diff --git a/docs/development/artifacts.md b/docs/development/artifacts.md index e49b4656665..7b0d74e8aa0 100644 --- a/docs/development/artifacts.md +++ b/docs/development/artifacts.md @@ -225,6 +225,8 @@ These artifacts are built if any project features requiring them are enabled: - `rand`: Random number generator libraries. - `rccl`: Collective communication libraries. - `MIOpen`: MIOpen kernel-select/fusion library. +- `rocdecode`: Video decode library (Linux only). +- `rocjpeg`: JPEG decode library (Linux only). > [!NOTE] > After adding a new artifact via `therock_provide_artifact()`, you may need to update `install_rocm_from_artifacts.py` to allow CI workflows and users to selectively install it.
diff --git a/docs/development/build_system.md b/docs/development/build_system.md index 5bdf22a61b0..6451a86f2ea 100644 --- a/docs/development/build_system.md +++ b/docs/development/build_system.md @@ -84,6 +84,9 @@ Sub-project directories: projects like [hipBLASLt](https://github.com/ROCm/hipBLASLt). - [`ml-libs/`](/ml-libs/) : Machine learning library sub-projects like [MIOpen](https://github.com/ROCm/MIOpen). +- [`media-libs/`](/media-libs/) : Media decoding library sub-projects like + [rocDecode](https://github.com/ROCm/rocm-systems/tree/develop/projects/rocdecode) + and [rocJPEG](https://github.com/ROCm/rocm-systems/tree/develop/projects/rocjpeg). - [`profiler/`](/profiler/) : Profiler sub-projects Note that there is nothing in the build system which ensures naming consistency, diff --git a/docs/development/installing_artifacts.md b/docs/development/installing_artifacts.md index 675547b08bb..6a301bff561 100644 --- a/docs/development/installing_artifacts.md +++ b/docs/development/installing_artifacts.md @@ -41,9 +41,15 @@ Choose one of these options to specify where to install from: | `--prim` | Flag | Include primitives artifacts | | `--rand` | Flag | Include random number generator artifacts | | `--rccl` | Flag | Include RCCL artifacts | +| `--rocdecode` | Flag | Include rocDecode artifacts (Linux only) | +| `--rocjpeg` | Flag | Include rocJPEG artifacts (Linux only) | | `--rocwmma` | Flag | Include rocWMMA artifacts | | `--tests` | Flag | Include test artifacts for enabled components | +> [!NOTE] +> `--rocdecode` and `--rocjpeg` require `sysdeps-amd-mesa` and are only +> available on Linux. + ### Utility Options | Option | Type | Description | @@ -289,6 +295,17 @@ python build_tools/install_rocm_from_artifacts.py \ --run-github-repo ROCm/rocm-libraries ``` +### Install Media Libraries from CI Run (Linux only) + +Install rocDecode and rocJPEG artifacts from a CI run: + +```bash +python build_tools/install_rocm_from_artifacts.py \ + --run-id 19588907671 \ + --amdgpu-family gfx110X-all \ + --rocdecode --rocjpeg +``` + ### Install from Dev Tarball Install a development build using a commit hash version: diff --git a/docs/development/windows_support.md b/docs/development/windows_support.md index 9399af5d202..2c94383c2f1 100644 --- a/docs/development/windows_support.md +++ b/docs/development/windows_support.md @@ -61,6 +61,9 @@ mainline, in open source, using MSVC, etc.). | | | | | | | comm-libs | [rccl](https://github.com/ROCm/rocm-systems/tree/develop/projects/rccl) | rocm-systems | ❌ | Unsupported | | | | | | | +| media-libs | [rocDecode](https://github.com/ROCm/rocm-systems/tree/develop/projects/rocdecode) | rocm-systems | ❌ | Linux only (requires VA-API / Mesa) | +| media-libs | [rocJPEG](https://github.com/ROCm/rocm-systems/tree/develop/projects/rocjpeg) | rocm-systems | ❌ | Linux only (requires VA-API / Mesa) | +| | | | | | | math-libs | [rocRAND](https://github.com/ROCm/rocm-libraries/tree/develop/projects/rocrand) | rocm-libraries | ✅ | | | math-libs | [hipRAND](https://github.com/ROCm/rocm-libraries/tree/develop/projects/hiprand) | rocm-libraries | ✅ | | | math-libs | [rocPRIM](https://github.com/ROCm/rocm-libraries/tree/develop/projects/rocprim) | rocm-libraries | ✅ | | diff --git a/media-libs/CMakeLists.txt b/media-libs/CMakeLists.txt index 9f679cd9a15..3af0cf04b5c 100644 --- a/media-libs/CMakeLists.txt +++ b/media-libs/CMakeLists.txt @@ -47,6 +47,7 @@ if(THEROCK_ENABLE_ROCDECODE AND THEROCK_ENABLE_SYSDEPS_AMD_MESA) COMPONENTS dbg dev + doc lib test SUBPROJECT_DEPS @@ -103,6 +104,7 @@ if(THEROCK_ENABLE_ROCJPEG AND THEROCK_ENABLE_SYSDEPS_AMD_MESA) COMPONENTS dbg dev + doc lib test SUBPROJECT_DEPS diff --git a/media-libs/README.md b/media-libs/README.md new file mode 100644 index 00000000000..32ed88d584b --- /dev/null +++ b/media-libs/README.md @@ -0,0 +1,30 @@ +# ROCm Media Libraries + +This directory contains media decoding libraries for AMD GPUs. + +- **rocDecode** -- high-performance video decoding using VA-API +- **rocJPEG** -- high-performance JPEG decoding using VA-API + +Both libraries depend on AMD Mesa for VA-API support and are only available +on Linux. + +## Dependencies + +Media libraries require the `THEROCK_ENABLE_SYSDEPS_AMD_MESA` option to be +enabled, which provides the bundled Mesa VA-API driver. Each library can also +be individually controlled: + +- `-DTHEROCK_ENABLE_ROCDECODE=ON` +- `-DTHEROCK_ENABLE_ROCJPEG=ON` + +Or disabled as a group: + +- `-DTHEROCK_ENABLE_MEDIA_LIBS=OFF` + +## Source Layout + +The source code for both libraries lives in the +[rocm-systems](https://github.com/ROCm/rocm-systems) repository: + +- `rocm-systems/projects/rocdecode` +- `rocm-systems/projects/rocjpeg` diff --git a/media-libs/artifact-rocdecode.toml b/media-libs/artifact-rocdecode.toml index 2a35403ef1e..18217c2701c 100644 --- a/media-libs/artifact-rocdecode.toml +++ b/media-libs/artifact-rocdecode.toml @@ -1,6 +1,7 @@ # rocdecode [components.dbg."media-libs/rocdecode/stage"] [components.dev."media-libs/rocdecode/stage"] +[components.doc."media-libs/rocdecode/stage"] [components.lib."media-libs/rocdecode/stage"] [components.test."media-libs/rocdecode/stage"] include = [ diff --git a/media-libs/artifact-rocjpeg.toml b/media-libs/artifact-rocjpeg.toml index 53bee352173..19f3f03c388 100644 --- a/media-libs/artifact-rocjpeg.toml +++ b/media-libs/artifact-rocjpeg.toml @@ -1,6 +1,7 @@ # rocjpeg [components.dbg."media-libs/rocjpeg/stage"] [components.dev."media-libs/rocjpeg/stage"] +[components.doc."media-libs/rocjpeg/stage"] [components.lib."media-libs/rocjpeg/stage"] [components.test."media-libs/rocjpeg/stage"] include = [