Build pytorch failed by cuda/GcdLcmKernel.cu

xingwenzhi: <p>SETUP ENV:<br>
ubuntu 16.04<br>
cuda 11.2<br>
python 3.9</p>
<p>ERROR log:<br>
[3485/5257] Generating include/renameavx.h<br>
Generating renameavx.h: mkrename cinz_ 4 8 avx<br>
[3487/5257] Generating include/renamefma4.h<br>
Generating renamefma4.h: mkrename finz_ 4 8 fma4<br>
[3488/5257] Generating include/renameavx2128.h<br>
Generating renameavx2128.h: mkrename finz_ 2 4 avx2128<br>
[3489/5257] Generating include/renamecuda.h<br>
Generating renamecuda.h: mkrename finz_ 1 1 cuda<br>
[3497/5257] Generating …/…/…/include/sleef.h<br>
Generating sleef.h: mkrename cinz_ 2 4 __m128d __m128 __m128i _<em>m128i <strong>SSE2</strong><br>
Generating sleef.h: mkrename cinz</em> 2 4 __m128d __m128 __m128i _<em>m128i <strong>SSE2</strong> sse2<br>
Generating sleef.h: mkrename cinz</em> 2 4 __m128d __m128 __m128i _<em>m128i <strong>SSE2</strong> sse4<br>
Generating sleef.h: mkrename cinz</em> 4 8 __m256d __m256 __m128i struct\ {\ _<em>m128i\ x,\ y;\ } <strong>AVX</strong><br>
Generating sleef.h: mkrename cinz</em> 4 8 __m256d __m256 __m128i struct\ {\ _<em>m128i\ x,\ y;\ } <strong>AVX</strong> avx<br>
Generating sleef.h: mkrename finz</em> 4 8 __m256d __m256 __m128i struct\ {\ _<em>m128i\ x,\ y;\ } <strong>AVX</strong> fma4<br>
Generating sleef.h: mkrename finz</em> 4 8 __m256d __m256 __m128i _<em>m256i <strong>AVX</strong> avx2<br>
Generating sleef.h: mkrename finz</em> 2 4 __m128d <strong>m128 <em><em>m128i <em><em>m128i <strong>SSE2</strong> avx2128<br>
Generating sleef.h: mkrename finz</em> 8 16 <strong>m512d <strong>m512 <strong>m256i <em><em>m512i <strong>AVX512F</strong><br>
Generating sleef.h: mkrename finz</em> 8 16 <em><em>m512d <em><em>m512 <em><em>m256i <em><em>m512i <strong>AVX512F</strong> avx512f<br>
Generating sleef.h: mkrename cinz</em> 8 16 <strong>m512d <strong>m512 <strong>m256i <em><em>m512i <strong>AVX512F</strong> avx512fnofma<br>
Generating sleef.h: mkrename cinz</em> 1 1 double float int32_t int32_t <strong>STDC</strong> purec<br>
Generating sleef.h: mkrename finz</em> 1 1 double float int32_t int32_t FP_FAST_FMA purecfma<br>
[4007/5257] Building C object caffe2/CMakeFiles/torch_cpu.dir/</strong>/third_party/miniz-2.0.8/miniz.c.o<br>
…/third_party/miniz-2.0.8/miniz.c:3108:9: note: <span class="hashtag">#pragma</span> message: Using fopen, ftello, fseeko, stat() etc. path for file I/O - this path may not support large files.<br>
<span class="hashtag">#pragma</span> message(“Using fopen, ftello, fseeko, stat() etc. path for file I/O - this path may not support large files.”)<br>
^<br>
[4561/5257] Building CUDA object caffe2/CMakeFiles/torch_cuda.dir/</strong>/aten/src/ATen/native/cuda/GcdLcmKernel.cu.o<br>
FAILED: caffe2/CMakeFiles/torch_cuda.dir/</strong>/aten/src/ATen/native/cuda/GcdLcmKernel.cu.o<br>
/usr/local/cuda-11.2/bin/nvcc -forward-unknown-to-host-compiler -DAT_PER_OPERATOR_HEADERS -DHAVE_MALLOC_USABLE_SIZE=1 -DHAVE_MMAP=1 -DHAVE_SHM_OPEN=1 -DHAVE_SHM_UNLINK=1 -DIDEEP_USE_MKL -DMAGMA_V2 -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DTORCH_CUDA_BUILD_MAIN_LIB -DUSE_C10D_GLOO -DUSE_C10D_MPI -DUSE_C10D_NCCL -DUSE_CUDA -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_NCCL -DUSE_RPC -DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -Dtorch_cuda_EXPORTS -Iaten/src -I…/aten/src -I. -I…/ -I…/cmake/…/third_party/benchmark/include -I…/cmake/…/third_party/cudnn_frontend/include -I…/third_party/onnx -Ithird_party/onnx -I…/third_party/foxi -Ithird_party/foxi -Iinclude -I…/torch/csrc/distributed -I…/aten/src/THC -I…/aten/src/ATen/cuda -Icaffe2/aten/src -I…/aten/…/third_party/catch/single_include -I…/aten/src/ATen/… -Icaffe2/aten/src/ATen -Inccl/include -I…/c10/cuda/…/… -I…/c10/… -I…/third_party/tensorpipe -Ithird_party/tensorpipe -I…/third_party/tensorpipe/third_party/libnop/include -I…/torch/csrc/api -I…/torch/csrc/api/include -isystem=third_party/gloo -isystem=…/cmake/…/third_party/gloo -isystem=…/cmake/…/third_party/googletest/googlemock/include -isystem=…/cmake/…/third_party/googletest/googletest/include -isystem=…/third_party/protobuf/src -isystem=/home/PJLAB/xingwenzhi/anaconda3/include -isystem=…/third_party/gemmlowp -isystem=…/third_party/neon2sse -isystem=…/third_party/XNNPACK/include -isystem=…/third_party -isystem=…/cmake/…/third_party/eigen -isystem=/home/PJLAB/xingwenzhi/anaconda3/include/python3.9 -isystem=/home/PJLAB/xingwenzhi/anaconda3/lib/python3.9/site-packages/numpy/core/include -isystem=…/cmake/…/third_party/pybind11/include -isystem=/usr/local/cuda-11.2/include -isystem=…/third_party/ideep/mkl-dnn/third_party/oneDNN/include -isystem=…/third_party/ideep/include -Xfatbin -compress-all -DONNX_NAMESPACE=onnx_torch -gencode arch=compute_75,code=sm_75 -Xcudafe --diag_suppress=cc_clobber_ignored,–diag_suppress=integer_sign_change,–diag_suppress=useless_using_declaration,–diag_suppress=set_but_not_used,–diag_suppress=field_without_dll_interface,–diag_suppress=base_class_has_different_dll_interface,–diag_suppress=dll_interface_conflict_none_assumed,–diag_suppress=dll_interface_conflict_dllexport_assumed,–diag_suppress=implicit_return_from_non_void_function,–diag_suppress=unsigned_compare_with_zero,–diag_suppress=declared_but_not_referenced,–diag_suppress=bad_friend_decl --expt-relaxed-constexpr --expt-extended-lambda  -Wno-deprecated-gpu-targets --expt-extended-lambda -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS</em></em> -D__CUDA_NO_HALF_CONVERSIONS</em></em> -D__CUDA_NO_HALF2_OPERATORS</em></em> -D__CUDA_NO_BFLOAT16_CONVERSIONS</em></em> -O3 -DNDEBUG -Xcompiler=-fPIC -DCAFFE2_USE_GLOO -DCUDA_HAS_FP16=1 -DHAVE_GCC_GET_CPUID -DUSE_AVX -DUSE_AVX2 -DTH_HAVE_THREAD -Xcompiler=-Wall,-Wextra,-Wno-unused-parameter,-Wno-unused-variable,-Wno-unused-function,-Wno-unused-result,-Wno-unused-local-typedefs,-Wno-missing-field-initializers,-Wno-write-strings,-Wno-unknown-pragmas,-Wno-type-limits,-Wno-array-bounds,-Wno-unknown-pragmas,-Wno-sign-compare,-Wno-strict-overflow,-Wno-strict-aliasing,-Wno-error=deprecated-declarations,-Wno-missing-braces,-Wno-maybe-uninitialized -DTORCH_CUDA_BUILD_MAIN_LIB -Xcompiler -pthread -std=c++14 -MD -MT caffe2/CMakeFiles/torch_cuda.dir/</strong>/aten/src/ATen/native/cuda/GcdLcmKernel.cu.o -MF caffe2/CMakeFiles/torch_cuda.dir/</strong>/aten/src/ATen/native/cuda/GcdLcmKernel.cu.o.d -x cu -c …/aten/src/ATen/native/cuda/GcdLcmKernel.cu -o caffe2/CMakeFiles/torch_cuda.dir/</strong>/aten/src/ATen/native/cuda/GcdLcmKernel.cu.o<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu: In lambda function:<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:19:721: error: the value of ‘at::native::gcd_name’ is not usable in a constant expression<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:16:12: note: ‘at::native::gcd_name’ was not declared ‘constexpr’<br>
const char gcd_name[] = “gcd”;<br>
^<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu: In lambda function:<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:19:1388: error: the value of ‘at::native::gcd_name’ is not usable in a constant expression<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:16:12: note: ‘at::native::gcd_name’ was not declared ‘constexpr’<br>
const char gcd_name[] = “gcd”;<br>
^<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu: In lambda function:<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:19:2050: error: the value of ‘at::native::gcd_name’ is not usable in a constant expression<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:16:12: note: ‘at::native::gcd_name’ was not declared ‘constexpr’<br>
const char gcd_name[] = “gcd”;<br>
^<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu: In lambda function:<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:19:2698: error: the value of ‘at::native::gcd_name’ is not usable in a constant expression<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:16:12: note: ‘at::native::gcd_name’ was not declared ‘constexpr’<br>
const char gcd_name[] = “gcd”;<br>
^<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu: In lambda function:<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:19:3350: error: the value of ‘at::native::gcd_name’ is not usable in a constant expression<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:16:12: note: ‘at::native::gcd_name’ was not declared ‘constexpr’<br>
const char gcd_name[] = “gcd”;<br>
^<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu: In lambda function:<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:38:721: error: the value of ‘at::native::lcm_name’ is not usable in a constant expression<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:35:12: note: ‘at::native::lcm_name’ was not declared ‘constexpr’<br>
const char lcm_name[] = “lcm”;<br>
^<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu: In lambda function:<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:38:1388: error: the value of ‘at::native::lcm_name’ is not usable in a constant expression<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:35:12: note: ‘at::native::lcm_name’ was not declared ‘constexpr’<br>
const char lcm_name[] = “lcm”;<br>
^<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu: In lambda function:<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:38:2050: error: the value of ‘at::native::lcm_name’ is not usable in a constant expression<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:35:12: note: ‘at::native::lcm_name’ was not declared ‘constexpr’<br>
const char lcm_name[] = “lcm”;<br>
^<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu: In lambda function:<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:38:2698: error: the value of ‘at::native::lcm_name’ is not usable in a constant expression<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:35:12: note: ‘at::native::lcm_name’ was not declared ‘constexpr’<br>
const char lcm_name[] = “lcm”;<br>
^<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu: In lambda function:<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:38:3350: error: the value of ‘at::native::lcm_name’ is not usable in a constant expression<br>
…/aten/src/ATen/native/cuda/GcdLcmKernel.cu:35:12: note: ‘at::native::lcm_name’ was not declared ‘constexpr’<br>
const char lcm_name[] = “lcm”;<br>
^<br>
[4562/5257] Building CUDA object caffe2/CMakeFiles/torch_cuda.dir/</em></em>/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu.o<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu: In lambda function:<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu:177:794: warning: ‘at::GenericPackedTensorAccessor&lt;T, N, PtrTraits, index_t&gt; at::Tensor::packed_accessor() const &amp; [with T = double; long unsigned int N = 4ul; PtrTraits = at::DefaultPtrTraits; index_t = long int]’ is deprecated: packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead [-Wdeprecated-declarations]<br>
aten/src/ATen/core/TensorBody.h:241:1: note: declared here<br>
GenericPackedTensorAccessor&lt;T,N,PtrTraits,index_t&gt; packed_accessor() const &amp; {<br>
^<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu:177:855: warning: ‘at::GenericPackedTensorAccessor&lt;T, N, PtrTraits, index_t&gt; at::Tensor::packed_accessor() const &amp; [with T = double; long unsigned int N = 4ul; PtrTraits = at::DefaultPtrTraits; index_t = long int]’ is deprecated: packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead [-Wdeprecated-declarations]<br>
aten/src/ATen/core/TensorBody.h:241:1: note: declared here<br>
GenericPackedTensorAccessor&lt;T,N,PtrTraits,index_t&gt; packed_accessor() const &amp; {<br>
^<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu:177:916: warning: ‘at::GenericPackedTensorAccessor&lt;T, N, PtrTraits, index_t&gt; at::Tensor::packed_accessor() const &amp; [with T = long int; long unsigned int N = 4ul; PtrTraits = at::DefaultPtrTraits; index_t = long int]’ is deprecated: packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead [-Wdeprecated-declarations]<br>
aten/src/ATen/core/TensorBody.h:241:1: note: declared here<br>
GenericPackedTensorAccessor&lt;T,N,PtrTraits,index_t&gt; packed_accessor() const &amp; {<br>
^<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu:177:984: warning: ‘at::GenericPackedTensorAccessor&lt;T, N, PtrTraits, index_t&gt; at::Tensor::packed_accessor() const &amp; [with T = double; long unsigned int N = 3ul; PtrTraits = at::DefaultPtrTraits; index_t = long int]’ is deprecated: packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead [-Wdeprecated-declarations]<br>
aten/src/ATen/core/TensorBody.h:241:1: note: declared here<br>
GenericPackedTensorAccessor&lt;T,N,PtrTraits,index_t&gt; packed_accessor() const &amp; {<br>
^<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu: In lambda function:<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu:177:2471: warning: ‘at::GenericPackedTensorAccessor&lt;T, N, PtrTraits, index_t&gt; at::Tensor::packed_accessor() const &amp; [with T = float; long unsigned int N = 4ul; PtrTraits = at::DefaultPtrTraits; index_t = long int]’ is deprecated: packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead [-Wdeprecated-declarations]<br>
aten/src/ATen/core/TensorBody.h:241:1: note: declared here<br>
GenericPackedTensorAccessor&lt;T,N,PtrTraits,index_t&gt; packed_accessor() const &amp; {<br>
^<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu:177:2531: warning: ‘at::GenericPackedTensorAccessor&lt;T, N, PtrTraits, index_t&gt; at::Tensor::packed_accessor() const &amp; [with T = float; long unsigned int N = 4ul; PtrTraits = at::DefaultPtrTraits; index_t = long int]’ is deprecated: packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead [-Wdeprecated-declarations]<br>
aten/src/ATen/core/TensorBody.h:241:1: note: declared here<br>
GenericPackedTensorAccessor&lt;T,N,PtrTraits,index_t&gt; packed_accessor() const &amp; {<br>
^<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu:177:2592: warning: ‘at::GenericPackedTensorAccessor&lt;T, N, PtrTraits, index_t&gt; at::Tensor::packed_accessor() const &amp; [with T = long int; long unsigned int N = 4ul; PtrTraits = at::DefaultPtrTraits; index_t = long int]’ is deprecated: packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead [-Wdeprecated-declarations]<br>
aten/src/ATen/core/TensorBody.h:241:1: note: declared here<br>
GenericPackedTensorAccessor&lt;T,N,PtrTraits,index_t&gt; packed_accessor() const &amp; {<br>
^<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu:177:2659: warning: ‘at::GenericPackedTensorAccessor&lt;T, N, PtrTraits, index_t&gt; at::Tensor::packed_accessor() const &amp; [with T = float; long unsigned int N = 3ul; PtrTraits = at::DefaultPtrTraits; index_t = long int]’ is deprecated: packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead [-Wdeprecated-declarations]<br>
aten/src/ATen/core/TensorBody.h:241:1: note: declared here<br>
GenericPackedTensorAccessor&lt;T,N,PtrTraits,index_t&gt; packed_accessor() const &amp; {<br>
^<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu: In lambda function:<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu:177:4151: warning: ‘at::GenericPackedTensorAccessor&lt;T, N, PtrTraits, index_t&gt; at::Tensor::packed_accessor() const &amp; [with T = c10::Half; long unsigned int N = 4ul; PtrTraits = at::DefaultPtrTraits; index_t = long int]’ is deprecated: packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead [-Wdeprecated-declarations]<br>
aten/src/ATen/core/TensorBody.h:241:1: note: declared here<br>
GenericPackedTensorAccessor&lt;T,N,PtrTraits,index_t&gt; packed_accessor() const &amp; {<br>
^<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu:177:4215: warning: ‘at::GenericPackedTensorAccessor&lt;T, N, PtrTraits, index_t&gt; at::Tensor::packed_accessor() const &amp; [with T = c10::Half; long unsigned int N = 4ul; PtrTraits = at::DefaultPtrTraits; index_t = long int]’ is deprecated: packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead [-Wdeprecated-declarations]<br>
aten/src/ATen/core/TensorBody.h:241:1: note: declared here<br>
GenericPackedTensorAccessor&lt;T,N,PtrTraits,index_t&gt; packed_accessor() const &amp; {<br>
^<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu:177:4276: warning: ‘at::GenericPackedTensorAccessor&lt;T, N, PtrTraits, index_t&gt; at::Tensor::packed_accessor() const &amp; [with T = long int; long unsigned int N = 4ul; PtrTraits = at::DefaultPtrTraits; index_t = long int]’ is deprecated: packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead [-Wdeprecated-declarations]<br>
aten/src/ATen/core/TensorBody.h:241:1: note: declared here<br>
GenericPackedTensorAccessor&lt;T,N,PtrTraits,index_t&gt; packed_accessor() const &amp; {<br>
^<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu:177:4347: warning: ‘at::GenericPackedTensorAccessor&lt;T, N, PtrTraits, index_t&gt; at::Tensor::packed_accessor() const &amp; [with T = c10::Half; long unsigned int N = 3ul; PtrTraits = at::DefaultPtrTraits; index_t = long int]’ is deprecated: packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead [-Wdeprecated-declarations]<br>
aten/src/ATen/core/TensorBody.h:241:1: note: declared here<br>
GenericPackedTensorAccessor&lt;T,N,PtrTraits,index_t&gt; packed_accessor() const &amp; {<br>
^<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu: In member function ‘void at::native::structured_fractional_max_pool2d_backward_cuda::impl(const at::Tensor&amp;, const at::Tensor&amp;, c10::IntArrayRef, c10::IntArrayRef, const at::Tensor&amp;, const at::Tensor&amp;)’:<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu:248:57: warning: ‘at::GenericPackedTensorAccessor&lt;T, N, PtrTraits, index_t&gt; at::Tensor::packed_accessor() const &amp; [with T = long int; long unsigned int N = 4ul; PtrTraits = at::DefaultPtrTraits; index_t = long int]’ is deprecated: packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead [-Wdeprecated-declarations]<br>
auto devIndices = indices</em>.packed_accessor&lt;int64_t, 4&gt;();<br>
^<br>
aten/src/ATen/core/TensorBody.h:241:1: note: declared here<br>
GenericPackedTensorAccessor&lt;T,N,PtrTraits,index_t&gt; packed_accessor() const &amp; {<br>
^<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu: In lambda function:<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu:249:816: warning: ‘at::GenericPackedTensorAccessor&lt;T, N, PtrTraits, index_t&gt; at::Tensor::packed_accessor() const &amp; [with T = double; long unsigned int N = 4ul; PtrTraits = at::DefaultPtrTraits; index_t = long int]’ is deprecated: packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead [-Wdeprecated-declarations]<br>
aten/src/ATen/core/TensorBody.h:241:1: note: declared here<br>
GenericPackedTensorAccessor&lt;T,N,PtrTraits,index_t&gt; packed_accessor() const &amp; {<br>
^<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu:249:885: warning: ‘at::GenericPackedTensorAccessor&lt;T, N, PtrTraits, index_t&gt; at::Tensor::packed_accessor() const &amp; [with T = double; long unsigned int N = 4ul; PtrTraits = at::DefaultPtrTraits; index_t = long int]’ is deprecated: packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead [-Wdeprecated-declarations]<br>
aten/src/ATen/core/TensorBody.h:241:1: note: declared here<br>
GenericPackedTensorAccessor&lt;T,N,PtrTraits,index_t&gt; packed_accessor() const &amp; {<br>
^<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu: In lambda function:<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu:249:2372: warning: ‘at::GenericPackedTensorAccessor&lt;T, N, PtrTraits, index_t&gt; at::Tensor::packed_accessor() const &amp; [with T = float; long unsigned int N = 4ul; PtrTraits = at::DefaultPtrTraits; index_t = long int]’ is deprecated: packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead [-Wdeprecated-declarations]<br>
aten/src/ATen/core/TensorBody.h:241:1: note: declared here<br>
GenericPackedTensorAccessor&lt;T,N,PtrTraits,index_t&gt; packed_accessor() const &amp; {<br>
^<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu:249:2440: warning: ‘at::GenericPackedTensorAccessor&lt;T, N, PtrTraits, index_t&gt; at::Tensor::packed_accessor() const &amp; [with T = float; long unsigned int N = 4ul; PtrTraits = at::DefaultPtrTraits; index_t = long int]’ is deprecated: packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead [-Wdeprecated-declarations]<br>
aten/src/ATen/core/TensorBody.h:241:1: note: declared here<br>
GenericPackedTensorAccessor&lt;T,N,PtrTraits,index_t&gt; packed_accessor() const &amp; {<br>
^<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu: In lambda function:<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu:249:3932: warning: ‘at::GenericPackedTensorAccessor&lt;T, N, PtrTraits, index_t&gt; at::Tensor::packed_accessor() const &amp; [with T = c10::Half; long unsigned int N = 4ul; PtrTraits = at::DefaultPtrTraits; index_t = long int]’ is deprecated: packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead [-Wdeprecated-declarations]<br>
aten/src/ATen/core/TensorBody.h:241:1: note: declared here<br>
GenericPackedTensorAccessor&lt;T,N,PtrTraits,index_t&gt; packed_accessor() const &amp; {<br>
^<br>
…/aten/src/ATen/native/cuda/FractionalMaxPool2d.cu:249:4004: warning: ‘at::GenericPackedTensorAccessor&lt;T, N, PtrTraits, index_t&gt; at::Tensor::packed_accessor() const &amp; [with T = c10::Half; long unsigned int N = 4ul; PtrTraits = at::DefaultPtrTraits; index_t = long int]’ is deprecated: packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead [-Wdeprecated-declarations]<br>
aten/src/ATen/core/TensorBody.h:241:1: note: declared here<br>
GenericPackedTensorAccessor&lt;T,N,PtrTraits,index_t&gt; packed_accessor() const &amp; {<br>
^<br>
[4578/5257] Building CUDA object caffe2/CMakeFiles/torch_cuda.dir/</strong>/aten/src/ATen/native/cuda/ForeachUnaryOp.cu.o<br>
ninja: build stopped: subcommand failed.</p>
<p>If you had solved this problem, pleas reply me your solution. Thanks lot!</p>

ptrblck: <p>Which PyTorch commit are you trying to build?</p>

xingwenzhi: <p>Hi, thanks for your reply. My pytorch vesion is “Building wheel torch-1.9.0a0+gitdfbd030”, the latest vesion.</p>

xingwenzhi: <p>Hi, thanks for your reply. My pytorch vesion is “Building wheel torch-1.9.0a0+gitdfbd030”, the latest vesion.</p>

ptrblck: <p><code>1.9.0a0</code> is a pre-1.9.0 release and thus not the latest version.<br>
In any case, this commit works for me using CUDA 11.2:</p>
<pre><code class="lang-python">git clone https://github.com/pytorch/pytorch
cd pytorch
git checkout dfbd030
git submodule update --init --recursive 
python setup.py install
</code></pre>
<pre><code class="lang-python">&gt;&gt;&gt; import torch
&gt;&gt;&gt; torch.__version__
'1.9.0a0+df837d0'
&gt;&gt;&gt; torch.version.cuda
'11.2'
</code></pre>

xingwenzhi: <p>Thank you very much.  In my case, this cannot work for me.  I have to chose TensorRT for my model inference. Thanks again.</p>

Jean_Brian: <p>Meet the same problem</p>