Skip to content

Link dpnp_backend_c against only the MKL SYCL domains it uses - #3012

Merged
antonwolfy merged 2 commits into
masterfrom
link-to-only-used-mkl-libs
Aug 7, 2026
Merged

Link dpnp_backend_c against only the MKL SYCL domains it uses#3012
antonwolfy merged 2 commits into
masterfrom
link-to-only-used-mkl-libs

Conversation

@antonwolfy

@antonwolfy antonwolfy commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

dpnp_backend_c linked the MKL::MKL_SYCL umbrella target, whose link interface pulls in every MKL SYCL domain. This target is defined by MKL's MKLConfig.cmake, so the exact DLL set it drags in depends on the MKL build, not on dpnp.

This PR links the backend against only the MKL SYCL domains its sources use:

  • BLASoneapi::mkl::blas::scal
  • RNGoneapi::mkl::rng engines/distributions and the VSL C API
  • VMoneapi::mkl::vm vector math (div, sqr, add, powx, sqrt, …)

dft, lapack, sparse, stats, and data_fitting are not referenced by any source compiled into dpnp_backend_c, so they are dropped from its link interface.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?

@antonwolfy antonwolfy added this to the 0.21.0 release milestone Aug 5, 2026
@antonwolfy antonwolfy self-assigned this Aug 5, 2026
@antonwolfy
antonwolfy marked this pull request as ready for review August 5, 2026 15:21
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Array API standard conformance tests for dpnp=0.21.0dev3=py314h509198e_36 ran successfully.
Passed: 1376
Failed: 1
Skipped: 5

@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 78.414%. remained the same — link-to-only-used-mkl-libs into master

@ndgrigorian ndgrigorian left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@antonwolfy
antonwolfy merged commit 6ad6540 into master Aug 7, 2026
79 of 86 checks passed
@antonwolfy
antonwolfy deleted the link-to-only-used-mkl-libs branch August 7, 2026 10:18
github-actions Bot added a commit that referenced this pull request Aug 7, 2026
`dpnp_backend_c` linked the `MKL::MKL_SYCL` umbrella target, whose link
interface pulls in *every* MKL SYCL domain. This target is defined by
MKL's `MKLConfig.cmake`, so the exact DLL set it drags in depends on the
MKL build, not on dpnp.

This PR links the backend against only the MKL SYCL domains its sources
use:
* **BLAS** — `oneapi::mkl::blas::scal`
* **RNG** — `oneapi::mkl::rng` engines/distributions and the VSL C API
* **VM** — `oneapi::mkl::vm` vector math (`div`, `sqr`, `add`, `powx`,
`sqrt`, …)

`dft`, `lapack`, `sparse`, `stats`, and `data_fitting` are not
referenced by any source compiled into `dpnp_backend_c`, so they are
dropped from its link interface. 6ad6540
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants