PyTorchEMD icon indicating copy to clipboard operation
PyTorchEMD copied to clipboard

Updated CUDA and PyTorch versions

Open ahariri13 opened this issue 4 years ago • 8 comments

Hello, I am interested in this code but I have CUDA 10.1 version and PyTorch 1.5. Is there a way to modify the setup accordingly ?

Thank you in advance

ahariri13 avatar Jun 26 '20 13:06 ahariri13

I've made a pull request but in the meantime, just change the deprecated AT_CHECK with TORCH_CHECK in the following lines and follow the installation steps. https://github.com/daerduoCarey/PyTorchEMD/blob/e5c0feb8c15741a858362f9c397d9ed4b8b1752b/cuda/emd_kernel.cu#L16-L17

cihanongun avatar Jul 08 '20 13:07 cihanongun

Thanks a lot! This work for me.

asurada404 avatar Sep 16 '20 17:09 asurada404

This works for me!(Pytorch 1.7 CUDA 10.2) Thanks a lot.

QhelDIV avatar Jan 04 '21 07:01 QhelDIV

Hi, does anyone know how to compile with CUDA 11.3 PyTorch 1.11?

XinYu-Andy avatar Jun 07 '22 14:06 XinYu-Andy

@XinYu-Andy I build PyTorchEMD successfully with PyTorch 1.11 and CUDA 11.0. I modified cuda/emd_kernel.cu as follows:

  1. Comment #include <THC/THC.h>
  2. Replace all THCudaCheck with C10_CUDA_CHECK

I hope this can be helpful!

bluestyle97 avatar Jun 23 '22 07:06 bluestyle97

2. C10_CUDA_CHECK

Thank you very much! It works for me!

XinYu-Andy avatar Sep 05 '22 04:09 XinYu-Andy

i successfully build PyTorchEMD,but when i run test_emd_loss.py, there comes another problem:Segmentation fault (core dumped)。does anyone know how to solve this?

@XinYu-Andy I build PyTorchEMD successfully with PyTorch 1.11 and CUDA 11.0. I modified cuda/emd_kernel.cu as follows:

  1. Comment #include <THC/THC.h>
  2. Replace all THCudaCheck with C10_CUDA_CHECK

I hope this can be helpful!

i successfully build PyTorchEMD,but when i run test_emd_loss.py, there comes another problem:Segmentation fault (core dumped)。does anyone know how to solve this?

Alhambra-H avatar Oct 25 '23 08:10 Alhambra-H

Thanks to @cihanongun and @bluestyle97, I build successfully with torch 2.0.0 and CUDA 11.7 by modified cuda/emd_kernel.cu as:

  1. Comment #include <THC/THC.h>
  2. Repalce all AT_CHECK with TORCH_CHECK
  3. Replace all THCudaCheck with C10_CUDA_CHECK
  4. Replace all CHECK_EQ with TORCH_CHECK_EQ

zhouzheyuan avatar Feb 22 '24 12:02 zhouzheyuan