NVIDIAGameWorks/kaolin

ImportError Upon Trying To Use dmtet_tutorial.ipynb

nkwade opened this issue · 2 comments

I have cloned the kaolin repo and I am trying to get the dmtet_tutorial Jupyter Notebook to work and I create a conda virtual enviroment and follow all the setup steps for the kaolin before I try to run the notebook. It required kaolin to be imported as a package so I install that as well, then when I run the first cell in the notebook (see first image) I am given a weird import error which is the following:

ImportError Traceback (most recent call last)
Cell In[2], line 2
1 import torch
----> 2 import kaolin
3 import numpy as np
4 from dmtet_network import Decoder

File ~/.conda/envs/cent7/2020.11-py38/pointe/lib/python3.8/site-packages/kaolin/init.py:1
----> 1 from . import io
2 from . import metrics
3 from . import ops

File ~/.conda/envs/cent7/2020.11-py38/pointe/lib/python3.8/site-packages/kaolin/io/init.py:5
3 from . import obj
4 from . import off
----> 5 from . import render
6 from . import shapenet
7 from . import usd

File ~/.conda/envs/cent7/2020.11-py38/pointe/lib/python3.8/site-packages/kaolin/io/render.py:23
21 import numpy as np
22 from PIL import Image
---> 23 from ..render.camera import generate_perspective_projection
26 def import_synthetic_view(root_dir, idx, rgb=True, depth_linear=False,
...
---> 17 from kaolin import _C
19 class _TileToPackedCuda(torch.autograd.Function):
20 """torch.autograd.function wrapper for :func:tile_to_packed CUDA implementations"""

ImportError: /home/nkwade/.conda/envs/cent7/2020.11-py38/pointe/lib/python3.8/site-packages/kaolin/_C.so: undefined symbol: _ZNK3c1010TensorImpl36is_contiguous_nondefault_policy_implENS_12MemoryFormatE

Image 1:
image

I think this is beyond my knowledge and this is my first every github issue ive published so please let me know if I did anything wrong! Thanks in advance!

Hi @nkwade , usually that happens when the torch version you are using is not matching the one you've built the library with OR not matching the cuda version you've built the library with.

Make sure you are building the library with the same cuda than torch (see installation instructions: https://kaolin.readthedocs.io/en/latest/notes/installation.html)

Also just to be sure before reinstalling, remove all the build files:

rm -rf build/ kaolin/_C.so kaolin.egg-info

Please copy paste the installation logs here in case that is still happening