Skip to content

Conversation

@Cstandardlib
Copy link
Collaborator

@Cstandardlib Cstandardlib commented Oct 17, 2025

Linked Issue

Fix #6592

What's changed?

  • Restructure the LAPACK Heterogeneous interface.
  • Add support for lda(leading dimension) different than n(order of the matrices).
  • Migrate from standalone hegvd_op.h/cpp to unified container::kernels::lapack_xxx API. Change the diago_dav* code (Davidson-type methods). Now only hegvd and heevx are changed, since hegvx CPU needs some other code change.
  • Move auxiliary memory into inner routine, so that the calling fuction does not need to manually recover input matrices A and B.
  • Add Tests for lapack_heevx, lapack_hegvx.
  • Remove hegvd_op.h/cpp. Should be conducted later in a new PR to gradually migrate into new lapack APIs, adding Unit Tests first.

Tip

Diago_DavSubspace is not protected by a unittest.

Tests

  • Rename test TARGET names in source/source_base/module_container/ATen/ to be auto-run in MODULE_BASE group by GitHub CI.

Any changes of core modules?

Important

Now all Column-Major LAPACK Heterogeneous Interface has been consolidated in source_base/module_container.
Reminder: New changes/extensions for column-major LAPACK interface are supposed to be based on this module.
Please DO NOT add separately or create branches.

Caution

container Device is different from base_device!

@Cstandardlib Cstandardlib marked this pull request as ready for review October 19, 2025 18:39
@Cstandardlib Cstandardlib added Refactor Refactor ABACUS codes Interfaces Interfaces with other packages labels Oct 19, 2025
@Cstandardlib Cstandardlib marked this pull request as draft October 20, 2025 03:21
@Cstandardlib Cstandardlib added the Unit Tests/Integreate Tests Issues/PR related to unit tests and integrate tests label Oct 20, 2025
@Cstandardlib Cstandardlib marked this pull request as ready for review October 20, 2025 17:54
@Critsium-xy
Copy link
Collaborator

LGTM

@mohanchen mohanchen merged commit d9afb3e into deepmodeling:develop Oct 21, 2025
14 checks passed
@Cstandardlib Cstandardlib deleted the refactor/hegvd_op branch October 21, 2025 08:39
kluonj pushed a commit to kluonj/abacus-develop that referenced this pull request Oct 24, 2025
…ng#6610)

* Update lapack_hegvd interface to support lda different than n

* Replace hegvd_op with lapack_hegvd in diago_dav_subspace

* Remove itype parameter for heevx that is required only in gv

* Update heevx to use correct arg list

* Add lapack_heevx

* Fix lapack_heevx and add template instantiation

* Replace hsolver::heevx_op with ct::kernels::lapack_heevx in diago_david

* Add lapack_hegvx

* Fix hip hegvd

* Fix hegvd to prevent B from being overwritten by Cholesky

* Switch on ATen/kernels/test

* Change container test TARGET name to be auto-run by CI

* Add test for heevx

* Add test for hegvx

* Remove test output code

* Clean the code and add docs

* Fix mismatched parentheses
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Interfaces Interfaces with other packages Refactor Refactor ABACUS codes Unit Tests/Integreate Tests Issues/PR related to unit tests and integrate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor] Restructure the standard/generalized eig driver of LAPACK

3 participants