Skip to content

[Bugfix]: Only run GPU tests on HIP backend - #504

Open
daniellegillai wants to merge 2 commits into
ROCm:developfrom
daniellegillai:guard-gpu-test
Open

[Bugfix]: Only run GPU tests on HIP backend#504
daniellegillai wants to merge 2 commits into
ROCm:developfrom
daniellegillai:guard-gpu-test

Conversation

@daniellegillai

@daniellegillai daniellegillai commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Note: ran out of time to test that nothing broke on the HIP backend, and to review more carefully which tests should be HIP only. But with that test and review, this should otherwise be ready.

Motivation

Fixes #500: when rocAL is compiled with CPU backend, does not run the GPU tests.

Technical Details

Modified the tests/cpp_api/CMakeLists.txt to guard the GPU tests with a BACKEND check. Also emits a message when skipping GPU tests in cmake step.

Test Plan

Built TOT rpp and MIVisionX with CPU backends, then built rocAL with -DBACKEND=CPU. Ran CTests.
Note: ran out of time to test that nothing broke on the HIP backend, and to review more carefully which tests should be HIP only. But with that test and review, this should otherwise be ready.

Test Result

Only runs non-GPU tests on CPU backend, passes all:

Test project /home/danielle/rocAL/build-cpu
    Start 1: basic_test_cpu
1/8 Test #1: basic_test_cpu .....................   Passed    1.03 sec
    Start 2: dataloader_multithread_cpu
2/8 Test #2: dataloader_multithread_cpu .........   Passed    2.03 sec
    Start 3: performance_tests_cpu
3/8 Test #3: performance_tests_cpu ..............   Passed    1.01 sec
    Start 4: performance_tests_with_depth_cpu
4/8 Test #4: performance_tests_with_depth_cpu ...   Passed    1.09 sec
    Start 5: unit_tests_cpu
5/8 Test #5: unit_tests_cpu .....................   Passed    9.23 sec
    Start 6: serialization_test_cpu
6/8 Test #6: serialization_test_cpu .............   Passed    0.91 sec
    Start 7: checkpoint_save
7/8 Test #7: checkpoint_save ....................   Passed    1.78 sec
    Start 8: checkpoint_restore
8/8 Test #8: checkpoint_restore .................   Passed    2.01 sec

@daniellegillai
daniellegillai marked this pull request as draft August 7, 2026 23:57
@daniellegillai
daniellegillai marked this pull request as ready for review August 7, 2026 23:58
@kiritigowda kiritigowda self-assigned this Aug 10, 2026
@kiritigowda kiritigowda added enhancement New feature or request bug fix labels Aug 10, 2026
@kiritigowda

Copy link
Copy Markdown
Collaborator

@levxn can you validate this on both CPU and HIP backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Issue]: Running GPU tests on CPU backend, some fail

2 participants