From 2ee149741c72719bcfb5644f883f56c24f973b26 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Tue, 5 Aug 2025 19:28:57 -0700 Subject: [PATCH 1/2] adjust windows-platform-specific initialization logic --- dpnp/__init__.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/dpnp/__init__.py b/dpnp/__init__.py index 170b73b76cc0..744200ca13f6 100644 --- a/dpnp/__init__.py +++ b/dpnp/__init__.py @@ -40,17 +40,13 @@ # where to search for DLLs towards both DPNP backend and DPCTL Sycl interface, # otherwise DPNP import will be failing. This is because the libraries # are not installed under any of default paths where Python is searching. -from platform import system - -if system() == "Windows": # pragma: no cover - if hasattr(os, "add_dll_directory"): - os.add_dll_directory(mypath) - os.add_dll_directory(dpctlpath) +if sys.platform == "win32": # pragma: no cover + os.add_dll_directory(mypath) + os.add_dll_directory(dpctlpath) os.environ["PATH"] = os.pathsep.join( [os.getenv("PATH", ""), mypath, dpctlpath] ) - # For virtual environments on Windows, add folder with DPC++ libraries # to the DLL search path if sys.base_exec_prefix != sys.exec_prefix and os.path.isfile( From 445ca8158b93f02415e7716497f1eb5c53507ec9 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Wed, 6 Aug 2025 13:26:52 -0700 Subject: [PATCH 2/2] add gh-2553 to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb31d3cd3255..5f3edc23d969 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Replaced `ci` section in `.pre-commit-config.yaml` with a new GitHub workflow with scheduled run to autoupdate the `pre-commit` configuration [#2542](https://github.com/IntelPython/dpnp/pull/2542) * FFT module is updated to perform in-place FFT in intermediate steps of ND FFT [#2543](https://github.com/IntelPython/dpnp/pull/2543) * Reused dpctl tensor include to enable experimental SYCL namespace for complex types [#2546](https://github.com/IntelPython/dpnp/pull/2546) +* Changed Windows-specific logic in dpnp initialization [#2553](https://github.com/IntelPython/dpnp/pull/2553) ### Deprecated