Calls to GEBP kernel in TensorContraction does not compile with AVX512
@rmlarsen1
Submitted by Rasmus Munk LarsenAssigned to Nobody
Link to original bugzilla bug (#1661)
Version: 3.4 (development)
Platform: x86 - AVX512
Description
It seems that a definition of ScalarBinaryOpTraits<LhsScalar,RhsScalar>::ReturnType is missing in AVX512 mode. Perhaps related to dbfcceab?
Error message:
In file included from
third_party/eigen3/google_benchmarks/tensor_benchmarks_cpu.cc:5:
In file included from ./third_party/eigen3/google_benchmarks/tensor_benchmarks.h:5:
In file included from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:14:
In file included from ./third_party/eigen3/unsupported/Eigen/CXX11/../../../Eigen/Core:259:
./third_party/eigen3/unsupported/Eigen/CXX11/../../../Eigen/src/Core/util/BlasUtil.h:63:63: error: no type named 'ReturnType' in 'Eigen::ScalarBinaryOpTraits<__attribute__((vector_size(16 * sizeof(float)))) float, Eigen::internal::QuadPacket<__attribute__((vector_size(16 * sizeof(float)))) float>, Eigen::internal::scalar_product_op<__attribute__((vector_size(16 * sizeof(float)))) float, Eigen::internal::QuadPacket<__attribute__((vector_size(16 * sizeof(float)))) float> > >'
typedef typename ScalarBinaryOpTraits<LhsScalar,RhsScalar>::ReturnType Scalar;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
./third_party/eigen3/unsupported/Eigen/CXX11/../../../Eigen/src/Core/products/GeneralBlockPanelKernel.h:474:62: note: in instantiation of template class 'Eigen::internal::conj_helper<__attribute__((__vector_size__(16 * sizeof(float)))) float, Eigen::internal::QuadPacket<__attribute__((__vector_size__(16 * sizeof(float)))) float>, false, false>' requested here
conj_helper<LhsPacketType,RhsPacketType,ConjLhs,ConjRhs> cj;
^
./third_party/eigen3/unsupported/Eigen/CXX11/../../../Eigen/src/Core/products/GeneralBlockPanelKernel.h:1312:13: note: in instantiation of function template specialization 'Eigen::internal::gebp_traits<float, float, false, false, 1>::madd<__attribute__((__vector_size__(16 * sizeof(float)))) float, Eigen::internal::QuadPacket<__attribute__((__vector_size__(16 * sizeof(float)))) float>, __attribute__((__vector_size__(16 * sizeof(float)))) float, Eigen::internal::FixedInt<0> ()>' requested here
EIGEN_GEBP_ONESTEP(0);
^
./third_party/eigen3/unsupported/Eigen/CXX11/../../../Eigen/src/Core/products/GeneralBlockPanelKernel.h:1274:22: note: expanded from macro 'EIGEN_GEBP_ONESTEP'
traits.madd(A0, rhs_panel, C0, T0, fix<0>); \
^
./third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h:208:5: note: in instantiation of member function 'Eigen::internal::gebp_kernel<float, float, long, Eigen::internal::blas_data_mapper<float, long, 0, 0>, 48, 4, false, false>::operator()' requested here
GebpKernel()(output_mapper, lhsBlock, rhsBlock, rows, depth, cols, alpha,
^
./third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h:765:36: note: in instantiation of member function 'Eigen::internal::TensorContractionKernel<float, float, float, long, Eigen::internal::blas_data_mapper<float, long, 0, 0>, Eigen::internal::TensorContractionInputMapper<float, long, 1, Eigen::TensorEvaluator<const Eigen::TensorMap<Eigen::Tensor<const float, 2, 0, long>, 16, MakePointer>, Eigen::DefaultDevice>, Eigen::array<long, 1>, Eigen::array<long, 1>, 16, true, false, 0, MakePointer>, Eigen::internal::TensorContractionInputMapper<float, long, 0, Eigen::TensorEvaluator<const Eigen::TensorMap<Eigen::Tensor<const float, 2, 0, long>, 16, MakePointer>, Eigen::DefaultDevice>, Eigen::array<long, 1>, Eigen::array<long, 1>, 16, true, true, 0, MakePointer> >::invoke' requested here
TensorContractionKernel::invoke(output_mapper, blockA, blockB,
^
./third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h:668:20: note: in instantiation of function template specialization 'Eigen::TensorContractionEvaluatorBase<Eigen::TensorEvaluator<const Eigen::TensorContractionOp<const Eigen::array<Eigen::IndexPair<long>, 1>, const Eigen::TensorMap<Eigen::Tensor<const float, 2, 0, long>, 16, MakePointer>, const Eigen::TensorMap<Eigen::Tensor<const float, 2, 0, long>, 16, MakePointer>, const Eigen::NoOpOutputKernel>, Eigen::DefaultDevice> >::evalGemmPartial<true, true, true, 0, true>' requested here
this->template evalGemmPartial<lhs_inner_dim_contiguous,
^
./third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h:591:22: note: (skipping 4 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
this->template evalGemm<lhs_inner_dim_contiguous, rhs_inner_dim_contiguous,
^
./third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h:146:24: note: in instantiation of member function 'Eigen::TensorContractionEvaluatorBase<Eigen::TensorEvaluator<const Eigen::TensorContractionOp<const Eigen::array<Eigen::IndexPair<long>, 1>, const Eigen::TensorMap<Eigen::Tensor<const float, 2, 0, long>, 16, MakePointer>, const Eigen::TensorMap<Eigen::Tensor<const float, 2, 0, long>, 16, MakePointer>, const Eigen::NoOpOutputKernel>, Eigen::DefaultDevice> >::evalSubExprsIfNeeded' requested here
return m_rightImpl.evalSubExprsIfNeeded(m_leftImpl.data());
^
./third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h:69:41: note: in instantiation of member function 'Eigen::TensorEvaluator<const Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<float, 2, 0, long>, 16, MakePointer>, const Eigen::TensorContractionOp<const Eigen::array<Eigen::IndexPair<long>, 1>, const Eigen::TensorMap<Eigen::Tensor<const float, 2, 0, long>, 16, MakePointer>, const Eigen::TensorMap<Eigen::Tensor<const float, 2, 0, long>, 16, MakePointer>, const Eigen::NoOpOutputKernel> >, Eigen::DefaultDevice>::evalSubExprsIfNeeded' requested here
const bool needs_assign = evaluator.evalSubExprsIfNeeded(NULL);
^
./third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDevice.h:35:59: note: in instantiation of member function 'Eigen::internal::TensorExecutor<const Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<float, 2, 0, long>, 16, MakePointer>, const Eigen::TensorContractionOp<const Eigen::array<Eigen::IndexPair<long>, 1>, const Eigen::TensorMap<Eigen::Tensor<const float, 2, 0, long>, 16, MakePointer>, const Eigen::TensorMap<Eigen::Tensor<const float, 2, 0, long>, 16, MakePointer>, const Eigen::NoOpOutputKernel> >, Eigen::DefaultDevice, true, false>::run' requested here
internal::TensorExecutor<const Assign, DeviceType>::run(assign, m_device);
^
./third_party/eigen3/google_benchmarks/tensor_benchmarks.h:568:25: note: in instantiation of function template specialization 'Eigen::TensorDevice<Eigen::TensorMap<Eigen::Tensor<float, 2, 0, long>, 16, MakePointer>, Eigen::DefaultDevice>::operator=<Eigen::TensorContractionOp<const Eigen::array<Eigen::IndexPair<long>, 1>, const Eigen::TensorMap<Eigen::Tensor<const float, 2, 0, long>, 16, MakePointer>, const Eigen::TensorMap<Eigen::Tensor<const float, 2, 0, long>, 16, MakePointer>, const Eigen::NoOpOutputKernel> >' requested here
C.device(device_) = A.contract(B, dims);
^
third_party/eigen3/google_benchmarks/tensor_benchmarks_cpu.cc:133:25: note: in instantiation of member function 'BenchmarkSuiteEigen::DefaultDevice::contraction' requested here
BM_FuncWithInputDimsCPU(contraction, N, N, N);