Closed haihan19955 closed 2 years ago
I just compiled the extensions file by using setup.py. It seems that I cannot correctly get emd_cuda. and so as chamfer_3D module.
`/workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance# python setup.py build running build running build_ext building 'emd_cuda' extension Emitting ninja build file /workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance/build/temp.linux-x86_64-3.8/build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) [1/2] /usr/local/cuda/bin/nvcc -I/usr/local/lib/python3.8/dist-packages/torch/include -I/usr/local/lib/python3.8/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.8/dist-packages/torch/include/TH -I/usr/local/lib/python3.8/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.8 -c -c /workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance/emd_kernel.cu -o /workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance/build/temp.linux-x86_64-3.8/emd_kernel.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=emd_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 [2/2] c++ -MMD -MF /workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance/build/temp.linux-x86_64-3.8/emd.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/local/lib/python3.8/dist-packages/torch/include -I/usr/local/lib/python3.8/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.8/dist-packages/torch/include/TH -I/usr/local/lib/python3.8/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.8 -c -c /workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance/emd.cpp -o /workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance/build/temp.linux-x86_64-3.8/emd.o -g -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=emd_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 root@63b600344976:/workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance# root@63b600344976:/workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance# root@63b600344976:/workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance# python Python 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.
import emd_cuda Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'emd_cuda'`
Are there any solutions?
Please use python setup.py install.
python setup.py install
I just compiled the extensions file by using setup.py. It seems that I cannot correctly get emd_cuda. and so as chamfer_3D module.
`/workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance# python setup.py build running build running build_ext building 'emd_cuda' extension Emitting ninja build file /workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance/build/temp.linux-x86_64-3.8/build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) [1/2] /usr/local/cuda/bin/nvcc -I/usr/local/lib/python3.8/dist-packages/torch/include -I/usr/local/lib/python3.8/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.8/dist-packages/torch/include/TH -I/usr/local/lib/python3.8/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.8 -c -c /workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance/emd_kernel.cu -o /workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance/build/temp.linux-x86_64-3.8/emd_kernel.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=emd_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 [2/2] c++ -MMD -MF /workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance/build/temp.linux-x86_64-3.8/emd.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/local/lib/python3.8/dist-packages/torch/include -I/usr/local/lib/python3.8/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.8/dist-packages/torch/include/TH -I/usr/local/lib/python3.8/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.8 -c -c /workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance/emd.cpp -o /workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance/build/temp.linux-x86_64-3.8/emd.o -g -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=emd_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 root@63b600344976:/workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance# root@63b600344976:/workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance# root@63b600344976:/workspaces/pytorch/PCN-PyTorch/extensions/earth_movers_distance# python Python 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.
Are there any solutions?