Skip to content

Openblas backend implementation#722

Open
CDAC-SSDG wants to merge 7 commits into
uxlfoundation:developfrom
CDAC-Bengaluru:openblas-backend-implementation
Open

Openblas backend implementation#722
CDAC-SSDG wants to merge 7 commits into
uxlfoundation:developfrom
CDAC-Bengaluru:openblas-backend-implementation

Conversation

@CDAC-SSDG
Copy link
Copy Markdown

Description

This PR adds support for using OpenBLAS as a new backend within oneMath for BLAS operations.

The implementation follows the design proposed in RFC#707 and integrates OpenBLAS as a CPU backend through the existing backend abstraction layer. BLAS operations are mapped to the OpenBLAS interface while preserving the oneMath API and execution model.

The implementation provides coverage across Level 1, Level 2, and Level 3 BLAS routines, along with support for batch operations and relevant BLAS extensions where applicable. Functionality is aligned with OpenBLAS capabilities.

Build system integration has been added to enable selection of the OpenBLAS backend through CMake configuration. The implementation has been validated with both DPC++ and AdaptiveCpp toolchains.

Documentation has been added describing how to configure and build the project with OpenBLAS support:

  • docs/building_the_project_with_openblas.rst

Motivation and Context

This change provides an additional backend option for BLAS operations using OpenBLAS, allowing users to build and run oneMath in environments where other backends may not be available or desired. It improves flexibility in backend selection while remaining consistent with the modular backend design of oneMath.

Testing

The implementation has been built and tested, test logs are attached with this PR.
OpenBlas with DPC++ unit tests log.txt

@CDAC-SSDG CDAC-SSDG requested review from a team as code owners April 13, 2026 14:36
@sknepper
Copy link
Copy Markdown
Contributor

Thank you much for your contribution, @CDAC-SSDG !
A few questions/comments:

  1. More domains than just BLAS had changes. Could you please provide an explanation for those changes? Ideally, separating commits can also help in the review process, but that's probably too challenging at this point.
  2. The clang-format check is failing - could you please apply the changes it suggests so that check passes?
  3. Some of the ArmPL tests are failing - I'm guessing this isn't due to your changes, but could you please check, particularly for the BLAS domain?
  4. As a next step after this PR is merged, having github runners testing the OpenBLAS backend would be a nice check to add (but not required).

Comment thread cmake/mkl/MKLConfig.cmake Outdated
Comment thread include/oneapi/math/detail/backends_table.hpp Outdated
Comment thread tests/unit_tests/CMakeLists.txt Outdated
@sknepper
Copy link
Copy Markdown
Contributor

Hi @CDAC-SSDG - could you please apply the changes from the clang-format check so it passes? Thanks!

Copy link
Copy Markdown
Contributor

@sknepper sknepper left a comment

Choose a reason for hiding this comment

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

@CDAC-SSDG - thank you very much for this valuable contribution! The changes look good to me.
@ndingle-arm - could you please check the latest changes and verify that all your questions have been answered?

Comment thread src/blas/backends/openblas/openblas_common.hpp Outdated
Comment thread src/blas/backends/openblas/openblas_extensions.cxx Outdated
Comment thread src/blas/backends/openblas/openblas_extensions.cxx Outdated
Comment thread src/blas/backends/openblas/openblas_level1.cxx Outdated
Comment thread src/blas/backends/openblas/openblas_batch.cxx Outdated
Comment thread src/blas/backends/openblas/openblas_extensions.cxx Outdated
Comment thread src/blas/backends/openblas/openblas_extensions.cxx Outdated
Comment thread src/blas/backends/openblas/CMakeLists.txt Outdated
Copy link
Copy Markdown
Contributor

@ndingle-arm ndingle-arm 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 for the change @CDAC-SSDG but I spotted a few more things reading through again.

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.

4 participants