I would guess PyTorch 0.4.0 might use a min. compute capability of 3.5 while your device uses 3.0.
Take a look at the stack trace and try to check which operation / function call fails.
Once you’ve isolated it, check which compute capability introduced it.