[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:
@@ -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",
|
||||
]
|
||||
Reference in New Issue
Block a user