Skip to content

[Bugfix] Include headers necessary for ROCm 10.0.0 - #4768

Open
rjrock wants to merge 1 commit into
ROCm:mainfrom
rjrock:bugfix/rocm10_includes
Open

[Bugfix] Include headers necessary for ROCm 10.0.0#4768
rjrock wants to merge 1 commit into
ROCm:mainfrom
rjrock:bugfix/rocm10_includes

Conversation

@rjrock

@rjrock rjrock commented Aug 14, 2026

Copy link
Copy Markdown

Motivation

vLLM CI fails on the ROCm 10.0.0rc2 release, partly due to missing includes in Aiter. ROCm 10.0.0rc2 uses hipcub 5.0.0 that does not transitively include the attributes listed below.

Fixes #4769

Technical Details

hipcub::Min and hipcub::Max are in thread_operators.hpp. hipcub::Traits is in util_type.hpp.

Test Plan

Reproducer for compiler fail and, with changes, compiler success:

WORKDIR="$(mktemp -d)"
trap 'rm -rf "$WORKDIR"' EXIT
cd "$WORKDIR"

echo "== Installing ROCm SDK 10.0.0rc2 into a throwaway uv venv =="
uv venv --python 3.12 .venv
source .venv/bin/activate
uv pip install --index-url https://rocm.prereleases.amd.com/whl-multi-arch "rocm[libraries,devel]==10.0.0rc2"
rocm-sdk init

echo "== Fetching upstream AITER's sampling.cuh from source (main) =="
AITER_RAW="https://raw.githubusercontent.com/ROCm/aiter/main/csrc/cpp_itfs/sampling"
mkdir -p sampling
curl -sL -o sampling/sampling.cuh "$AITER_RAW/sampling.cuh"
curl -sL -o sampling/vec_dtypes.cuh "$AITER_RAW/vec_dtypes.cuh"

SAMPLING_CUH="sampling/sampling.cuh"

ROCM_DEVEL="$(python3 -c 'import _rocm_sdk_devel, os; print(os.path.dirname(_rocm_sdk_devel.__file__))')"
CLANGXX="$ROCM_DEVEL/lib/llvm/bin/clang++"
echo "== Compiler under test: $("$CLANGXX" --version | head -1) =="

for variant in unpatched patched; do
    if [[ "$variant" == "patched" ]]; then
        sed -i '/#include <hipcub\/block\/block_store.hpp>/a\
#include <hipcub/util_type.hpp>\
#include <hipcub/thread/thread_operators.hpp>' "$SAMPLING_CUH"
    fi

    echo "== [$variant] Compiling sampling.cuh =="
    if "$CLANGXX" -w -x hip -c "$SAMPLING_CUH" -o sampling.o --offload-arch=gfx942 -I"$ROCM_DEVEL/include"; then
        echo "== [$variant] OK: sampling.cuh compiled successfully =="
    else
        echo "== [$variant] FAILED: sampling.cuh did not compile =="
    fi
done

Test Result

The test succeeds when the needed headers are included.

Submission Checklist

I didn't run the pre-commit hooks in order not to pollute this minimal change.

+ hipcub::Traits is defined in hipcub/util_type.hpp
+ hipcub::Min/Max are defined in hipcub/thread/thread_operators.hpp
@rjrock
rjrock requested a review from a team August 14, 2026 21:39
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs; main branch always runs both MI35X and MI300X
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: GPT-OSS-120B, DeepSeek-R1-0528, Kimi-K2.5
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 4768 --add-label <label>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Issue]: ROCm10.0.0rc2 missing headers

1 participant