diff --git a/.github/workflows/conformance-hip.yml b/.github/workflows/conformance-hip.yml index fd57c6477..69456e647 100644 --- a/.github/workflows/conformance-hip.yml +++ b/.github/workflows/conformance-hip.yml @@ -80,6 +80,18 @@ jobs: run: | rocminfo amd-smi || true + - name: Install rocDecode + run: | + git clone --depth 1 --filter=blob:none --sparse https://github.com/ROCm/rocm-systems.git + cd rocm-systems + git sparse-checkout set projects/rocdecode + cd projects/rocdecode + mkdir build + cd build + cmake .. + make -j$(nproc) + make install + cd ../../../../ - name: Install RPP run: | git clone --depth 1 --filter=blob:none --sparse https://github.com/ROCm/rocm-libraries.git @@ -109,7 +121,7 @@ jobs: run: | mkdir build cd build - cmake .. -DBUILD_PYPACKAGE=OFF -DCMAKE_DISABLE_FIND_PACKAGE_rocdecode=ON + cmake .. -DBUILD_PYPACKAGE=OFF make -j$(nproc) make install - name: Run tests diff --git a/tests/cpp_api/CMakeLists.txt b/tests/cpp_api/CMakeLists.txt index bdc6cb8d2..b8c3015b2 100644 --- a/tests/cpp_api/CMakeLists.txt +++ b/tests/cpp_api/CMakeLists.txt @@ -236,7 +236,7 @@ add_test( if(rocdecode_FOUND) add_test(NAME video_tests_rocdecode COMMAND video_tests - ${ROCM_PATH}/share/rocal/test/data/videos/AMD_driving_virtual_20.mp4 1 1 2 + ${ROCM_PATH}/share/rocal/test/data/videos/AMD_driving_virtual_20.mp4 1 1 1 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/video_tests) endif() diff --git a/tests/cpp_api/video_tests/video_tests.cpp b/tests/cpp_api/video_tests/video_tests.cpp index 49f5dcec9..ac4b19a33 100644 --- a/tests/cpp_api/video_tests/video_tests.cpp +++ b/tests/cpp_api/video_tests/video_tests.cpp @@ -130,7 +130,12 @@ int main(int argc, const char **argv) { if (argc >= argIdx + MIN_ARG_COUNT) enable_sequence_rearrange = atoi(argv[++argIdx]) ? true : false; - auto decoder_mode = ((decoder_type > 0) ? RocalDecodeDevice::ROCAL_HW_DECODE : RocalDecodeDevice::ROCAL_SW_DECODE); + if (!(decoder_type == 0 || decoder_type == 1)) { + std::cout << "Usage: video_tests \n"; + std::cout << "hardware_decode_mode must be 0 or 1\n"; + return -1; + } + auto decoder_mode = ((decoder_type == 1) ? RocalDecodeDevice::ROCAL_HW_DECODE : RocalDecodeDevice::ROCAL_SW_DECODE); RocalDecoderType rocal_decoder_type = RocalDecoderType::ROCAL_DECODER_VIDEO_FFMPEG_SW; if (decoder_type == 1) { rocal_decoder_type = RocalDecoderType::ROCAL_DECODER_VIDEO_ROCDECODE;