-
Notifications
You must be signed in to change notification settings - Fork 35
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
python3 run.py failed #5
Comments
Same issue here, when trying to compile inside of the official NVIDIA Docker image:
|
I fixed the issue by removing "extra_cflags=['/wd4624'] " while my device is on Ubuntu 20.04. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(gh_baize-chatbot) ub2004@ub2004-B85M-A0:~/llm_dev/RWKV-CUDA/wkv$ python3 run.py
Using /home/ub2004/.cache/torch_extensions/py38_cu117 as PyTorch extensions root...
Creating extension directory /home/ub2004/.cache/torch_extensions/py38_cu117/wkv...
Detected CUDA files, patching ldflags
Emitting ninja build file /home/ub2004/.cache/torch_extensions/py38_cu117/wkv/build.ninja...
Building extension module wkv...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/3] c++ -MMD -MF wkv_op.o.d -DTORCH_EXTENSION_NAME=wkv -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /home/ub2004/.local/lib/python3.8/site-packages/torch/include -isystem /home/ub2004/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/ub2004/.local/lib/python3.8/site-packages/torch/include/TH -isystem /home/ub2004/.local/lib/python3.8/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /usr/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 /wd4624 -c /home/ub2004/llm_dev/RWKV-CUDA/wkv/cuda/wkv_op.cpp -o wkv_op.o
FAILED: wkv_op.o
c++ -MMD -MF wkv_op.o.d -DTORCH_EXTENSION_NAME=wkv -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /home/ub2004/.local/lib/python3.8/site-packages/torch/include -isystem /home/ub2004/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/ub2004/.local/lib/python3.8/site-packages/torch/include/TH -isystem /home/ub2004/.local/lib/python3.8/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /usr/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 /wd4624 -c /home/ub2004/llm_dev/RWKV-CUDA/wkv/cuda/wkv_op.cpp -o wkv_op.o
c++: error: /wd4624: No such file or directory
[2/3] /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=wkv -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /home/ub2004/.local/lib/python3.8/site-packages/torch/include -isystem /home/ub2004/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/ub2004/.local/lib/python3.8/site-packages/torch/include/TH -isystem /home/ub2004/.local/lib/python3.8/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /usr/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_BFLOAT16_CONVERSIONS -D__CUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 --compiler-options '-fPIC' --use_fast_math --extra-device-vectorization -std=c++17 -c /home/ub2004/llm_dev/RWKV-CUDA/wkv/cuda/wkv_cuda_v2.cu -o wkv_cuda_v2.cuda.o
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/home/ub2004/.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1893, in _run_ninja_build
subprocess.run(
File "/usr/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
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 "run.py", line 86, in
wkv_cuda = load(name="wkv", sources=["cuda/wkv_op.cpp", f"cuda/wkv_cuda_v{CUDA_KERNEL_VERSION}.cu"],
File "/home/ub2004/.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1284, in load
return _jit_compile(
File "/home/ub2004/.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1509, in _jit_compile
_write_ninja_file_and_build_library(
File "/home/ub2004/.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1624, in _write_ninja_file_and_build_library
_run_ninja_build(
File "/home/ub2004/.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1909, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'wkv'
(gh_baize-chatbot) ub2004@ub2004-B85M-A0:~/llm_dev/RWKV-CUDA/wkv$
The text was updated successfully, but these errors were encountered: