From 6a2036b03347db2acdff813300a1cdac28c74b71 Mon Sep 17 00:00:00 2001 From: Kiriti Gowda Date: Fri, 14 Nov 2025 13:23:51 -0800 Subject: [PATCH] Package - Host package updates (#671) * rocDecode host - Package * Host Package - Added * Readme - Host updates * Changelog - Updates [ROCm/rocdecode commit: 433ca3a56440975692438d1e154a7a71b3b9de2f] --- projects/rocdecode/CHANGELOG.md | 3 ++- projects/rocdecode/CMakeLists.txt | 19 +++++++++++++++++-- projects/rocdecode/README.md | 10 ++++++---- .../docker/rocDecode-on-ubuntu20.dockerfile | 2 +- .../docker/rocDecode-on-ubuntu22.dockerfile | 2 +- .../install/rocDecode-package-install.rst | 8 ++++---- .../docs/install/rocDecode-prerequisites.rst | 2 +- .../docs/tutorials/rocDecode-samples.rst | 4 ++-- .../src/rocdecode-host/CMakeLists.txt | 14 +++++++------- 9 files changed, 41 insertions(+), 23 deletions(-) diff --git a/projects/rocdecode/CHANGELOG.md b/projects/rocdecode/CHANGELOG.md index 02a9da8068..385bee1997 100644 --- a/projects/rocdecode/CHANGELOG.md +++ b/projects/rocdecode/CHANGELOG.md @@ -2,13 +2,14 @@ Full documentation for rocDecode is available at [https://rocm.docs.amd.com/projects/rocDecode/en/latest/](https://rocm.docs.amd.com/projects/rocDecode/en/latest/) -## (Unreleased) rocDecode 1.5.1 +## rocDecode 1.6.0 for ROCm 7.2.0 ### Changed * Updated libdrm path configuration and libva version requirements for ROCm and TheRock platforms ### Added * Logging control. Message output from the core components is now controlled by the logging level threshold, which can be set by an environment variable or other methods. +* rocdecode-host package - rocdecode-host library and samples ### Resolved issues diff --git a/projects/rocdecode/CMakeLists.txt b/projects/rocdecode/CMakeLists.txt index e0e5068b68..dd778cb6e4 100644 --- a/projects/rocdecode/CMakeLists.txt +++ b/projects/rocdecode/CMakeLists.txt @@ -40,7 +40,7 @@ if (NOT DEFINED CMAKE_CXX_COMPILER) endif() # rocdecode Version -set(VERSION "1.5.1") +set(VERSION "1.6.0") # Set Project Version and Language project(rocdecode VERSION ${VERSION} LANGUAGES CXX) @@ -381,6 +381,9 @@ if(HIP_FOUND AND Libva_FOUND AND Libdrm_amdgpu_FOUND) # Debian package - Test set(CPACK_DEBIAN_TEST_PACKAGE_NAME "${PROJECT_NAME}-test" ) set(CPACK_DEBIAN_TEST_PACKAGE_DEPENDS "rocm-core, ${CPACK_DEBIAN_DEV_PACKAGE_NAME}" ) + # Debian package - Host + set(CPACK_DEBIAN_HOST_PACKAGE_NAME "${PROJECT_NAME}-host" ) + set(CPACK_DEBIAN_HOST_PACKAGE_DEPENDS "rocm-core, ${CPACK_DEBIAN_DEV_PACKAGE_NAME}" ) # RPM package set(CPACK_RPM_COMPONENT_INSTALL ON) set(CPACK_RPM_RUNTIME_PACKAGE_NAME "${PROJECT_NAME}") @@ -394,23 +397,28 @@ if(HIP_FOUND AND Libva_FOUND AND Libdrm_amdgpu_FOUND) # RPM package specific variable for Test set(CPACK_RPM_TEST_PACKAGE_NAME "${PROJECT_NAME}-test" ) set(CPACK_RPM_TEST_PACKAGE_REQUIRES "rocm-core, ${CPACK_RPM_DEV_PACKAGE_NAME}" ) + # RPM package specific variable for Host + set(CPACK_RPM_HOST_PACKAGE_NAME "${PROJECT_NAME}-host" ) + set(CPACK_RPM_HOST_PACKAGE_REQUIRES "rocm-core, ${CPACK_RPM_DEV_PACKAGE_NAME}" ) if(NOT ROCM_DEP_ROCMCORE) string(REGEX REPLACE ",? ?rocm-core," "" CPACK_RPM_RUNTIME_PACKAGE_REQUIRES ${CPACK_RPM_RUNTIME_PACKAGE_REQUIRES}) string(REGEX REPLACE ",? ?rocm-core-asan," "" CPACK_RPM_ASAN_PACKAGE_REQUIRES ${CPACK_RPM_ASAN_PACKAGE_REQUIRES}) string(REGEX REPLACE ",? ?rocm-core," "" CPACK_RPM_DEV_PACKAGE_REQUIRES ${CPACK_RPM_DEV_PACKAGE_REQUIRES}) string(REGEX REPLACE ",? ?rocm-core," "" CPACK_RPM_TEST_PACKAGE_REQUIRES ${CPACK_RPM_TEST_PACKAGE_REQUIRES}) + string(REGEX REPLACE ",? ?rocm-core," "" CPACK_RPM_HOST_PACKAGE_REQUIRES ${CPACK_RPM_TEST_PACKAGE_REQUIRES}) string(REGEX REPLACE ",? ?rocm-core," "" CPACK_DEBIAN_RUNTIME_PACKAGE_DEPENDS ${CPACK_DEBIAN_RUNTIME_PACKAGE_DEPENDS}) string(REGEX REPLACE ",? ?rocm-core-asan," "" CPACK_DEBIAN_ASAN_PACKAGE_DEPENDS ${CPACK_DEBIAN_ASAN_PACKAGE_DEPENDS}) string(REGEX REPLACE ",? ?rocm-core," "" CPACK_DEBIAN_DEV_PACKAGE_DEPENDS ${CPACK_DEBIAN_DEV_PACKAGE_DEPENDS}) string(REGEX REPLACE ",? ?rocm-core," "" CPACK_DEBIAN_TEST_PACKAGE_DEPENDS ${CPACK_DEBIAN_TEST_PACKAGE_DEPENDS}) + string(REGEX REPLACE ",? ?rocm-core," "" CPACK_DEBIAN_HOST_PACKAGE_DEPENDS ${CPACK_DEBIAN_TEST_PACKAGE_DEPENDS}) endif() if(ENABLE_ASAN_PACKAGING) # ASAN Package requires asan component with only libraries and license file set(CPACK_COMPONENTS_ALL asan) else() - set(CPACK_COMPONENTS_ALL runtime dev test) + set(CPACK_COMPONENTS_ALL runtime dev test host) endif() set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") @@ -457,6 +465,13 @@ if(HIP_FOUND AND Libva_FOUND AND Libdrm_amdgpu_FOUND) cpack_add_component(test DISPLAY_NAME "rocdecode Test Package" DESCRIPTION "High perf video decode SDK for AMD GPUs. rocdecode test") + + # make rocdecode-host for decoding on HOST only if FFMPEG is available + if(ROCDECODE_ENABLE_HOST_DECODER AND FFMPEG_FOUND) + cpack_add_component(host + DISPLAY_NAME "rocdecode host package" + DESCRIPTION "High perf video decode host SDK for AMD GPUs") + endif() else() message("-- ${Red}AMD ROCm ${PROJECT_NAME} -- unmet dependencies${ColourReset}") diff --git a/projects/rocdecode/README.md b/projects/rocdecode/README.md index e09899f01f..0763b52c14 100644 --- a/projects/rocdecode/README.md +++ b/projects/rocdecode/README.md @@ -122,28 +122,30 @@ system. * Runtime package - `rocdecode` only provides the rocdecode library `librocdecode.so` * Development package - `rocdecode-dev`/`rocdecode-devel` provides the library, header files, and samples +* Host package - `rocdecode-host` provides rocdecode host decode * Test package - `rocdecode-test` provides CTest to verify installation #### Ubuntu ```shell - sudo apt install rocdecode rocdecode-dev rocdecode-test + sudo apt install rocdecode rocdecode-dev rocdecode-test rocdecode-host ``` #### RHEL ```shell - sudo yum install rocdecode rocdecode-devel rocdecode-test + sudo yum install rocdecode rocdecode-devel rocdecode-test rocdecode-host ``` #### SLES ```shell - sudo zypper install rocdecode rocdecode-devel rocdecode-test + sudo zypper install rocdecode rocdecode-devel rocdecode-test rocdecode-host ``` >[!NOTE] -> Package install auto installs all dependencies. +> * Package install auto installs all dependencies. +> * `rocdecode-host` package is optional package use in host video decode > [!IMPORTANT] > `RHEL`/`SLES` package install requires manual `FFMPEG` dev install diff --git a/projects/rocdecode/docker/rocDecode-on-ubuntu20.dockerfile b/projects/rocdecode/docker/rocDecode-on-ubuntu20.dockerfile index 16256f7ba1..8bdcdca0bf 100644 --- a/projects/rocdecode/docker/rocDecode-on-ubuntu20.dockerfile +++ b/projects/rocdecode/docker/rocDecode-on-ubuntu20.dockerfile @@ -14,4 +14,4 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install initramfs-tools libnuma-de WORKDIR /workspace # install rocDecode package -RUN DEBIAN_FRONTEND=noninteractive sudo apt install -y rocdecode rocdecode-dev rocdecode-test \ No newline at end of file +RUN DEBIAN_FRONTEND=noninteractive sudo apt install -y rocdecode rocdecode-dev rocdecode-test rocdecode-host \ No newline at end of file diff --git a/projects/rocdecode/docker/rocDecode-on-ubuntu22.dockerfile b/projects/rocdecode/docker/rocDecode-on-ubuntu22.dockerfile index 0634f913d7..7100c1d6e4 100644 --- a/projects/rocdecode/docker/rocDecode-on-ubuntu22.dockerfile +++ b/projects/rocdecode/docker/rocDecode-on-ubuntu22.dockerfile @@ -14,4 +14,4 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install initramfs-tools libnuma-de WORKDIR /workspace # install rocDecode package -RUN DEBIAN_FRONTEND=noninteractive sudo apt install -y rocdecode rocdecode-dev rocdecode-test \ No newline at end of file +RUN DEBIAN_FRONTEND=noninteractive sudo apt install -y rocdecode rocdecode-dev rocdecode-test rocdecode-host \ No newline at end of file diff --git a/projects/rocdecode/docs/install/rocDecode-package-install.rst b/projects/rocdecode/docs/install/rocDecode-package-install.rst index 66ce6d8148..ff3c5d5ccb 100644 --- a/projects/rocdecode/docs/install/rocDecode-package-install.rst +++ b/projects/rocdecode/docs/install/rocDecode-package-install.rst @@ -44,7 +44,7 @@ Use the following commands to install only the rocDecode runtime package: Complete installation ======================================== -Use the following commands to install ``rocdecode``, ``rocdecode-dev``, and ``rocdecode-test``: +Use the following commands to install ``rocdecode``, ``rocdecode-dev``, ``rocdecode-host``, and ``rocdecode-test``: .. tab-set:: @@ -52,16 +52,16 @@ Use the following commands to install ``rocdecode``, ``rocdecode-dev``, and ``ro .. code:: shell - sudo apt install rocdecode rocdecode-dev rocdecode-test + sudo apt install rocdecode rocdecode-dev rocdecode-test rocdecode-host .. tab-item:: RHEL .. code:: shell - sudo yum install rocdecode rocdecode-devel rocdecode-test + sudo yum install rocdecode rocdecode-devel rocdecode-test rocdecode-host .. tab-item:: SLES .. code:: shell - sudo zypper install rocdecode rocdecode-devel rocdecode-test + sudo zypper install rocdecode rocdecode-devel rocdecode-test rocdecode-host diff --git a/projects/rocdecode/docs/install/rocDecode-prerequisites.rst b/projects/rocdecode/docs/install/rocDecode-prerequisites.rst index ac99253a52..b0198f7382 100644 --- a/projects/rocdecode/docs/install/rocDecode-prerequisites.rst +++ b/projects/rocdecode/docs/install/rocDecode-prerequisites.rst @@ -26,7 +26,7 @@ The following prerequisites are installed by the package installer. If you are b .. note:: - To use the rocDecode samples, the ``rocdecode``, ``rocdecode-dev``, and ``rocdecode-test`` packages need to be installed. + To use the rocDecode samples, the ``rocdecode``, ``rocdecode-dev``, ``rocdecode-host``, and ``rocdecode-test`` packages need to be installed. If you're installing using the rocDecode source code, the ``rocDecode-setup.py`` script must be run with ``--developer`` set to ``ON``. diff --git a/projects/rocdecode/docs/tutorials/rocDecode-samples.rst b/projects/rocdecode/docs/tutorials/rocDecode-samples.rst index b377a46b8d..c2176d3e35 100644 --- a/projects/rocdecode/docs/tutorials/rocDecode-samples.rst +++ b/projects/rocdecode/docs/tutorials/rocDecode-samples.rst @@ -10,9 +10,9 @@ rocDecode samples are available in the `rocDecode GitHub repository `. -All three rocDecode packages, ``rocDecode``, ``rocdecode-dev``, and ``rocdecode-test``, must be installed to use the rocDecode samples. +All rocDecode packages, ``rocDecode``, ``rocdecode-dev``, ``rocdecode-host``, and ``rocdecode-test``, must be installed to use the rocDecode samples. -If you're using a :doc:`package installer <../install/rocDecode-package-install>`, install ``rocdecode``, ``rocdecode-dev``, and ``rocdecode-test``. +If you're using a :doc:`package installer <../install/rocDecode-package-install>`, install ``rocdecode``, ``rocdecode-dev``, ``rocdecode-host``, and ``rocdecode-test``. If you're building and installing rocDecode from its :doc:`source code <../install/rocDecode-build-and-install>`, ``rocDecode-setup.py`` needs to be run with ``--developer`` set to ``ON``: diff --git a/projects/rocdecode/src/rocdecode-host/CMakeLists.txt b/projects/rocdecode/src/rocdecode-host/CMakeLists.txt index d514058df9..5f27bd1779 100644 --- a/projects/rocdecode/src/rocdecode-host/CMakeLists.txt +++ b/projects/rocdecode/src/rocdecode-host/CMakeLists.txt @@ -95,14 +95,14 @@ if(HIP_FOUND AND Threads_FOUND AND FFMPEG_FOUND) # install rocdecode-host libs -- {ROCM_PATH}/lib set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}) - install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT runtime NAMELINK_SKIP) - install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}-targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT dev NAMELINK_ONLY) - install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT asan) + install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT host NAMELINK_SKIP) + install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}-targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT host NAMELINK_ONLY) + install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT host) # install rocdecode include files -- {ROCM_PATH}/include/rocdecode install(FILES ${PROJECT_SOURCE_DIR}/../../api/rocdecode/rocdecode_host.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocdecode COMPONENT dev) + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocdecode COMPONENT host) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_version.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocdecode COMPONENT dev) + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocdecode COMPONENT host) # Cmake module config file configurations set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules/" CACHE INTERNAL "Default module path.") @@ -139,7 +139,7 @@ if(HIP_FOUND AND Threads_FOUND AND FFMPEG_FOUND) "${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" - COMPONENT dev + COMPONENT host ) # Install the export set for use with the install-tree @@ -147,7 +147,7 @@ if(HIP_FOUND AND Threads_FOUND AND FFMPEG_FOUND) FILE ${PROJECT_NAME}-targets.cmake NAMESPACE rocdecode:: DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" - COMPONENT dev + COMPONENT host ) else()