Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement syevd_batch/heevd_batch via syevd/heevd call #1867

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

vlad-perevezentsev
Copy link
Collaborator

@vlad-perevezentsev vlad-perevezentsev commented Jun 3, 2024

This PR suggests adding syevd_batch and heevd_batch implementation as a separate function and provide iteration of the batch array within it to avoid allocation of each 2D array before calling syevd and heevd to improve performance and avoid serialization of all host tasks in the queue in MKL call;

Performance of dpnp.eigh on Iris Xe
image

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to 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?
  • If this PR is a work in progress, are you filing the PR as a draft?

Copy link
Contributor

github-actions bot commented Jun 3, 2024

View rendered docs @ https://intelpython.github.io/dpnp/pull/1867/index.html

@vlad-perevezentsev vlad-perevezentsev changed the title Implement syevd_batch via syevd call Implement syevd_batch/heevd_batch via syevd/heevd call Jun 4, 2024
@vlad-perevezentsev vlad-perevezentsev marked this pull request as ready for review June 4, 2024 18:00
@vlad-perevezentsev vlad-perevezentsev self-assigned this Jun 4, 2024
dpnp/backend/extensions/lapack/heevd.cpp Outdated Show resolved Hide resolved
dpnp/linalg/dpnp_utils_linalg.py Outdated Show resolved Hide resolved
dpnp/backend/extensions/lapack/syevd.cpp Outdated Show resolved Hide resolved
dpnp/backend/extensions/lapack/syevd.hpp Outdated Show resolved Hide resolved
dpnp/backend/extensions/lapack/heevd.hpp Outdated Show resolved Hide resolved
dpnp/backend/extensions/lapack/syevd.cpp Show resolved Hide resolved
dpnp/backend/extensions/lapack/heevd.cpp Show resolved Hide resolved
@@ -230,6 +230,136 @@ std::pair<sycl::event, sycl::event>
return std::make_pair(args_ev, syevd_ev);
}

std::pair<sycl::event, sycl::event>
syevd_batch(sycl::queue &exec_q,
Copy link
Contributor

Choose a reason for hiding this comment

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

heevd_batch and syevd_batch looks exactly the same, isn't they?
The only sensible difference is array of callbacks, but it can be passed as an input argument.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, another difference is that we use ...dispatch_table and ...dispatch_vector to get a pointer to the executing function

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.

None yet

3 participants