Skip to content

Commit 0877a32

Browse files
Merge master into enable_amd_build
2 parents 2eaf883 + 587918a commit 0877a32

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ repos:
6666
name: isort (pyi)
6767
types: [pyi]
6868
- repo: https://github.com/pycqa/flake8
69-
rev: 7.1.2
69+
rev: 7.2.0
7070
hooks:
7171
- id: flake8
7272
args: ["--config=.flake8"]
@@ -79,7 +79,7 @@ repos:
7979
- id: clang-format
8080
args: ["-i"]
8181
- repo: https://github.com/gitleaks/gitleaks
82-
rev: v8.24.0
82+
rev: v8.25.1
8383
hooks:
8484
- id: gitleaks
8585
- repo: https://github.com/jumanjihouse/pre-commit-hooks

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ This release achieves 100% compliance with Python Array API specification (revis
3434
* Resolved an issue with an incorrect result returned due to missing dependency from the strided kernel on a copy event in `dpnp.erf` [#2378](https://github.com/IntelPython/dpnp/pull/2378)
3535
* Updated `conda create` commands build and install instructions of `Quick start guide` to avoid a compilation error [#2395](https://github.com/IntelPython/dpnp/pull/2395)
3636
* Added handling of empty string passed to a test env variable defining data type scope as a `False` value [#2415](https://github.com/IntelPython/dpnp/pull/2415)
37+
* Resolved build issues on non-Intel targets in `dpnp.i0` and `dpnp.kaiser` [#2439](https://github.com/IntelPython/dpnp/pull/2439)
3738

3839

3940
## [0.17.0] - 02/26/2025

dpnp/backend/extensions/window/kaiser.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@
4040
#define __SYCL_COMPILER_BESSEL_I0_SUPPORT 20241208L
4141
#endif
4242

43-
#if __SYCL_COMPILER_VERSION >= __SYCL_COMPILER_BESSEL_I0_SUPPORT
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) && \
47+
(__SYCL_COMPILER_VERSION >= __SYCL_COMPILER_BESSEL_I0_SUPPORT)
4448
#include <sycl/ext/intel/math.hpp>
4549
#endif
4650

@@ -74,7 +78,8 @@ class KaiserFunctor
7478

7579
void operator()(sycl::id<1> id) const
7680
{
77-
#if __SYCL_COMPILER_VERSION >= __SYCL_COMPILER_BESSEL_I0_SUPPORT
81+
#if defined(__SPIR__) && defined(__INTEL_LLVM_COMPILER) && \
82+
(__SYCL_COMPILER_VERSION >= __SYCL_COMPILER_BESSEL_I0_SUPPORT)
7883
using sycl::ext::intel::math::cyl_bessel_i0;
7984
#else
8085
using dpnp::kernels::i0::impl::cyl_bessel_i0;

dpnp/backend/kernels/elementwise_functions/i0.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@
3535
#define __SYCL_COMPILER_BESSEL_I0_SUPPORT 20241208L
3636
#endif
3737

38-
#if __SYCL_COMPILER_VERSION >= __SYCL_COMPILER_BESSEL_I0_SUPPORT
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) && \
42+
(__SYCL_COMPILER_VERSION >= __SYCL_COMPILER_BESSEL_I0_SUPPORT)
3943
#include <sycl/ext/intel/math.hpp>
4044
#endif
4145

@@ -253,7 +257,8 @@ struct I0Functor
253257

254258
resT operator()(const argT &x) const
255259
{
256-
#if __SYCL_COMPILER_VERSION >= __SYCL_COMPILER_BESSEL_I0_SUPPORT
260+
#if defined(__SPIR__) && defined(__INTEL_LLVM_COMPILER) && \
261+
(__SYCL_COMPILER_VERSION >= __SYCL_COMPILER_BESSEL_I0_SUPPORT)
257262
using sycl::ext::intel::math::cyl_bessel_i0;
258263
#else
259264
using impl::cyl_bessel_i0;

dpnp/random/dpnp_iface_random.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1672,7 +1672,7 @@ def seed(seed=None, device=None, sycl_queue=None):
16721672
"""
16731673

16741674
# update a mt19937 random number for both RandomState and legacy functionality
1675-
global _dpnp_random_states
1675+
global _dpnp_random_states # noqa: F824
16761676

16771677
sycl_queue = dpnp.get_normalized_queue_device(
16781678
device=device, sycl_queue=sycl_queue

0 commit comments

Comments
 (0)