Skip to content

Add rocWMMA to TheRock#1938

Merged
marbre merged 13 commits into
mainfrom
users/bsyrowik/add_rocwmma
Nov 12, 2025
Merged

Add rocWMMA to TheRock#1938
marbre merged 13 commits into
mainfrom
users/bsyrowik/add_rocwmma

Conversation

@bsyrowik
Copy link
Copy Markdown
Contributor

@bsyrowik bsyrowik commented Oct 25, 2025

Motivation

This PR adds the rocWMMA library to TheRock with testing.

Technical Details

We pull from rocm-libraries, and enable support and testing for Windows build.

Test Plan

Pull-Request CI run.

Test Result

Should check CI run when it completes.

Submission Checklist

Comment thread build_tools/github_actions/test_executable_scripts/test_rocwmma.py Outdated
@bsyrowik bsyrowik marked this pull request as ready for review October 27, 2025 23:31
@bsyrowik bsyrowik requested review from geomin12 and marbre October 28, 2025 00:24
Comment thread patches/amd-mainline/rocWMMA/0001-Check-for-Ninja-and-use-newer-gtest.patch Outdated
Comment thread math-libs/rocWMMA Outdated
Comment thread patches/amd-mainline/rocWMMA/0001-Check-for-Ninja-and-use-newer-gtest.patch Outdated
Comment thread build_tools/github_actions/fetch_test_configurations.py Outdated
Comment thread build_tools/github_actions/test_executable_scripts/test_rocwmma.py Outdated
@bsyrowik bsyrowik force-pushed the users/bsyrowik/add_rocwmma branch from 44e4193 to 7bd48ac Compare October 29, 2025 19:53
Comment thread build_tools/github_actions/test_executable_scripts/test_rocwmma.py Outdated
@bsyrowik bsyrowik force-pushed the users/bsyrowik/add_rocwmma branch from bfb3c5f to c2a5287 Compare November 6, 2025 18:40
bsyrowik added a commit to ROCm/rocm-libraries that referenced this pull request Nov 6, 2025
## Motivation

These changes are required to integrate rocWMMA into TheRock. This PR
subsumes the patches from my PR for TheRock here:
ROCm/TheRock#1938

## Technical Details

Mostly changes to testing and CMake configuration.
Notably:
 - Update googletest dependency.
 - Create new regression and smoke test ctest files.
 - Suggest using Ninja.
 - Export the project.

## Test Plan

TheRock CI:
https://github.com/ROCm/TheRock/actions/runs/18804601794

An equivalent PR from ROCm/rocWMMA passed all checks as well:
https://github.com/ROCm/rocWMMA/pull/601/checks

## Test Result

Tests passed

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
assistant-librarian Bot pushed a commit to ROCm/rocWMMA that referenced this pull request Nov 7, 2025
[rocWMMA] CMake changes for integration into TheRock

## Motivation

These changes are required to integrate rocWMMA into TheRock. This PR
subsumes the patches from my PR for TheRock here:
ROCm/TheRock#1938

## Technical Details

Mostly changes to testing and CMake configuration.
Notably:
 - Update googletest dependency.
 - Create new regression and smoke test ctest files.
 - Suggest using Ninja.
 - Export the project.

## Test Plan

TheRock CI:
https://github.com/ROCm/TheRock/actions/runs/18804601794

An equivalent PR from ROCm/rocWMMA passed all checks as well:
https://github.com/ROCm/rocWMMA/pull/601/checks

## Test Result

Tests passed

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
@bsyrowik bsyrowik force-pushed the users/bsyrowik/add_rocwmma branch from c2a5287 to bd804f7 Compare November 7, 2025 21:49
Copy link
Copy Markdown
Member

@marbre marbre left a comment

Choose a reason for hiding this comment

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

Please excuse the delayed review. Some comments.

Comment thread CMakeLists.txt Outdated
Comment thread build_tools/github_actions/test_executable_scripts/test_rocwmma.py Outdated
Comment thread math-libs/artifact-rocwmma.toml
Comment thread math-libs/artifact-rocwmma.toml
Comment thread math-libs/CMakeLists.txt Outdated
Comment thread math-libs/artifact-rocwmma.toml Outdated
Comment thread math-libs/artifact-rocwmma.toml Outdated
Comment thread build_tools/github_actions/fetch_test_configurations.py Outdated
@bsyrowik bsyrowik force-pushed the users/bsyrowik/add_rocwmma branch from e7b6c39 to 867413d Compare November 10, 2025 19:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 adds the rocWMMA library to TheRock, integrating it as a new math library component with comprehensive testing support on both Linux and Windows platforms.

  • Integrates rocWMMA from rocm-libraries repository with CMake configuration
  • Adds test infrastructure and CI configuration for rocWMMA validation
  • Excludes rocWMMA from unsupported GPU targets (older gfx906, gfx101X, gfx103X families)

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
math-libs/artifact-rocwmma.toml Defines artifact packaging for rocWMMA library including headers, tests, and samples
math-libs/CMakeLists.txt Adds rocWMMA subproject configuration with optional rocBLAS and benchmark dependencies
examples/cpp-sdk-user/CMakeLists.txt Adds find_package configuration for rocWMMA in SDK user examples
examples/clean_configure_test_project.cmake Propagates THEROCK_ENABLE_ROCWMMA flag to test project configuration
examples/CMakeLists.txt Passes THEROCK_ENABLE_ROCWMMA flag to test configuration
docs/development/windows_support.md Documents rocWMMA Windows support status
docs/development/installing_artifacts.md Adds --rocwmma flag documentation for artifact installation
cmake/therock_amdgpu_targets.cmake Excludes rocWMMA from unsupported GPU targets (gfx906, gfx101X, gfx103X, gfx1103)
build_tools/install_rocm_from_artifacts.py Implements --rocwmma flag for artifact retrieval script
build_tools/github_actions/test_executable_scripts/test_rocwmma.py Adds test execution script with sharding support for rocWMMA tests
build_tools/github_actions/fetch_test_configurations.py Configures CI test job for rocWMMA with 4 shards on Linux and Windows
README.md Documents THEROCK_ENABLE_ROCWMMA configuration flag
CMakeLists.txt Defines rocWMMA feature with optional rocBLAS dependency

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

Comment thread math-libs/CMakeLists.txt
Comment thread math-libs/CMakeLists.txt
Comment thread build_tools/github_actions/test_executable_scripts/test_rocwmma.py
Comment thread build_tools/github_actions/test_executable_scripts/test_rocwmma.py
Copy link
Copy Markdown
Collaborator

@stellaraccident stellaraccident left a comment

Choose a reason for hiding this comment

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

Generally looks good. I will review in detail after meetings today.

Copy link
Copy Markdown
Member

@marbre marbre left a comment

Choose a reason for hiding this comment

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

LGTM, assuming that the newly added rocWMMA tests all pass (as they already did on Windows). Let's wait for the CI signal prior to merging.

@marbre marbre merged commit d24cccc into main Nov 12, 2025
57 checks passed
@marbre marbre deleted the users/bsyrowik/add_rocwmma branch November 12, 2025 17:24
@github-project-automation github-project-automation Bot moved this from TODO to Done in TheRock Triage Nov 12, 2025
@ScottTodd
Copy link
Copy Markdown
Member

This caused build failures on the gfx101X and gfx103X GPU families on both Linux and Windows: #2127

2025-11-13T07:55:19.5029690Z [rocWMMA] /therock/src/rocm-libraries/projects/rocwmma/library/include/rocwmma/internal/config.hpp:79:15: error: static assertion failed: Unsupported architecture
2025-11-13T07:55:19.5030400Z [rocWMMA] 79 | static_assert(0, "Unsupported architecture");
2025-11-13T07:55:19.5030686Z [rocWMMA] | ^
2025-11-13T07:55:19.5030944Z [rocWMMA] 1 error generated when compiling for gfx906.
2025-11-13T07:55:19.5031232Z [rocWMMA] Elapsed time (seconds): 5.43847
2025-11-13T07:55:19.5031624Z [rocWMMA] [4/1054] Building CXX object samples/CMakeFiles/hipRTC_gemm.dir/hipRTC_gemm.cpp.o
2025-11-13T07:55:19.5032104Z [rocWMMA] FAILED: samples/CMakeFiles/hipRTC_gemm.dir/hipRTC_gemm.cpp.o

Looking at the code in rocWMMA at https://github.com/ROCm/rocm-libraries/blob/07b9a2d3c3c7b3642bd41ec07a4096e877c7b729/projects/rocwmma/library/include/rocwmma/internal/config.hpp#L29-L80, unsupported architectures are compilation errors. At a minimum for now I think we'll need to exclude rocWMMA from certain target families in https://github.com/ROCm/TheRock/blob/main/cmake/therock_amdgpu_targets.cmake, but ideally the project would at least build in some form (fallback behavior, etc.) for all architectures.

cc @stellaraccident @sa-faizal

@bsyrowik
Copy link
Copy Markdown
Contributor Author

ideally the project would at least build in some form (fallback behavior, etc.) for all architectures.

I am hesitant to do this because rocWMMA facilitates utilization of hardware constructs that are not available on the gfx10** devices, so it doesn't make much sense to provide support for them.

rocWMMA is excluded for all gfx10** families in https://github.com/ROCm/TheRock/blob/main/cmake/therock_amdgpu_targets.cmake, so I'm not sure why we're still trying to build against them?

@bsyrowik
Copy link
Copy Markdown
Contributor Author

bsyrowik commented Nov 13, 2025

I opened #1944 to cover this. The only device we don't support but ideally should support is gfx1103.

slojosic-amd added a commit to lemonade-sdk/llamacpp-rocm that referenced this pull request Dec 5, 2025
danielholanda pushed a commit to lemonade-sdk/llamacpp-rocm that referenced this pull request Dec 8, 2025
* DGGML_HIP_FORCE_ROCWMMA_FATTN_GFX12 is not needed anymore

* More updates for README and manual_instructions

* Add gfx1150 to the build-llamacpp-rocm worflow

* Enabling rocWMMA_FATTN builds since rocWMMA headers are part of TheRock after ROCm/TheRock#1938

* rocWMMA patch is not needed anymore
rponnuru5 pushed a commit that referenced this pull request Dec 9, 2025
## Motivation

This PR adds the rocWMMA library to TheRock with testing.

## Technical Details

We pull from rocm-libraries, and enable support and testing for Windows
build.

## Test Plan

Pull-Request CI run.

## Test Result

Should check CI run when it completes.

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.

---------

Co-authored-by: Marius Brehler <marius.brehler@amd.com>
ammallya pushed a commit to ROCm/rocWMMA that referenced this pull request Jan 13, 2026
## Motivation

These changes are required to integrate rocWMMA into TheRock. This PR
subsumes the patches from my PR for TheRock here:
ROCm/TheRock#1938

## Technical Details

Mostly changes to testing and CMake configuration.
Notably:
 - Update googletest dependency.
 - Create new regression and smoke test ctest files.
 - Suggest using Ninja.
 - Export the project.

## Test Plan

TheRock CI:
https://github.com/ROCm/TheRock/actions/runs/18804601794

An equivalent PR from ROCm/rocWMMA passed all checks as well:
https://github.com/ROCm/rocWMMA/pull/601/checks

## Test Result

Tests passed

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants