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 and heevd_batch #1936

Merged
merged 22 commits into from
Jul 26, 2024
Merged

Conversation

vlad-perevezentsev
Copy link
Collaborator

This PR is a duplicate and continues the work of #1867 . Due to the change in syevd/heevd function interface #1891 this PR is a quick way to avoid conflicts during rebasing.

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;

  • 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?

dpnp/backend/extensions/lapack/evd_batch_common.hpp Outdated Show resolved Hide resolved
dpnp/backend/extensions/lapack/heevd_batch.cpp Outdated Show resolved Hide resolved
dpnp/backend/extensions/lapack/heevd_batch.hpp Outdated Show resolved Hide resolved
dpnp/linalg/dpnp_utils_linalg.py Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Jul 24, 2024

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

dpnp/backend/extensions/lapack/heevd_batch.cpp Outdated Show resolved Hide resolved
dpnp/backend/extensions/lapack/evd_batch_common.hpp Outdated Show resolved Hide resolved
dpnp/linalg/dpnp_utils_linalg.py Outdated Show resolved Hide resolved
dpnp/backend/extensions/lapack/evd_batch_common.hpp Outdated Show resolved Hide resolved
dpnp/backend/extensions/lapack/evd_batch_common.hpp Outdated Show resolved Hide resolved
dpnp/backend/extensions/lapack/heevd_batch.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@antonwolfy antonwolfy left a comment

Choose a reason for hiding this comment

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

Thank you @vlad-perevezentsev . It's really nice changes which can be replicated to other batch functions and which help to get rid of limitations we previously had there.

@antonwolfy antonwolfy merged commit aa534f8 into master Jul 26, 2024
30 of 39 checks passed
@antonwolfy antonwolfy deleted the impl_syevd_heevd_batch branch July 26, 2024 11:14
github-actions bot added a commit that referenced this pull request Jul 26, 2024
* Implement syevd_batch and heevd_batch

* Move include dpctl type_utils header to sourse files

* Add memory alocation check for scratchpad

* Add more checks for scratchpad_size

* Move includes

* Allocate memory for w with expected shape

* Applied review comments

* Add common_evd_checks to reduce dublicate code

* Remove host_task_events from syevd and heevd

* Applied review comments

* Use init_evd_dispatch_table instead of init_evd_batch_dispatch_table

* Move init_evd_dispatch_table to evd_common_utils.hpp

* Add helper function check_zeros_shape

* Implement alloc_scratchpad function to evd_batch_common.hpp

* Make round_up_mult as inline

* Add comment for check_zeros_shape

* Make alloc_scratchpad as inline aa534f8
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