TorchVision 0.9.0 Installation Error

torchvision installation error after trying all possible suggestions …

/home/nvidia/vision/torchvision/csrc/ops/autograd/deform_conv2d_kernel.cpp:30:9: error: ‘AutoDispatchBelowADInplaceOrView’ is not a member of ‘at’
at::AutoDispatchBelowADInplaceOrView g;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/nvidia/vision/torchvision/csrc/ops/autograd/deform_conv2d_kernel.cpp: In static member function ‘static torch::autograd::variable_list vision::ops::{anonymous}::DeformConv2dBackwardFunction::forward(torch::autograd::AutogradContext*, const Variable&, const Variable&, const Variable&, const Variable&, const Variable&, const Variable&, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, bool)’:
/home/nvidia/vision/torchvision/csrc/ops/autograd/deform_conv2d_kernel.cpp:145:9: error: ‘AutoDispatchBelowADInplaceOrView’ is not a member of ‘at’
at::AutoDispatchBelowADInplaceOrView g;

error: command ‘aarch64-linux-gnu-gcc’ failed with exit status 1![Error|690x354]

Screenshot updated…

Tried All options …
(upload://vQaL1h7RogmCP1ueqTwqWD8Rloh.jpeg)

2 Likes

Same here.

I am trying to install it with Docker environment for PyTorch-1.10.0 and Torchvision-0.11.1

Procedures:
RUN git clone --branch ${TORCHVISION_VERSION} GitHub - pytorch/vision: Datasets, Transforms and Models specific to Computer Vision torchvision
RUN cd torchvision &&
python3 setup.py install &&
cd …/ &&
rm -rf torchvision

Error occurs when running setup.py install
/torchvision/torchvision/csrc/ops/autograd/deform_conv2d_kernel.cpp: In static member function ‘static torch::autograd::variable_list vision::ops::{anonymous}::DeformConv2dFunction::forward(torch::autograd::AutogradContext*, const Variable&, const Variable&, const Variable&, const Variable&, const Variable&, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, bool)’:
/torchvision/torchvision/csrc/ops/autograd/deform_conv2d_kernel.cpp:30:9: error: ‘AutoDispatchBelowADInplaceOrView’ is not a member of ‘at’
at::AutoDispatchBelowADInplaceOrView g;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/torchvision/torchvision/csrc/ops/autograd/deform_conv2d_kernel.cpp: In static member function ‘static torch::autograd::variable_list vision::ops::{anonymous}::DeformConv2dBackwardFunction::forward(torch::autograd::AutogradContext*, const Variable&, const Variable&, const Variable&, const Variable&, const Variable&, const Variable&, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, bool)’:
/torchvision/torchvision/csrc/ops/autograd/deform_conv2d_kernel.cpp:145:9: error: ‘AutoDispatchBelowADInplaceOrView’ is not a member of ‘at’
at::AutoDispatchBelowADInplaceOrView g;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/autograd.h:4:0,
from /torchvision/torchvision/csrc/ops/autograd/deform_conv2d_kernel.cpp:3:
/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/autograd/custom_function.h: In instantiation of ‘torch::autograd::variable_list torch::autograd::CppNode::apply(torch::autograd::variable_list&&) [with T = vision::ops::{anonymous}::DeformConv2dBackwardFunction; torch::autograd::variable_list = std::vectorat::Tensor]’:
/torchvision/torchvision/csrc/ops/autograd/deform_conv2d_kernel.cpp:266:1: required from here
/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/autograd/custom_function.h:279:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (num_outputs > num_forward_inputs) {
^~~~~~~~
/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/autograd/custom_function.h:290:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (num_outputs != num_forward_inputs) {
^~~~~~~~~
/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/autograd/custom_function.h:300:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < num_outputs; ++i) {
^~~~~~~~~~~
/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/autograd/custom_function.h: In instantiation of ‘torch::autograd::variable_list torch::autograd::CppNode::apply(torch::autograd::variable_list&&) [with T = vision::ops::{anonymous}::DeformConv2dFunction; torch::autograd::variable_list = std::vectorat::Tensor]’:
/torchvision/torchvision/csrc/ops/autograd/deform_conv2d_kernel.cpp:266:1: required from here
/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/autograd/custom_function.h:279:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (num_outputs > num_forward_inputs) {
^~~~~~~~
/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/autograd/custom_function.h:290:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (num_outputs != num_forward_inputs) {
^~~~~~~~~
/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/autograd/custom_function.h:300:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < num_outputs; ++i) {
^~~~~~~~~~~
error: command ‘aarch64-linux-gnu-gcc’ failed with exit status 1

I met the same trouble.
Could you please tell me what I can do?

I think the folks on the PyTorch Community may be in a better position to offer help and give some pointers to solve this problem.
https://pytorch.org/vision/stable/index.html

Good Luck