I'm cuda toolkit 11.2 - ubuntu 20 / python 3.8
nightly build of pytorch.
Linux pop-os 5.8.0-7630-generic #32~1609193707~20.10~781bb80-Ubuntu SMP Tue Jan 5 21:29:56 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Sat 06 Feb 2021 06:56:10 AEDT
Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.
Detected CUDA files, patching ldflags
Emitting ninja build file /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/build/build.ninja...
Building extension module rcca...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/2] c++ -MMD -MF lib_cffi.o.d -DTORCH_EXTENSION_NAME=rcca -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -isystem /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include -isystem /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH -isystem /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC -isystem /usr/local/cuda-11.2/include -isystem /home/jp/miniconda3/envs/torch/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -O3 -c /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp -o lib_cffi.o
FAILED: lib_cffi.o
c++ -MMD -MF lib_cffi.o.d -DTORCH_EXTENSION_NAME=rcca -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -isystem /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include -isystem /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH -isystem /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC -isystem /usr/local/cuda-11.2/include -isystem /home/jp/miniconda3/envs/torch/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -O3 -c /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp -o lib_cffi.o
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp: In function ‘int ca_forward_cuda(const at::Tensor&, const at::Tensor&, at::Tensor&)’:
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:10:25: error: ‘THCState_getCurrentStream’ was not declared in this scope
10 | cudaStream_t stream = THCState_getCurrentStream(state);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:13:34: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
13 | float * t_data = t.data();
| ^
In file included from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:2,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensorApply.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensor.h:5,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THCTensor.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THC.h:13,
from /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:3:
/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here
363 | T * data() const {
| ^~~~
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:14:34: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
14 | float * f_data = f.data();
| ^
In file included from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:2,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensorApply.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensor.h:5,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THCTensor.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THC.h:13,
from /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:3:
/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here
363 | T * data() const {
| ^~~~
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:15:44: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
15 | float * weight_data = weight.data();
| ^
In file included from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:2,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensorApply.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensor.h:5,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THCTensor.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THC.h:13,
from /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:3:
/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here
363 | T * data() const {
| ^~~~
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp: In function ‘int ca_backward_cuda(const at::Tensor&, const at::Tensor&, const at::Tensor&, at::Tensor&, at::Tensor&)’:
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:21:25: error: ‘THCState_getCurrentStream’ was not declared in this scope
21 | cudaStream_t stream = THCState_getCurrentStream(state);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:24:34: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
24 | float * t_data = t.data();
| ^
In file included from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:2,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensorApply.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensor.h:5,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THCTensor.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THC.h:13,
from /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:3:
/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here
363 | T * data() const {
| ^~~~
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:25:34: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
25 | float * f_data = f.data();
| ^
In file included from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:2,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensorApply.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensor.h:5,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THCTensor.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THC.h:13,
from /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:3:
/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here
363 | T * data() const {
| ^~~~
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:26:36: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
26 | float * dt_data = dt.data();
| ^
In file included from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:2,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensorApply.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensor.h:5,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THCTensor.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THC.h:13,
from /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:3:
/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here
363 | T * data() const {
| ^~~~
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:27:36: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
27 | float * df_data = df.data();
| ^
In file included from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:2,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensorApply.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensor.h:5,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THCTensor.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THC.h:13,
from /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:3:
/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here
363 | T * data() const {
| ^~~~
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:28:36: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
28 | float * dw_data = dw.data();
| ^
In file included from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:2,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensorApply.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensor.h:5,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THCTensor.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THC.h:13,
from /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:3:
/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here
363 | T * data() const {
| ^~~~
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp: In function ‘int ca_map_forward_cuda(const at::Tensor&, const at::Tensor&, at::Tensor&)’:
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:33:25: error: ‘THCState_getCurrentStream’ was not declared in this scope
33 | cudaStream_t stream = THCState_getCurrentStream(state);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:38:49: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
38 | const float weight_data = weight.data();
| ^
In file included from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:2,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensorApply.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensor.h:5,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THCTensor.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THC.h:13,
from /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:3:
/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here
363 | T * data() const {
| ^~~~
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:39:39: warning: ‘T at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
39 | const float g_data = g.data();
| ^
In file included from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:2,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensorApply.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensor.h:5,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THCTensor.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THC.h:13,
from /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:3:
/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here
363 | T * data() const {
| ^~~~
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:40:37: warning: ‘T at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
40 | float out_data = out.data();
| ^
In file included from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:2,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensorApply.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensor.h:5,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THCTensor.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THC.h:13,
from /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:3:
/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here
363 | T * data() const {
| ^~~~
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp: In function ‘int ca_map_backward_cuda(const at::Tensor&, const at::Tensor&, const at::Tensor&, at::Tensor&, at::Tensor&)’:
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:47:25: error: ‘THCState_getCurrentStream’ was not declared in this scope
47 | cudaStream_t stream = THCState_getCurrentStream(state);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:52:45: warning: ‘T at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
52 | const float dout_data = dout.data();
| ^
In file included from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:2,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensorApply.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensor.h:5,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THCTensor.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THC.h:13,
from /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:3:
/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here
363 | T * data() const {
| ^~~~
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:53:49: warning: ‘T at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
53 | const float weight_data = weight.data();
| ^
In file included from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:2,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensorApply.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensor.h:5,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THCTensor.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THC.h:13,
from /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:3:
/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here
363 | T * data() const {
| ^~~~
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:54:39: warning: ‘T at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
54 | const float g_data = g.data();
| ^
In file included from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:2,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensorApply.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensor.h:5,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THCTensor.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THC.h:13,
from /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:3:
/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here
363 | T * data() const {
| ^~~~
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:55:35: warning: ‘T at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
55 | float dw_data = dw.data();
| ^
In file included from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:2,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensorApply.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensor.h:5,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THCTensor.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THC.h:13,
from /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:3:
/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here
363 | T * data() const {
| ^~~~
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:56:35: warning: ‘T at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
56 | float *dg_data = dg.data();
| ^
In file included from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:2,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensorApply.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH/THTensor.h:5,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THCTensor.h:4,
from /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC/THC.h:13,
from /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:3:
/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here
363 | T * data() const {
| ^~~~
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1533, in _run_ninja_build
subprocess.run(
File "/home/jp/miniconda3/envs/torch/lib/python3.8/subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
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.py", line 17, in
import networks
File "/home/jp/Documents/gitWorkspace/CCNet-1/networks/init.py", line 3, in
import networks.ccnet
File "/home/jp/Documents/gitWorkspace/CCNet-1/networks/ccnet.py", line 13, in
from cc_attention import CrissCrossAttention
File "/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/init.py", line 1, in
from .functions import CrissCrossAttention, ca_weight, ca_map
File "/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/functions.py", line 16, in
rcca = load(name="rcca",
File "/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 986, in load
return _jit_compile(
File "/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1193, in _jit_compile
_write_ninja_file_and_build_library(
File "/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1297, in _write_ninja_file_and_build_library
_run_ninja_build(
File "/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1555, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'rcca'
Loading extension module rcca...
Traceback (most recent call last):
File "train.py", line 17, in
import networks
File "/home/jp/Documents/gitWorkspace/CCNet-1/networks/init.py", line 3, in
import networks.ccnet
File "/home/jp/Documents/gitWorkspace/CCNet-1/networks/ccnet.py", line 13, in
from cc_attention import CrissCrossAttention
File "/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/init.py", line 1, in
from .functions import CrissCrossAttention, ca_weight, ca_map
File "/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/functions.py", line 16, in
rcca = load(name="rcca",
File "/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 986, in load
return _jit_compile(
File "/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1213, in _jit_compile
return _import_module_from_library(name, build_directory, is_python_module)
File "/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1560, in _import_module_from_library
Loading extension module rcca...
Traceback (most recent call last):
file, path, description = imp.find_module(module_name, [path])
File "train.py", line 17, in
File "/home/jp/miniconda3/envs/torch/lib/python3.8/imp.py", line 296, in find_module
import networks
raise ImportError(_ERR_MSG.format(name), name=name)
File "/home/jp/Documents/gitWorkspace/CCNet-1/networks/init.py", line 3, in
ImportError: No module named 'rcca'import networks.ccnet
File "/home/jp/Documents/gitWorkspace/CCNet-1/networks/ccnet.py", line 13, in
from cc_attention import CrissCrossAttention
File "/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/init.py", line 1, in
from .functions import CrissCrossAttention, ca_weight, ca_map
File "/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/functions.py", line 16, in
rcca = load(name="rcca",
File "/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 986, in load
return _jit_compile(
File "/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1213, in _jit_compile
return _import_module_from_library(name, build_directory, is_python_module)
File "/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1560, in _import_module_from_library
Loading extension module rcca...
file, path, description = imp.find_module(module_name, [path])
File "/home/jp/miniconda3/envs/torch/lib/python3.8/imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'rcca'
Traceback (most recent call last):
File "train.py", line 17, in
import networks
File "/home/jp/Documents/gitWorkspace/CCNet-1/networks/init.py", line 3, in
import networks.ccnet
File "/home/jp/Documents/gitWorkspace/CCNet-1/networks/ccnet.py", line 13, in
from cc_attention import CrissCrossAttention
File "/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/init.py", line 1, in
from .functions import CrissCrossAttention, ca_weight, ca_map
File "/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/functions.py", line 16, in
rcca = load(name="rcca",
File "/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 986, in load
return _jit_compile(
File "/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1213, in _jit_compile
return _import_module_from_library(name, build_directory, is_python_module)
File "/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1560, in _import_module_from_library
file, path, description = imp.find_module(module_name, [path])
File "/home/jp/miniconda3/envs/torch/lib/python3.8/imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'rcca'
Traceback (most recent call last):
File "/home/jp/miniconda3/envs/torch/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/jp/miniconda3/envs/torch/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/distributed/launch.py", line 260, in
main()
File "/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/distributed/launch.py", line 255, in main
raise subprocess.CalledProcessError(returncode=process.returncode,
subprocess.CalledProcessError: Command '['/home/jp/miniconda3/envs/torch/bin/python', '-u', 'train.py', '--local_rank=3', '--data-dir', '--model', '--random-mirror', '--random-scale', '--restore-from', './dataset/resnet101-imagenet.pth', '--input-size', '--gpu', '0,1,2,3', '--learning-rate', '1e-2', '--weight-decay', '5e-4', '--batch-size', '8', '--num-steps', '--ohem']' returned non-zero exit status 1.
Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.
Detected CUDA files, patching ldflags
Emitting ninja build file /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/build/build.ninja...
Building extension module rcca...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/2] c++ -MMD -MF lib_cffi.o.d -DTORCH_EXTENSION_NAME=rcca -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -isystem /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include -isystem /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH -isystem /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC -isystem /usr/local/cuda-11.2/include -isystem /home/jp/miniconda3/envs/torch/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -O3 -c /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp -o lib_cffi.o
FAILED: lib_cffi.o
c++ -MMD -MF lib_cffi.o.d -DTORCH_EXTENSION_NAME=rcca -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -isystem /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include -isystem /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/TH -isystem /home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/include/THC -isystem /usr/local/cuda-11.2/include -isystem /home/jp/miniconda3/envs/torch/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -O3 -c /home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp -o lib_cffi.o
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp: In function ‘int ca_forward_cuda(const at::Tensor&, const at::Tensor&, at::Tensor&)’:
/home/jp/Documents/gitWorkspace/CCNet-1/cc_attention/src/lib_cffi.cpp:10:25: error: ‘THCState_getCurrentStream’ was not declared in this scope
10 | cudaStream_t stream = THCState_getCurrentStream(state);