Solved by tom in post #2 
              
              
                torch.jit.load(...., map_location="cuda") will work on master. 
scripted_module = torch.jit.script(torch.nn.Linear(2, 3).eval())
frozen_module = torch.jit.freeze(scripted_module)
assert len(list(frozen_module.named_parameters())) == 0
print(frozen_module.code)
frozen_module.save('/tmp/x.pt')

and th…