File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
kernels/elementwise_functions Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 4040#define __SYCL_COMPILER_BESSEL_I0_SUPPORT 20241208L
4141#endif
4242
43- // The <sycl/ext/intel/math.hpp> header and related types like
44- // _iml_half_internal are not compatible with NVIDIA GPUs and cause compilation
45- // errors when building with -fsycl-targets=nvptx64-nvidia-cuda.
46- #if ! defined(__NVPTX__ ) && \
43+ // Include <sycl/ext/intel/math.hpp> only when targeting Intel devices.
44+ // This header relies on intel-specific types like _iml_half_internal,
45+ // which are not supported on non-intel backends (e.g., CUDA, AMD)
46+ #if defined(__SPIR__ ) && defined(__INTEL_LLVM_COMPILER) && \
4747 (__SYCL_COMPILER_VERSION >= __SYCL_COMPILER_BESSEL_I0_SUPPORT)
4848#include < sycl/ext/intel/math.hpp>
4949#endif
@@ -78,7 +78,7 @@ class KaiserFunctor
7878
7979 void operator ()(sycl::id<1 > id) const
8080 {
81- #if ! defined(__NVPTX__ ) && \
81+ #if defined(__SPIR__ ) && defined(__INTEL_LLVM_COMPILER) && \
8282 (__SYCL_COMPILER_VERSION >= __SYCL_COMPILER_BESSEL_I0_SUPPORT)
8383 using sycl::ext::intel::math::cyl_bessel_i0;
8484#else
Original file line number Diff line number Diff line change 3535#define __SYCL_COMPILER_BESSEL_I0_SUPPORT 20241208L
3636#endif
3737
38- // The <sycl/ext/intel/math.hpp> header and related types like
39- // _iml_half_internal are not compatible with NVIDIA GPUs and cause compilation
40- // errors when building with -fsycl-targets=nvptx64-nvidia-cuda.
41- #if ! defined(__NVPTX__ ) && \
38+ // Include <sycl/ext/intel/math.hpp> only when targeting Intel devices.
39+ // This header relies on intel-specific types like _iml_half_internal,
40+ // which are not supported on non-intel backends (e.g., CUDA, AMD)
41+ #if defined(__SPIR__ ) && defined(__INTEL_LLVM_COMPILER) && \
4242 (__SYCL_COMPILER_VERSION >= __SYCL_COMPILER_BESSEL_I0_SUPPORT)
4343#include < sycl/ext/intel/math.hpp>
4444#endif
@@ -257,7 +257,7 @@ struct I0Functor
257257
258258 resT operator ()(const argT &x) const
259259 {
260- #if ! defined(__NVPTX__ ) && \
260+ #if defined(__SPIR__ ) && defined(__INTEL_LLVM_COMPILER) && \
261261 (__SYCL_COMPILER_VERSION >= __SYCL_COMPILER_BESSEL_I0_SUPPORT)
262262 using sycl::ext::intel::math::cyl_bessel_i0;
263263#else
You can’t perform that action at this time.
0 commit comments