Skip to content

[hipDNN] Add matmul frontend integration tests#4962

Merged
BrianHarrisonAMD merged 5 commits into
ROCm:developfrom
jovanau:add-matmul-frontend-integration-tests
Mar 4, 2026
Merged

[hipDNN] Add matmul frontend integration tests#4962
BrianHarrisonAMD merged 5 commits into
ROCm:developfrom
jovanau:add-matmul-frontend-integration-tests

Conversation

@jovanau
Copy link
Copy Markdown
Contributor

@jovanau jovanau commented Feb 27, 2026

Motivation

This PR addresses hipDNN issue #4951, which requests adding missing frontend integration test coverage for the Matmul operation.

Technical Details

This PR includes three changes:

1. FrontendGraphFactory support for Matmu

Added MATMUL to OperationType.
Added switch‑case dispatch in FrontendGraphFactory::create().
Implemented createMatmulGraph() using:

graph.matmul(a, b, matmulAttrs);

with simple 2×3 and 3×4 matrix inputs for deterministic testing.

2. Added new integration test: IntegrationMatmul.cpp

Following the structure of IntegrationConvForward.cpp, the test:

  • is parameterized with:
    • good plugin
    • execute‑fail plugin
    • no‑engines plugin
  • tests both auto‑assigned and manual UIDs
  • builds a small Matmul graph using float tensors
  • exercises the entire frontend execution pipeline:
validate() → build_operation_graph() → create_execution_plans()
→ check_support() → build_plans() → get_workspace_size() → execute()
  • uses SKIP_IF_NO_DEVICES() for GPU‑dependent execution
  • creates variant packs using device memory from the test tensor bundle
  • verifies expected failures for execute‑fail and no‑engines plugins

3. CMake update

Added IntegrationMatmul.cpp to tests/frontend/CMakeLists.txt under public_hipdnn_frontend_tests.

Test Plan

All tests were built and executed inside the official TheRock docker environment.

Test Result

[1/2] Validating test names with --gtest_list_tests test collection

Test Name Validation Report
============================================================
Total tests found: 2901
Valid test names: 2901
Invalid test names: 0
[1/2] Running all tests via ctest
Test project /therock/output/build/ml-libs/hipDNN/build
    Start 1: hipdnn_data_sdk_tests
1/7 Test #1: hipdnn_data_sdk_tests ............   Passed    0.96 sec
    Start 2: hipdnn_backend_tests
2/7 Test #2: hipdnn_backend_tests .............   Passed    1.38 sec
    Start 3: hipdnn_frontend_tests
3/7 Test #3: hipdnn_frontend_tests ............   Passed    0.05 sec
    Start 4: hipdnn_test_sdk_tests
4/7 Test #4: hipdnn_test_sdk_tests ............   Passed    8.19 sec
    Start 5: hipdnn_plugin_sdk_tests
5/7 Test #5: hipdnn_plugin_sdk_tests ..........   Passed    0.03 sec
    Start 6: public_hipdnn_backend_tests
6/7 Test #6: public_hipdnn_backend_tests ......   Passed    0.32 sec
    Start 7: public_hipdnn_frontend_tests
7/7 Test #7: public_hipdnn_frontend_tests .....   Passed    0.35 sec
100% tests passed, 0 tests failed out of 7

Label Time Summary:
integration_test    =   0.67 sec*proc (2 tests)
unit_test           =  10.61 sec*proc (5 tests)

Total Test time (real) =  11.29 sec

Submission Checklist

@jovanau jovanau requested a review from a team as a code owner February 27, 2026 11:42
@assistant-librarian assistant-librarian Bot added the external contribution Code contribution from users community.. label Feb 27, 2026
@BrianHarrisonAMD
Copy link
Copy Markdown
Contributor

Thanks for the contribution!

Running CI now.

Copy link
Copy Markdown
Contributor

@BrianHarrisonAMD BrianHarrisonAMD 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 CI & automations pass.

Thanks for the contribution!

Comment thread projects/hipdnn/tests/frontend/IntegrationMatmul.cpp
@jovanau jovanau force-pushed the add-matmul-frontend-integration-tests branch from d3ef861 to b9d973c Compare March 2, 2026 14:20
@BrianHarrisonAMD
Copy link
Copy Markdown
Contributor

ty ty for the updates!

Kicking off CI.

@BrianHarrisonAMD
Copy link
Copy Markdown
Contributor

I kicked off the CI once more.
Please let this one run fully without updating!

Each change I have to re-approve the CI run, and I think this is ready to go in once we get a green run.
ty ty.

@jovanau
Copy link
Copy Markdown
Contributor Author

jovanau commented Mar 3, 2026

Sorry about that.
All the tests passed yesterday, and I accidentally clicked to update the branch. I’m not sure why they’re failing now.

@BrianHarrisonAMD
Copy link
Copy Markdown
Contributor

Sorry about that. All the tests passed yesterday, and I accidentally clicked to update the branch. I’m not sure why they’re failing now.

No worries!
Looks like machine issues. I re-kicked it.

@BrianHarrisonAMD
Copy link
Copy Markdown
Contributor

Sorry about that. All the tests passed yesterday, and I accidentally clicked to update the branch. I’m not sure why they’re failing now.

Might be due to the github issues happening right now.
Ill try rekicking it again once things are resolved.

@BrianHarrisonAMD BrianHarrisonAMD merged commit cbf6048 into ROCm:develop Mar 4, 2026
34 of 40 checks passed
@BrianHarrisonAMD
Copy link
Copy Markdown
Contributor

Thanks for the contribution!

jovanau added a commit to jovanau/rocm-libraries that referenced this pull request Mar 19, 2026
## Motivation

<!-- Explain the purpose of this PR and the goals it aims to achieve.
-->
This PR addresses hipDNN issue ROCm#4951, which requests adding missing
frontend integration test coverage for the Matmul operation.

## Technical Details

<!-- Explain the changes along with any relevant GitHub links. -->
This PR includes three changes:

### 1. FrontendGraphFactory support for Matmu


Added MATMUL to OperationType.  
Added switch‑case dispatch in FrontendGraphFactory::create().  
Implemented createMatmulGraph() using:

```cpp
graph.matmul(a, b, matmulAttrs);
```

with simple 2×3 and 3×4 matrix inputs for deterministic testing.


### 2. Added new integration test: IntegrationMatmul.cpp

Following the structure of IntegrationConvForward.cpp, the test:

- is parameterized with:
  - good plugin  
  - execute‑fail plugin  
  - no‑engines plugin  
- tests both auto‑assigned and manual UIDs  
- builds a small Matmul graph using float tensors  
- exercises the entire frontend execution pipeline:

```
validate() → build_operation_graph() → create_execution_plans()
→ check_support() → build_plans() → get_workspace_size() → execute()
```

- uses SKIP_IF_NO_DEVICES() for GPU‑dependent execution  
- creates variant packs using device memory from the test tensor bundle
- verifies expected failures for execute‑fail and no‑engines plugins  

### 3. CMake update

Added IntegrationMatmul.cpp to tests/frontend/CMakeLists.txt under
public_hipdnn_frontend_tests.


## Test Plan

<!-- Explain any relevant testing done to verify this PR. -->
All tests were built and executed inside the official TheRock docker
environment.

## Test Result

<!-- Briefly summarize test outcomes. -->

```
[1/2] Validating test names with --gtest_list_tests test collection

Test Name Validation Report
============================================================
Total tests found: 2901
Valid test names: 2901
Invalid test names: 0
```

```
[1/2] Running all tests via ctest
Test project /therock/output/build/ml-libs/hipDNN/build
    Start 1: hipdnn_data_sdk_tests
1/7 Test ROCm#1: hipdnn_data_sdk_tests ............   Passed    0.96 sec
    Start 2: hipdnn_backend_tests
2/7 Test ROCm#2: hipdnn_backend_tests .............   Passed    1.38 sec
    Start 3: hipdnn_frontend_tests
3/7 Test ROCm#3: hipdnn_frontend_tests ............   Passed    0.05 sec
    Start 4: hipdnn_test_sdk_tests
4/7 Test ROCm#4: hipdnn_test_sdk_tests ............   Passed    8.19 sec
    Start 5: hipdnn_plugin_sdk_tests
5/7 Test ROCm#5: hipdnn_plugin_sdk_tests ..........   Passed    0.03 sec
    Start 6: public_hipdnn_backend_tests
6/7 Test ROCm#6: public_hipdnn_backend_tests ......   Passed    0.32 sec
    Start 7: public_hipdnn_frontend_tests
7/7 Test ROCm#7: public_hipdnn_frontend_tests .....   Passed    0.35 sec
```

```
100% tests passed, 0 tests failed out of 7

Label Time Summary:
integration_test    =   0.67 sec*proc (2 tests)
unit_test           =  10.61 sec*proc (5 tests)

Total Test time (real) =  11.29 sec
```

## Submission Checklist

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

---------

Signed-off-by: jovanau <u.jovana2@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external contribution Code contribution from users community.. project: hipdnn

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants