PyTorchEMD icon indicating copy to clipboard operation
PyTorchEMD copied to clipboard

Any updates for CUDA?

Open fsbarros98 opened this issue 1 year ago • 4 comments

Is there any way to install this with CUDA 11.8 and PyTorch 2.2? I've followed the tips in https://github.com/daerduoCarey/PyTorchEMD/issues/6 and was able to install but when running I get the following error:

    match = emd_cuda.approxmatch_forward(xyz1, xyz2)

     RuntimeError: Unknown layout

fsbarros98 avatar Mar 19 '24 14:03 fsbarros98

Hi, I am able to run with CUDA 11.8, PyTorch 2.2.1 and Python 3.11.8. However, others that seem to have the same error with PyTorch 2.2.1 suggest to downgrade to PyTorch 2.1.0 as it appears to be a torch problem, see e.g. https://github.com/Vahe1994/AQLM/issues/20.

Hope it helps!

stefanengelmann avatar Mar 25 '24 14:03 stefanengelmann

Hi, I am able to run with CUDA 11.8, PyTorch 2.2.1 and Python 3.11.8. However, others that seem to have the same error with PyTorch 2.2.1 suggest to downgrade to PyTorch 2.1.0 as it appears to be a torch problem, see e.g. Vahe1994/AQLM#20.

Hope it helps!

Hello @stefanengelmann, thanks for your information. I was wondering what is your gcc version?

xiaozhi-alan-zhu avatar May 27 '24 07:05 xiaozhi-alan-zhu

I also followed the suggestion in https://github.com/daerduoCarey/PyTorchEMD/issues/6, but still get the error.

Here is the error message:

Loading extension module emd_ext...
load emd_ext time: 25.744s
Traceback (most recent call last):
  File "/home/pandu/Documents/Research-Projects/diffusion_models/LION/test_func.py", line 18, in <module>
    res = emd_cuda.approxmatch_forward(a, b)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: CUDA error: an illegal memory access was encountered

Following are the code snippet that caused the error:

import torch
from third_party.PyTorchEMD.backend import emd_cuda_dynamic as emd_cuda 


dim = 3
num_samples = 1
num_points = 100
a = torch.rand((num_samples, num_points, dim)).cuda()
b = torch.rand((num_samples, num_points, dim)).cuda()
res = emd_cuda.approxmatch_forward(a, b)

xiaozhi-alan-zhu avatar May 27 '24 07:05 xiaozhi-alan-zhu

Does this repo support for cuda 12.1?

Xunmenggod avatar Sep 12 '24 03:09 Xunmenggod