We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa1e817 commit 2151275Copy full SHA for 2151275
1 file changed
ggml/src/ggml-sycl/element_wise.cpp
@@ -72,7 +72,12 @@ static __dpct_inline__ T op_elu(T x) {
72
template<typename T>
73
static __dpct_inline__ T op_tanh(T x) {
74
if constexpr (std::is_same_v<T, sycl::ext::oneapi::bfloat16>) {
75
- return sycl::ext::oneapi::experimental::tanh(x);
+ constexpr int ver = __INTEL_LLVM_COMPILER;
76
+#if defined(__INTEL_LLVM_COMPILER) && (__INTEL_LLVM_COMPILER >= 20260000)
77
+ return sycl::ext::oneapi::experimental::tanh(x);
78
+#else
79
+ return static_cast<T>(sycl::tanh(static_cast<float>(x)));
80
+#endif
81
} else {
82
return sycl::tanh(x);
83
}
0 commit comments