From 254c73f89fec4d7bcf3054f86a0f78d0bfdefb44 Mon Sep 17 00:00:00 2001 From: krisztian-gajdar Date: Wed, 18 Nov 2026 10:56:34 +0100 Subject: [PATCH 1/2] perf(server): ship FlashInfer's prebuilt JIT modules in the sglang-cu130 bundle A new sglang-cu130 container compiled FlashInfer's JIT modules with nvcc the first time each was used: the sampling module during the sampled warmup, and further modules while the engine starts. flashinfer-jit-cache 0.6.18+cu130 carries those modules prebuilt for sm_80 through sm_120, and FlashInfer loads them instead of compiling. The wheel comes from FlashInfer's GitHub release through a source pin, like the other cu130 wheels whose index omits upload timestamps. --- .../cuda13-sglang-cu130-amd64/manifest.json | 6 +++--- .../cuda13-sglang-cu130-amd64/pylock.toml | 5 +++++ packages/sie_server/bundle-locks/exceptions.json | 6 ++++++ packages/sie_server/bundles/sglang-cu130.yaml | 6 ++++++ tools/ci/cuda13_image_smoke.py | 12 +++++++++++- tools/ci/tests/test_cuda13_image_smoke.py | 9 ++++++++- 6 files changed, 39 insertions(+), 5 deletions(-) diff --git a/packages/sie_server/bundle-locks/cuda13-sglang-cu130-amd64/manifest.json b/packages/sie_server/bundle-locks/cuda13-sglang-cu130-amd64/manifest.json index 7af19e812..188836170 100644 --- a/packages/sie_server/bundle-locks/cuda13-sglang-cu130-amd64/manifest.json +++ b/packages/sie_server/bundle-locks/cuda13-sglang-cu130-amd64/manifest.json @@ -26,14 +26,14 @@ "allow" ], "inputs": { - "requirements_sha256": "6d29b7815d5f5105dbc70e23f5c3c51a225c6b2e0127eca3834a327d94eeec4a", + "requirements_sha256": "25831dec2002fa0748dde04a235e79ee88ac33ba885b02b7e5075f061011f8d2", "root_versions_sha256": "baaee3f4ed167d22897e99edc787077a74b2ce56dbbf986ebc4e1a80bdde6f24" }, - "lock_sha256": "0097bf4a365e28cbc6ff9b35b49e5f13f19ad622d9862b29c3c9912fe959ab08", + "lock_sha256": "2e66cf20cf5acf02935a069d2c06796a1e4789414b15e1f3a8758e0c0e2ca67c", "policy_sha256": "d64e8e1cf9c2341810e07b556520974b73f5ccd3d09721efb3b6b107d2473d0f", "root_exclude_newer": "2026-11-06T20:00:00Z", "schema_version": 1, - "source_pins_sha256": "6808e668b2e2a0982ffa734b251936b07fab343a4b201d549e85333691f7ec85", + "source_pins_sha256": "f5cadfe1391c1d1e7feef6df532e25d9c1402832497ef81faa121a4946fb9b2e", "target": { "architecture": "amd64", "bundle": "sglang-cu130", diff --git a/packages/sie_server/bundle-locks/cuda13-sglang-cu130-amd64/pylock.toml b/packages/sie_server/bundle-locks/cuda13-sglang-cu130-amd64/pylock.toml index 9c6791ca0..087b7d0a6 100644 --- a/packages/sie_server/bundle-locks/cuda13-sglang-cu130-amd64/pylock.toml +++ b/packages/sie_server/bundle-locks/cuda13-sglang-cu130-amd64/pylock.toml @@ -250,6 +250,11 @@ version = "4.0.0b35" sdist = { url = "https://files.pythonhosted.org/packages/dc/04/8749f4e48bc7f30a502fcd93985792281da2170b676a1dd641ed0880c5b4/flash_attn_4-4.0.0b35.tar.gz", upload-time = 2026-10-14T08:21:14Z, size = 481472, hashes = { sha256 = "45c48469c851c54052f0004c9679b19ea7d70423960788a5be570a75f189e0ab" } } wheels = [{ url = "https://files.pythonhosted.org/packages/bc/46/020652846c4028f4ec0af1d0f8f9ef1067a2813b9539fa666f4190ba86aa/flash_attn_4-4.0.0b35-py3-none-any.whl", upload-time = 2026-10-14T08:21:12Z, size = 509535, hashes = { sha256 = "6df9a60fab0ca55c3f9c35244e794411afeff565100955e40db6c73e72848f94" } }] +[[packages]] +name = "flashinfer-jit-cache" +version = "0.6.18+cu130" +archive = { url = "https://github.com/flashinfer-ai/flashinfer/releases/download/v0.6.18/flashinfer_jit_cache-0.6.18+cu130-cp39-abi3-manylinux_2_28_x86_64.whl", hashes = { sha256 = "428a47a554ade93c30a818e142b781df58582bf056bab94611fb4c906cc366bf" } } + [[packages]] name = "flashinfer-python" version = "0.6.18" diff --git a/packages/sie_server/bundle-locks/exceptions.json b/packages/sie_server/bundle-locks/exceptions.json index 560d068ae..4f24e3bd6 100644 --- a/packages/sie_server/bundle-locks/exceptions.json +++ b/packages/sie_server/bundle-locks/exceptions.json @@ -3,6 +3,12 @@ "scope": "Exact version and artifact-source departures for the bundle-libs overlay only. Root-compatible overlaps remain pinned.", "source_pins": { "cuda13-sglang-cu130-amd64": { + "flashinfer-jit-cache": { + "reason": "FlashInfer's prebuilt JIT modules for the bundle's flashinfer-python 0.6.18 on CUDA 13.0. FlashInfer publishes this wheel on its own cu130 index, which omits upload timestamps, so uv0.9.28 excludes it under the global cutoff. This exact public wheel and SHA256 are an explicit source exception; the cutoff still applies to index-resolved candidates.", + "sha256": "428a47a554ade93c30a818e142b781df58582bf056bab94611fb4c906cc366bf", + "url": "https://github.com/flashinfer-ai/flashinfer/releases/download/v0.6.18/flashinfer_jit_cache-0.6.18+cu130-cp39-abi3-manylinux_2_28_x86_64.whl", + "version": "0.6.18+cu130" + }, "sgl-deep-ep": { "reason": "Preserve the CUDA13 bundle's native cu130 variant. The official cu130 index omits upload timestamps, so uv0.9.28 excludes this artifact under the global cutoff. This exact public wheel and SHA256 are an explicit source exception; the cutoff still applies to index-resolved candidates.", "sha256": "9c15cb83b56bcc1ec1a838f47a06e9e067c69e0f0b16498d0e7451a548c2047a", diff --git a/packages/sie_server/bundles/sglang-cu130.yaml b/packages/sie_server/bundles/sglang-cu130.yaml index bb915b791..269d56e5b 100644 --- a/packages/sie_server/bundles/sglang-cu130.yaml +++ b/packages/sie_server/bundles/sglang-cu130.yaml @@ -86,3 +86,9 @@ deps: # exactly, so declare the same version explicitly: this keeps the import in # the image and lets the bundle resolve as one compatible dependency set. apache-tvm-ffi: '==0.1.11' + # FlashInfer's prebuilt JIT modules for CUDA 13.0, including the sampling + # module every sampled request needs. Without them a new container compiles + # each module with nvcc the first time it is used. FlashInfer refuses a + # jit-cache whose version differs from flashinfer-python, so this pin moves + # with SGLang's flashinfer-python pin. + flashinfer-jit-cache: '==0.6.18' diff --git a/tools/ci/cuda13_image_smoke.py b/tools/ci/cuda13_image_smoke.py index 253016481..fd72dd763 100644 --- a/tools/ci/cuda13_image_smoke.py +++ b/tools/ci/cuda13_image_smoke.py @@ -20,6 +20,9 @@ """ SGLANG_CHECKS = """ +from pathlib import Path + +import flashinfer_jit_cache import tvm_ffi import xgrammar from sie_server.adapters.sglang import cuda13, gemma, generation @@ -35,9 +38,16 @@ } for distribution, version in expected.items(): assert importlib.metadata.version(distribution) == version, distribution -for distribution, upstream in (("sgl-deep-gemm", "0.2.0"), ("sglang-kernel", "0.4.7")): +for distribution, upstream in ( + ("flashinfer-jit-cache", "0.6.18"), + ("sgl-deep-gemm", "0.2.0"), + ("sglang-kernel", "0.4.7"), +): actual_upstream, separator, variant = importlib.metadata.version(distribution).partition("+") assert (actual_upstream, separator, variant) == (upstream, "+", "cu130"), distribution +flashinfer_version = importlib.metadata.version("flashinfer-python") +assert flashinfer_jit_cache.__version__.startswith(flashinfer_version), flashinfer_jit_cache.__version__ +assert (Path(flashinfer_jit_cache.get_jit_cache_dir()) / "sampling" / "sampling.so").is_file() assert importlib.metadata.distribution("sglang").files """ diff --git a/tools/ci/tests/test_cuda13_image_smoke.py b/tools/ci/tests/test_cuda13_image_smoke.py index dff9ec834..a535cd72e 100644 --- a/tools/ci/tests/test_cuda13_image_smoke.py +++ b/tools/ci/tests/test_cuda13_image_smoke.py @@ -36,10 +36,17 @@ def test_sglang_check_uses_safe_distribution_and_adapter_surfaces(): def test_sglang_native_wheels_require_exact_cu130_local_variants(): script = cuda13_image_smoke.validation_script("sglang-cu130") - assert '(("sgl-deep-gemm", "0.2.0"), ("sglang-kernel", "0.4.7"))' in script + assert '("flashinfer-jit-cache", "0.6.18"),' in script + assert '("sgl-deep-gemm", "0.2.0"),' in script + assert '("sglang-kernel", "0.4.7"),' in script assert '.partition("+")' in script assert '(upstream, "+", "cu130")' in script +def test_sglang_image_carries_flashinfer_prebuilt_sampling_module(): + script = cuda13_image_smoke.validation_script("sglang-cu130") + assert "flashinfer_jit_cache.__version__.startswith(flashinfer_version)" in script + assert '/ "sampling" / "sampling.so").is_file()' in script + @pytest.mark.parametrize( ("bundle", "torch_version"), From 10e2d96e00ad71fe7678dba6c9efddf5e50acbae Mon Sep 17 00:00:00 2001 From: krisztian-gajdar Date: Wed, 18 Nov 2026 12:35:36 +0100 Subject: [PATCH 2/2] style(ci): separate the prebuilt sampling module test with two blank lines --- tools/ci/tests/test_cuda13_image_smoke.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/ci/tests/test_cuda13_image_smoke.py b/tools/ci/tests/test_cuda13_image_smoke.py index a535cd72e..21ea255ee 100644 --- a/tools/ci/tests/test_cuda13_image_smoke.py +++ b/tools/ci/tests/test_cuda13_image_smoke.py @@ -42,6 +42,7 @@ def test_sglang_native_wheels_require_exact_cu130_local_variants(): assert '.partition("+")' in script assert '(upstream, "+", "cu130")' in script + def test_sglang_image_carries_flashinfer_prebuilt_sampling_module(): script = cuda13_image_smoke.validation_script("sglang-cu130") assert "flashinfer_jit_cache.__version__.startswith(flashinfer_version)" in script