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

python3.x-dev (apt install, x should match your python3 version, ex: 3.8) #27

Open
lujl1209 opened this issue Oct 27, 2023 · 1 comment

Comments

@lujl1209
Copy link

Could you please provide some instruction on how to install python3.x-dev.
For example, I use python3.10.13, but I cannot find the package with command: sudo yum install python3.10-dev

And I have a problem below:
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
the error information is as below:
Traceback (most recent call last):
File "/home/GPU/jllu/work/project/lossless/code/diffusion/SynDiff-main_modified/train.py", line 861, in
init_processes(0, size, train_syndiff, args)
File "/home/GPU/jllu/work/project/lossless/code/diffusion/SynDiff-main_modified/train.py", line 724, in init_processes
fn(rank, gpu, args)
File "/home/GPU/jllu/work/project/lossless/code/diffusion/SynDiff-main_modified/train.py", line 188, in train_syndiff
from backbones.discriminator import Discriminator_small, Discriminator_large
File "/home/GPU/jllu/work/project/lossless/code/diffusion/SynDiff-main_modified/backbones/discriminator.py", line 12, in
from . import up_or_down_sampling
File "/home/GPU/jllu/work/project/lossless/code/diffusion/SynDiff-main_modified/backbones/up_or_down_sampling.py", line 15, in
from utils.op import upfirdn2d
File "/home/GPU/jllu/work/project/lossless/code/diffusion/SynDiff-main_modified/utils/op/init.py", line 1, in
from .fused_act import FusedLeakyReLU, fused_leaky_relu
File "/home/GPU/jllu/work/project/lossless/code/diffusion/SynDiff-main_modified/utils/op/fused_act.py", line 20, in
fused = load(
File "/home/GPU/jllu/software/condaenv/losstorch/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1284, in load
return jit_compile(
File "/home/GPU/jllu/software/condaenv/losstorch/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1508, in jit_compile
write_ninja_file_and_build_library(
File "/home/GPU/jllu/software/condaenv/losstorch/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1623, in write_ninja_file_and_build_library
run_ninja_build(
File "/home/GPU/jllu/software/condaenv/losstorch/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 'fused': [1/2] /home/GPU/jllu/software/condaenv/losstorch/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /home/GPU/jllu/software/condaenv/losstorch/lib/python3.10/site-packages/torch/include -isystem /home/GPU/jllu/software/condaenv/losstorch/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /home/GPU/jllu/software/condaenv/losstorch/lib/python3.10/site-packages/torch/include/TH -isystem /home/GPU/jllu/software/condaenv/losstorch/lib/python3.10/site-packages/torch/include/THC -isystem /home/GPU/jllu/software/condaenv/losstorch/include -isystem /home/GPU/jllu/software/condaenv/losstorch/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_80,code=compute_80 -gencode=arch=compute_80,code=sm_80 --compiler-options '-fPIC' -std=c++14 -c /home/GPU/jllu/work/project/lossless/code/diffusion/SynDiff-main_modified/utils/op/fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o
FAILED: fused_bias_act_kernel.cuda.o
/home/GPU/jllu/software/condaenv/losstorch/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /home/GPU/jllu/software/condaenv/losstorch/lib/python3.10/site-packages/torch/include -isystem /home/GPU/jllu/software/condaenv/losstorch/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /home/GPU/jllu/software/condaenv/losstorch/lib/python3.10/site-packages/torch/include/TH -isystem /home/GPU/jllu/software/condaenv/losstorch/lib/python3.10/site-packages/torch/include/THC -isystem /home/GPU/jllu/software/condaenv/losstorch/include -isystem /home/GPU/jllu/software/condaenv/losstorch/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_80,code=compute_80 -gencode=arch=compute_80,code=sm_80 --compiler-options '-fPIC' -std=c++14 -c /home/GPU/jllu/work/project/lossless/code/diffusion/SynDiff-main_modified/utils/op/fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o
/home/GPU/jllu/software/condaenv/losstorch/gcc/include/c++/shared_mutex: In member function 'bool std::shared_timed_mutex::try_lock_until(const std::chrono::time_point<std::chrono::_V2::system_clock, _Dur2>&)':
/home/GPU/jllu/software/condaenv/losstorch/gcc/include/c++/shared_mutex:419:71: error: taking address of temporary [-fpermissive]
int __ret = pthread_rwlock_timedwrlock(&_M_rwlock, &__ts);
^
/home/GPU/jllu/software/condaenv/losstorch/gcc/include/c++/shared_mutex: In member function 'bool std::shared_timed_mutex::try_lock_shared_until(const std::chrono::time_point<std::chrono::_V2::system_clock, _Dur2>&)':
/home/GPU/jllu/software/condaenv/losstorch/gcc/include/c++/shared_mutex:472:67: error: taking address of temporary [-fpermissive]
__ret = pthread_rwlock_timedrdlock(&_M_rwlock, &__ts);
^
ninja: build stopped: subcommand failed.

May I have your suggestion please.
thanks

@HuiLin0220
Copy link

Did you solve your problem?

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