Skip to content

Commit ae8b946

Browse files
Fix build: Remove RocDecodeRuntimeLoader include from RocDecCache.h
After removing the runtime loader, RocDecCache.h still had the include directive which caused build failures. The runtime loader is no longer needed since we link rocdecode directly. Also add install_rocdecode.sh packaging script following the same pattern as install_rocjpeg.sh from PR meta-pytorch#1554. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 15377be commit ae8b946

2 files changed

Lines changed: 28 additions & 1 deletion

File tree

packaging/install_rocdecode.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env bash
2+
# Copyright (c) Meta Platforms, Inc. and affiliates.
3+
# All rights reserved.
4+
#
5+
# This source code is licensed under the BSD-style license found in the
6+
# LICENSE file in the root directory of this source tree.
7+
8+
# Installs the rocDecode library
9+
#
10+
# rocDecode is not preinstalled by default in the CI runners. Both the build
11+
# and the test jobs need it (we don't ship it in the wheel), so we install it
12+
# from the ROCm dnf repo.
13+
14+
set -euo pipefail
15+
16+
# rocDecode requires HIP runtime and other ROCm dependencies. On CI runners
17+
# with full ROCm, install from the repo directly. On build-only images that
18+
# lack the full amdgpu stack, install with --nodeps (dependencies are satisfied
19+
# by the ROCm environment used to build torch).
20+
install_rocdecode_build_only() {
21+
dnf install -y "dnf-command(download)" >/dev/null 2>&1 || dnf install -y dnf-plugins-core
22+
rpm_dir="$(mktemp -d)"
23+
dnf download --destdir "${rpm_dir}" rocdecode rocdecode-devel
24+
rpm -Uvh --nodeps "${rpm_dir}"/rocdecode*.rpm
25+
}
26+
27+
dnf install -y --refresh rocdecode-devel \
28+
|| install_rocdecode_build_only

src/torchcodec/_core/RocDecCache.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <hip/hip_runtime.h>
1414
#include <torch/types.h>
1515

16-
#include "RocDecodeRuntimeLoader.h"
1716
#include <rocdecode/rocdecode.h>
1817
#include <rocdecode/rocparser.h>
1918

0 commit comments

Comments
 (0)