mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-30 07:44:10 +08:00
fix for HIP build errors that were introduced by a commit earlier this week
This commit is contained in:
parent
56bc4974fb
commit
2c38930161
@ -318,7 +318,7 @@ EIGEN_STRONG_INLINE __device__ bool operator >= (const half& a, const half& b) {
|
|||||||
// We need to provide emulated *host-side* FP16 operators for clang.
|
// We need to provide emulated *host-side* FP16 operators for clang.
|
||||||
#pragma push_macro("EIGEN_DEVICE_FUNC")
|
#pragma push_macro("EIGEN_DEVICE_FUNC")
|
||||||
#undef EIGEN_DEVICE_FUNC
|
#undef EIGEN_DEVICE_FUNC
|
||||||
#if defined(EIGEN_HAS_CUDA_FP16)
|
#if defined(EIGEN_HAS_GPU_FP16)
|
||||||
#define EIGEN_DEVICE_FUNC __host__
|
#define EIGEN_DEVICE_FUNC __host__
|
||||||
#else // both host and device need emulated ops.
|
#else // both host and device need emulated ops.
|
||||||
#define EIGEN_DEVICE_FUNC __host__ __device__
|
#define EIGEN_DEVICE_FUNC __host__ __device__
|
||||||
|
@ -46,7 +46,7 @@ template<> struct packet_traits<Eigen::half> : default_packet_traits
|
|||||||
template<> struct unpacket_traits<half2> { typedef Eigen::half type; enum {size=2, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef half2 half; };
|
template<> struct unpacket_traits<half2> { typedef Eigen::half type; enum {size=2, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef half2 half; };
|
||||||
|
|
||||||
template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pset1<half2>(const Eigen::half& from) {
|
template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pset1<half2>(const Eigen::half& from) {
|
||||||
#if !defined(EIGEN_CUDA_ARCH)
|
#if !defined(EIGEN_CUDA_ARCH) && !defined(EIGEN_HIP_DEVICE_COMPILE)
|
||||||
half2 r;
|
half2 r;
|
||||||
r.x = from;
|
r.x = from;
|
||||||
r.y = from;
|
r.y = from;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user