Skip to content

Conversation

@HydrogenSulfate
Copy link
Collaborator

This pull request adds support for the MAGMA library to the Iluvatar GPU backend in Paddle, enabling efficient computation of eigenvalues and eigenvectors (eig) for matrices. It introduces new CMake configuration for MAGMA, updates build scripts to include and link MAGMA, adds a CUDA eig kernel implementation leveraging MAGMA, and provides comprehensive unit tests for the new eig operator.

Build system integration and dependencies:

  • Added external/magma.cmake to set up MAGMA as a precompiled third-party library, including download, verification, and build steps.
  • Updated backends/iluvatar_gpu/CMakeLists.txt to include MAGMA in the build process, add relevant source files (magma_function.cc, magma.cc), and link the MAGMA library. [1] [2] [3]

Eigenvalue kernel and runtime support:

  • Implemented the CUDA eig kernel in eig_kernel.cu, using MAGMA for computation and supporting both real and complex input types. Handles CPU-GPU data movement as required by MAGMA.
  • Extended the runtime context in iluvatar_context.h to manage a cuSolver handle, required for MAGMA operations. [1] [2]

Testing and validation:

  • Added a comprehensive unit test suite for the eig operator on Iluvatar GPU, covering correctness, gradients, error handling, and both static and dynamic graph modes.

Submodule update:

  • Updated the Paddle submodule to reference a new commit, likely incorporating upstream changes needed for MAGMA integration.

@paddle-bot
Copy link

paddle-bot bot commented Dec 23, 2025

Thanks for your contribution!

@HydrogenSulfate HydrogenSulfate changed the title Support eig [ILUVATAR] Support eig Dec 23, 2025
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.

2 participants