Skip to content

Commit a9032cc

Browse files
Use sycl::ext::intel::math only for Intel devices
1 parent c34a498 commit a9032cc

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

dpnp/backend/extensions/window/kaiser.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
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

dpnp/backend/kernels/elementwise_functions/i0.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
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

0 commit comments

Comments
 (0)