Skip to content

Fix: Add DSP gemm pack with auto memcpy to buffer - #7060

Merged
mohanchen merged 3 commits into
deepmodeling:developfrom
Cstandardlib:dsp/zgemm-pack-mth
Mar 20, 2026
Merged

Fix: Add DSP gemm pack with auto memcpy to buffer#7060
mohanchen merged 3 commits into
deepmodeling:developfrom
Cstandardlib:dsp/zgemm-pack-mth

Conversation

@Cstandardlib

Copy link
Copy Markdown
Collaborator

What's changed?

  • Temporary solution to make it work for nonlocal gemm on DSP.
  • Add a gemm pack version, with auto memory buffer inside.

Copilot AI review requested due to automatic review settings March 19, 2026 04:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the DSP GEMM path for complex types to use new “pack” variants that internally allocate DSP buffers and perform host↔DSP copies, aiming to make nonlocal GEMM work on DSP as a temporary solution.

Changes:

  • Switched DSP complex GEMM calls to cgemm_pack_mth_ / zgemm_pack_mth_ in the BLAS connector.
  • Added DSP connector declarations and implementations for the new packed GEMM entry points.
  • Adjusted DSP connector header guard trailing #endifs.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
source/source_base/module_external/blas_connector_matrix.cpp Routes DSP complex GEMM calls through new packed DSP GEMM helpers.
source/source_base/kernels/dsp/dsp_connector.h Declares the new packed DSP GEMM APIs (and adjusts header guard endings).
source/source_base/kernels/dsp/dsp_connector.cpp Implements packed DSP GEMM helpers with DSP-side allocations and memcpy.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/source_base/kernels/dsp/dsp_connector.cpp
Comment thread source/source_base/kernels/dsp/dsp_connector.cpp
Comment thread source/source_base/kernels/dsp/dsp_connector.cpp
Comment thread source/source_base/kernels/dsp/dsp_connector.cpp
Comment thread source/source_base/kernels/dsp/dsp_connector.h Outdated
@mohanchen
mohanchen merged commit ad77994 into deepmodeling:develop Mar 20, 2026
15 checks passed
@mohanchen mohanchen added Refactor Refactor ABACUS codes GPU & DCU & HPC GPU and DCU and HPC related any issues labels Mar 20, 2026
@Cstandardlib
Cstandardlib deleted the dsp/zgemm-pack-mth branch April 9, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GPU & DCU & HPC GPU and DCU and HPC related any issues Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants