File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1125,7 +1125,8 @@ HWY_API HWY_BITCASTSCALAR_CONSTEXPR To BitCastScalar(const From& val) {
1125
1125
1126
1126
#ifndef HWY_HAVE_SCALAR_F16_TYPE
1127
1127
// Compiler supports _Float16, not necessarily with operators.
1128
- #if HWY_NEON_HAVE_F16C || HWY_RVV_HAVE_F16_VEC || HWY_SSE2_HAVE_F16_TYPE
1128
+ #if HWY_NEON_HAVE_F16C || HWY_RVV_HAVE_F16_VEC || HWY_SSE2_HAVE_F16_TYPE || \
1129
+ __SPIRV_DEVICE__
1129
1130
#define HWY_HAVE_SCALAR_F16_TYPE 1
1130
1131
#else
1131
1132
#define HWY_HAVE_SCALAR_F16_TYPE 0
@@ -1177,7 +1178,7 @@ using NativeSpecialFloatToWrapper =
1177
1178
// are generated regardless of F16 support; see #1684.
1178
1179
struct alignas (2 ) float16_t {
1179
1180
#if HWY_HAVE_SCALAR_F16_TYPE
1180
- #if HWY_RVV_HAVE_F16_VEC || HWY_SSE2_HAVE_F16_TYPE
1181
+ #if HWY_RVV_HAVE_F16_VEC || HWY_SSE2_HAVE_F16_TYPE || __SPIRV_DEVICE__
1181
1182
using Native = _Float16;
1182
1183
#elif HWY_NEON_HAVE_F16C
1183
1184
using Native = __fp16;
You can’t perform that action at this time.
0 commit comments