@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 9d1e611f0e
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 9, 23:00 UTC

[CI] Add Helion as an optional dependency (#32482)

Signed-off-by: Yanan Cao <gmagogsfm@gmail.com>

Yanan Cao committed Jan 19, 2026 at 11:09 UTC 9d1e611f0e98934092684cd4c7ef0e960f33813c
5 files changed +83
.buildkite/test-amd.yaml
+11
@@ -703,6 +703,17 @@ steps:
703 - pytest -v -s kernels/moe/test_batched_deepgemm.py
704 - pytest -v -s kernels/attention/test_deepgemm_attention.py
705
706 +- label: Kernels Helion Test
707 + timeout_in_minutes: 30
708 + mirror_hardwares: [amdexperimental, amdproduction]
709 + agent_pool: mi325_1
710 + source_file_dependencies:
711 + - vllm/utils/import_utils.py
712 + - tests/kernels/helion/
713 + commands:
714 + - pip install helion
715 + - pytest -v -s kernels/helion/
716 +
717 - label: Model Executor Test # 23min
718 timeout_in_minutes: 35
719 torch_nightly: true
.buildkite/test-pipeline.yaml
+10
@@ -624,6 +624,16 @@ steps:
624 - pytest -v -s kernels/moe/test_batched_deepgemm.py
625 - pytest -v -s kernels/attention/test_deepgemm_attention.py
626
627 +- label: Kernels Helion Test
628 + timeout_in_minutes: 30
629 + gpu: h100
630 + source_file_dependencies:
631 + - vllm/utils/import_utils.py
632 + - tests/kernels/helion/
633 + commands:
634 + - pip install helion
635 + - pytest -v -s kernels/helion/
636 +
637 - label: Model Executor Test # 23min
638 timeout_in_minutes: 35
639 torch_nightly: true
setup.py
+2
@@ -992,6 +992,8 @@ setup(
992 "flashinfer": [], # Kept for backwards compatibility
993 # Optional deps for AMD FP4 quantization support
994 "petit-kernel": ["petit-kernel"],
995 + # Optional deps for Helion kernel development
996 + "helion": ["helion"],
997 },
998 cmdclass=cmdclass,
999 package_data=package_data,
tests/kernels/helion/test_helion_available.py new
+45
@@ -0,0 +1,45 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3 +"""
4 +Tests for Helion kernel availability and basic functionality.
5 +
6 +This module demonstrates the pattern for testing optional Helion kernels.
7 +Tests in this directory will be skipped if Helion is not installed.
8 +"""
9 +
10 +import pytest
11 +
12 +from vllm.utils.import_utils import has_helion
13 +
14 +# Skip entire module if helion is not available
15 +if not has_helion():
16 + pytest.skip(
17 + "Helion is not installed. Install with: pip install vllm[helion]",
18 + allow_module_level=True,
19 + )
20 +
21 +import helion
22 +import helion.language as hl
23 +import torch
24 +
25 +
26 +def test_helion_kernel_compilation_smoke():
27 + """Smoke test: compile and run a simple Helion kernel."""
28 +
29 + @helion.kernel(autotune_effort="none")
30 + def add_kernel(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
31 + out = torch.empty_like(x)
32 + for tile in hl.tile(x.size()):
33 + out[tile] = x[tile] + y[tile]
34 + return out
35 +
36 + # Create test tensors
37 + x = torch.randn(1024, device="cuda", dtype=torch.float32)
38 + y = torch.randn(1024, device="cuda", dtype=torch.float32)
39 +
40 + # Run the helion kernel
41 + result = add_kernel(x, y)
42 +
43 + # Verify correctness
44 + expected = x + y
45 + assert torch.allclose(result, expected), "Helion kernel output mismatch"
vllm/utils/import_utils.py
+15
@@ -436,3 +436,18 @@ def has_arctic_inference() -> bool:
436 """Whether the optional `arctic_inference` package is available."""
437
438 return _has_module("arctic_inference")
439 +
440 +
441 +def has_helion() -> bool:
442 + """Whether the optional `helion` package is available.
443 +
444 + Helion is a Python-embedded DSL for writing ML kernels.
445 + See: https://github.com/pytorch/helion
446 +
447 + Usage:
448 + if has_helion():
449 + import helion
450 + import helion.language as hl
451 + # use helion...
452 + """
453 + return _has_module("helion")