diff --git a/third_party/eigen3/gpu_packet_math.patch b/third_party/eigen3/gpu_packet_math.patch index 50ac056df79a68d260390d38193b3e740aaf0bdd..1b6131abd41bc2f1a3c8ccf113ff3db4aa512877 100644 --- a/third_party/eigen3/gpu_packet_math.patch +++ b/third_party/eigen3/gpu_packet_math.patch @@ -22,4 +22,161 @@ return res; } }; - \ No newline at end of file +--- a/unsupported/Eigen/SpecialFunctions ++++ b/unsupported/Eigen/SpecialFunctions +@@ -48,6 +48,9 @@ + } + + #include "src/SpecialFunctions/SpecialFunctionsImpl.h" ++#if defined(EIGEN_HIPCC) ++#include "src/SpecialFunctions/HipVectorCompatibility.h" ++#endif + #include "src/SpecialFunctions/SpecialFunctionsPacketMath.h" + #include "src/SpecialFunctions/SpecialFunctionsHalf.h" + #include "src/SpecialFunctions/SpecialFunctionsFunctors.h" +--- /dev/null ++++ b/unsupported/Eigen/src/SpecialFunctions/HipVectorCompatibility.h +@@ -0,0 +1,143 @@ ++#ifndef HIP_VECTOR_COMPATIBILITY_H ++#define HIP_VECTOR_COMPATIBILITY_H ++ ++namespace hip_impl { ++ template struct Scalar_accessor; ++} // end namespace hip_impl ++ ++namespace Eigen { ++namespace internal { ++ ++#if EIGEN_HAS_C99_MATH ++template ++struct lgamma_impl> : lgamma_impl {}; ++#endif ++ ++template ++struct digamma_impl_maybe_poly> ++ : digamma_impl_maybe_poly {}; ++ ++template ++struct digamma_impl> : digamma_impl {}; ++ ++#if EIGEN_HAS_C99_MATH ++template ++struct erf_impl> : erf_impl {}; ++#endif // EIGEN_HAS_C99_MATH ++ ++#if EIGEN_HAS_C99_MATH ++template ++struct erfc_impl> : erfc_impl {}; ++#endif // EIGEN_HAS_C99_MATH ++ ++#if EIGEN_HAS_C99_MATH ++template ++struct ndtri_impl> : ndtri_impl {}; ++#endif // EIGEN_HAS_C99_MATH ++ ++template ++struct igammac_cf_impl, mode> ++ : igammac_cf_impl {}; ++ ++template ++struct igamma_series_impl, mode> ++ : igamma_series_impl {}; ++ ++#if EIGEN_HAS_C99_MATH ++template ++struct igammac_impl> : igammac_impl {}; ++#endif // EIGEN_HAS_C99_MATH ++ ++#if EIGEN_HAS_C99_MATH ++template ++struct igamma_generic_impl, mode> ++ : igamma_generic_impl {}; ++#endif // EIGEN_HAS_C99_MATH ++ ++template ++struct igamma_impl> : igamma_impl {}; ++ ++template ++struct igamma_der_a_retval> ++ : igamma_der_a_retval {}; ++ ++template ++struct igamma_der_a_impl> ++ : igamma_der_a_impl {}; ++ ++template ++struct gamma_sample_der_alpha_retval> ++ : gamma_sample_der_alpha_retval {}; ++ ++template ++struct gamma_sample_der_alpha_impl> ++ : gamma_sample_der_alpha_impl {}; ++ ++template ++struct zeta_impl_series> ++ : zeta_impl_series {}; ++ ++template ++struct zeta_impl> : zeta_impl {}; ++ ++#if EIGEN_HAS_C99_MATH ++template ++struct polygamma_impl> ++ : polygamma_impl {}; ++#endif // EIGEN_HAS_C99_MATH ++ ++#if EIGEN_HAS_C99_MATH ++template ++struct betainc_impl> : betainc_impl {}; ++ ++template ++struct incbeta_cfe> : incbeta_cfe {}; ++ ++template ++struct betainc_helper> ++ : betainc_helper {}; ++#else ++template ++struct betainc_impl> : betainc_impl {}; ++#endif // EIGEN_HAS_C99_MATH ++ ++template ++struct bessel_i0e_impl> : bessel_i0e_impl {}; ++ ++template ++struct bessel_i0_impl> : bessel_i0_impl {}; ++ ++template ++struct bessel_i1e_impl> : bessel_i1e_impl {}; ++ ++template ++struct bessel_i1_impl> : bessel_i1_impl {}; ++ ++template ++struct bessel_k0e_impl> : bessel_k0e_impl {}; ++ ++template ++struct bessel_k0_impl> : bessel_k0_impl {}; ++ ++template ++struct bessel_k1e_impl> : bessel_k1e_impl {}; ++ ++template ++struct bessel_k1_impl> : bessel_k1_impl {}; ++ ++template ++struct bessel_j0_impl> : bessel_j0_impl {}; ++ ++template ++struct bessel_y0_impl> : bessel_y0_impl {}; ++ ++template ++struct bessel_j1_impl> : bessel_j1_impl {}; ++ ++template ++struct bessel_y1_impl> : bessel_y1_impl {}; ++ ++} // end namespace internal ++} // end namespace Eigen ++ ++#endif // HIP_VECTOR_COMPATIBILITY_H