yifita / DSS

Differentiable Surface Splatting
442 stars 31 forks source link

Supporting for newer pytorch version #16

Closed ray8828 closed 2 years ago

ray8828 commented 2 years ago

Hi, thanks for sharing this great project, I tried to compile dss with pytorch 1.10, but the during running there is undefined_symbol error, will this project going to support pytorch 1.10 or later? thanks

/home/ray/anaconda3/envs/dss/lib/python3.8/site-packages/pytorch3d/structures/meshes.py:1108: UserWarning:

__floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').

Traceback (most recent call last):
  File "train_mvr.py", line 74, in <module>
    model = config.create_model(
  File "/mnt/Datasets/projects/DSS/config.py", line 184, in create_model
    renderer = create_renderer(cfg.renderer).to(device)
  File "/mnt/Datasets/projects/DSS/config.py", line 244, in create_renderer
    Raster = get_class_from_string(render_opt.raster_type)
  File "/mnt/Datasets/projects/DSS/DSS/utils/__init__.py", line 71, in get_class_from_string
    mod = importlib.import_module(cls_str[:i])
  File "/home/ray/anaconda3/envs/dss/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/mnt/Datasets/projects/DSS/DSS/core/rasterizer.py", line 21, in <module>
    from .. import _C, logger_py
ImportError: /mnt/Datasets/projects/DSS/DSS/_C.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZNK2at6Tensor7is_cudaEv
lxxue commented 2 years ago

Hi, sorry we didn't test for newer versions of pytorch. But I think it would be good to stick with the old version of pytorch and pytorch3d. The newer version of pytorch3d seems to introduce some incompatible changes for this repo.