Skip to content

Openblas backend implementation#722

Open
CDAC-SSDG wants to merge 2 commits intouxlfoundation:developfrom
CDAC-Bengaluru:openblas-backend-implementation
Open

Openblas backend implementation#722
CDAC-SSDG wants to merge 2 commits intouxlfoundation: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
"../../compiler/latest/linux/compiler/lib/${MKL_ARCH}"
"../../compiler/latest/linux/compiler/lib/${MKL_ARCH}_lin"
"../../compiler/latest/windows/compiler/lib/${MKL_ARCH}"
"../../compiler/latest/windows/compiler/lib/${MKL_ARCH}_win"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for the changes!
Looks like this branch CDAC-Bengaluru:openblas-backend-implementation is not synced with the latest develop branch from the main repo, so this PR contains reverted changes for some recent changes in the develop, like this change is reverting #719.
Could you please rebase your branch on the lates develop so these reverted changes will go away?

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