mit-han-lab / spvnas

[ECCV 2020] Searching Efficient 3D Architectures with Sparse Point-Voxel Convolution
http://spvnas.mit.edu/
MIT License
585 stars 109 forks source link

Compatibility with cuda 11.x #83

Closed Pamphlett closed 2 years ago

Pamphlett commented 2 years ago

Hi!

Thanks for sharing your code! That's awesome!

I encountered a compatibility issue while running the code. I got a RTX30 series card so I ran conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch to make cuda compatible with the hardware. However, errors occur when I trying to play with the simple example provided in tutorial.ipynb.

(torch) ➜  spvnas git:(master) ✗ python3 pam_test.py 
Traceback (most recent call last):
  File "pam_test.py", line 60, in <module>
    model = spvnas_specialized('SemanticKITTI_val_SPVNAS@65GMACs').cuda()
  File "/home/pamphlett/spvnas/model_zoo.py", line 44, in spvnas_specialized
    model = model.determinize()
  File "/home/pamphlett/spvnas/core/models/semantic_kitti/spvnas.py", line 295, in determinize
    x = self.forward(x)
  File "/home/pamphlett/spvnas/core/models/semantic_kitti/spvnas.py", line 312, in forward
    x0 = point_to_voxel(x, z)
  File "/home/pamphlett/spvnas/core/models/utils.py", line 44, in point_to_voxel
    ], 1))
  File "/home/pamphlett/anaconda3/envs/torch/lib/python3.7/site-packages/torchsparse/nn/functional/hash.py", line 19, in sphash
    return torchsparse.backend.hash_cuda(coords)
AttributeError: module 'torchsparse.backend' has no attribute 'hash_cuda'

Any idea about this? Thx :)

CCInc commented 2 years ago

Hi, this seems to be a torchsparse issue, please follow the installation and troubleshooting steps specified here: https://github.com/mit-han-lab/torchsparse#installation and open an issue on that repo if you continue to have issues. Thanks!