[Refactor][GLM-5.3-Flash] Move sparse_attn_indexer_kpool into the model folder and split AMD/NVIDIA (#55358)

Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
Co-authored-by: TJian <tunjian.tan@embeddedllm.com>
This commit is contained in:
Jiangyun Zhu
2026-09-16 05:50:35 +00:00
committed by GitHub
co-authored by TJian
parent 961c5b6b7e
commit 4fe9e6f6e5
6 changed files with 1007 additions and 397 deletions
+22
View File
@@ -0,0 +1,22 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""Sparse attention indexer (kpool) — hardware-isolated entry point.
The implementation lives under ``nvidia/`` and ``amd/`` (with shared helpers
in ``common/``); this module picks the right one for the current platform.
"""
from vllm.platforms import current_platform
if current_platform.is_rocm():
from .amd.sparse_indexer import (
SparseAttnIndexerKpool,
)
else:
from .nvidia.sparse_indexer import (
SparseAttnIndexerKpool,
)
__all__ = [
"SparseAttnIndexerKpool",
]