Closed RuiqiaoHe closed 1 year ago
Hi @RuiqiaoHe,
It looks like you have a mismatch between your CUDA version (12.0) and the version used to compile PyTorch (11.7).
The most recent version of PyTorch only includes up to 11.8, so you may need to downgrade your CUDA to 11.7 or 11.8 and ensure you have the PyTorch installed with the same version. You can find installation instructions here (make sure you select the right CUDA version under "compute platform").
If you must use CUDA 12, I believe you may need to build PyTorch yourself, although it looks like they haven't finalized support for CUDA 12 so you may run into more issues with this route.
Thank you for quick reply. I have downgrade my CUDA to 11.8 with conda install -c "nvidia/label/cuda-11.8.0" cuda-toolkit
. However, new problem arises:
warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler))
/A/anaconda2/envs/gpu/lib/python3.8/site-packages/torch/utils/cpp_extension.py:387: UserWarning: The detected CUDA version (11.8) has a minor version mismatch with the version that was used to compile PyTorch (11.7). Most likely this shouldn't be a problem.
warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
/A/anaconda2/envs/gpu/lib/python3.8/site-packages/torch/utils/cpp_extension.py:397: UserWarning: There are no g++ version bounds defined for CUDA version 11.8
warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
building 'torchsort.isotonic_cpu' extension
creating build/temp.linux-x86_64-cpython-38
creating build/temp.linux-x86_64-cpython-38/torchsort
gcc -pthread -B /A/anaconda2/envs/gpu/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/A/software/R-3.4.4/include -fPIC -I/A/anaconda2/envs/gpu/lib/python3.8/site-packages/torch/include -I/A/anaconda2/envs/gpu/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/A/anaconda2/envs/gpu/lib/python3.8/site-packages/torch/include/TH -I/A/anaconda2/envs/gpu/lib/python3.8/site-packages/torch/include/THC -I/A/anaconda2/envs/gpu/include/python3.8 -c torchsort/isotonic_cpu.cpp -o build/temp.linux-x86_64-cpython-38/torchsort/isotonic_cpu.o -fopenmp -ffast-math -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=isotonic_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
g++ -pthread -B /A/anaconda2/envs/gpu/compiler_compat -Wl,--sysroot=/ -pthread -shared -B /A/anaconda2/envs/gpu/compiler_compat -L/A/anaconda2/envs/gpu/lib -Wl,-rpath=/A/anaconda2/envs/gpu/lib -Wl,--no-as-needed -Wl,--sysroot=/ -L/A/software/R-3.4.4/lib -I/A/software/R-3.4.4/include build/temp.linux-x86_64-cpython-38/torchsort/isotonic_cpu.o -L/A/anaconda2/envs/gpu/lib/python3.8/site-packages/torch/lib -lc10 -ltorch -ltorch_cpu -ltorch_python -o build/lib.linux-x86_64-cpython-38/torchsort/isotonic_cpu.cpython-38-x86_64-linux-gnu.so
error: command '/A/anaconda2/bin/g++' failed: Exec format error
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> torchsort
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
My g++ is 4.8.5, however it seems that the version mismatch is a warning message. Could you please help me fix it?
I updated my GCC to 6.3.0 and solved this problem. Thanks a lot!
I tried to install torchsort in my linux environment with: Python 3.8.10 CUDA V12.0.140 PyTorch 1.13.0
After pip install, the error is:
Could you please help me with this problem? Thank you very much.