[CI][ROCm] Mirror remaining portable suites without duplicate coverage (#57877)

Signed-off-by: Andreas Karatzas <akaratza@amd.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
This commit is contained in:
Andreas Karatzas
2026-09-21 04:16:26 -05:00
committed by GitHub
co-authored by OpenAI Codex
parent b8cf275382
commit 8902dbb177
11 changed files with 352 additions and 109 deletions
+141 -33
View File
@@ -436,7 +436,7 @@ steps:
- tests/v1/e2e/general/
- vllm/platforms/rocm.py
commands:
- pytest -v -s v1/e2e/general --ignore v1/e2e/general/test_async_scheduling.py
- pytest -v -s v1/e2e/general --ignore v1/e2e/general/test_async_scheduling.py --ignore v1/e2e/general/test_kv_sharing_fast_prefill.py -k "not test_mamba_prefix_cache_mrv2"
- label: ":amd: (MI250) E2E Scheduling" # TBD
timeout_in_minutes: 55
@@ -1737,29 +1737,6 @@ steps:
- pytest -v -s tests/ir
- pytest -v -s tests/kernels/ir
- label: ":amd: (MI300) MLA Kernels" # TBD
timeout_in_minutes: 25
mirror_hardwares: [amdexperimental, amdproduction, amdgfx942nightly, amdmi300]
dind: false
agent_pool: mi300_1
working_dir: "/vllm-workspace/"
source_file_dependencies:
- vllm/v1/attention/backends/mla/rocm_aiter_mla.py
- vllm/v1/attention/selector.py
- vllm/platforms/rocm.py
- vllm/_aiter_ops.py
- tests/kernels/attention/test_rocm_aiter_mla_decode.py
- tests/kernels/attention/test_rocm_aiter_mla_decode_metadata.py
- tests/kernels/attention/test_rocm_aiter_mla_fp8_support.py
- tests/kernels/attention/test_rocm_aiter_mla_op_registration.py
optional: true
commands:
- amd-smi
- pytest -v -s tests/kernels/attention/test_rocm_aiter_mla_decode_metadata.py
- pytest -v -s tests/kernels/attention/test_rocm_aiter_mla_decode.py
- pytest -v -s tests/kernels/attention/test_rocm_aiter_mla_fp8_support.py
- pytest -v -s tests/kernels/attention/test_rocm_aiter_mla_op_registration.py
- label: ":amd: (MI300) Attention Kernels Shard %N" # TBD
timeout_in_minutes: 90
mirror_hardwares: [amdexperimental, amdproduction, amdgfx942nightly, amdmi300]
@@ -1778,7 +1755,7 @@ steps:
- vllm/platforms/rocm.py
- vllm/utils/flashinfer.py
commands:
- pytest -v -s kernels/attention --shard-id=$$BUILDKITE_PARALLEL_JOB --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT
- pytest -v -s kernels/attention --ignore=kernels/attention/test_triton_unified_attention_diffkv.py --ignore=kernels/attention/test_rocm_aiter_mla_decode.py --ignore=kernels/attention/test_rocm_aiter_mla_decode_metadata.py --ignore=kernels/attention/test_rocm_aiter_mla_fp8_support.py --ignore=kernels/attention/test_rocm_aiter_mla_op_registration.py --shard-id=$$BUILDKITE_PARALLEL_JOB --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT
- label: ":amd: (MI300) MiniMax Reduce RMS Kernels" # TBD
timeout_in_minutes: 45
@@ -2566,7 +2543,7 @@ steps:
- vllm/platforms/rocm.py
- vllm/entrypoints/generate/beam_search
commands:
- pytest -v -s samplers
- pytest -v -s samplers -k "not test_beam_search_passes_multimodal_data"
#------------------------------------------------------------ mi300 · misc ------------------------------------------------------------#
@@ -3364,6 +3341,48 @@ steps:
commands:
- python3 benchmarks/attention_benchmarks/benchmark.py --backends ROCM_ATTN ROCM_AITER_FA ROCM_AITER_UNIFIED_ATTN --batch-specs "8q1s1k"
#---------------------------------------------------------- mi355 · compile ----------------------------------------------------------#
- label: ":amd: (MI355) PyTorch Compilation H100 Cases"
timeout_in_minutes: 45
mirror_hardwares: [amdexperimental, amdproduction, amdgfx950nightly, amdmi355]
dind: false
agent_pool: mi355_1
num_gpus: 1
optional: true
working_dir: "/vllm-workspace/tests"
source_file_dependencies:
- vllm/__init__.py
- vllm/_aiter_ops.py
- vllm/_custom_ops.py
- vllm/compilation/
- vllm/config/
- vllm/distributed/
- "!vllm/distributed/kv_transfer/"
- vllm/engine/
- vllm/env_override.py
- vllm/envs.py
- vllm/forward_context.py
- vllm/inputs/
- vllm/ir/
- vllm/kernels/
- vllm/logger.py
- vllm/model_executor/
- vllm/multimodal/
- vllm/platforms/
- vllm/plugins/
- vllm/sampling_params.py
- vllm/sequence.py
- vllm/transformers_utils/
- vllm/triton_utils/
- vllm/utils/
- vllm/v1/
- tests/compile/h100/
- tests/utils.py
- csrc/
commands:
- pytest -v -s compile/h100/test_startup.py
#-------------------------------------------------------- mi355 · distributed --------------------------------------------------------#
- label: ":amd: (MI355) Distributed DP Basic" # TBD
@@ -3790,6 +3809,23 @@ steps:
#---------------------------------------------------------- mi355 · kernels ----------------------------------------------------------#
- label: ":amd: (MI355) Attention DiffKV Kernels"
timeout_in_minutes: 35
mirror_hardwares: [amdexperimental, amdproduction, amdgfx950nightly, amdmi355]
dind: false
agent_pool: mi355_1
num_gpus: 1
optional: true
working_dir: "/vllm-workspace/tests"
source_file_dependencies:
- vllm/v1/attention/ops/triton_unified_attention_diffkv.py
- vllm/v1/attention/backends/triton_attn_diffkv.py
- tests/kernels/attention/test_triton_unified_attention.py
- tests/kernels/attention/test_triton_unified_attention_diffkv.py
- vllm/platforms/rocm.py
commands:
- pytest -v -s kernels/attention/test_triton_unified_attention_diffkv.py
- label: ":amd: (MI355) Core Operation Kernels Shard %N" # TBD
timeout_in_minutes: 40
mirror_hardwares: [amdexperimental, amdproduction, amdgfx950nightly, amdmi355]
@@ -3859,19 +3895,19 @@ steps:
- vllm/_aiter_ops.py
- examples/basic/offline_inference/chat.py
- tests/kernels/attention/test_attention_selector.py
- tests/kernels/attention/test_rocm_aiter_mla_decode_metadata.py
optional: true
commands:
- amd-smi
- python3 examples/basic/offline_inference/chat.py --attention-backend TRITON_ATTN
- pytest -v -s tests/kernels/attention/test_attention_selector.py
- pytest -v -s tests/kernels/attention/test_rocm_aiter_mla_decode_metadata.py
- label: ":amd: (MI355) MLA Kernels" # TBD
timeout_in_minutes: 25
- label: ":amd: (MI355) MLA Kernels"
timeout_in_minutes: 40
mirror_hardwares: [amdexperimental, amdproduction, amdgfx950nightly, amdmi355]
dind: false
agent_pool: mi355_1
num_gpus: 1
optional: true
working_dir: "/vllm-workspace/"
source_file_dependencies:
- vllm/v1/attention/backends/mla/rocm_aiter_mla.py
@@ -3882,7 +3918,6 @@ steps:
- tests/kernels/attention/test_rocm_aiter_mla_decode_metadata.py
- tests/kernels/attention/test_rocm_aiter_mla_fp8_support.py
- tests/kernels/attention/test_rocm_aiter_mla_op_registration.py
optional: true
commands:
- amd-smi
- pytest -v -s tests/kernels/attention/test_rocm_aiter_mla_decode_metadata.py
@@ -3908,7 +3943,7 @@ steps:
- vllm/utils/flashinfer.py
optional: true
commands:
- pytest -v -s kernels/attention --shard-id=$$BUILDKITE_PARALLEL_JOB --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT
- pytest -v -s kernels/attention --ignore=kernels/attention/test_triton_unified_attention_diffkv.py --ignore=kernels/attention/test_rocm_aiter_mla_decode.py --ignore=kernels/attention/test_rocm_aiter_mla_decode_metadata.py --ignore=kernels/attention/test_rocm_aiter_mla_fp8_support.py --ignore=kernels/attention/test_rocm_aiter_mla_op_registration.py --shard-id=$$BUILDKITE_PARALLEL_JOB --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT
- label: ":amd: (MI355) MoE Kernels Shard %N" # TBD
timeout_in_minutes: 55
@@ -4050,6 +4085,21 @@ steps:
#------------------------------------------------------ mi355 · models / basic -------------------------------------------------------#
- label: ":amd: (MI355) GLM5Next"
timeout_in_minutes: 35
mirror_hardwares: [amdexperimental, amdproduction, amdgfx950nightly, amdmi355]
dind: false
agent_pool: mi355_1
num_gpus: 1
optional: true
working_dir: "/vllm-workspace/tests"
source_file_dependencies:
- vllm/models/glm5next/
- tests/models/glm5next/
- vllm/platforms/rocm.py
commands:
- pytest -v -s models/glm5next
- label: ":amd: (MI355) Basic Models (Extra Initialization) Shard %N" # TBD
timeout_in_minutes: 60
mirror_hardwares: [amdexperimental, amdproduction, amdgfx950nightly, amdmi355]
@@ -4087,7 +4137,27 @@ steps:
- export GIT_CONFIG_VALUE_0=HTTP/1.1
- MAMBA_FORCE_BUILD=TRUE uv pip install --system --no-build-isolation 'git+https://github.com/AndreasKaratzas/mamba@fix-rocm-7.0-warp-size-constexpr'
- CAUSAL_CONV1D_FORCE_BUILD=TRUE uv pip install --system --no-build-isolation 'git+https://github.com/Dao-AILab/causal-conv1d@v1.6.0'
- pytest -v -s models/language/generation -m hybrid_model --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT --shard-id=$$BUILDKITE_PARALLEL_JOB
- pytest -v -s models/language/generation -m hybrid_model -k 'not granite-4.0-tiny-preview' --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT --shard-id=$$BUILDKITE_PARALLEL_JOB
- label: ":amd: (MI355) Granite Language Model Compatibility"
timeout_in_minutes: 80
mirror_hardwares: [amdexperimental, amdproduction, amdgfx950nightly, amdmi355]
dind: false
agent_pool: mi355_1
num_gpus: 1
optional: true
working_dir: "/vllm-workspace/tests"
source_file_dependencies:
- vllm/
- "!vllm/distributed/kv_transfer/"
- tests/models/language/generation
commands:
- export GIT_CONFIG_COUNT=1
- export GIT_CONFIG_KEY_0=http.version
- export GIT_CONFIG_VALUE_0=HTTP/1.1
- MAMBA_FORCE_BUILD=TRUE uv pip install --system --no-build-isolation 'git+https://github.com/AndreasKaratzas/mamba@fix-rocm-7.0-warp-size-constexpr'
- CAUSAL_CONV1D_FORCE_BUILD=TRUE uv pip install --system --no-build-isolation 'git+https://github.com/Dao-AILab/causal-conv1d@v1.6.0'
- pytest -v -s models/language/generation -m hybrid_model -k 'granite-4.0-tiny-preview'
- label: ":amd: (MI355) Language Models (Extended Generation)" # TBD
timeout_in_minutes: 95
@@ -4308,8 +4378,46 @@ steps:
# commands:
# - pytest -s -v tests/quantization/test_gfx950_moe.py
#--------------------------------------------------------- mi355 · samplers ----------------------------------------------------------#
- label: ":amd: (MI355) Samplers Multimodal Beam Search"
timeout_in_minutes: 45
mirror_hardwares: [amdexperimental, amdproduction, amdgfx950nightly, amdmi355]
dind: false
agent_pool: mi355_1
num_gpus: 1
optional: true
working_dir: "/vllm-workspace/tests"
source_file_dependencies:
- vllm/model_executor/layers
- vllm/sampling_metadata.py
- vllm/v1/sample/
- vllm/entrypoints/generate/beam_search/
- tests/samplers
- tests/conftest.py
- vllm/_aiter_ops.py
- vllm/platforms/rocm.py
commands:
- pytest -v -s samplers/test_beam_search.py::test_beam_search_passes_multimodal_data
#------------------------------------------------------------ mi355 · v1 -------------------------------------------------------------#
- label: ":amd: (MI355) E2E Core Large Memory"
timeout_in_minutes: 65
mirror_hardwares: [amdexperimental, amdproduction, amdgfx950nightly, amdmi355]
dind: false
agent_pool: mi355_1
num_gpus: 1
optional: true
working_dir: "/vllm-workspace/tests"
source_file_dependencies:
- vllm/v1/
- tests/v1/e2e/general/
- vllm/platforms/rocm.py
commands:
- pytest -v -s v1/e2e/general/test_kv_sharing_fast_prefill.py
- pytest -v -s v1/e2e/general/test_mamba_prefix_cache.py::test_mamba_prefix_cache_mrv2 v1/e2e/general/test_mamba_prefix_cache.py::test_mamba_prefix_cache_mrv2_async
- label: ":amd: (MI355) V1 Attention Shard %N" # TBD
timeout_in_minutes: 125
mirror_hardwares: [amdexperimental, amdproduction, amdgfx950nightly, amdmi355]
+18 -1
View File
@@ -94,7 +94,7 @@ steps:
label: ":amd: (MI250) E2E Core"
dind: false
commands:
- pytest -v -s v1/e2e/general --ignore v1/e2e/general/test_async_scheduling.py
- pytest -v -s v1/e2e/general --ignore v1/e2e/general/test_async_scheduling.py --ignore v1/e2e/general/test_kv_sharing_fast_prefill.py -k "not test_mamba_prefix_cache_mrv2"
device: mi250_1
timeout_in_minutes: 50
depends_on:
@@ -115,6 +115,23 @@ steps:
commands:
- pytest -v -s v1/e2e/general/test_kv_sharing_fast_prefill.py
- pytest -v -s v1/e2e/general/test_mamba_prefix_cache.py::test_mamba_prefix_cache_mrv2 v1/e2e/general/test_mamba_prefix_cache.py::test_mamba_prefix_cache_mrv2_async
mirror:
amd:
label: ":amd: (MI355) E2E Core Large Memory"
dind: false
device: mi355_1
num_devices: 1
timeout_in_minutes: 65
working_dir: /vllm-workspace/tests
depends_on:
- image-build-amd
source_file_dependencies:
- vllm/v1/
- tests/v1/e2e/general/
- vllm/platforms/rocm.py
commands:
- pytest -v -s v1/e2e/general/test_kv_sharing_fast_prefill.py
- pytest -v -s v1/e2e/general/test_mamba_prefix_cache.py::test_mamba_prefix_cache_mrv2 v1/e2e/general/test_mamba_prefix_cache.py::test_mamba_prefix_cache_mrv2_async
- label: ":nvidia: (L4) V1 E2E"
key: v1-e2e-2-gpus
+45 -27
View File
@@ -196,6 +196,8 @@ steps:
- vllm/_aiter_ops.py
- vllm/envs.py
- vllm/platforms/rocm.py
commands:
- pytest -v -s kernels/attention --ignore=kernels/attention/test_triton_unified_attention_diffkv.py --ignore=kernels/attention/test_rocm_aiter_mla_decode.py --ignore=kernels/attention/test_rocm_aiter_mla_decode_metadata.py --ignore=kernels/attention/test_rocm_aiter_mla_fp8_support.py --ignore=kernels/attention/test_rocm_aiter_mla_op_registration.py --shard-id=$$BUILDKITE_PARALLEL_JOB --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT
- label: ":nvidia: (H100) Attention DiffKV Kernels"
key: kernels-attention-diffkv-test-h100
@@ -209,6 +211,24 @@ steps:
- tests/kernels/attention/test_triton_unified_attention_diffkv.py
commands:
- pytest -v -s kernels/attention/test_triton_unified_attention_diffkv.py
mirror:
amd:
label: ":amd: (MI355) Attention DiffKV Kernels"
dind: false
device: mi355_1
num_devices: 1
timeout_in_minutes: 35
working_dir: /vllm-workspace/tests
depends_on:
- image-build-amd
source_file_dependencies:
- vllm/v1/attention/ops/triton_unified_attention_diffkv.py
- vllm/v1/attention/backends/triton_attn_diffkv.py
- tests/kernels/attention/test_triton_unified_attention.py
- tests/kernels/attention/test_triton_unified_attention_diffkv.py
- vllm/platforms/rocm.py
commands:
- pytest -v -s kernels/attention/test_triton_unified_attention_diffkv.py
- label: ":nvidia: (H100) MLA Kernel Test"
key: kernels-flashmla-test-h100
@@ -231,6 +251,31 @@ steps:
- pytest -v -s kernels/attention/test_flashmla_sparse.py
- pytest -v -s kernels/attention/test_flashinfer_mla_decode.py
- pytest -v -s kernels/attention/test_mla_cross_layer_kernel_equivalence.py
mirror:
amd:
label: ":amd: (MI355) MLA Kernels"
dind: false
device: mi355_1
num_devices: 1
timeout_in_minutes: 40
working_dir: /vllm-workspace/
depends_on:
- image-build-amd
source_file_dependencies:
- vllm/v1/attention/backends/mla/rocm_aiter_mla.py
- vllm/v1/attention/selector.py
- vllm/platforms/rocm.py
- vllm/_aiter_ops.py
- tests/kernels/attention/test_rocm_aiter_mla_decode.py
- tests/kernels/attention/test_rocm_aiter_mla_decode_metadata.py
- tests/kernels/attention/test_rocm_aiter_mla_fp8_support.py
- tests/kernels/attention/test_rocm_aiter_mla_op_registration.py
commands:
- amd-smi
- pytest -v -s tests/kernels/attention/test_rocm_aiter_mla_decode_metadata.py
- pytest -v -s tests/kernels/attention/test_rocm_aiter_mla_decode.py
- pytest -v -s tests/kernels/attention/test_rocm_aiter_mla_fp8_support.py
- pytest -v -s tests/kernels/attention/test_rocm_aiter_mla_op_registration.py
- label: ":nvidia: (L4) Quantization Kernels Shard %N"
key: kernels-quantization-test
@@ -640,31 +685,6 @@ steps:
- pytest -v -s kernels/moe/test_moe_layer.py
- pytest -v -s kernels/moe/test_deepep_v2_moe.py
- label: ":amd: (MI355) MLA Kernels"
key: amd-mla-kernels-mi355
dind: false
device: mi355_1
num_devices: 1
timeout_in_minutes: 25
working_dir: /vllm-workspace/
depends_on:
- image-build-amd
source_file_dependencies:
- vllm/v1/attention/backends/mla/rocm_aiter_mla.py
- vllm/v1/attention/selector.py
- vllm/platforms/rocm.py
- vllm/_aiter_ops.py
- tests/kernels/attention/test_rocm_aiter_mla_decode.py
- tests/kernels/attention/test_rocm_aiter_mla_decode_metadata.py
- tests/kernels/attention/test_rocm_aiter_mla_fp8_support.py
- tests/kernels/attention/test_rocm_aiter_mla_op_registration.py
commands:
- amd-smi
- pytest -v -s tests/kernels/attention/test_rocm_aiter_mla_decode_metadata.py
- pytest -v -s tests/kernels/attention/test_rocm_aiter_mla_decode.py
- pytest -v -s tests/kernels/attention/test_rocm_aiter_mla_fp8_support.py
- pytest -v -s tests/kernels/attention/test_rocm_aiter_mla_op_registration.py
- label: ":amd: (MI355) FP8 MoE Kernels"
key: amd-fp8-moe-kernels-mi355
dind: false
@@ -720,9 +740,7 @@ steps:
- vllm/_aiter_ops.py
- examples/basic/offline_inference/chat.py
- tests/kernels/attention/test_attention_selector.py
- tests/kernels/attention/test_rocm_aiter_mla_decode_metadata.py
commands:
- amd-smi
- python3 examples/basic/offline_inference/chat.py --attention-backend TRITON_ATTN
- pytest -v -s tests/kernels/attention/test_attention_selector.py
- pytest -v -s tests/kernels/attention/test_rocm_aiter_mla_decode_metadata.py
+11
View File
@@ -119,6 +119,17 @@ steps:
- tests/models/glm5next/
commands:
- pytest -v -s models/glm5next
mirror:
amd:
label: ":amd: (MI355) GLM5Next"
dind: false
device: mi355_1
timeout_in_minutes: 35
working_dir: "/vllm-workspace/tests"
depends_on:
- image-build-amd
source_file_dependencies:
- vllm/platforms/rocm.py
- label: ":nvidia: (H200) Qwen4 Exp"
key: qwen4-exp-unit-tests
+22 -1
View File
@@ -91,7 +91,7 @@ steps:
commands:
- MAMBA_FORCE_BUILD=TRUE uv pip install --system --no-build-isolation 'git+https://github.com/AndreasKaratzas/mamba@fix-rocm-7.0-warp-size-constexpr'
- CAUSAL_CONV1D_FORCE_BUILD=TRUE uv pip install --system --no-build-isolation 'git+https://github.com/Dao-AILab/causal-conv1d@v1.6.0'
- pytest -v -s models/language/generation -m hybrid_model --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT --shard-id=$$BUILDKITE_PARALLEL_JOB
- pytest -v -s models/language/generation -m hybrid_model -k 'not granite-4.0-tiny-preview' --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT --shard-id=$$BUILDKITE_PARALLEL_JOB
# Granite 4 hybrid generation is sensitive to hardware-specific Triton SSD
# autotuning (https://github.com/vllm-project/vllm/issues/25194). Keep this one
@@ -111,6 +111,27 @@ steps:
- rm -rf /tmp/mamba-src && git clone --depth 1 --branch v2.3.0 https://github.com/state-spaces/mamba /tmp/mamba-src && sed -i 's/-std=c++17/-std=c++20/g' /tmp/mamba-src/setup.py && MAMBA_FORCE_BUILD=TRUE uv pip install --system --no-build-isolation /tmp/mamba-src
- CAUSAL_CONV1D_FORCE_BUILD=TRUE uv pip install --system --no-build-isolation 'git+https://github.com/Dao-AILab/causal-conv1d@v1.6.0'
- pytest -v -s models/language/generation -m hybrid_model -k 'granite-4.0-tiny-preview'
mirror:
amd:
label: ":amd: (MI355) Granite Language Model Compatibility"
dind: false
device: mi355_1
num_devices: 1
timeout_in_minutes: 80
working_dir: /vllm-workspace/tests
depends_on:
- image-build-amd
source_file_dependencies:
- vllm/
- "!vllm/distributed/kv_transfer/"
- tests/models/language/generation
commands:
- export GIT_CONFIG_COUNT=1
- export GIT_CONFIG_KEY_0=http.version
- export GIT_CONFIG_VALUE_0=HTTP/1.1
- MAMBA_FORCE_BUILD=TRUE uv pip install --system --no-build-isolation 'git+https://github.com/AndreasKaratzas/mamba@fix-rocm-7.0-warp-size-constexpr'
- CAUSAL_CONV1D_FORCE_BUILD=TRUE uv pip install --system --no-build-isolation 'git+https://github.com/Dao-AILab/causal-conv1d@v1.6.0'
- pytest -v -s models/language/generation -m hybrid_model -k 'granite-4.0-tiny-preview'
- label: ":nvidia: (H200 MIG 35GB) Language Models (Extended Generation)"
device: h200_35gb
+14
View File
@@ -87,6 +87,20 @@ steps:
- tests/compile/h100/
commands:
- "find compile/h100/ -name 'test_*.py' -print0 | xargs -0 -n1 -I{} pytest -s -v '{}'"
mirror:
amd:
label: ":amd: (MI355) PyTorch Compilation H100 Cases"
dind: false
device: mi355_1
timeout_in_minutes: 45
working_dir: "/vllm-workspace/tests"
depends_on:
- image-build-amd
source_file_dependencies:
- tests/utils.py
- csrc/
commands:
- pytest -v -s compile/h100/test_startup.py
- label: ":nvidia: (L4) PyTorch Compilation Passes"
key: pytorch-compilation-passes-unit-tests
+22 -1
View File
@@ -35,7 +35,7 @@ steps:
- vllm/_aiter_ops.py
- vllm/platforms/rocm.py
commands:
- pytest -v -s samplers
- pytest -v -s samplers -k "not test_beam_search_passes_multimodal_data"
# Qwen2-Audio-7B leaves no room for KV cache on a 16 GiB slice.
- label: ":nvidia: (H200 MIG 35GB) Samplers Multimodal Beam Search"
@@ -51,3 +51,24 @@ steps:
commands:
- VLLM_USE_FLASHINFER_SAMPLER=0 pytest -v -s samplers/test_beam_search.py::test_beam_search_passes_multimodal_data
- VLLM_USE_FLASHINFER_SAMPLER=1 pytest -v -s samplers/test_beam_search.py::test_beam_search_passes_multimodal_data
mirror:
amd:
label: ":amd: (MI355) Samplers Multimodal Beam Search"
dind: false
device: mi355_1
num_devices: 1
timeout_in_minutes: 45
working_dir: /vllm-workspace/tests
depends_on:
- image-build-amd
source_file_dependencies:
- vllm/model_executor/layers
- vllm/sampling_metadata.py
- vllm/v1/sample/
- vllm/entrypoints/generate/beam_search/
- tests/samplers
- tests/conftest.py
- vllm/_aiter_ops.py
- vllm/platforms/rocm.py
commands:
- pytest -v -s samplers/test_beam_search.py::test_beam_search_passes_multimodal_data
+16 -8
View File
@@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""Cold start and warm start tests for vLLM-compile.
Cold start runs in a forked child (must fork before CUDA init) which
Cold start runs in a separate child process which
populates on-disk caches and asserts cold-start counters. Warm start
then runs in the parent with clean in-memory state but populated caches.
"""
@@ -18,7 +18,7 @@ from vllm.compilation.counter import compilation_counter
from vllm.config import CompilationConfig, CompilationMode, CUDAGraphMode, PassConfig
from vllm.utils.torch_utils import is_torch_equal_or_newer
from ...utils import fork_new_process_for_each_test
from ...utils import create_new_process_for_each_test, requires_spawn_multiprocessing
MODEL = "microsoft/Phi-tiny-MoE-instruct"
@@ -54,17 +54,21 @@ def _cold_start(vllm_runner):
assert counters["aot_autograd"]["autograd_cache_hit"] == 0
@fork_new_process_for_each_test
@create_new_process_for_each_test()
@pytest.mark.parametrize("mega_aot_artifact", ["0", "1"])
def test_moe_startup(monkeypatch, vllm_runner, fresh_vllm_cache, mega_aot_artifact):
monkeypatch.setenv("VLLM_ENABLE_V1_MULTIPROCESSING", "0")
monkeypatch.setenv("VLLM_USE_MEGA_AOT_ARTIFACT", mega_aot_artifact)
monkeypatch.setenv("VLLM_DEEP_GEMM_WARMUP", "skip")
# Cold start in a forked child (must fork before CUDA init).
# ROCm and XPU cannot fork safely after device discovery.
# This model has 32 identical transformer layers which produce
# 33 subgraphs after splitting on attention — only 3 are unique.
ctx = mp.get_context("fork")
ctx = (
mp.get_context("spawn")
if requires_spawn_multiprocessing()
else mp.get_context("fork")
)
p = ctx.Process(target=_cold_start, args=(vllm_runner,))
p.start()
p.join()
@@ -223,13 +227,17 @@ def _cold_start_model(vllm_runner, spec: ModelStartupSpec):
@pytest.mark.parametrize("spec", MODEL_SPECS)
@fork_new_process_for_each_test
@create_new_process_for_each_test()
def test_model_startup(monkeypatch, vllm_runner, fresh_vllm_cache, spec):
monkeypatch.setenv("VLLM_ENABLE_V1_MULTIPROCESSING", "0")
monkeypatch.setenv("VLLM_DEEP_GEMM_WARMUP", "skip")
# Cold start in a forked child (must fork before CUDA init).
ctx = mp.get_context("fork")
# ROCm and XPU cannot fork safely after device discovery.
ctx = (
mp.get_context("spawn")
if requires_spawn_multiprocessing()
else mp.get_context("fork")
)
p = ctx.Process(target=_cold_start_model, args=(vllm_runner, spec))
p.start()
p.join()
@@ -135,6 +135,7 @@ def ref_paged_attn(
num_seqs = len(query_lens)
block_tables = block_tables.cpu().numpy()
_, block_size, num_kv_heads, head_size = key_cache.shape
head_size_v = value_cache.shape[-1]
outputs: list[torch.Tensor] = []
start_idx = 0
@@ -149,7 +150,7 @@ def ref_paged_attn(
k = key_cache[block_indices].view(-1, num_kv_heads, head_size)
k = k[:kv_len]
v = value_cache[block_indices].view(-1, num_kv_heads, head_size)
v = value_cache[block_indices].view(-1, num_kv_heads, head_size_v)
v = v[:kv_len]
if q.shape[1] != k.shape[1]:
@@ -5,6 +5,7 @@
import pytest
import torch
from tests.kernels.attention.test_triton_unified_attention import ref_paged_attn
from vllm.platforms import current_platform
from vllm.utils.math_utils import next_power_of_2
from vllm.utils.torch_utils import (
@@ -81,7 +82,7 @@ def _alloc_segm_buffers(seq_threshold_3D: int, num_query_heads: int, head_size_v
@pytest.mark.parametrize("dtype", DTYPES)
@pytest.mark.parametrize("seq_threshold_3D", SEQ_THRESHOLD_3D_VALUES)
@torch.inference_mode()
def test_triton_unified_attn_diffkv_vs_fa(
def test_triton_unified_attn_diffkv_vs_reference(
seq_lens: list[tuple[int, int]],
num_heads: tuple[int, int],
head_sizes: tuple[int, int],
@@ -93,12 +94,13 @@ def test_triton_unified_attn_diffkv_vs_fa(
) -> None:
head_size_qk, head_size_v = head_sizes
# DiffKV requires FA3 (Hopper) / FA4 (Blackwell) as the reference.
fa_version = get_flash_attn_version(head_size=head_size_qk, head_size_v=head_size_v)
if not is_flash_attn_varlen_func_available() or fa_version not in (3, 4):
pytest.skip(f"FA DiffKV needs FA3/FA4 (got version {fa_version}).")
from vllm.v1.attention.backends.fa_utils import flash_attn_varlen_func
# Keep the FA3/FA4 comparison on NVIDIA; ROCm uses the PyTorch oracle.
if not current_platform.is_rocm():
fa_version = get_flash_attn_version(
head_size=head_size_qk, head_size_v=head_size_v
)
if not is_flash_attn_varlen_func_available() or fa_version not in (3, 4):
pytest.skip(f"FA DiffKV needs FA3/FA4 (got version {fa_version}).")
torch.set_default_device(DEVICE_TYPE)
set_random_seed(0)
@@ -135,28 +137,44 @@ def test_triton_unified_attn_diffkv_vs_fa(
0, NUM_BLOCKS, (num_seqs, max_num_blocks_per_seq), dtype=torch.int32
)
# ---- FlashAttention DiffKV (ground truth) ---------------------------
# Mirror the backend: fix degenerate strides on size-1 dims so FA's
# TMA path sees ≥16-byte-aligned strides (matters for num_kv_heads==1).
fa_k = canonicalize_singleton_dim_strides(key_cache)
fa_v = canonicalize_singleton_dim_strides(value_cache)
fa_out = torch.empty(sum(query_lens), num_query_heads, head_size_v, dtype=dtype)
flash_attn_varlen_func(
q=query,
k=fa_k,
v=fa_v,
out=fa_out,
cu_seqlens_q=cu_query_lens,
max_seqlen_q=max_query_len,
seqused_k=kv_lens_t,
max_seqlen_k=max_kv_len,
softmax_scale=scale,
causal=True,
window_size=list(window_size),
block_table=block_tables,
softcap=soft_cap if soft_cap is not None else 0,
fa_version=fa_version,
)
if current_platform.is_rocm():
# FP32 also keeps the helper's in-place scaling off the kernel input.
ref_out = ref_paged_attn(
query.float(),
key_cache.float(),
value_cache.float(),
query_lens,
kv_lens,
block_tables,
scale,
sliding_window=sliding_window,
soft_cap=soft_cap,
).to(dtype)
else:
from vllm.v1.attention.backends.fa_utils import flash_attn_varlen_func
# FA's TMA path needs aligned singleton strides (num_kv_heads == 1).
fa_k = canonicalize_singleton_dim_strides(key_cache)
fa_v = canonicalize_singleton_dim_strides(value_cache)
ref_out = torch.empty(
sum(query_lens), num_query_heads, head_size_v, dtype=dtype
)
flash_attn_varlen_func(
q=query,
k=fa_k,
v=fa_v,
out=ref_out,
cu_seqlens_q=cu_query_lens,
max_seqlen_q=max_query_len,
seqused_k=kv_lens_t,
max_seqlen_k=max_kv_len,
softmax_scale=scale,
causal=True,
window_size=list(window_size),
block_table=block_tables,
softcap=soft_cap if soft_cap is not None else 0,
fa_version=fa_version,
)
# ---- Triton DiffKV --------------------------------------------------
segm_output, segm_max, segm_expsum = _alloc_segm_buffers(
@@ -183,7 +201,4 @@ def test_triton_unified_attn_diffkv_vs_fa(
softmax_segm_expsum=segm_expsum,
)
(
torch.testing.assert_close(triton_out, fa_out, atol=2e-2, rtol=2e-2),
f"triton vs FA max abs diff: {torch.max(torch.abs(triton_out - fa_out))}",
)
torch.testing.assert_close(triton_out, ref_out, atol=2e-2, rtol=2e-2)
+13 -4
View File
@@ -4,18 +4,23 @@
The decode path hands the kernel column slices of the merged ``q|k|v`` conv
output and of the fused ``qkvbfg_a`` projection (beta), so q/k/v/beta are
token-strided rather than contiguous. The kernel must read them in place,
match a pure-PyTorch recurrence, and reject layouts it cannot address.
token-strided rather than contiguous. Both backends must match a pure-PyTorch
recurrence. CUDA reads these slices in place and rejects unsupported layouts;
the ROCm wrapper makes contiguous copies before launching its kernel.
"""
import pytest
import torch
from vllm.models.glm5next.nvidia.ops.third_party.kda import fused_recurrent_kda
from vllm.platforms import current_platform
if current_platform.is_rocm():
from vllm.models.glm5next.amd.ops.third_party.kda import fused_recurrent_kda
else:
from vllm.models.glm5next.nvidia.ops.third_party.kda import fused_recurrent_kda
pytestmark = pytest.mark.skipif(
not current_platform.is_cuda(), reason="CUDA-only Triton kernel"
not current_platform.is_cuda_alike(), reason="Requires CUDA or ROCm"
)
H, D = 16, 128
@@ -160,6 +165,10 @@ def test_fused_recurrent_kda_strided_inputs_bit_identical_to_contiguous(
torch.testing.assert_close(state, state_ref, rtol=0, atol=0)
@pytest.mark.skipif(
not current_platform.is_cuda(),
reason="Only the CUDA implementation requires zero-copy token-strided layouts",
)
@torch.inference_mode()
def test_fused_recurrent_kda_rejects_unaddressable_layouts():
"""Layouts the token-stride addressing cannot express must fail loudly