[Kernel] Phase 4 batch-3: migrate tangled JIT subsystems + new groups into kernels.ops (RFC #29630) (#32045)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Xiaoyu Zhang
2026-07-22 21:15:03 +08:00
committed by GitHub
co-authored by Claude Opus 4.8
parent 71fe649d68
commit 74338e94f1
389 changed files with 8186 additions and 8158 deletions
@@ -1132,11 +1132,14 @@ def dsa_impl_capability(impl: str) -> tuple[bool, str]:
if impl == "fa3":
try:
from sglang.jit_kernel.flash_attention import ( # noqa: F401
from sglang.kernels.ops.attention.flash_attention import ( # noqa: F401
flash_attn_with_kvcache,
)
except ImportError as exc:
return False, f"sglang.jit_kernel.flash_attention unavailable: {exc}"
return (
False,
f"sglang.kernels.ops.attention.flash_attention unavailable: {exc}",
)
# sgl-kernel flash_attn is compiled for SM9.x (Hopper) only;
# it raises NotImplementedError on Blackwell (SM10.x+).
if major < 9 or major >= 10:
+2 -2
View File
@@ -6,8 +6,8 @@ from typing import List, Optional
import torch
from sglang.jit_kernel.kv_canary import consts
from sglang.jit_kernel.kv_canary.verify import CANARY_SLOT_BYTES, RealKvSource
from sglang.kernels.ops.kv_canary import consts
from sglang.kernels.ops.kv_canary.verify import CANARY_SLOT_BYTES, RealKvSource
from sglang.srt.kv_canary.buffer_group import CanaryBufferGroup, PoolKind
from sglang.srt.kv_canary.config import CanaryConfig, CanaryMode
from sglang.srt.kv_canary.pool_patcher.adapters.mha import attach_mha
@@ -5,8 +5,8 @@ from unittest.mock import patch
import torch
from sglang.jit_kernel.kv_canary.consts import RealKvHashMode
from sglang.jit_kernel.kv_canary.verify import CanaryLaunchTag
from sglang.kernels.ops.kv_canary.consts import RealKvHashMode
from sglang.kernels.ops.kv_canary.verify import CanaryLaunchTag
from sglang.srt.kv_canary import endpoint as endpoint_module
from sglang.srt.kv_canary.buffer_group import CanaryBufferGroup
from sglang.srt.kv_canary.capacities import CanaryLaunchCapacities