Skip to content

Fix rocDecode test#480

Merged
kiritigowda merged 10 commits into
ROCm:developfrom
daniellegillai:decode_test_fix
Jul 25, 2026
Merged

Fix rocDecode test#480
kiritigowda merged 10 commits into
ROCm:developfrom
daniellegillai:decode_test_fix

Conversation

@daniellegillai

Copy link
Copy Markdown
Contributor

Motivation

Fixes #479 so that the video_tests_rocdecode ctest passes.

Technical Details

Pass in 1 as the hardware_decode_mode arg for video_tests.cpp (instead of 2), and also change video_tests.cpp to consistently check if the decoder_type == 1, rather than == 1 in one check and > 0 in another.

Test Plan

rocAL ctests.

Test Result

All 21 ctests pass.

Copilot AI left a comment

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.

Pull request overview

Fixes the failing video_tests_rocdecode CTest by aligning the test arguments and decoder selection logic with the documented hardware_decode_mode=0/1 contract, preventing mismatched decode configuration that could lead to hangs/timeouts.

Changes:

  • Update video_tests_rocdecode CTest to pass hardware_decode_mode=1 (valid value) instead of 2.
  • Make video_tests.cpp consistently treat decoder_type == 1 as the only condition for HW/rocDecode mode.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/cpp_api/video_tests/video_tests.cpp Makes HW decode mode selection consistent by checking decoder_type == 1.
tests/cpp_api/CMakeLists.txt Fixes the rocDecode CTest argument to use a valid hardware_decode_mode value.

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

Comment thread tests/cpp_api/video_tests/video_tests.cpp
rrawther
rrawther previously approved these changes Jul 14, 2026

@rrawther rrawther left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

please address copilot comment as well

Comment thread tests/cpp_api/video_tests/video_tests.cpp
@daniellegillai

Copy link
Copy Markdown
Contributor Author

Right now the CI is not running the rocDecode tests (-DCMAKE_DISABLE_FIND_PACKAGE_rocdecode=ON), as otherwise there is the follow cmake error:

CMake Error at rocAL/CMakeLists.txt:281 (add_library):
  Cannot find source file:
    /opt/rocm/share/rocdecode/utils/rocvideodecode/roc_video_dec.cpp

CMake Error at rocAL/rocAL_hip/CMakeLists.txt:50 (add_library):
  Cannot find source file:
    /opt/rocm/share/rocdecode/utils/resize_kernels.cpp

The /opt/rocm/share/rocdecode/utils directory does not exist in the docker image used in the CI.

rrawther
rrawther previously approved these changes Jul 18, 2026
@daniellegillai

Copy link
Copy Markdown
Contributor Author

Right now the CI is not running the rocDecode tests (-DCMAKE_DISABLE_FIND_PACKAGE_rocdecode=ON), as otherwise there is the follow cmake error:

CMake Error at rocAL/CMakeLists.txt:281 (add_library):
  Cannot find source file:
    /opt/rocm/share/rocdecode/utils/rocvideodecode/roc_video_dec.cpp

CMake Error at rocAL/rocAL_hip/CMakeLists.txt:50 (add_library):
  Cannot find source file:
    /opt/rocm/share/rocdecode/utils/resize_kernels.cpp

The /opt/rocm/share/rocdecode/utils directory does not exist in the docker image used in the CI.

Having the CI build rocDecode from source solves this problem and provides the required source files in the /opt/rocm/share/rocdecode/utils directory.

@daniellegillai

Copy link
Copy Markdown
Contributor Author

rocDecode test now enabled and succeeding on the workflow when tested locally (48a2e47)

@daniellegillai
daniellegillai requested a review from rrawther July 21, 2026 20:42

@rrawther rrawther left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Added a comment

Comment thread .github/workflows/conformance-hip.yml
@kiritigowda
kiritigowda merged commit e17e350 into ROCm:develop Jul 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Issue]: rocDecode ctest fails due to bad param

4 participants