ma-xu/pointMLP-pytorch

Failed to test PointMLP in classification_ModelNet40

kaimingkuang opened this issue · 3 comments

Hi,
I was trying to run pointMLP-pytorch/classification_ModelNet40/models/pointmlp.py and got the following error:

Traceback (most recent call last):
  File "../../pointMLP-pytorch/classification_ModelNet40/models/pointmlp.py", line 366, in <module>
    out = model(data)
  File "/kaiming-fast-vol/anaconda3/envs/pointmlp/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
  File "../../pointMLP-pytorch/classification_ModelNet40/models/pointmlp.py", line 338, in forward
    xyz, x = self.local_grouper_list[i](xyz, x.permute(0, 2, 1))  # [b,g,3]  [b,g,k,d]
  File "/kaiming-fast-vol/anaconda3/envs/pointmlp/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
  File "../../pointMLP-pytorch/classification_ModelNet40/models/pointmlp.py", line 161, in forward
    fps_idx = pointnet2_utils.furthest_point_sample(xyz, self.groups).long()  # [B, npoint]
  File "/kaiming-fast-vol/anaconda3/envs/pointmlp/lib/python3.7/site-packages/pointnet2_ops/pointnet2_utils.py", line 54, in forward
    out = _ext.furthest_point_sampling(xyz, npoint)
RuntimeError: falseINTERNAL ASSERT FAILED at "pointnet2_ops/_ext-src/src/sampling.cpp":83, please report a bug to PyTorch. CPU not supported

Here is my hardware/software configuration:

  • CPU: Intel(R) Xeon(R) Gold 6230 CPU @ 2.10GHz
  • GPU: NVIDIA A100
  • CUDA: 10.2
  • PyTorch: 1.10.1
  • Python: 3.7.16
    Can you help me with it? Thank you.

Turns out the FPS module does not support CPU mode. I sent the tensor and the model to GPU and fixed it:

if __name__ == '__main__':
    data = torch.rand(2, 3, 1024).cuda()
    print("===> testing pointMLP ...")
    model = pointMLP().cuda()
    out = model(data)
    print(out.shape)
ma-xu commented

@kaimingkuang The lib does not support cpu operations.

Thanks! It would be better if this test code could be fixed.