• Jeremy Reizenstein's avatar
    Take care with single integers on gpu · 7f1e63ae
    Jeremy Reizenstein authored
    Summary:
    Pytorch seems to be becoming stricter about integer tensors of shape `(1,)` on GPU and not allowing them to be used as `int`s. For example the following no longer works on pytorch master,
        foo = torch.tensor([3, 5, 3], device="cuda:0")
        torch.arange(10) + foo[0]
    because this is the sum of tensors on different devices.
    
    Here fix tests which recently broke because of this.
    
    Reviewed By: nikhilaravi
    
    Differential Revision: D21929745
    
    fbshipit-source-id: 25374f70468d1c895372766f1a9dd61df0833957
    7f1e63ae
test_point_mesh_distance.py 28.8 KB