nv-tlabs / NKSR

[CVPR 2023 Highlight] Neural Kernel Surface Reconstruction
https://research.nvidia.com/labs/toronto-ai/NKSR
Other
735 stars 43 forks source link

Torch 1.13.0 + CUDA 11.6 error when import _C #43

Closed hungdche closed 11 months ago

hungdche commented 11 months ago

Hi,

I'm running into this error while trying to install nksr. My torch version is 1.13.0, and my CUDA version is 11.6, so I download nksr using the following command:

pip install -U nksr -f https://nksr.huangjh.tech/whl/torch-1.13.0+cu116.html

However, when I ran python examples/recons_waymo.py, I ran into this error

Traceback (most recent call last):
  File "/.../NKSR/examples/recons_waymo.py", line 10, in <module>
    import nksr
  File "/.../.local/lib/python3.9/site-packages/nksr/__init__.py", line 18, in <module>
    from nksr.nn.unet import SparseStructureNet
  File "/.../.local/lib/python3.9/site-packages/nksr/nn/__init__.py", line 10, in <module>
    from .modules import Conv3d, GroupNorm, Activation, GroupNorm, MaxPooling, Upsampling, SparseZeroPadding
  File "/.../.local/lib/python3.9/site-packages/nksr/nn/modules.py", line 14, in <module>
    from nksr.svh import SparseFeatureHierarchy, KernelMap, VoxelStatus
  File "/.../.local/lib/python3.9/site-packages/nksr/svh.py", line 14, in <module>
    from nksr.ext import _CpuIndexGrid, _CudaIndexGrid
  File "/.../.local/lib/python3.9/site-packages/nksr/ext.py", line 9, in <module>
    from nksr import _C
ImportError: /.../.local/lib/python3.9/site-packages/nksr/_C.so: undefined symbol: _ZN2at4_ops5zeros4callEN3c108ArrayRefINS2_6SymIntEEENS2_8optionalINS2_10ScalarTypeEEENS6_INS2_6LayoutEEENS6_INS2_6DeviceEEENS6_IbEE

I check my torch version with python -c "import torch; print(torch.__version__)"

1.13.0.dev20220616

and cuda version with nvcc --version

Copyright (c) 2005-2022 NVIDIA Corporation
Built on Thu_Feb_10_18:23:41_PST_2022
Cuda compilation tools, release 11.6, V11.6.112
Build cuda_11.6.r11.6/compiler.30978841_0

Any help is much appreciated. Thanks!

heiwang1997 commented 11 months ago

Hey @hungdche your download command should be correct. The 1.13.0.dev20220616 is a bit suspicious though. Did you install torch in a standard way (such as pip or conda)?

hungdche commented 11 months ago

Hi. I'm not sure since torch was preinstalled. I updated to torch2.0.0 and it works now. Thanks!