| 1 | # SPDX-License-Identifier: Apache-2.0 |
| 2 | # SPDX-FileCopyrightText: Copyright contributors to the vLLM project |
| 3 | """DeepSeek V4.1 fused ops. |
| 4 | |
| 5 | Single bridging point for the kernels V4.1 shares verbatim with V4: the |
| 6 | re-exports below are the only place this package reaches into |
| 7 | ``vllm.models.deepseek_v4``, so submodules import them from ``.`` instead of |
| 8 | naming the V4 path themselves. Keep these imports above the ``.``-relative |
| 9 | ones — ``indexer_k_store`` reads them off this partially-initialized module. |
| 10 | """ |
| 11 | |
| 12 | from vllm.models.deepseek_v4.common.ops.fused_indexer_q import ( |
| 13 | MXFP4_BLOCK_SIZE, |
| 14 | fused_indexer_q_rope_quant, |
| 15 | ) |
| 16 | from vllm.models.deepseek_v4.common.ops.fused_indexer_q import ( |
| 17 | _fp32x2_to_fp4x2 as _fp32x2_to_fp4x2, # re-export for .indexer_k_store |
| 18 | ) |
| 19 | from vllm.models.deepseek_v4.common.ops.fused_inv_rope_fp8_quant import ( |
| 20 | fused_inv_rope_fp8_quant, |
| 21 | ) |
| 22 | |
| 23 | from .cache_utils import ( |
| 24 | build_flashinfer_mixed_sparse_indices, |
| 25 | combine_topk_swa_indices, |
| 26 | compute_global_topk_indices_and_lens, |
| 27 | dequantize_and_gather_k_cache, |
| 28 | quantize_and_insert_k_cache, |
| 29 | ) |
| 30 | from .indexer_k_store import indexer_k_norm_rope_store |
| 31 | |
| 32 | __all__ = [ |
| 33 | "MXFP4_BLOCK_SIZE", |
| 34 | "build_flashinfer_mixed_sparse_indices", |
| 35 | "combine_topk_swa_indices", |
| 36 | "compute_global_topk_indices_and_lens", |
| 37 | "dequantize_and_gather_k_cache", |
| 38 | "fused_indexer_q_rope_quant", |
| 39 | "fused_inv_rope_fp8_quant", |
| 40 | "indexer_k_norm_rope_store", |
| 41 | "quantize_and_insert_k_cache", |
| 42 | ] |