94057c3d3e
PR Test (NPU) / check-changes (push) Has been cancelled
PR Test (NPU) / pr-gate (push) Has been cancelled
PR Test (NPU) / set-image-config (push) Has been cancelled
PR Test (NPU) / stage-b-test-1-npu-a2 (0) (push) Has been cancelled
PR Test (NPU) / stage-b-test-1-npu-a2 (1) (push) Has been cancelled
PR Test (NPU) / stage-b-test-2-npu-a2 (0) (push) Has been cancelled
PR Test (NPU) / stage-b-test-2-npu-a2 (1) (push) Has been cancelled
PR Test (NPU) / stage-b-test-4-npu-a3 (push) Has been cancelled
PR Test (NPU) / stage-b-test-16-npu-a3 (push) Has been cancelled
PR Test (NPU) / multimodal-gen-test-1-npu-a3 (push) Has been cancelled
PR Test (NPU) / multimodal-gen-test-2-npu-a3 (push) Has been cancelled
PR Test (Arm64) / pr-gate (push) Has been cancelled
PR Test (Arm64) / check-changes (push) Has been cancelled
PR Test (Arm64) / build-test (push) Has been cancelled
PR Test (sgl-router) / gate (push) Has been cancelled
PR Test (sgl-router) / tier-1 — lint (push) Has been cancelled
PR Test (sgl-router) / tier-2 — build + test (push) Has been cancelled
PR Test (sgl-router) / tier-3 — docker (placeholder) (push) Has been cancelled
PR Test (sgl-router) / tier-3 — k8s integration (push) Has been cancelled
PR Test (sgl-router) / tier-3 — e2e (push) Has been cancelled
PR Test (sgl-router) / finish (push) Has been cancelled
PR Test (NPU) / single-node-poc (map[name:qwen3_6_27b_w8a8_1p_in64k_out1k_50ms runner:linux-aarch64-a3-2 test_case:test/registered/ascend/performance/qwen3_6_27b/test_npu_qwen3_6_27b_w8a8_1p_in64k_out1k_50ms.py test_type:perf]) (push) Has been cancelled
PR Test (NPU) / pr-test-npu-finish (push) Has been cancelled
PR Test (Xeon) / pr-gate (push) Has been cancelled
PR Test (Xeon) / check-changes (push) Has been cancelled
PR Test (Xeon) / build-test (, xeon-gnr, base-b-test-cpu) (push) Has been cancelled
PR Test (XPU) / check-changes (push) Has been cancelled
PR Test (XPU) / pr-gate (push) Has been cancelled
PR Test (XPU) / stage-a-test-1-gpu-xpu (push) Has been cancelled
PR Test (XPU) / wait-for-stage-a (push) Has been cancelled
PR Test (XPU) / stage-b-test-1-gpu-xpu (push) Has been cancelled
PR Test (XPU) / finish (push) Has been cancelled
CI Model Inventory / build-inventory (push) Has been cancelled
Lint / lint (push) Has been cancelled
PR Benchmark (SMG Components) / Benchmark Compilation Check (push) Has been cancelled
PR Benchmark (SMG Components) / Benchmark - Manual Policy (push) Has been cancelled
PR Benchmark (SMG Components) / Benchmark - Request Processing (push) Has been cancelled
PR Benchmark (SMG Components) / Benchmark Summary (push) Has been cancelled
PR Test (SMG) / build-wheel (push) Has been cancelled
Release SGLang Model Gateway to PyPI / build on windows (x86_64 - auto) (push) Has been cancelled
Release SGLang Model Gateway to PyPI / build on macos (x86_64 - auto) (push) Has been cancelled
PR Test (SMG) / python-unit-tests (push) Has been cancelled
PR Test (SMG) / unit-tests (push) Has been cancelled
PR Test (SMG) / benchmarks (push) Has been cancelled
PR Test (SMG) / chat-completions (push) Has been cancelled
PR Test (SMG) / chat-completions-4gpu (push) Has been cancelled
PR Test (SMG) / e2e (push) Has been cancelled
PR Test (SMG) / docker-build-test (push) Has been cancelled
PR Test (SMG) / k8s-integration (push) Has been cancelled
PR Test (SMG) / finish (push) Has been cancelled
PR Test (SMG) / summarize-benchmarks (push) Has been cancelled
Release SGLang Model Gateway Docker Image / publish (push) Has been cancelled
Release SGLang Model Gateway to PyPI / build on macos (aarch64 - auto) (push) Has been cancelled
Release SGLang Model Gateway to PyPI / build on linux (aarch64 - auto) (push) Has been cancelled
Release SGLang Model Gateway to PyPI / build on linux (x86_64 - auto) (push) Has been cancelled
Release SGLang Model Gateway to PyPI / build on linux (aarch64 - musllinux_1_1) (push) Has been cancelled
Release SGLang Model Gateway to PyPI / build on linux (x86_64 - musllinux_1_1) (push) Has been cancelled
Release SGLang Model Gateway to PyPI / Build SDist (push) Has been cancelled
Release SGLang Model Gateway to PyPI / Upload to PyPI (push) Has been cancelled
Release SGLang Kernels / build-cu129-matrix (aarch64, 12.9, 3.10, arm-kernel-build-node) (push) Has been cancelled
Release SGLang Kernels / build-cu129-matrix (x86_64, 12.9, 3.10, x64-kernel-build-node) (push) Has been cancelled
Release SGLang Kernels / release-cu129 (push) Has been cancelled
Release SGLang Kernels / build-cu130-matrix (aarch64, 13.0, 3.10, arm-kernel-build-node) (push) Has been cancelled
Release SGLang Kernels / build-cu130-matrix (x86_64, 13.0, 3.10, x64-kernel-build-node) (push) Has been cancelled
Release SGLang Kernels / release-cu130 (push) Has been cancelled
Release SGLang Kernels / build-rocm-matrix (3.10, 700) (push) Has been cancelled
Release SGLang Kernels / build-rocm-matrix (3.10, 720) (push) Has been cancelled
Release SGLang Kernels / release-rocm700 (push) Has been cancelled
Release SGLang Kernels / release-rocm720 (push) Has been cancelled
Release SGLang Kernels / build-musa43 (43, 3.10) (push) Has been cancelled
Release SGLang Kernels / release-musa43 (push) Has been cancelled
102 lines
4.0 KiB
Python
102 lines
4.0 KiB
Python
from pathlib import Path
|
|
|
|
|
|
def _data_dir() -> Path:
|
|
return Path(__file__).resolve().parent / "data"
|
|
|
|
|
|
def gen_sgl_trtllm_gen_fused_moe_sm100_module():
|
|
import flashinfer
|
|
from flashinfer.artifacts import ArtifactPath, CheckSumHash
|
|
from flashinfer.jit import env as jit_env
|
|
from flashinfer.jit.core import current_compilation_context, gen_jit_spec
|
|
from flashinfer.jit.cubin_loader import (
|
|
ensure_symlink,
|
|
get_artifact,
|
|
get_meta_hash,
|
|
verify_symlinked_headers,
|
|
)
|
|
from flashinfer.jit.fused_moe import BMM_EXPORT_HEADERS
|
|
|
|
overlay_data_dir = _data_dir()
|
|
overlay_csrc_dir = overlay_data_dir / "csrc"
|
|
overlay_include_dir = overlay_data_dir / "include"
|
|
flashinfer_data_dir = Path(flashinfer.__file__).resolve().parent / "data"
|
|
flashinfer_csrc_dir = flashinfer_data_dir / "csrc"
|
|
flashinfer_include_dir = flashinfer_data_dir / "include"
|
|
|
|
include_path = f"{ArtifactPath.TRTLLM_GEN_BMM}/include"
|
|
header_name = "flashinferMetaInfo"
|
|
checksum_path = f"{ArtifactPath.TRTLLM_GEN_BMM}/checksums.txt"
|
|
checksum = get_artifact(checksum_path, CheckSumHash.TRTLLM_GEN_BMM)
|
|
assert checksum, f"Failed to get checksums.txt from {checksum_path}"
|
|
meta_hash = get_meta_hash(checksum)
|
|
|
|
metainfo = get_artifact(f"{include_path}/{header_name}.h", meta_hash)
|
|
assert metainfo, f"{header_name}.h not found"
|
|
|
|
bmm_export_path = f"{include_path}/trtllmGen_bmm_export"
|
|
for header in BMM_EXPORT_HEADERS:
|
|
h = get_artifact(f"{bmm_export_path}/{header}", get_meta_hash(checksum, header))
|
|
assert h, f"{header} not found"
|
|
|
|
symlink_path = (
|
|
jit_env.FLASHINFER_CUBIN_DIR
|
|
/ "flashinfer"
|
|
/ "trtllm"
|
|
/ "batched_gemm"
|
|
/ "trtllmGen_bmm_export"
|
|
)
|
|
ensure_symlink(symlink_path, jit_env.FLASHINFER_CUBIN_DIR / bmm_export_path)
|
|
verify_symlinked_headers(symlink_path, BMM_EXPORT_HEADERS, checksum)
|
|
|
|
nvcc_flags = current_compilation_context.get_nvcc_flags_list(
|
|
supported_major_versions=[10, 12]
|
|
)
|
|
|
|
return gen_jit_spec(
|
|
"sgl_fused_moe_trtllm_sm100",
|
|
[
|
|
flashinfer_csrc_dir / "nv_internal/cpp/kernels/quantization.cu",
|
|
flashinfer_csrc_dir / "nv_internal/cpp/common/envUtils.cpp",
|
|
flashinfer_csrc_dir / "nv_internal/cpp/common/logger.cpp",
|
|
flashinfer_csrc_dir / "nv_internal/cpp/common/stringUtils.cpp",
|
|
flashinfer_csrc_dir / "nv_internal/cpp/common/tllmException.cpp",
|
|
flashinfer_csrc_dir / "nv_internal/cpp/common/memoryUtils.cu",
|
|
overlay_csrc_dir / "trtllm_fused_moe_kernel_launcher.cu",
|
|
overlay_csrc_dir / "trtllm_fused_moe_runner.cu",
|
|
flashinfer_csrc_dir
|
|
/ "fused_moe/trtllm_backend/trtllm_fused_moe_routing_deepseek.cu",
|
|
flashinfer_csrc_dir
|
|
/ "fused_moe/trtllm_backend/trtllm_fused_moe_routing_llama4.cu",
|
|
flashinfer_csrc_dir
|
|
/ "fused_moe/trtllm_backend/trtllm_fused_moe_routing_custom.cu",
|
|
flashinfer_csrc_dir
|
|
/ "fused_moe/trtllm_backend/trtllm_fused_moe_routing_common.cu",
|
|
overlay_csrc_dir
|
|
/ "fused_moe/trtllm_backend/trtllm_fused_moe_dev_kernel.cu",
|
|
flashinfer_csrc_dir / "trtllm_batched_gemm_runner.cu",
|
|
],
|
|
extra_cuda_cflags=[
|
|
"-DTLLM_GEN_EXPORT_INTERFACE",
|
|
"-DTLLM_GEN_EXPORT_FLASHINFER",
|
|
"-DTLLM_ENABLE_CUDA",
|
|
"-DENABLE_BF16",
|
|
"-DENABLE_FP8",
|
|
"-DENABLE_FP4",
|
|
"-DCUTLASS_ENABLE_GDC_FOR_SM100=1",
|
|
f'-DTLLM_GEN_GEMM_CUBIN_PATH=\\"{ArtifactPath.TRTLLM_GEN_BMM}\\"',
|
|
]
|
|
+ nvcc_flags,
|
|
extra_include_paths=[
|
|
overlay_include_dir,
|
|
overlay_csrc_dir,
|
|
flashinfer_include_dir,
|
|
flashinfer_csrc_dir,
|
|
flashinfer_csrc_dir / "nv_internal",
|
|
flashinfer_csrc_dir / "nv_internal/include",
|
|
jit_env.FLASHINFER_CUBIN_DIR,
|
|
jit_env.FLASHINFER_CUBIN_DIR / include_path,
|
|
],
|
|
)
|