Which Eigen version is needed?
[ 33%] Building CXX object caffe2/CMakeFiles/caffe2.dir/operators/cross_entropy_op.cc.o
cd ....../pytorch/build/caffe2 && /usr/bin/c++  -DCPUINFO_SUPPORTED_PLATFORM=1 -DHAVE_MALLOC_USABLE_SIZE=1 -DHAVE_MMAP=1 -DHAVE_SHM_OPEN=1 -DHAVE_SHM_UNLINK=1 -DNNP_CONVOLUTION_ONLY=0 -DNNP_INFERENCE_ONLY=0 -DONNX_NAMESPACE=onnx_torch -DTH_BLAS_MKL -DUSE_C11_ATOMICS=1 -D_FILE_OFFSET_BITS=64 -Dcaffe2_EXPORTS -I....../pytorch/aten/src -I....../pytorch/build -I....../pytorch -I....../pytorch/third_party/protobuf/src -I....../pytorch/build/caffe2/contrib/aten -I....../pytorch/third_party/onnx -I....../pytorch/build/third_party/onnx -I....../pytorch/build/caffe2/aten/src/TH -I....../pytorch/aten/src/TH -I....../pytorch/build/caffe2/aten/src -I....../pytorch/build/aten/src -I....../pytorch/aten/src/THNN -I....../pytorch/aten/src/THCUNN -I....../pytorch/aten/../third_party/catch/single_include -I....../pytorch/build/caffe2/aten/src/ATen -I....../pytorch/aten/src/ATen/.. -I....../pytorch/caffe2/core/nomnigraph/include -I/usr/local/cuda/include -I....../pytorch/third_party/NNPACK/include -I....../pytorch/third_party/pthreadpool/include -I....../pytorch/third_party/cpuinfo/include -isystem /opt/intel/mkl/include -isystem /usr/local/include -isystem ....../pytorch/cmake/../third_party/eigen -isystem /usr/include/python3.6m -isystem ~/.local/lib/python3.6/site-packages/numpy/core/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem ....../pytorch/cmake/../third_party/cub -isystem ....../pytorch/torch/lib/tmp_install/include -isystem ....../pytorch/build/include  -msse3 -msse4.1 -msse4.2   --std=c++11  -fvisibility-inlines-hidden -fopenmp -O2 -fPIC -Wno-narrowing -Wall -Wextra -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-stringop-overflow -DHAVE_AVX_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION -O3  -fPIC   -march=native -DCUDA_HAS_FP16=1 -DHAVE_GCC_GET_CPUID -DUSE_SSE2 -DUSE_SSE4_1 -DUSE_SSE4_2 -DUSE_SSE3 -DUSE_AVX -DUSE_AVX2 -DTH_HAVE_THREAD -fvisibility=hidden -DCAFFE2_BUILD_MAIN_LIB -O2 -pthread -std=gnu++11 -o CMakeFiles/caffe2.dir/operators/cross_entropy_op.cc.o -c ....../pytorch/caffe2/operators/cross_entropy_op.cc
In file included from /usr/local/include/unsupported/Eigen/CXX11/Tensor:104:0,
                 from ....../pytorch/caffe2/operators/conv_op_eigen.cc:10:
/usr/local/include/unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h:220:10: error: ‘array_size’ is not a class template
   struct array_size<IndexTuple<T, O...> > {
          ^~~~~~~~~~
In file included from /usr/local/include/unsupported/Eigen/CXX11/Tensor:114:0,
                 from ....../pytorch/caffe2/operators/conv_op_eigen.cc:10:
/usr/local/include/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h:203:60: error: ‘scalar_logistic_op’ is not a member of ‘Eigen::internal’
     EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_logistic_op<Scalar>, const Derived>
                                                            ^~~~~~~~~~~~~~~~~~
/usr/local/include/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h:203:60: note: suggested alternative: ‘scalar_log10_op’
     EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_logistic_op<Scalar>, const Derived>
                                                            ^~~~~~~~~~~~~~~~~~
                                                            scalar_log10_op
/usr/local/include/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h:203:60: error: ‘scalar_logistic_op’ is not a member of ‘Eigen::internal’
/usr/local/include/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h:203:60: note: suggested alternative: ‘scalar_log10_op’
     EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_logistic_op<Scalar>, const Derived>
                                                            ^~~~~~~~~~~~~~~~~~
                                                            scalar_log10_op
/usr/local/include/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h:203:85: error: wrong number of template arguments (1, should be 2)
     EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_logistic_op<Scalar>, const Derived>
                                                                                     ^
In file included from /usr/local/include/unsupported/Eigen/CXX11/Tensor:96:0,
                 from ....../pytorch/caffe2/operators/conv_op_eigen.cc:10:
/usr/local/include/unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h:69:52: note: provided for ‘template<class UnaryOp, class XprType> class Eigen::TensorCwiseUnaryOp’
 template<typename UnaryOp, typename XprType> class TensorCwiseUnaryOp;
                                                    ^~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/unsupported/Eigen/CXX11/Tensor:114:0,
                 from ....../pytorch/caffe2/operators/conv_op_eigen.cc:10:
/usr/local/include/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h:203:86: error: expected unqualified-id before ‘,’ token
     EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_logistic_op<Scalar>, const Derived>
                                                                                      ^
/usr/local/include/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h:215:60: error: ‘scalar_expm1_op’ is not a member of ‘Eigen::internal’
     EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_expm1_op<Scalar>, const Derived>
                                                            ^~~~~~~~~~~~~~~
/usr/local/include/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h:215:60: note: suggested alternative: ‘scalar_exp_op’
     EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_expm1_op<Scalar>, const Derived>
                                                            ^~~~~~~~~~~~~~~
                                                            scalar_exp_op
/usr/local/include/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h:215:60: error: ‘scalar_expm1_op’ is not a member of ‘Eigen::internal’
/usr/local/include/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h:215:60: note: suggested alternative: ‘scalar_exp_op’
     EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_expm1_op<Scalar>, const Derived>
                                                            ^~~~~~~~~~~~~~~
                                                            scalar_exp_op
/usr/local/include/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h:215:82: error: wrong number of template arguments (1, should be 2)
     EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_expm1_op<Scalar>, const Derived>
                                                                                  ^
In file included from /usr/local/include/unsupported/Eigen/CXX11/Tensor:96:0,
                 from ....../pytorch/caffe2/operators/conv_op_eigen.cc:10:
/usr/local/include/unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h:69:52: note: provided for ‘template<class UnaryOp, class XprType> class Eigen::TensorCwiseUnaryOp’
 template<typename UnaryOp, typename XprType> class TensorCwiseUnaryOp;
                                                    ^~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/unsupported/Eigen/CXX11/Tensor:114:0,
                 from ....../pytorch/caffe2/operators/conv_op_eigen.cc:10:
/usr/local/include/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h:215:83: error: expected unqualified-id before ‘,’ token
     EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_expm1_op<Scalar>, const Derived>
                                                                                   ^
In file included from /usr/include/c++/7/cassert:44:0,
                 from ....../pytorch/aten/src/ATen/core/SmallVector.h:27,
                 from ....../pytorch/aten/src/ATen/core/ArrayRef.h:20,
                 from ....../pytorch/caffe2/core/context.h:17,
                 from ....../pytorch/caffe2/operators/conv_op_eigen.cc:6:
/usr/local/include/unsupported/Eigen/CXX11/src/Tensor/TensorMap.h: In member function ‘const Scalar& Eigen::TensorMap<PlainObjectType, Options_, MakePointer_>::operator()(Eigen::TensorMap<PlainObjectType, Options_, MakePointer_>::Index, Eigen::TensorMap<PlainObjectType, Options_, MakePointer_>::Index, IndexTypes ...) const’:
/usr/local/include/unsupported/Eigen/CXX11/src/Tensor/TensorMap.h:153:7: error: ‘all’ is not a member of ‘Eigen::internal’
       eigen_assert(internal::all((Eigen::NumTraits<Index>::highest() >= otherIndices)...));
       ^
/usr/local/include/unsupported/Eigen/CXX11/src/Tensor/TensorMap.h: In member function ‘Eigen::TensorMap<PlainObjectType, Options_, MakePointer_>::Scalar& Eigen::TensorMap<PlainObjectType, Options_, MakePointer_>::operator()(Eigen::TensorMap<PlainObjectType, Options_, MakePointer_>::Index, Eigen::TensorMap<PlainObjectType, Options_, MakePointer_>::Index, IndexTypes ...)’:
/usr/local/include/unsupported/Eigen/CXX11/src/Tensor/TensorMap.h:241:8: error: ‘all’ is not a member of ‘Eigen::internal’
        eigen_assert(internal::all((Eigen::NumTraits<Index>::highest() >= otherIndices)...));
        ^
caffe2/CMakeFiles/caffe2.dir/build.make:4195: recipe for target 'caffe2/CMakeFiles/caffe2.dir/operators/conv_op_eigen.cc.o' failed
make[2]: *** [caffe2/CMakeFiles/caffe2.dir/operators/conv_op_eigen.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '....../pytorch/build'
CMakeFiles/Makefile2:1727: recipe for target 'caffe2/CMakeFiles/caffe2.dir/all' failed
make[1]: *** [caffe2/CMakeFiles/caffe2.dir/all] Error 2
make[1]: Leaving directory '....../pytorch/build'
Makefile:143: recipe for target 'all' failed
make: *** [all] Error 2
Failed to run 'bash ../tools/build_pytorch_libs.sh --use-cuda --use-nnpack --use-mkldnn caffe2 libshm gloo c10d THD'