mit-han-lab / torchsparse

[MICRO'23, MLSys'22] TorchSparse: Efficient Training and Inference Framework for Sparse Convolution on GPUs.
https://torchsparse.mit.edu
MIT License
1.16k stars 132 forks source link

[Installation] <title> ImportError: cannot import name 'PointTensor' from 'torchsparse.tensor' #230

Closed zeliangDing closed 10 months ago

zeliangDing commented 11 months ago

Is there an existing issue for this?

Have you followed all the steps in the FAQ?

Current Behavior

When I use "https://github.com/zju3dv/NeuralRecon" , run " python demo.py --cfg ./config/demo.yaml" Some trouble happened,like this

图片

Error Line

ImportError: cannot import name 'PointTensor' from 'torchsparse.tensor' 10

Environment

- GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
- NVCC:  Cuda compilation tools, release 11.1, V11.1.105
- PyTorch: 1.9.0
- PyTorch CUDA: 1.9.0+cu111

Full Error Log

Error Log [PUT YOUR ERROR LOG HERE]
zhijian-liu commented 11 months ago

We've removed the definition of PointTensor in the latest version. You may refer to https://github.com/mit-han-lab/spvnas/commit/08570cf687622c4d5a5cfa2d7d5f3dcb629222d1 for necessary changes to use the latest TorchSparse. Alternatively, you could also downgrade to v2.0.0.

zeliangDing commented 11 months ago

@zhijian-liu @Shadow581 Thanks. I hope this problem will fixed early!

tiancaipipi110 commented 10 months ago

v2.0.0

@zhijian-liu What's the installation guide for 2.0.0? Which cuda and pytorch should one use for python 3.8? python -c "$(curl -fsSL https://raw.githubusercontent.com/mit-han-lab/torchsparse/master/install.py)"only installs 2.1.0. The wheels listed on this site are all v2.1.0

zhijian-liu commented 10 months ago

@tiancaipipi110, you could try to install the previous version by

pip install --upgrade git+https://github.com/mit-han-lab/torchsparse.git@v2.0.0
Amber0913 commented 9 months ago

@zhijian-liu Could you provide the wheels of v2.0.0?I encountered an installation error when using this statement pip install --upgrade git+https://github.com/mit-han-lab/torchsparse.git@v2.0.0.