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

can't run the code #7

Open
lcxsnow opened this issue Feb 7, 2023 · 1 comment
Open

can't run the code #7

lcxsnow opened this issue Feb 7, 2023 · 1 comment

Comments

@lcxsnow
Copy link

lcxsnow commented Feb 7, 2023

When I run "python train_stylegan2.py configs/gan/stylegan2/c10_style64.gin vitgan --mode=aug_both --aug=diffaug --lbd_r1=0.1 --no_lazy --halflife_k=1000 --penalty=bcr --use_warmup --use_nerf_proj", it appeneded the below message.

Files already downloaded and verified
Files already downloaded and verified
Traceback (most recent call last):
File "/home/m11113013/.conda/envs/ViTGAN/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1723, in _run_ninja_build
env=env)
File "/home/m11113013/.conda/envs/ViTGAN/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 "train_stylegan2.py", line 404, in
worker(P)
File "train_stylegan2.py", line 313, in worker
generator, discriminator = get_architecture(P.architecture, image_size, P=P)
File "/home/m11113013/ProjectCode/practice model/ViTGAN-main/models/gan/init.py", line 29, in get_architecture
from models.gan.stylegan2.vit_generator import Generator
File "/home/m11113013/ProjectCode/practice model/ViTGAN-main/models/gan/stylegan2/vit_generator.py", line 12, in
from models.gan.stylegan2.op import FusedLeakyReLU, conv2d_gradfix
File "/home/m11113013/ProjectCode/practice model/ViTGAN-main/models/gan/stylegan2/op/init.py", line 1, in
from .fused_act import FusedLeakyReLU, fused_leaky_relu
File "/home/m11113013/ProjectCode/practice model/ViTGAN-main/models/gan/stylegan2/op/fused_act.py", line 15, in
os.path.join(module_path, "fused_bias_act_kernel.cu"),
File "/home/m11113013/.conda/envs/ViTGAN/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1136, in load
keep_intermediates=keep_intermediates)
File "/home/m11113013/.conda/envs/ViTGAN/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1347, in jit_compile
is_standalone=is_standalone)
File "/home/m11113013/.conda/envs/ViTGAN/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1452, in write_ninja_file_and_build_library
error_prefix=f"Error building extension '{name}'")
File "/home/m11113013/.conda/envs/ViTGAN/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1733, in run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'fused': [1/2] /usr/local/cuda-11.0/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /home/m11113013/.conda/envs/ViTGAN/lib/python3.7/site-packages/torch/include -isystem /home/m11113013/.conda/envs/ViTGAN/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /home/m11113013/.conda/envs/ViTGAN/lib/python3.7/site-packages/torch/include/TH -isystem /home/m11113013/.conda/envs/ViTGAN/lib/python3.7/site-packages/torch/include/THC -isystem /usr/local/cuda-11.0/include -isystem /home/m11113013/.conda/envs/ViTGAN/include/python3.7m -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 '/home/m11113013/ProjectCode/practice model/ViTGAN-main/models/gan/stylegan2/op/fused_bias_act_kernel.cu' -o fused_bias_act_kernel.cuda.o
FAILED: fused_bias_act_kernel.cuda.o
/usr/local/cuda-11.0/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /home/m11113013/.conda/envs/ViTGAN/lib/python3.7/site-packages/torch/include -isystem /home/m11113013/.conda/envs/ViTGAN/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /home/m11113013/.conda/envs/ViTGAN/lib/python3.7/site-packages/torch/include/TH -isystem /home/m11113013/.conda/envs/ViTGAN/lib/python3.7/site-packages/torch/include/THC -isystem /usr/local/cuda-11.0/include -isystem /home/m11113013/.conda/envs/ViTGAN/include/python3.7m -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 '/home/m11113013/ProjectCode/practice model/ViTGAN-main/models/gan/stylegan2/op/fused_bias_act_kernel.cu' -o fused_bias_act_kernel.cuda.o
nvcc fatal : Unsupported gpu architecture 'compute_86'
ninja: build stopped: subcommand failed.

I tried to install the older pytorch version, but it doesn't work.

@Ray006
Copy link

Ray006 commented Dec 26, 2023

have you solved it? I met the same issue

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