[Hardware][AMD][Kernel][CI][Bugfix] Fix ROCm DeepEP FP8 max (#50467)

Signed-off-by: Matthew Wong <Matthew.Wong2@amd.com> Co-authored-by: Andreas Karatzas <akaratza@amd.com>

Matt committed Jul 30, 2026 at 21:37 UTC d91f7af7d05d7bad61088418e305830778c27f0e
2 files changed +6 -11
docker/Dockerfile.rocm
+5 -2
@@ -467,18 +467,21 @@ RUN --mount=type=cache,target=/root/.cache/ccache \
467
468 # DeepEP build stage - depends on ROCShmem, builds the HIP kernel wheel.
469 FROM build_rocshmem AS build_deepep
470 -ARG DEEPEP_BRANCH="a9ea9774"
470 +ARG DEEPEP_BRANCH="0f63d3e9"
471 ARG DEEPEP_REPO="https://github.com/ROCm/DeepEP.git"
472 ARG DEEPEP_NIC="cx7"
473
474 # Build DeepEP wheel. DeepEP looks for rocshmem at ROCSHMEM_DIR.
475 # DeepEP only supports gfx942 and gfx950, so avoid gfx90a in the default list.
476 +# We pass --rocm-gfx942-fp8-fnuz-max 224 to align the DeepEP dispatch FP8
477 +# quantization bound with vLLM's own clamp
478 +# (vllm/model_executor/layers/quantization/utils/fp8_utils.py): 224 for E4M3FNUZ
479 RUN --mount=type=cache,target=/root/.cache/ccache \
480 export PYTORCH_ROCM_ARCH="gfx942;gfx950" \
481 && git clone ${DEEPEP_REPO} \
482 && cd DeepEP \
483 && git checkout ${DEEPEP_BRANCH} \
481 - && LDFLAGS="-fuse-ld=mold" MAX_JOBS="${MAX_JOBS:-$(nproc)}" python3 setup.py --variant rocm --rocm-explicit-ctx --nic ${DEEPEP_NIC} bdist_wheel --dist-dir=/app/deep_install
484 + && LDFLAGS="-fuse-ld=mold" MAX_JOBS="${MAX_JOBS:-$(nproc)}" python3 setup.py --variant rocm --rocm-explicit-ctx --nic ${DEEPEP_NIC} --rocm-gfx942-fp8-fnuz-max 224 bdist_wheel --dist-dir=/app/deep_install
485
486 # MoRI runtime dependencies live in Dockerfile.rocm so NIC backend changes do
487 # not force users to rebuild the long-lived Dockerfile.rocm_base image.
tests/kernels/moe/test_deepep_moe.py
+1 -9
@@ -11,7 +11,7 @@ import torch.distributed
11 from torch.distributed import ProcessGroup
12
13 import vllm.envs as envs
14 -from tests.kernels.moe.utils import check_accuracy, make_dummy_moe_config
14 +from tests.kernels.moe.utils import make_dummy_moe_config
15 from vllm import _custom_ops as ops
16 from vllm.config import VllmConfig, set_current_vllm_config
17 from vllm.model_executor.layers.activation import SiluAndMul
@@ -367,14 +367,6 @@ def assert_deepep_close(
367 k: int,
368 use_fp8_dispatch: bool,
369 ) -> None:
370 - if use_fp8_dispatch and current_platform.is_fp8_fnuz():
371 - # ROCm e4m3fnuz rounds differently than the reference quant,
372 - # so DeepEP's fp8 dispatch can yield a few outliers even with
373 - # a correct kernel; allow a small fraction of mismatches here.
374 - atol = rtol = 1.5e-1
375 - check_accuracy(expected, actual, atol=atol, rtol=rtol, percent=0.95)
376 - return
377 -
370 torch.testing.assert_close(
371 expected,
372 actual,