Nvcc fatal : Unsupported gpu architecture 'compute_86'

Taimoor-R: <p>Traceback (most recent call last):<br>
File “venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/utils/cpp_extension.py”, line 1814, in _run_ninja_build<br>
env=env)<br>
File “/vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/subprocess.py”, line 512, in run<br>
output=stdout, stderr=stderr)<br>
subprocess.CalledProcessError: Command ‘[‘ninja’, ‘-v’]’ returned non-zero exit status 1.</p>
<p>The above exception was the direct cause of the following exception:</p>
<p>Traceback (most recent call last):<br>
File “scripts/train.py”, line 16, in <br>
from training.coach import Coach<br>
File “./training/coach.py”, line 19, in <br>
from models.psp import pSp<br>
File “./models/psp.py”, line 6, in <br>
from models.encoders import psp_encoders<br>
File “./models/encoders/psp_encoders.py”, line 9, in <br>
from models.stylegan2.model import EqualLinear<br>
File “./models/stylegan2/model.py”, line 7, in <br>
from models.stylegan2.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d<br>
File “./models/stylegan2/op/<strong>init</strong>.py”, line 1, in <br>
from .fused_act import FusedLeakyReLU, fused_leaky_relu<br>
File “./models/stylegan2/op/fused_act.py”, line 13, in <br>
os.path.join(module_path, ‘fused_bias_act_kernel.cu’),<br>
File “/vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/utils/cpp_extension.py”, line 1214, in load<br>
keep_intermediates=keep_intermediates)<br>
File “/vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/utils/cpp_extension.py”, line 1435, in <em>jit_compile<br>
is_standalone=is_standalone)<br>
File “/vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/utils/cpp_extension.py”, line 1540, in <em>write_ninja_file_and_build_library<br>
error_prefix=f"Error building extension ‘{name}’")<br>
File “/vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/utils/cpp_extension.py”, line 1824, in <em>run_ninja_build<br>
raise RuntimeError(message) from e<br>
RuntimeError: Error building extension ‘fused’: [1/3] /usr/local/cuda/bin/nvcc  -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="<em>gcc" -DPYBIND11_STDLIB="<em>libstdcpp" -DPYBIND11_BUILD_ABI="<em>cxxabi1011" -isystem /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include -isystem /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/TH -isystem /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS</em></em> -D__CUDA_NO_HALF_CONVERSIONS</em></em> -D__CUDA_NO_BFLOAT16_CONVERSIONS</em></em> -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 /vol/research/AttriGAN/encoder4editing/models/stylegan2/op/fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o<br>
FAILED: fused_bias_act_kernel.cuda.o<br>
/usr/local/cuda/bin/nvcc  -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="<em>gcc" -DPYBIND11_STDLIB="<em>libstdcpp" -DPYBIND11_BUILD_ABI="<em>cxxabi1011" -isystem /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include -isystem /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/TH -isystem /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS</em></em> -D__CUDA_NO_HALF_CONVERSIONS</em>_ -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 /vol/research/AttriGAN/encoder4editing/models/stylegan2/op/fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o<br>
nvcc fatal   : Unsupported gpu architecture ‘compute_86’<br>
[2/3] c++ -MMD -MF fused_bias_act.o.d -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -isystem /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include -isystem /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/TH -isystem /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -c /vol/research/AttriGAN/encoder4editing/models/stylegan2/op/fused_bias_act.cpp -o fused_bias_act.o<br>
In file included from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/c10/core/DeviceType.h:8:0,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/c10/core/Device.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/c10/core/Allocator.h:6,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/ATen/ATen.h:7,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/extension.h:4,<br>
from /vol/research/AttriGAN/encoder4editing/models/stylegan2/op/fused_bias_act.cpp:1:<br>
/vol/research/AttriGAN/encoder4editing/models/stylegan2/op/fused_bias_act.cpp: In function ‘at::Tensor fused_bias_act(const at::Tensor&amp;, const at::Tensor&amp;, const at::Tensor&amp;, int, int, float, float)’:<br>
/vol/research/AttriGAN/encoder4editing/models/stylegan2/op/fused_bias_act.cpp:7:42: warning: ‘at::DeprecatedTypeProperties&amp; at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]<br>
<span class="hashtag-raw">#define</span> CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), <span class="hashtag-raw">#x</span> " must be a CUDA tensor")<br>
^<br>
/vol/research/AttriGAN/encoder4editing/models/stylegan2/op/fused_bias_act.cpp:13:5: note: in expansion of macro ‘CHECK_CUDA’<br>
CHECK_CUDA(input);<br>
^<br>
In file included from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/ATen/core/Tensor.h:3:0,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/ATen/DeviceGuard.h:4,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/ATen/ATen.h:11,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/extension.h:4,<br>
from /vol/research/AttriGAN/encoder4editing/models/stylegan2/op/fused_bias_act.cpp:1:<br>
/vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:213:30: note: declared here<br>
DeprecatedTypeProperties &amp; type() const {<br>
^~~~<br>
In file included from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/c10/core/DeviceType.h:8:0,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/c10/core/Device.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/c10/core/Allocator.h:6,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/ATen/ATen.h:7,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/extension.h:4,<br>
from /vol/research/AttriGAN/encoder4editing/models/stylegan2/op/fused_bias_act.cpp:1:<br>
/vol/research/AttriGAN/encoder4editing/models/stylegan2/op/fused_bias_act.cpp:7:42: warning: ‘at::DeprecatedTypeProperties&amp; at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]<br>
<span class="hashtag-raw">#define</span> CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), <span class="hashtag-raw">#x</span> " must be a CUDA tensor")<br>
^<br>
/vol/research/AttriGAN/encoder4editing/models/stylegan2/op/fused_bias_act.cpp:14:5: note: in expansion of macro ‘CHECK_CUDA’<br>
CHECK_CUDA(bias);<br>
^<br>
In file included from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/ATen/core/Tensor.h:3:0,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/ATen/DeviceGuard.h:4,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/ATen/ATen.h:11,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,<br>
from /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/torch/extension.h:4,<br>
from /vol/research/AttriGAN/encoder4editing/models/stylegan2/op/fused_bias_act.cpp:1:<br>
/vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:213:30: note: declared here<br>
DeprecatedTypeProperties &amp; type() const {<br>
^~~~<br>
ninja: build stopped: subcommand failed.</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/d/a/da9cbcfa22431c2fb8e316a2d73006fbb49d9bcd.png" data-download-href="https://discuss.pytorch.org/uploads/default/da9cbcfa22431c2fb8e316a2d73006fbb49d9bcd" title="Screen Shot 2022-09-06 at 16.18.26"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/d/a/da9cbcfa22431c2fb8e316a2d73006fbb49d9bcd_2_614x499.png" alt="Screen Shot 2022-09-06 at 16.18.26" data-base62-sha1="vbVTI9XeAVIXhVoD1irzyQv5qBD" width="614" height="499" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/d/a/da9cbcfa22431c2fb8e316a2d73006fbb49d9bcd_2_614x499.png, https://discuss.pytorch.org/uploads/default/optimized/3X/d/a/da9cbcfa22431c2fb8e316a2d73006fbb49d9bcd_2_921x748.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/d/a/da9cbcfa22431c2fb8e316a2d73006fbb49d9bcd_2_1228x998.png 2x" data-dominant-color="161717"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screen Shot 2022-09-06 at 16.18.26</span><span class="informations">1430×1164 222 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>Conda Env:<br>
packages in environment at /vol/research/AttriGAN/venv/anaconda3/envs/myenv2:<br>
Name                    Version                   Build  Channel<br>
_libgcc_mutex             0.1                        main<br>
_openmp_mutex             5.1                       1_gnu<br>
absl-py                   0.9.0                    pypi_0    pypi<br>
backcall                  0.2.0                    pypi_0    pypi<br>
blas                      1.0                         mkl<br>
brotlipy                  0.7.0           py37h540881e_1004    conda-forge<br>
bzip2                     1.0.8                h7f98852_4    conda-forge<br>
ca-certificates           2022.07.19           h06a4308_0<br>
cachetools                4.1.0                    pypi_0    pypi<br>
certifi                   2022.6.15        py37h06a4308_0<br>
cffi                      1.14.6           py37hc58025e_0    conda-forge<br>
chardet                   3.0.4                    pypi_0    pypi<br>
charset-normalizer        2.1.1              pyhd8ed1ab_0    conda-forge<br>
cryptography              37.0.2           py37h38fbfac_0    conda-forge<br>
cudatoolkit               11.6.0              hecad31d_10    conda-forge<br>
cycler                    0.10.0                   pypi_0    pypi<br>
debugpy                   1.6.3                    pypi_0    pypi<br>
decorator                 4.4.2                    pypi_0    pypi<br>
entrypoints               0.4                      pypi_0    pypi<br>
ffmpeg                    4.3                  hf484d3e_0    pytorch<br>
fonttools                 4.37.1                   pypi_0    pypi<br>
freetype                  2.10.4               h0708190_1    conda-forge<br>
future                    0.18.2                   pypi_0    pypi<br>
gmp                       6.2.1                h58526e2_0    conda-forge<br>
gnutls                    3.6.13               h85f3911_1    conda-forge<br>
google-auth               1.15.0                   pypi_0    pypi<br>
google-auth-oauthlib      0.4.1                    pypi_0    pypi<br>
grpcio                    1.29.0                   pypi_0    pypi<br>
idna                      2.9                      pypi_0    pypi<br>
imageio                   2.9.0                    pypi_0    pypi<br>
importlib-metadata        1.6.0                    pypi_0    pypi<br>
intel-openmp              2021.4.0          h06a4308_3561<br>
ipykernel                 6.15.2                   pypi_0    pypi<br>
ipython                   7.34.0                   pypi_0    pypi<br>
jedi                      0.18.1                   pypi_0    pypi<br>
jpeg                      9e                   h166bdaf_1    conda-forge<br>
jupyter-client            7.2.0                    pypi_0    pypi<br>
jupyter-core              4.11.1                   pypi_0    pypi<br>
kiwisolver                1.2.0                    pypi_0    pypi<br>
lame                      3.100             h7f98852_1001    conda-forge<br>
lcms2                     2.12                 hddcbb42_0    conda-forge<br>
ld_impl_linux-64          2.38                 h1181459_1<br>
libedit                   3.1.20210910         h7f8727e_0<br>
libffi                    3.3                  he6710b0_2<br>
libgcc-ng                 11.2.0               h1234567_1<br>
libgomp                   11.2.0               h1234567_1<br>
libiconv                  1.17                 h166bdaf_0    conda-forge<br>
libpng                    1.6.37               h21135ba_2    conda-forge<br>
libstdcxx-ng              11.2.0               h1234567_1<br>
libtiff                   4.2.0                hf544144_3    conda-forge<br>
libwebp-base              1.2.2                h7f98852_1    conda-forge<br>
lz4-c                     1.9.3                h9c3ff4c_1    conda-forge<br>
markdown                  3.2.2                    pypi_0    pypi<br>
markupsafe                2.1.1                    pypi_0    pypi<br>
matplotlib                3.5.3                    pypi_0    pypi<br>
matplotlib-inline         0.1.6                    pypi_0    pypi<br>
mkl                       2021.4.0           h06a4308_640<br>
mkl-service               2.4.0            py37h402132d_0    conda-forge<br>
mkl_fft                   1.3.1            py37h3e078e5_1    conda-forge<br>
mkl_random                1.2.2            py37h219a48f_0    conda-forge<br>
mxnet                     1.9.1                    pypi_0    pypi<br>
ncurses                   6.3                  h5eee18b_3<br>
nest-asyncio              1.5.5                    pypi_0    pypi<br>
nettle                    3.6                  he412f7d_0    conda-forge<br>
networkx                  2.4                      pypi_0    pypi<br>
ninja                     1.10.2               h06a4308_5<br>
ninja-base                1.10.2               hd09550d_5<br>
numpy                     1.21.5           py37h6c91a56_3<br>
numpy-base                1.21.5           py37ha15fc14_3<br>
oauthlib                  3.1.0                    pypi_0    pypi<br>
olefile                   0.46               pyh9f0ad1d_1    conda-forge<br>
opencv-python             4.6.0.66                 pypi_0    pypi<br>
openh264                  2.1.1                h780b84a_0    conda-forge<br>
openjpeg                  2.4.0                hb52868f_1    conda-forge<br>
openssl                   1.1.1q               h7f8727e_0<br>
packaging                 21.3                     pypi_0    pypi<br>
parso                     0.8.3                    pypi_0    pypi<br>
pexpect                   4.8.0                    pypi_0    pypi<br>
pickleshare               0.7.5                    pypi_0    pypi<br>
pillow                    7.1.2                    pypi_0    pypi<br>
pip                       22.1.2           py37h06a4308_0<br>
prompt-toolkit            3.0.31                   pypi_0    pypi<br>
protobuf                  3.12.2                   pypi_0    pypi<br>
psutil                    5.9.2                    pypi_0    pypi<br>
ptyprocess                0.7.0                    pypi_0    pypi<br>
pyaml                     21.10.1                  pypi_0    pypi<br>
pyasn1                    0.4.8                    pypi_0    pypi<br>
pyasn1-modules            0.2.8                    pypi_0    pypi<br>
pycparser                 2.21               pyhd8ed1ab_0    conda-forge<br>
pygments                  2.13.0                   pypi_0    pypi<br>
pyopenssl                 22.0.0             pyhd8ed1ab_0    conda-forge<br>
pyparsing                 2.4.7                    pypi_0    pypi<br>
pysocks                   1.7.1            py37h89c1867_5    conda-forge<br>
python                    3.7.13               h12debd9_0<br>
python-dateutil           2.8.1                    pypi_0    pypi<br>
python-graphviz           0.8.4                    pypi_0    pypi<br>
python_abi                3.7                     2_cp37m    conda-forge<br>
pytorch                   1.12.1          py3.7_cuda11.6_cudnn8.3.2_0    pytorch<br>
pytorch-lightning         0.7.1                    pypi_0    pypi<br>
pytorch-mutex             1.0                        cuda    pytorch<br>
pywavelets                1.1.1                    pypi_0    pypi<br>
pyyaml                    6.0                      pypi_0    pypi<br>
pyzmq                     23.2.1                   pypi_0    pypi<br>
readline                  8.1.2                h7f8727e_1<br>
requests                  2.23.0                   pypi_0    pypi<br>
requests-oauthlib         1.3.0                    pypi_0    pypi<br>
rsa                       4.0                      pypi_0    pypi<br>
scikit-image              0.17.2                   pypi_0    pypi<br>
scipy                     1.7.3                    pypi_0    pypi<br>
setuptools                63.4.1           py37h06a4308_0<br>
six                       1.16.0             pyh6c4a22f_0    conda-forge<br>
sqlite                    3.39.2               h5082296_0<br>
tensorboard               2.10.0                   pypi_0    pypi<br>
tensorboard-data-server   0.6.1                    pypi_0    pypi<br>
tensorboard-plugin-wit    1.8.1                    pypi_0    pypi<br>
tensorboardx              2.5.1                    pypi_0    pypi<br>
tifffile                  2021.11.2                pypi_0    pypi<br>
tk                        8.6.12               h1ccaba5_0<br>
torchaudio                0.12.1               py37_cu116    pytorch<br>
torchvision               0.13.1               py37_cu116    pytorch<br>
tornado                   6.2                      pypi_0    pypi<br>
tqdm                      4.64.1                   pypi_0    pypi<br>
traitlets                 5.3.0                    pypi_0    pypi<br>
typing_extensions         4.3.0              pyha770c72_0    conda-forge<br>
urllib3                   1.25.11                  pypi_0    pypi<br>
wcwidth                   0.2.5                    pypi_0    pypi<br>
werkzeug                  2.2.2                    pypi_0    pypi<br>
wheel                     0.37.1             pyhd3eb1b0_0<br>
xz                        5.2.5                h7f8727e_1<br>
zipp                      3.8.1                    pypi_0    pypi<br>
zlib                      1.2.12               h7f8727e_2<br>
zstd                      1.5.0                ha95c52a_0    conda-forge</p>
<h1><a name="question-1" class="anchor" href="#question-1"></a>Question:</h1>
<p>How do I reslove this issue, I am using python version 3.7, cuda-11.6 all in a conda virtual env. Furthermore, this issue only arises in the RTX30 series GPUS(using RTX 3090).</p>

ptrblck: <p>Your local CUDA compiler (<code>nvcc</code>) might be too old and you should check a) which one is used in case you have installed multiple compilers, and b) if it supports sm_86.</p>

Taimoor-R: <p>I am running the task on a condor cluster and it has its own installation of cuda compiler. However this problem is preseistant to only my case as others on the cluster dont seem to have this problem. All my dependencies are in the conda venv that i have created as stated above.</p>

ptrblck: <aside class="quote no-group" data-username="Taimoor-R" data-post="3" data-topic="160878">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/taimoor-r/48/53037_2.png" class="avatar"> Taimoor-R:</div>
<blockquote>
<p>All my dependencies are in the conda venv that i have created as stated above.</p>
</blockquote>
</aside>
<p>Your <code>conda</code> environment does not ship with a CUDA compiler and the locally installed <code>nvcc</code> is used as seen in the error and the corresponding path:</p>
<pre><code class="lang-auto">RuntimeError: Error building extension ‘fused’: [1/3] /usr/local/cuda/bin/nvcc 
</code></pre>
<p>Again, check your local CUDA toolkit as it will be used to build custom CUDA extensions, not the CUDA runtime installed via <code>conda</code>.</p>

Taimoor-R: <p>Traceback (most recent call last):<br>
File “/vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/utils/cpp_extension.py”, line 1814, in _run_ninja_build<br>
env=env)<br>
File “/vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/subprocess.py”, line 512, in run<br>
output=stdout, stderr=stderr)<br>
subprocess.CalledProcessError: Command ‘[‘ninja’, ‘-v’]’ returned non-zero exit status 1.</p>
<p>The above exception was the direct cause of the following exception:</p>
<p>Traceback (most recent call last):<br>
File “scripts/train.py”, line 16, in<br>
from training.coach import Coach<br>
File “./training/coach.py”, line 19, in<br>
from models.psp import pSp<br>
File “./models/psp.py”, line 6, in<br>
from models.encoders import psp_encoders<br>
File “./models/encoders/psp_encoders.py”, line 9, in<br>
from models.stylegan2.model import EqualLinear<br>
File “./models/stylegan2/model.py”, line 7, in<br>
from models.stylegan2.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d<br>
File “./models/stylegan2/op/<strong>init</strong>.py”, line 1, in<br>
from .fused_act import FusedLeakyReLU, fused_leaky_relu<br>
File “./models/stylegan2/op/fused_act.py”, line 13, in<br>
os.path.join(module_path, ‘fused_bias_act_kernel.cu’),<br>
File “/vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/utils/cpp_extension.py”, line 1214, in load<br>
keep_intermediates=keep_intermediates)<br>
File “/vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/utils/cpp_extension.py”, line 1435, in _jit_compile<br>
is_standalone=is_standalone)<br>
File “/vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/utils/cpp_extension.py”, line 1540, in _write_ninja_file_and_build_library<br>
error_prefix=f"Error building extension ‘{name}’“)<br>
File “/vol/research/AttriGAN/venv/anaconda3/envs/myenv2/lib/python3.7/site-packages/torch/utils/cpp_extension.py”, line 1824, in _run_ninja_build<br>
raise RuntimeError(message) from e<br>
RuntimeError: Error building extension ‘fused’: [1/2] /vol/research/AttriGAN/venv/anaconda3/envs/myenv2/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=”_gcc" -DPYBIND11_STDLIB=“_li$<br>
FAILED: fused_bias_act_kernel.cuda.o<br>
/vol/research/AttriGAN/venv/anaconda3/envs/myenv2/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=”_gcc" -DPYBIND11_STDLIB=“_libstdcpp” -DPYBIND11_BUILD_ABI=“_cxxabi1011” -isyste$<br>
cc1plus: fatal error: cuda_runtime.h: No such file or directory<br>
compilation terminated.<br>
ninja: build stopped: subcommand failed.</p>
<p>Even after installing nvcc in the conda enviroment it is still giving the same error</p>

OdaRuichiro: <p>Hello, I have also encountered the same problem. Do you have a solution? Thank you</p>