Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
f7036886
Unverified
Commit
f7036886
authored
Dec 28, 2025
by
Andreas Karatzas
Committed by
GitHub
Dec 28, 2025
Browse files
[ROCm][CI] Add TorchCodec source build for transcription tests (#31323)
Signed-off-by:
Andreas Karatzas
<
akaratza@amd.com
>
parent
96142f20
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
1 deletion
+102
-1
.buildkite/test-amd.yaml
.buildkite/test-amd.yaml
+4
-1
docker/Dockerfile.rocm
docker/Dockerfile.rocm
+8
-0
tools/install_torchcodec_rocm.sh
tools/install_torchcodec_rocm.sh
+90
-0
No files found.
.buildkite/test-amd.yaml
View file @
f7036886
...
@@ -774,8 +774,9 @@ steps:
...
@@ -774,8 +774,9 @@ steps:
-
csrc/
-
csrc/
-
vllm/entrypoints/openai/
-
vllm/entrypoints/openai/
-
vllm/model_executor/models/whisper.py
-
vllm/model_executor/models/whisper.py
-
tools/
commands
:
# LMEval+Transcription WER check
commands
:
# LMEval+Transcription WER check
# Transcription WER check is skipped because encoder-decoder models are not supported on ROCm, see https://github.com/vllm-project/vllm/issues/27442
-
bash ../tools/install_torchcodec_rocm.sh || exit
1
-
pytest -s entrypoints/openai/correctness/
-
pytest -s entrypoints/openai/correctness/
...
@@ -1604,6 +1605,8 @@ steps:
...
@@ -1604,6 +1605,8 @@ steps:
-
.buildkite/scripts/run-prime-rl-test.sh
-
.buildkite/scripts/run-prime-rl-test.sh
commands
:
commands
:
-
bash .buildkite/scripts/run-prime-rl-test.sh
-
bash .buildkite/scripts/run-prime-rl-test.sh
##### EPLB Accuracy Tests #####
-
label
:
DeepSeek V2-Lite Accuracy
-
label
:
DeepSeek V2-Lite Accuracy
mirror_hardwares
:
[
amdexperimental
,
amdproduction
]
mirror_hardwares
:
[
amdexperimental
,
amdproduction
]
agent_pool
:
mi325_4
agent_pool
:
mi325_4
...
...
docker/Dockerfile.rocm
View file @
f7036886
...
@@ -97,6 +97,14 @@ RUN --mount=type=cache,target=/root/.cache/uv \
...
@@ -97,6 +97,14 @@ RUN --mount=type=cache,target=/root/.cache/uv \
uv pip install --system hf_transfer
uv pip install --system hf_transfer
ENV HF_HUB_ENABLE_HF_TRANSFER=1
ENV HF_HUB_ENABLE_HF_TRANSFER=1
# install audio decode package `torchcodec` from source (required due to
# ROCm and torch version mismatch) for tests with datasets package
COPY tools/install_torchcodec_rocm.sh /tmp/install_torchcodec.sh
RUN bash /tmp/install_torchcodec.sh \
&& rm /tmp/install_torchcodec.sh \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Copy in the v1 package (for python-only install test group)
# Copy in the v1 package (for python-only install test group)
COPY --from=export_vllm /vllm_v1 /usr/local/lib/python${PYTHON_VERSION}/dist-packages/vllm/v1
COPY --from=export_vllm /vllm_v1 /usr/local/lib/python${PYTHON_VERSION}/dist-packages/vllm/v1
...
...
tools/install_torchcodec_rocm.sh
0 → 100755
View file @
f7036886
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
# Script to install TorchCodec from source (required for ROCm compatibility)
set
-e
TORCHCODEC_REPO
=
"
${
TORCHCODEC_REPO
:-
https
://github.com/pytorch/torchcodec.git
}
"
TORCHCODEC_BRANCH
=
"
${
TORCHCODEC_BRANCH
:-
main
}
"
echo
"=== TorchCodec Installation Script ==="
# Check if torchcodec is already installed and working
if
python3
-c
"from torchcodec.decoders import VideoDecoder"
2>/dev/null
;
then
echo
"TorchCodec is already installed and working. Skipping."
exit
0
fi
echo
"TorchCodec not found. Installing from source..."
# Install system dependencies (FFmpeg + pkg-config)
install_system_deps
()
{
if
command
-v
apt-get &> /dev/null
;
then
echo
"Installing system dependencies..."
apt-get update
&&
apt-get
install
-y
--no-install-recommends
\
pkg-config
\
ffmpeg libavcodec-dev libavformat-dev libavutil-dev
\
libswscale-dev libavdevice-dev libavfilter-dev libswresample-dev
else
echo
"Warning: apt-get did not work. Please install dependencies manually."
return
1
fi
}
# Check for pkg-config
if
!
command
-v
pkg-config &> /dev/null
;
then
echo
"pkg-config not found. Installing system dependencies..."
install_system_deps
fi
# Check for required FFmpeg libraries
echo
"Checking for FFmpeg libraries..."
if
!
pkg-config
--exists
libavcodec libavformat libavutil libswscale libavdevice libavfilter libswresample 2>/dev/null
;
then
echo
"FFmpeg development libraries not found. Installing..."
install_system_deps
fi
# Install Python build dependencies
echo
"Installing Python build dependencies..."
pip
install
pybind11 setuptools wheel
# Set pybind11 cmake path so CMake can find it
export
pybind11_DIR
=
$(
python3
-c
"import pybind11; print(pybind11.get_cmake_dir())"
)
export
CMAKE_PREFIX_PATH
=
"
${
pybind11_DIR
}
:
${
CMAKE_PREFIX_PATH
}
"
echo
"pybind11_DIR set to:
$pybind11_DIR
"
# Create temp directory for build
BUILD_DIR
=
$(
mktemp
-d
-t
torchcodec-XXXXXX
)
echo
"Building in temporary directory:
$BUILD_DIR
"
cleanup
()
{
echo
"Cleaning up
$BUILD_DIR
"
rm
-rf
"
$BUILD_DIR
"
}
trap
cleanup EXIT
# Clone and build
cd
"
$BUILD_DIR
"
echo
"Cloning TorchCodec from
$TORCHCODEC_REPO
(branch:
$TORCHCODEC_BRANCH
)..."
git clone
--depth
1
--branch
"
$TORCHCODEC_BRANCH
"
"
$TORCHCODEC_REPO
"
torchcodec
cd
torchcodec
# Set build environment for ROCm compatibility
export
TORCHCODEC_CMAKE_BUILD_DIR
=
"
${
PWD
}
/build"
export
TORCHCODEC_DISABLE_COMPILE_WARNING_AS_ERROR
=
1
export
I_CONFIRM_THIS_IS_NOT_A_LICENSE_VIOLATION
=
1
echo
"Building TorchCodec..."
pip
install
.
--no-build-isolation
# Verify installation
echo
"Verifying installation..."
if
python3
-c
"from torchcodec.decoders import VideoDecoder; print('TorchCodec installed successfully!')"
;
then
echo
"=== TorchCodec installation complete ==="
else
echo
"Error: TorchCodec installation failed verification"
exit
1
fi
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment