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

quant_cuda does not compile. #64

Open
4rrw opened this issue Nov 21, 2022 · 0 comments
Open

quant_cuda does not compile. #64

4rrw opened this issue Nov 21, 2022 · 0 comments

Comments

@4rrw
Copy link

4rrw commented Nov 21, 2022

When i call qtorch.quant i receive message:

Traceback (most recent call last):
  File "/home/.../anaconda3/envs/qtorch/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1900, in _run_ninja_build
    `subprocess.run(`
  File "/home/.../anaconda3/envs/qtorch/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 "<string>", line 1, in <module>
  File "/home/.../anaconda3/envs/qtorch/lib/python3.10/site-packages/qtorch/quant/__init__.py", line 1, in <module>
    from .quant_function import *
  File "/home/.../anaconda3/envs/qtorch/lib/python3.10/site-packages/qtorch/quant/quant_function.py", line 20, in <module>
    quant_cuda = load(
  File "/home/.../anaconda3/envs/qtorch/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1284, in load
    return _jit_compile(
  File "/home/.../anaconda3/envs/qtorch/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1508, in _jit_compile
    _write_ninja_file_and_build_library(
  File "/home/.../anaconda3/envs/qtorch/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1623, in _write_ninja_file_and_build_library
    _run_ninja_build(
  File "/home/.../anaconda3/envs/qtorch/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 'quant_cuda': [1/1] c++ quant_cuda.o bit_helper.cuda.o sim_helper.cuda.o block_kernel.cuda.o float_kernel.cuda.o fixed_point_kernel.cuda.o quant.cuda.o -shared -L/home/.../anaconda3/envs/qtorch/lib/python3.10/site-packages/torch/lib -lc10 -lc10_cuda -ltorch_cpu -ltorch_cuda_cu -ltorch_cuda_cpp -ltorch -ltorch_python -L/home/.../anaconda3/envs/qtorch/lib64 -lcudart -o quant_cuda.so
FAILED: quant_cuda.so 
c++ quant_cuda.o bit_helper.cuda.o sim_helper.cuda.o block_kernel.cuda.o float_kernel.cuda.o fixed_point_kernel.cuda.o quant.cuda.o -shared -L/home/.../anaconda3/envs/qtorch/lib/python3.10/site-packages/torch/lib -lc10 -lc10_cuda -ltorch_cpu -ltorch_cuda_cu -ltorch_cuda_cpp -ltorch -ltorch_python -L/home/.../anaconda3/envs/qtorch/lib64 -lcudart -o quant_cuda.so
/home/.../anaconda3/envs/qtorch/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -lcudart
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Versions of requirements:
cuda: 11.6
python :3.10
pytorch: 1.13
gcc: 9.3.0
sphinx: 5.3.0

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