Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
bdcf87b
Apply gfx1250_wip_dllehr gfx1250 enablement onto upstream main
dllehr-amd May 27, 2026
bdd3c2d
[ROCm] Route flash_attn_varlen_func to aiter.ops.triton.mha
dllehr-amd May 27, 2026
ca28361
[ROCm][gfx1250] Make vLLM C++/HIP extensions build for gfx1250
dllehr-amd May 27, 2026
db637c2
[ROCm][gfx1250] Runtime fixes to run vLLM on the FFM simulator
dllehr-amd May 27, 2026
4a803f1
[ROCm][gfx1250] FFM-sim enablement: amdsmi torch fallbacks + DSV4 lay…
dllehr-amd May 27, 2026
e7d62aa
[ROCm][gfx1250] Enable DeepSeek-V4 MXFP4 MoE + sparse-attn compressor…
dllehr-amd May 27, 2026
9e0d2f8
[ROCm][gfx1250] gpt-oss: skip pruned-layer weights in mxfp4 + quark l…
dllehr-amd May 27, 2026
bd18d41
[ROCm][gfx1250] Enable AiterW4A8ExpertsMonolithic on gfx1250 (gpt-oss…
dllehr-amd May 28, 2026
2085d1a
docker/Dockerfile.rocm: port gfx1250_wip build chain
Jun 2, 2026
1c7cbab
Add gfx1250 Enabled docker rocm base (#987)
JadenMathias Jun 5, 2026
e02a0a0
gfx1250 enabled rocm dockerfile (#988)
JadenMathias Jun 5, 2026
2bd9d43
adding ffm dockerfile layer
Jun 8, 2026
777e10c
Fix small merge error
jpvillam-amd Jun 9, 2026
3d05518
Remove AMDSMI
JadenMathias Jun 10, 2026
c9055e8
Fixed uninstall amdsmi in ffm
JadenMathias Jun 10, 2026
1ae7cdf
Build process with no whls
Jun 10, 2026
ce876db
switching build branches
Jun 12, 2026
3534847
Aiter routing patch for gptoss fp4 on 1250
jpvillam-amd Jun 12, 2026
5426a08
Initial non-accurate impl for dsr1
jpvillam-amd Jun 12, 2026
4e87e61
Add gpt bench script
jpvillam-amd Jun 12, 2026
b9ee66d
Remove patch for 950 gate
jpvillam-amd Jun 12, 2026
b4d0fc8
Missing cmake gate for skinny gemms
jpvillam-amd Jun 18, 2026
df47797
Update default args for rocm_base for gfx1250
JadenMathias Jun 23, 2026
76025d7
Initial fixes to get dsr4 working (#1017)
jpvillam-amd Jun 23, 2026
13e68a1
Small import error
jpvillam-amd Jun 23, 2026
2bfbeda
Swap back to whl and apply patches
jpvillam-amd Jun 29, 2026
af2a02a
adding vllm basic functionality smoketest
Jun 23, 2026
9a40477
455 wip 625 (#1023)
jpvillam-amd Jun 25, 2026
3bbcc67
455 platform enablement (#1031)
JadenMathias Jun 29, 2026
8910e1d
Small fixes for whl build
Jun 30, 2026
efc222f
Add PyPi index and move triton patch in dockerfile
JadenMathias Jun 29, 2026
5646534
Remove triton installation
JadenMathias Jun 29, 2026
15bed5e
Remove triton patch from rocm_base
JadenMathias Jun 30, 2026
82cb8c2
Swap to cdna version check
jpvillam-amd Jun 30, 2026
70fb0ea
cleaning dockerfile
Jun 30, 2026
eb446b8
fixing dockerfile linting
Jun 30, 2026
d7ee390
Clean up
jpvillam-amd Jun 30, 2026
3a240a6
Add numa dep
jpvillam-amd Jul 1, 2026
116b1ac
Remove mori build again for now
jpvillam-amd Jul 1, 2026
bf0eca8
dllehr_gpt: gpt-oss gfx1250 ATOM-parity perf patches (#1035)
dllehr-amd Jul 6, 2026
36e2c1a
Clean up code a bit from prev commit
jpvillam-amd Jul 6, 2026
8285433
adding gfx942 and gfx950 to pytorch archs to enable vllm C++ custom ops
Jul 6, 2026
a3c2cb3
feat(mi450): switch to nightlies index, split ROCm/torch install, fix…
kiran-thumma Jul 7, 2026
5744135
fix: revert APEX_VERSION to 1.11.0 (do not bump)
kiran-thumma Jul 7, 2026
b371a0b
fix: single RUN for rocm+torch install, device-all for torchvision, +…
kiran-thumma Jul 7, 2026
5950d8e
fix: remove --extra-index-url pypi.org to prevent silent CUDA torch f…
kiran-thumma Jul 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ install(CODE "set(CMAKE_INSTALL_LOCAL_ONLY TRUE)" ALL_COMPONENTS)
set(PYTHON_SUPPORTED_VERSIONS "3.10" "3.11" "3.12" "3.13" "3.14")

# Supported AMD GPU architectures.
set(HIP_SUPPORTED_ARCHS "gfx906;gfx908;gfx90a;gfx942;gfx950;gfx1030;gfx1100;gfx1101;gfx1102;gfx1103;gfx1150;gfx1151;gfx1152;gfx1153;gfx1200;gfx1201")
set(HIP_SUPPORTED_ARCHS "gfx906;gfx908;gfx90a;gfx942;gfx950;gfx1250;gfx1030;gfx1100;gfx1101;gfx1102;gfx1103;gfx1150;gfx1151;gfx1152;gfx1153;gfx1200;gfx1201")

# ROCm installation prefix. Default to /opt/rocm but allow override via
# -DROCM_PATH=/your/rocm/path when invoking cmake.
Expand Down Expand Up @@ -1370,6 +1370,17 @@ if(VLLM_GPU_LANG STREQUAL "HIP")
"csrc/rocm/torch_bindings.cpp"
"csrc/rocm/skinny_gemms.cu"
"csrc/rocm/attention.cu")
set(VLLM_ROCM_EXT_FLAGS ${VLLM_GPU_FLAGS})

# skinny_gemms.cu is built on gfx9/gfx11 ISA (MFMA, dot2/dot4, legacy
# s_waitcnt asm) that gfx1250 (gfx12) does not provide. Exclude it from the
# gfx1250 build and disable its op registrations (VLLM_SKIP_SKINNY_GEMMS);
# vLLM falls back to default/Triton GEMM for those ops on gfx1250.
if(VLLM_GPU_ARCHES MATCHES "gfx1250")
message(STATUS "gfx1250 detected: excluding csrc/rocm/skinny_gemms.cu from _rocm_C")
list(REMOVE_ITEM VLLM_ROCM_EXT_SRC "csrc/rocm/skinny_gemms.cu")
list(APPEND VLLM_ROCM_EXT_FLAGS "-DVLLM_SKIP_SKINNY_GEMMS")
endif()

set(VLLM_ROCM_HAS_GFX1100 OFF)
if(VLLM_GPU_ARCHES MATCHES "gfx1100")
Expand All @@ -1385,10 +1396,15 @@ if(VLLM_GPU_LANG STREQUAL "HIP")
DESTINATION vllm
LANGUAGE ${VLLM_GPU_LANG}
SOURCES ${VLLM_ROCM_EXT_SRC}
COMPILE_FLAGS ${VLLM_GPU_FLAGS}
COMPILE_FLAGS ${VLLM_ROCM_EXT_FLAGS}
ARCHITECTURES ${VLLM_GPU_ARCHES}
USE_SABI 3
WITH_SOABI)

# Needed to pass skip skinny flag to .cpp targets
if(VLLM_GPU_ARCHES MATCHES "gfx1250")
target_compile_definitions(_rocm_C PRIVATE VLLM_SKIP_SKINNY_GEMMS)
endif()

if(VLLM_ROCM_HAS_GFX1100)
target_compile_definitions(_rocm_C PRIVATE VLLM_ROCM_GFX1100)
Expand Down
102 changes: 102 additions & 0 deletions benchmarks/vllm_smoketest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
#!/bin/bash
set -euo pipefail

# add model args here
declare -A MODEL_PATHS=(
[gpt-oss-120b-mxfp4]="/data/amd/gpt-oss-120b-w-mxfp4-a-fp8"
[DeepSeek-R1-0528-MXFP4]="/data/amd/DeepSeek-R1-0528-MXFP4"
)
declare -A MODEL_SERVE_ARGS=(
[gpt-oss-120b-mxfp4]="--tensor-parallel-size 1 --gpu_memory_utilization 0.7 --attention-backend TRITON_ATTN"
[DeepSeek-R1-0528-MXFP4]="--tensor-parallel-size 1 --gpu_memory_utilization 0.9 --dtype auto --no-enable-prefix-caching --disable-uvicorn-access-log --trust-remote-code"
)
declare -A MODEL_ENV=(
[gpt-oss-120b-mxfp4]="HSA_ENABLE_SDMA=0 USE_SVM=0 HSA_XNACK=0 VLLM_ROCM_AITER_FUSED_MOE_TRITON_GEMM_A4W4=1 VLLM_ROCM_USE_AITER=1 VLLM_ROCM_USE_AITER_UNIFIED_ATTENTION=0 VLLM_ROCM_USE_SKINNY_GEMM=0 VLLM_ROCM_USE_AITER_RMSNORM=0"
[DeepSeek-R1-0528-MXFP4]="HSA_ENABLE_SDMA=0 USE_SVM=0 HSA_XNACK=0 VLLM_ROCM_AITER_FUSED_MOE_TRITON_GEMM_A4W4=1 VLLM_ROCM_USE_AITER=1 VLLM_ROCM_USE_AITER_UNIFIED_ATTENTION=1 VLLM_ROCM_USE_SKINNY_GEMM=0 VLLM_ROCM_USE_AITER_RMSNORM=0"
)

MODEL_NAME="gpt-oss-120b-mxfp4" # default
MODEL_PATH_OVERRIDE="" # overrided path
MODEL_SET=0 # whether --model was explicitly passed
RUN_LM_EVAL=0
PORT=8000

usage() {
cat <<'EOF'
Usage: ./vllm_smoketest.sh [--model NAME] [--model-path PATH] [--lm-eval] [--port PORT] [--list]
--model NAME Registry key to run (default: gpt-oss-120b-mxfp4)
--model-path PATH Override model path for this run
--lm-eval Run lm_eval after curl check
--port PORT Server port (default: 8000)
--list List available models
EOF
}

while [[ $# -gt 0 ]]; do
case "$1" in
--model) MODEL_NAME="$2"; MODEL_SET=1; shift 2 ;;
--model-path) MODEL_PATH_OVERRIDE="$2"; shift 2 ;;
--lm-eval) RUN_LM_EVAL=1; shift ;;
--port) PORT="$2"; shift 2 ;;
--list) for n in "${!MODEL_PATHS[@]}"; do echo "$n -> ${MODEL_PATHS[$n]}"; done; exit 0 ;;
-h|--help) usage; exit 0 ;;
*) echo "Unknown argument: $1" >&2; usage; exit 1 ;;
esac
done

if [[ -n "$MODEL_PATH_OVERRIDE" && $MODEL_SET -eq 0 ]]; then
echo "ERROR: --model-path requires --model (which model's serve args/env to use)." >&2
usage; exit 1
fi

MODEL="${MODEL_PATHS[$MODEL_NAME]:-$MODEL_NAME}"
[[ -n "$MODEL_PATH_OVERRIDE" ]] && MODEL="$MODEL_PATH_OVERRIDE"
SERVE_ARGS="${MODEL_SERVE_ARGS[$MODEL_NAME]:-}"
MODEL_ENV_ARGS="${MODEL_ENV[$MODEL_NAME]:-}"
echo "Model: $MODEL | Port: $PORT | lm_eval: $RUN_LM_EVAL"

# temp
pip3 install "fastapi<0.137"

LOG_DIR="$(pwd)/vllm_smoke_test_logs"
mkdir -p "$LOG_DIR"
echo "Logs: $LOG_DIR"

server_pid=""
cleanup() { [[ -n "$server_pid" ]] && kill "$server_pid" 2>/dev/null && wait "$server_pid" 2>/dev/null; true; }
trap cleanup EXIT
trap 'exit 130' INT TERM

# --- start server ---
env $MODEL_ENV_ARGS \
vllm serve --model "$MODEL" --host localhost --port "$PORT" $SERVE_ARGS &
server_pid=$!
echo "Waiting for server (pid $server_pid)..."

until curl -s "http://localhost:$PORT/health" &>/dev/null; do
ps -p "$server_pid" >/dev/null || { echo "ERROR: server died"; tail -n 50 "$LOG_DIR/server.log"; exit 1; }
sleep 5
done
echo "Server ready."

# --- check if text was generated ---
echo "=== Curl completion check ==="
http_code=$(curl -s -o "$LOG_DIR/curl_completion.log" -w '%{http_code}' \
"http://localhost:$PORT/v1/completions" \
-H "Content-Type: application/json" \
-d "{\"model\":\"$MODEL\",\"prompt\":\"San Francisco is a\",\"max_tokens\":32,\"temperature\":0}")
cat "$LOG_DIR/curl_completion.log"; echo
[[ "$http_code" == "200" ]] || { echo "FAIL: HTTP $http_code" >&2; exit 1; }
grep -q '"text"' "$LOG_DIR/curl_completion.log" || { echo "FAIL: no text in response" >&2; exit 1; }
echo "PASS"

# --- lm_eval ---
if [[ $RUN_LM_EVAL -eq 1 ]]; then
echo "=== lm_eval ==="
pip install "lm-eval[api]"
lm_eval --model local-completions \
--model_args "model=$MODEL,base_url=http://localhost:$PORT/v1/completions,num_concurrent=64,max_retries=3,tokenized_requests=False" \
--tasks gsm8k --num_fewshot 3 --limit 100 2>&1 | tee "$LOG_DIR/lm_eval.log"
fi

echo "Done."
7 changes: 4 additions & 3 deletions cmake/external_projects/triton_kernels.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Install OpenAI triton_kernels from https://github.com/triton-lang/triton/tree/main/python/triton_kernels

set(DEFAULT_TRITON_KERNELS_TAG "v3.5.1")
set(DEFAULT_TRITON_KERNELS_TAG "padroute")

# Set TRITON_KERNELS_SRC_DIR for use with local development with vLLM. We expect TRITON_KERNELS_SRC_DIR to
# be directly set to the triton_kernels python directory.
Expand All @@ -11,13 +11,14 @@ if (DEFINED ENV{TRITON_KERNELS_SRC_DIR})
SOURCE_DIR $ENV{TRITON_KERNELS_SRC_DIR}
)

#TODO (JPVILLAM): Test new release of triton kernels and put back to normal
else()
set(TRITON_GIT "https://github.com/triton-lang/triton.git")
set(TRITON_GIT "https://github.com/jpvillam-amd/triton.git")
message (STATUS "[triton_kernels] Fetch from ${TRITON_GIT}:${DEFAULT_TRITON_KERNELS_TAG}")
FetchContent_Declare(
triton_kernels
# TODO (varun) : Fetch just the triton_kernels directory from Triton
GIT_REPOSITORY https://github.com/triton-lang/triton.git
GIT_REPOSITORY https://github.com/jpvillam-amd/triton.git
GIT_TAG ${DEFAULT_TRITON_KERNELS_TAG}
GIT_PROGRESS TRUE
SOURCE_SUBDIR python/triton_kernels/triton_kernels
Expand Down
4 changes: 2 additions & 2 deletions csrc/quickreduce/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ union BufferResource {

__quickreduce_device_inline__ static int32x4_t buffer_load_dwordx4(
int32x4_t srsrc, int32_t voffset, int32_t soffset,
int32_t aux) __asm("llvm.amdgcn.raw.buffer.load.v4i32");
int32_t aux) {}

__quickreduce_device_inline__ static void buffer_store_dwordx4(
int32x4_t data, int32x4_t srsrc, int32_t voffset, int32_t soffset,
int32_t aux) __asm("llvm.amdgcn.raw.buffer.store.v4i32");
int32_t aux) {}

__quickreduce_device_inline__ static void set_fp16_ovfl(bool const value) {
#if defined(__gfx942__)
Expand Down
10 changes: 10 additions & 0 deletions csrc/rocm/attention.cu
Original file line number Diff line number Diff line change
Expand Up @@ -2405,13 +2405,23 @@ template <typename T, int absz, int cbid, int blgp>
__device__ __forceinline__ floatx8 gcn_wmma16x16x16_instr(const bit16x8& inpA,
const bit16x8& inpB,
const floatx8& inpC) {
#if defined(__gfx1250__)
// gfx1250 (gfx12 family) does not provide the gfx12 WMMA variant used by
// gfx1200/1201 (needs wmma-128b-insts). This custom-attention WMMA path is
// unsupported on gfx1250; trap if ever launched (fail loud, not silent-wrong).
(void)inpA;
(void)inpB;
__builtin_trap();
return inpC;
#else
if constexpr (std::is_same<T, _Float16>::value) {
return __builtin_amdgcn_wmma_f32_16x16x16_f16_w32_gfx12(inpA, inpB, inpC);
} else if constexpr (std::is_same<T, __hip_bfloat16>::value) {
return __builtin_amdgcn_wmma_f32_16x16x16_bf16_w32_gfx12(inpA, inpB, inpC);
} else {
static_assert(false, "unsupported 16b dtype");
}
#endif
}

template <typename T>
Expand Down
5 changes: 5 additions & 0 deletions csrc/rocm/torch_bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, rocm_ops) {
// vLLM custom ops for rocm

// skinny_gemms.cu (LLMM1/wvSplitK/wvSplitKrc/wvSplitKQ) is excluded on gfx1250
// (gfx9/gfx11 ISA, unsupported there); skip these registrations to avoid
// undefined symbols. vLLM uses default/Triton GEMM for these ops on gfx1250.
#ifndef VLLM_SKIP_SKINNY_GEMMS
// Custom gemm op for matrix-vector multiplication
rocm_ops.def(
"LLMM1(Tensor in_a, Tensor in_b, int rows_per_block) -> "
Expand All @@ -38,6 +42,7 @@ TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, rocm_ops) {
"Tensor scale_a, "
" Tensor scale_b, int CuCount) -> ()");
rocm_ops.impl("wvSplitKQ", torch::kCUDA, &wvSplitKQ);
#endif // VLLM_SKIP_SKINNY_GEMMS

#ifdef VLLM_ROCM_GFX1100
// W4A16 GPTQ kernels for AMD RDNA3 (gfx1100).
Expand Down
45 changes: 30 additions & 15 deletions docker/Dockerfile.rocm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ARG NIC_BACKEND=all
# Users can specify a custom version compatible with their host drivers.
# The default version has been tested with ioinic-dkms=25.11.1.001
ARG AINIC_VERSION=1.117.3-hydra
ARG UBUNTU_CODENAME=jammy
ARG UBUNTU_CODENAME=noble

# Sccache configuration. Release builds use this today; CI can opt in when a
# shared S3-compatible cache backend is available.
Expand All @@ -28,14 +28,14 @@ ARG SCCACHE_S3_NO_CREDENTIALS=0

FROM ${BASE_IMAGE} AS base

ARG ARG_PYTORCH_ROCM_ARCH
ARG ARG_PYTORCH_ROCM_ARCH=gfx942;gfx950;gfx1250
ENV PYTORCH_ROCM_ARCH=${ARG_PYTORCH_ROCM_ARCH:-${PYTORCH_ROCM_ARCH}}

# Install build dependencies and utilities
RUN apt-get update -q -y && apt-get install -q -y \
sqlite3 libsqlite3-dev libfmt-dev libmsgpack-dev libsuitesparse-dev \
apt-transport-https ca-certificates wget curl \
libnuma-dev ccache mold
build-essential libnuma-dev ccache mold
RUN --mount=type=cache,target=/root/.cache/pip \
python3 -m pip install --upgrade pip
# Note: mold is installed but not set as the system default linker because
Expand All @@ -61,6 +61,10 @@ ENV UV_HTTP_TIMEOUT=500
ENV UV_INDEX_STRATEGY="unsafe-best-match"
# Use copy mode to avoid hardlink failures with Docker cache mounts
ENV UV_LINK_MODE=copy
# python binary fall back for non venv builds
ENV UV_PYTHON=${VIRTUAL_ENV:-/usr}/bin/python3
# Expose paths from wheel installation
ENV PKG_CONFIG_PATH=${ROCM_PATH}/lib/rocm_sysdeps/lib/pkgconfig:${PKG_CONFIG_PATH}
# ccache directory - persisted across layer rebuilds via cache mounts.
ENV CCACHE_DIR=/root/.cache/ccache
ENV CCACHE_COMPILERCHECK=content
Expand Down Expand Up @@ -110,8 +114,8 @@ WORKDIR ${COMMON_WORKDIR}
FROM base AS fetch_vllm_0
ONBUILD COPY ./ vllm/
FROM base AS fetch_vllm_1
ARG VLLM_REPO="https://github.com/vllm-project/vllm.git"
ARG VLLM_BRANCH="main"
ARG VLLM_REPO="https://github.com/ROCm/vllm.git"
ARG VLLM_BRANCH="455_wip"
ENV VLLM_REPO=${VLLM_REPO}
ENV VLLM_BRANCH=${VLLM_BRANCH}
ONBUILD RUN git clone ${VLLM_REPO} \
Expand Down Expand Up @@ -242,7 +246,7 @@ ARG RIXL_BRANCH="39be1de8"
ARG RIXL_REPO="https://github.com/ROCm/RIXL.git"
ARG UCX_BRANCH="bfb51733"
ARG UCX_REPO="https://github.com/openucx/ucx.git"
ENV ROCM_PATH=/opt/rocm
# ENV ROCM_PATH=/opt/rocm -> correct ROCM_PATH is set in base image
ENV UCX_HOME=/usr/local/ucx
ENV RIXL_HOME=/usr/local/rixl
ENV RIXL_BENCH_HOME=/usr/local/rixl_bench
Expand Down Expand Up @@ -298,6 +302,7 @@ RUN --mount=type=cache,target=/root/.cache/ccache \
git checkout ${RIXL_BRANCH} && \
CC="ccache gcc" CXX="ccache g++" \
meson setup build --prefix=${RIXL_HOME} \
--force-fallback-for=abseil-cpp \
-Ducx_path=${UCX_HOME} \
-Drocm_path=${ROCM_PATH} && \
cd build && \
Expand All @@ -310,6 +315,10 @@ RUN --mount=type=cache,target=/root/.cache/ccache \
RUN cd /opt/rixl && \
sed -i "s/--exclude 'libamdhip64\*'/--exclude 'libamdhip64*' --exclude 'libcore*' --exclude 'libpull*'/" \
contrib/build-wheel.sh && \
# The wheel build re-runs meson via meson-python; force the bundled abseil
sed -i 's|setup = \["-Dinstall_headers=false"\]|setup = ["-Dinstall_headers=false", "--force-fallback-for=abseil-cpp"]|' \
pyproject.toml && \
grep -q 'force-fallback-for' pyproject.toml && \
mkdir -p /app/install && \
_ucx_install_dir=${UCX_HOME} \
./contrib/build-wheel.sh \
Expand All @@ -326,7 +335,7 @@ ARG ROCSHMEM_REPO="https://github.com/ROCm/rocm-systems.git"
# DeepEP only supports gfx942 and gfx950; build ROCShmem for the same set so
# it can be linked against DeepEP without arch mismatches.
ARG DEEPEP_ROCM_ARCH="gfx942;gfx950"
ENV ROCM_PATH=/opt/rocm
# ENV ROCM_PATH=/opt/rocm -> Correct rocm_path is set in base image
ENV ROCSHMEM_DIR=/opt/rocshmem

RUN --mount=type=cache,target=/root/.cache/ccache \
Expand Down Expand Up @@ -386,7 +395,7 @@ RUN /bin/bash -lc 'set -euo pipefail; \
curl -fsSL https://packages.broadcom.com/artifactory/api/security/keypair/PackagesKey/public \
-o /etc/apt/keyrings/broadcom-nic.asc; \
chmod a+r /etc/apt/keyrings/broadcom-nic.asc; \
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/broadcom-nic.asc] https://packages.broadcom.com/artifactory/ethernet-nic-debian-public jammy main" \
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/broadcom-nic.asc] https://packages.broadcom.com/artifactory/ethernet-nic-debian-public ${UBUNTU_CODENAME} main" \
> /etc/apt/sources.list.d/broadcom-nic.list; \
apt-get update && apt-get install -y --no-install-recommends \
bnxt-rocelib=235.2.86.0 \
Expand Down Expand Up @@ -575,9 +584,6 @@ RUN --mount=type=cache,target=/root/.cache/uv \
ENV HF_XET_HIGH_PERFORMANCE=1
ENV HF_HUB_DOWNLOAD_TIMEOUT=60

# Keep torch.cuda.is_available() fork-safe (see vllm/env_override.py).
ENV PYTORCH_NVML_BASED_CUDA_CHECK=1

# Pre-install vLLM test dependencies.
COPY requirements/test/rocm.txt /tmp/rocm-test-reqs.txt
RUN --mount=type=cache,target=/root/.cache/uv \
Expand Down Expand Up @@ -634,6 +640,10 @@ COPY --from=export_vllm /vllm_v1 /usr/local/lib/python${PYTHON_VERSION}/dist-pac
# Hide source under src/ so it won't shadow the installed package in tests.
RUN mkdir src && mv vllm src/vllm

# tblib is required by conftest.py at collection time; --no-deps prevents
# uv from pulling CUDA torch as a transitive dependency.
RUN uv pip install --system --no-deps tblib

# -----------------------
# Final vLLM image
FROM mori_base AS final
Expand Down Expand Up @@ -698,18 +708,23 @@ ENV SAFETENSORS_FAST_GPU=1
# Performance environment variable.
ENV HIP_FORCE_DEV_KERNARG=1

# Keep torch.cuda.is_available() fork-safe (see vllm/env_override.py).
ENV PYTORCH_NVML_BASED_CUDA_CHECK=1

# Workaround for ROCm profiler limits
RUN echo "ROCTRACER_MAX_EVENTS=10000000" > ${COMMON_WORKDIR}/libkineto.conf
ENV KINETO_CONFIG="${COMMON_WORKDIR}/libkineto.conf"
RUN echo "VLLM_BASE_IMAGE=${BASE_IMAGE}" >> ${COMMON_WORKDIR}/versions.txt \
&& echo "MORI_NIC_BACKEND=${NIC_BACKEND}" >> ${COMMON_WORKDIR}/versions.txt \
&& echo "AINIC_VERSION=${AINIC_VERSION}" >> ${COMMON_WORKDIR}/versions.txt


### Install triton from upstream for AITER Deps TODO: (JPVILLAM) If possible to get this on whls it would be better
RUN pip3 uninstall -y triton && \
git clone https://github.com/triton-lang/triton.git && \
cd triton && \
git checkout c517f38c && \
TRITON_APPEND_CMAKE_ARGS="-DCMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH=FALSE" pip3 install .

CMD ["/bin/bash"]

#Set entrypoint for vllm-openai official images
FROM final AS vllm-openai
ENTRYPOINT ["vllm", "serve"]
ENTRYPOINT ["vllm", "serve"]
14 changes: 14 additions & 0 deletions docker/Dockerfile.rocm_1250_ffm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# FFM overlay for gfx1250 builds
ARG BASE_IMAGE=rocm/vllm-private:juan_455_npi_test
FROM ${BASE_IMAGE}

# extract tarball into /root/x/ffm/.
ADD ubuntu_24_04_rel.tar.gz /root/x/ffm/
ENV HSA_MODEL_LIB=/root/x/ffm/libhsakmtmodel.so
ENV HSA_MODEL_TOML="/root/x/ffm/ffm_config.toml"
ENV HSA_MODEL_ARGS=ffm_enable_time_slicing
ENV HSA_MODEL_TOPOLOGY=/root/x/ffm/topology/mi450
ENV HSA_MODEL_NUM_THREADS=64

### Remove AMD SMI
RUN pip uninstall -y amdsmi && rm -rf ${SITE_PACKAGES}/_rocm_sdk_core/share/amd_smi/amdsmi
Loading
Loading