質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
CUDA

CUDAは並列計算プラットフォームであり、Nvidia GPU(Graphics Processing Units)向けのプログラミングモデルです。CUDAは様々なプログラミング言語、ライブラリ、APIを通してNvidiaにインターフェイスを提供します。

コンパイル

コンパイルとは、プログラミング言語のテキストソース(ソースコード)をコンピュータ上で実行可能な形式(オブジェクトコード)に変換することをいいます

コンパイルエラー

コンパイルのフェーズで生成されるエラーです。よく無効なシンタックスやタイプが含まれているとき発生します。

Ninja

NinjaはHTML5 Webアプリケーションを開発するためのオーサリングツールです。 NinjaはChromeウェブストアでインストールできます。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

Q&A

0回答

1918閲覧

ninja: build stopped コンパイルに失敗してしまう

smart-material

総合スコア12

CUDA

CUDAは並列計算プラットフォームであり、Nvidia GPU(Graphics Processing Units)向けのプログラミングモデルです。CUDAは様々なプログラミング言語、ライブラリ、APIを通してNvidiaにインターフェイスを提供します。

コンパイル

コンパイルとは、プログラミング言語のテキストソース(ソースコード)をコンピュータ上で実行可能な形式(オブジェクトコード)に変換することをいいます

コンパイルエラー

コンパイルのフェーズで生成されるエラーです。よく無効なシンタックスやタイプが含まれているとき発生します。

Ninja

NinjaはHTML5 Webアプリケーションを開発するためのオーサリングツールです。 NinjaはChromeウェブストアでインストールできます。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

0グッド

0クリップ

投稿2021/12/27 01:45

前提・実現したいこと

下記に記載したエラーが発生してしまうため、いろいろ試しましたがうまく解決できません。
お力をお貸しください。

発生している問題・エラーメッセージ

raise RuntimeError(message) RuntimeError: Error building extension 'fused': [1/3] /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/TH -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /home/a/libraries/anaconda3/envs/gan/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -std=c++11 -c /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o FAILED: fused_bias_act_kernel.cuda.o /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/TH -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /home/a/libraries/anaconda3/envs/gan/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -std=c++11 -c /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning). /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: no suitable constructor exists to convert from "c10::ScalarType" to "at::Type" /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: type name is not allowed /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: expected an expression /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: type name is not allowed /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: expected an expression /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: type name is not allowed /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: expected an expression /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: type name is not allowed /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: expected an expression /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: type name is not allowed /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: expected an expression /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: type name is not allowed /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: expected an expression /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: type name is not allowed /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: expected an expression /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: type name is not allowed /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: expected an expression /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: type name is not allowed /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: expected an expression /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: type name is not allowed /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: expected an expression /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: type name is not allowed /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: expected an expression /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: type name is not allowed /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: expected an expression 37 errors detected in the compilation of "/tmp/tmpxft_000071ce_00000000-7_fused_bias_act_kernel.cpp1.ii". [2/3] c++ -MMD -MF fused_bias_act.o.d -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/TH -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /home/a/libraries/anaconda3/envs/gan/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/a/GANSketching/training/networks/op/fused_bias_act.cpp -o fused_bias_act.o FAILED: fused_bias_act.o c++ -MMD -MF fused_bias_act.o.d -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/TH -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/THC -isystem /usr/local/cuda/include 5.4.0-isystem /home/a/libraries/anaconda3/envs/gan/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/a/GANSketching/training/networks/op/fused_bias_act.cpp -o fused_bias_act.o /home/a/GANSketching/training/networks/op/fused_bias_act.cpp: In function ‘at::Tensor fused_bias_act(const at::Tensor&, const at::Tensor&, const at::Tensor&, int, int, float, float)’: /home/a/GANSketching/training/networks/op/fused_bias_act.cpp:7:82: error: ‘TORCH_CHECK’ was not declared in this scope #define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor") ^ /home/a/GANSketching/training/networks/op/fused_bias_act.cpp:13:5: note: in expansion of macro ‘CHECK_CUDA’ CHECK_CUDA(input); ^ ninja: build stopped: subcommand failed.

試したこと

・ninjaのインストール
・CUDAバージョン変更8から10

補足情報(FW/ツールのバージョンなど)

ninja 1.10.2.3
tensorflow-gpu 2.6.2
termcolor 1.1.0
python 3.6
gcc 5.4.0
cuda 8.0

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問