Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install failed #13

Open
KIDxiaoyuan opened this issue Nov 30, 2021 · 1 comment
Open

install failed #13

KIDxiaoyuan opened this issue Nov 30, 2021 · 1 comment

Comments

@KIDxiaoyuan
Copy link

PyTorchEMD/cuda/emd_kernel.cu(181): error: identifier "AT_CHECK" is undefined

in running setup
(base) server1@server1:/data/PythonCodes/XiaoYuan/PyTorchEMD$ python setup.py install
running install
running bdist_egg
running egg_info
creating emd_ext.egg-info
writing emd_ext.egg-info/PKG-INFO
writing dependency_links to emd_ext.egg-info/dependency_links.txt
writing top-level names to emd_ext.egg-info/top_level.txt
writing manifest file 'emd_ext.egg-info/SOURCES.txt'
reading manifest file 'emd_ext.egg-info/SOURCES.txt'
writing manifest file 'emd_ext.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
/home/server1/anaconda3/lib/python3.7/site-packages/torch/utils/cpp_extension.py:782: UserWarning: The detected CUDA version (11.1) has a minor version mismatch with the version that was used to compile PyTorch (11.3). Most likely this shouldn't be a problem.
warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
building 'emd_cuda' extension
creating /data/PythonCodes/XiaoYuan/PyTorchEMD/build
creating /data/PythonCodes/XiaoYuan/PyTorchEMD/build/temp.linux-x86_64-3.7
creating /data/PythonCodes/XiaoYuan/PyTorchEMD/build/temp.linux-x86_64-3.7/cuda
Emitting ninja build file /data/PythonCodes/XiaoYuan/PyTorchEMD/build/temp.linux-x86_64-3.7/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/2] /home/server1/home/cuda11.1/bin/nvcc -I/home/server1/anaconda3/lib/python3.7/site-packages/torch/include -I/home/server1/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/server1/anaconda3/lib/python3.7/site-packages/torch/include/TH -I/home/server1/anaconda3/lib/python3.7/site-packages/torch/include/THC -I/home/server1/home/cuda11.1/include -I/home/server1/anaconda3/include/python3.7m -c -c /data/PythonCodes/XiaoYuan/PyTorchEMD/cuda/emd_kernel.cu -o /data/PythonCodes/XiaoYuan/PyTorchEMD/build/temp.linux-x86_64-3.7/cuda/emd_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_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
FAILED: /data/PythonCodes/XiaoYuan/PyTorchEMD/build/temp.linux-x86_64-3.7/cuda/emd_kernel.o
/home/server1/home/cuda11.1/bin/nvcc -I/home/server1/anaconda3/lib/python3.7/site-packages/torch/include -I/home/server1/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/server1/anaconda3/lib/python3.7/site-packages/torch/include/TH -I/home/server1/anaconda3/lib/python3.7/site-packages/torch/include/THC -I/home/server1/home/cuda11.1/include -I/home/server1/anaconda3/include/python3.7m -c -c /data/PythonCodes/XiaoYuan/PyTorchEMD/cuda/emd_kernel.cu -o /data/PythonCodes/XiaoYuan/PyTorchEMD/build/temp.linux-x86_64-3.7/cuda/emd_kernel.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
_ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_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
/data/PythonCodes/XiaoYuan/PyTorchEMD/cuda/emd_kernel.cu(181): error: identifier "AT_CHECK" is undefined

/data/PythonCodes/XiaoYuan/PyTorchEMD/cuda/emd_kernel.cu(268): error: identifier "AT_CHECK" is undefined

/data/PythonCodes/XiaoYuan/PyTorchEMD/cuda/emd_kernel.cu(385): error: identifier "AT_CHECK" is undefined

3 errors detected in the compilation of "/data/PythonCodes/XiaoYuan/PyTorchEMD/cuda/emd_kernel.cu".
[2/2] c++ -MMD -MF /data/PythonCodes/XiaoYuan/PyTorchEMD/build/temp.linux-x86_64-3.7/cuda/emd.o.d -pthread -B /home/server1/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/server1/anaconda3/lib/python3.7/site-packages/torch/include -I/home/server1/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/server1/anaconda3/lib/python3.7/site-packages/torch/include/TH -I/home/server1/anaconda3/lib/python3.7/site-packages/torch/include/THC -I/home/server1/home/cuda11.1/include -I/home/server1/anaconda3/include/python3.7m -c -c /data/PythonCodes/XiaoYuan/PyTorchEMD/cuda/emd.cpp -o /data/PythonCodes/XiaoYuan/PyTorchEMD/build/temp.linux-x86_64-3.7/cuda/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
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/home/server1/anaconda3/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1723, in _run_ninja_build
env=env)
File "/home/server1/anaconda3/lib/python3.7/subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "setup.py", line 26, in
'build_ext': BuildExtension
File "/home/server1/anaconda3/lib/python3.7/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/server1/anaconda3/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/server1/anaconda3/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/server1/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/server1/anaconda3/lib/python3.7/site-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/home/server1/anaconda3/lib/python3.7/site-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/home/server1/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/server1/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/server1/anaconda3/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 164, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/home/server1/anaconda3/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 150, in call_command
self.run_command(cmdname)
File "/home/server1/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/server1/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/server1/anaconda3/lib/python3.7/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/home/server1/anaconda3/lib/python3.7/distutils/command/install_lib.py", line 107, in build
self.run_command('build_ext')
File "/home/server1/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/server1/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/server1/anaconda3/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/home/server1/anaconda3/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/home/server1/anaconda3/lib/python3.7/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/home/server1/anaconda3/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 735, in build_extensions
build_ext.build_extensions(self)
File "/home/server1/anaconda3/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/home/server1/anaconda3/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/home/server1/anaconda3/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/home/server1/anaconda3/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 202, in build_extension
_build_ext.build_extension(self, ext)
File "/home/server1/anaconda3/lib/python3.7/distutils/command/build_ext.py", line 534, in build_extension
depends=ext.depends)
File "/home/server1/anaconda3/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 565, in unix_wrap_ninja_compile
with_cuda=with_cuda)
File "/home/server1/anaconda3/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1404, in _write_ninja_file_and_compile_objects
error_prefix='Error compiling objects for extension')
File "/home/server1/anaconda3/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1733, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension

@tommaoer
Copy link

hi, you can refer to this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants