teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

4

エラーの内容を変更しました。

2020/07/03 06:37

投稿

oinari03
oinari03

スコア59

title CHANGED
File without changes
body CHANGED
@@ -53,31 +53,48 @@
53
53
 
54
54
  ```
55
55
  (venv) [hirayama@habomai AlphAction]$ python setup.py build develop
56
- which: no hipcc in (/home/hirayama/test/AlphAction/venv/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/hirayama/.local/bin:/home/hirayama/bin)
56
+ which: no hipcc in (/opt/gcc/7.3.0/bin:/home/hirayama/test/AlphAction/venv/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/hirayama/.local/bin:/home/hirayama/bin)
57
57
  running build
58
58
  running build_py
59
59
  running build_ext
60
60
  /home/hirayama/test/AlphAction/venv/lib/python3.7/site-packages/torch/utils/cpp_extension.py:305: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
61
61
  warnings.warn(msg.format('we could not find ninja.'))
62
- /home/hirayama/test/AlphAction/venv/lib/python3.7/site-packages/torch/utils/cpp_extension.py:245: UserWarning:
63
-
64
- !! WARNING !!
65
-
66
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
67
- Your compiler (g++ 4.8.5) may be ABI-incompatible with PyTorch!
68
- Please use a compiler that is ABI-compatible with GCC 5.0 and above.
69
- See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html.
70
-
71
- See https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6
72
- for instructions on how to install GCC 5 or higher.
73
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
74
-
75
- !! WARNING !!
76
-
77
- warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler))
78
62
  building 'detector.nms.nms_cuda' extension
79
63
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/hirayama/test/AlphAction/venv/lib/python3.7/site-packages/torch/include -I/home/hirayama/test/AlphAction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/hirayama/test/AlphAction/venv/lib/python3.7/site-packages/torch/include/TH -I/home/hirayama/test/AlphAction/venv/lib/python3.7/site-packages/torch/include/THC -I/opt/cuda/10.2.89/include -I/home/hirayama/test/AlphAction/venv/include -I/opt/pyenv/versions/3.7.7/include/python3.7m -c detector/nms/src/nms_cuda.cpp -o build/temp.linux-x86_64-3.7/detector/nms/src/nms_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=nms_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
80
- gcc: エラー: unrecognized command line option ‘-std=c++14
64
+ detector/nms/src/nms_cuda.cpp: 関数 ‘at::Tensor nms(const at::Tensor&, float) 内:
65
+ detector/nms/src/nms_cuda.cpp:4:39: 警告: ‘at::DeprecatedTypeProperties& 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]
66
+ #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
67
+ ^
68
+ detector/nms/src/nms_cuda.cpp:9:3: 備考: in expansion of macro ‘CHECK_CUDA’
69
+ CHECK_CUDA(dets);
70
+ ^
71
+ In file included from /home/hirayama/test/AlphAction/venv/lib/python3.7/site-packages/torch/include/ATen/Tensor.h:11:0,
72
+ from /home/hirayama/test/AlphAction/venv/lib/python3.7/site-packages/torch/include/ATen/Context.h:4,
73
+ from /home/hirayama/test/AlphAction/venv/lib/python3.7/site-packages/torch/include/ATen/ATen.h:5,
74
+ from /home/hirayama/test/AlphAction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
75
+ from /home/hirayama/test/AlphAction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
76
+ from /home/hirayama/test/AlphAction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
77
+ from /home/hirayama/test/AlphAction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
78
+ from /home/hirayama/test/AlphAction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
79
+ from /home/hirayama/test/AlphAction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
80
+ from /home/hirayama/test/AlphAction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
81
+ from /home/hirayama/test/AlphAction/venv/lib/python3.7/site-packages/torch/include/torch/extension.h:4,
82
+ from detector/nms/src/nms_cuda.cpp:2:
83
+ /home/hirayama/test/AlphAction/venv/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:262:30: 備考: ここで宣言されています
84
+ DeprecatedTypeProperties & type() const {
85
+ ^~~~
86
+ detector/nms/src/nms_cuda.cpp:4:23: エラー: ‘AT_CHECK’ was not declared in this scope
87
+ #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
88
+ ^
89
+ detector/nms/src/nms_cuda.cpp:4:23: 備考: in definition of macro ‘CHECK_CUDA’
90
+ #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
91
+ ^~~~~~~~
92
+ detector/nms/src/nms_cuda.cpp:4:23: 備考: suggested alternative: ‘DCHECK’
93
+ #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
94
+ ^
95
+ detector/nms/src/nms_cuda.cpp:4:23: 備考: in definition of macro ‘CHECK_CUDA’
96
+ #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")
97
+ ^~~~~~~~
81
98
  error: command 'gcc' failed with exit status 1
82
99
  ```
83
100
  ここではgccのversionが5以下なのが原因といっていますが、module loadなどで見るとgccのversionは7なのに対してなんでなんだろうと疑問です。

3

エラーの内容を読み取りました。

2020/07/03 06:37

投稿

oinari03
oinari03

スコア59

title CHANGED
File without changes
body CHANGED
@@ -80,6 +80,7 @@
80
80
  gcc: エラー: unrecognized command line option ‘-std=c++14’
81
81
  error: command 'gcc' failed with exit status 1
82
82
  ```
83
+ ここではgccのversionが5以下なのが原因といっていますが、module loadなどで見るとgccのversionは7なのに対してなんでなんだろうと疑問です。
83
84
 
84
85
  ### その後ちょっと進んでしまってのエラー
85
86
  とはいえと思いそのままpreparationのファイルを特定のディレクトリにおいて

2

gccについて検証しました。

2020/07/03 06:09

投稿

oinari03
oinari03

スコア59

title CHANGED
File without changes
body CHANGED
@@ -81,7 +81,7 @@
81
81
  error: command 'gcc' failed with exit status 1
82
82
  ```
83
83
 
84
- ### その後ちょっと進んでしまったところ
84
+ ### その後ちょっと進んでしまってのエラー
85
85
  とはいえと思いそのままpreparationのファイルを特定のディレクトリにおいて
86
86
  demo.py imput.mp4を実行しようとしました。
87
87
 
@@ -97,6 +97,23 @@
97
97
  すると以上のような結果になってしまって、buildでうまくいってないからかなとおもっています。
98
98
  まずは、buildのエラーを解決したいです。
99
99
 
100
+ ### 試したこと
101
+ gccの存在確認とバージョンを見てみる。
102
+
103
+ ```
104
+ (venv) [hirayama@habomai demo]$ which gcc
105
+ /usr/bin/gcc
106
+ (venv) [hirayama@habomai demo]$ gcc -v
107
+ 組み込み spec を使用しています。
108
+ COLLECT_GCC=gcc
109
+ COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
110
+ ターゲット: x86_64-redhat-linux
111
+ configure 設定: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
112
+ スレッドモデル: posix
113
+ gcc バージョン 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)
114
+ ```
115
+
116
+
100
117
  ### 解決してほしいこと
101
118
  buildができるようにしてほしいです。
102
119
  英語の内容であるためかほとんどサンプルがなくていまいち解決策が見つかりません。

1

その他のエラーを追加しました。

2020/07/03 05:36

投稿

oinari03
oinari03

スコア59

title CHANGED
File without changes
body CHANGED
@@ -80,6 +80,23 @@
80
80
  gcc: エラー: unrecognized command line option ‘-std=c++14’
81
81
  error: command 'gcc' failed with exit status 1
82
82
  ```
83
+
84
+ ### その後ちょっと進んでしまったところ
85
+ とはいえと思いそのままpreparationのファイルを特定のディレクトリにおいて
86
+ demo.py imput.mp4を実行しようとしました。
87
+
88
+ ```
89
+ (venv) [hirayama@habomai demo]$ python demo.py input.mp4
90
+ Traceback (most recent call last):
91
+ File "demo.py", line 14, in <module>
92
+ from action_predictor import AVAPredictorWorker
93
+ File "/home/hirayama/test/AlphAction/demo/action_predictor.py", line 3, in <module>
94
+ from AlphAction.structures.bounding_box import BoxList
95
+ ModuleNotFoundError: No module named 'AlphAction'
96
+ ```
97
+ すると以上のような結果になってしまって、buildでうまくいってないからかなとおもっています。
98
+ まずは、buildのエラーを解決したいです。
99
+
83
100
  ### 解決してほしいこと
84
101
  buildができるようにしてほしいです。
85
102
  英語の内容であるためかほとんどサンプルがなくていまいち解決策が見つかりません。