[hipDNN] Add matmul frontend integration tests#4962
Conversation
|
Thanks for the contribution! Running CI now. |
BrianHarrisonAMD
left a comment
There was a problem hiding this comment.
LGTM assuming CI & automations pass.
Thanks for the contribution!
Signed-off-by: jovanau <u.jovana2@gmail.com>
d3ef861 to
b9d973c
Compare
|
ty ty for the updates! Kicking off CI. |
|
I kicked off the CI once more. 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. |
|
Sorry about that. |
No worries! |
Might be due to the github issues happening right now. |
|
Thanks for the contribution! |
## 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>
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:
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:
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
Submission Checklist