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

debug ProgramEntrance_1.py get a error:opset version is not supported, can not generate dispatching scheme with op /model.10/Resize(Resize), currently we support only [(10, 13)], however 16 was given. #579

Open
tuantuanyyyy opened this issue Oct 21, 2024 · 1 comment

Comments

@tuantuanyyyy
Copy link

hi, i tried to debug the code Entrance_1.py according to the idea in the this video
https://www.bilibili.com/video/BV1934y147p2/?spm_id_from=333.788.videopod.sections&vd_source=c276bd4c8dbb36d81805cd3ae2fc2946
but i have some errors blow:

Traceback (most recent call last):
File "/root/liq/fde/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1900, in _run_ninja_build
subprocess.run(
File "/usr/lib/python3.10/subprocess.py", line 524, 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 "/root/liq/ppq_quantize/ppq_quantization.py", line 96, in
with ENABLE_CUDA_KERNEL():
File "/root/liq/fde/lib/python3.10/site-packages/ppq/api/interface.py", line 927, in init
CUDA_COMPLIER.complie()
File "/root/liq/fde/lib/python3.10/site-packages/ppq/core/ffi.py", line 29, in complie
self.CUDA_EXTENTION = load(
File "/root/liq/fde/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1284, in load
return jit_compile(
File "/root/liq/fde/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1508, in jit_compile
write_ninja_file_and_build_library(
File "/root/liq/fde/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1623, in write_ninja_file_and_build_library
run_ninja_build(
File "/root/liq/fde/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1916, in run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'PPQ_Cuda_Impls': [1/5] /usr/bin/nvcc -DTORCH_EXTENSION_NAME=PPQ_Cuda_Impls -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/TH -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/THC -isystem /usr/include/python3.10 -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -std=c++14 -c /root/liq/fde/lib/python3.10/site-packages/ppq/csrc/cuda/linear.cu -o linear.cuda.o
FAILED: linear.cuda.o
/usr/bin/nvcc -DTORCH_EXTENSION_NAME=PPQ_Cuda_Impls -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/TH -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/THC -isystem /usr/include/python3.10 -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -std=c++14 -c /root/liq/fde/lib/python3.10/site-packages/ppq/csrc/cuda/linear.cu -o linear.cuda.o
nvcc fatal : Unsupported gpu architecture 'compute_86'
[2/5] /usr/bin/nvcc -DTORCH_EXTENSION_NAME=PPQ_Cuda_Impls -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/TH -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/THC -isystem /usr/include/python3.10 -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -std=c++14 -c /root/liq/fde/lib/python3.10/site-packages/ppq/csrc/cuda/sort.cu -o sort.cuda.o
FAILED: sort.cuda.o
/usr/bin/nvcc -DTORCH_EXTENSION_NAME=PPQ_Cuda_Impls -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/TH -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/THC -isystem /usr/include/python3.10 -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -std=c++14 -c /root/liq/fde/lib/python3.10/site-packages/ppq/csrc/cuda/sort.cu -o sort.cuda.o
nvcc fatal : Unsupported gpu architecture 'compute_86'
[3/5] /usr/bin/nvcc -DTORCH_EXTENSION_NAME=PPQ_Cuda_Impls -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/TH -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/THC -isystem /usr/include/python3.10 -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -std=c++14 -c /root/liq/fde/lib/python3.10/site-packages/ppq/csrc/cuda/train.cu -o train.cuda.o
FAILED: train.cuda.o
/usr/bin/nvcc -DTORCH_EXTENSION_NAME=PPQ_Cuda_Impls -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/TH -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/THC -isystem /usr/include/python3.10 -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -std=c++14 -c /root/liq/fde/lib/python3.10/site-packages/ppq/csrc/cuda/train.cu -o train.cuda.o
nvcc fatal : Unsupported gpu architecture 'compute_86'
[4/5] /usr/bin/nvcc -DTORCH_EXTENSION_NAME=PPQ_Cuda_Impls -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/TH -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/THC -isystem /usr/include/python3.10 -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -std=c++14 -c /root/liq/fde/lib/python3.10/site-packages/ppq/csrc/cuda/floating.cu -o floating.cuda.o
FAILED: floating.cuda.o
/usr/bin/nvcc -DTORCH_EXTENSION_NAME=PPQ_Cuda_Impls -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/TH -isystem /root/liq/fde/lib/python3.10/site-packages/torch/include/THC -isystem /usr/include/python3.10 -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -std=c++14 -c /root/liq/fde/lib/python3.10/site-packages/ppq/csrc/cuda/floating.cu -o floating.cuda.o
nvcc fatal : Unsupported gpu architecture 'compute_86'
ninja: build stopped: subcommand failed.

my gpu is rtx3090. what cause this bug?thank you for your attention to my problem.

@tuantuanyyyy tuantuanyyyy changed the title 测试ProgramEntrance_1.py报错:nvcc fatal : Unsupported gpu architecture 'compute_86' debug ProgramEntrance_1.py get a error:nvcc fatal : Unsupported gpu architecture 'compute_86' Oct 21, 2024
@tuantuanyyyy
Copy link
Author

i search issue and find someone said that with ENABLE_CUDA_KERNEL(): with ENABLE_CUDA_KERNEL(): can be try to deleted.
but also get a new error:

Traceback (most recent call last):
File "/root/liq/ppq_quantize/ppq_quantization.py", line 98, in
quantized = quantize_native_model(
File "/root/liq/fde/lib/python3.10/site-packages/ppq/core/defs.py", line 54, in _wrapper
return func(*args, **kwargs)
File "/root/liq/fde/lib/python3.10/site-packages/ppq/api/interface.py", line 518, in quantize_native_model
ppq_ir = dispatch_graph(graph=model, platform=platform,
File "/root/liq/fde/lib/python3.10/site-packages/ppq/api/interface.py", line 675, in dispatch_graph
dispatching_table = dispatcher.dispatch(
File "/root/liq/fde/lib/python3.10/site-packages/ppq/scheduler/dispatchers.py", line 199, in dispatch
recivers, generators = SOI_receivers(graph), SOI_generators(graph)
File "/root/liq/fde/lib/python3.10/site-packages/ppq/scheduler/base.py", line 63, in SOI_receivers
for idx, plat in enumerate(operation.socket.in_plat):
File "/root/liq/fde/lib/python3.10/site-packages/ppq/IR/base/graph.py", line 172, in socket
return DEFAULT_SOCKET_TABLEself.type
File "/root/liq/fde/lib/python3.10/site-packages/ppq/IR/base/opdef.py", line 307, in Resize_Socket
CHECK_OPSET(op=op, min_version_supported=10, max_version_supported=13, strict_check=True)
File "/root/liq/fde/lib/python3.10/site-packages/ppq/IR/base/opdef.py", line 191, in CHECK_OPSET
raise TypeError(
TypeError: opset version is not supported, can not generate dispatching scheme with op /model.10/Resize(Resize), currently we support only [(10, 13)], however 16 was given.

i want to know how can i try to solve this problem
thanks you.

@tuantuanyyyy tuantuanyyyy changed the title debug ProgramEntrance_1.py get a error:nvcc fatal : Unsupported gpu architecture 'compute_86' debug ProgramEntrance_1.py get a error:opset version is not supported, can not generate dispatching scheme with op /model.10/Resize(Resize), currently we support only [(10, 13)], however 16 was given. Oct 21, 2024
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

1 participant