From d5f77f14d0eb3b8dbcf968eae443d6e5a1c79f4d Mon Sep 17 00:00:00 2001 From: shiyuan680 <72335504+shiyuan680@users.noreply.github.com> Date: Wed, 26 Nov 2025 11:06:12 +0800 Subject: [PATCH] mkdir triton package and move triton files (#4420) ### What this PR does / why we need it? mkdir triton package and move triton files - vLLM version: v0.11.0 - vLLM main: https://github.com/vllm-project/vllm/commit/2918c1b49c88c29783c86f78d2c4221cb9622379 Signed-off-by: shiyuan680 <917935075@qq.com> --- vllm_ascend/ops/triton/__init__.py | 0 vllm_ascend/ops/triton/fla/__init__.py | 0 vllm_ascend/ops/{ => triton/fla}/fla.py | 0 vllm_ascend/ops/{ => triton/fla}/sigmoid_gating.py | 0 vllm_ascend/ops/triton/mamba/__init__.py | 0 vllm_ascend/ops/{ => triton/mamba}/casual_conv1d.py | 0 vllm_ascend/patch/worker/patch_triton.py | 9 +++++---- 7 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 vllm_ascend/ops/triton/__init__.py create mode 100644 vllm_ascend/ops/triton/fla/__init__.py rename vllm_ascend/ops/{ => triton/fla}/fla.py (100%) rename vllm_ascend/ops/{ => triton/fla}/sigmoid_gating.py (100%) create mode 100644 vllm_ascend/ops/triton/mamba/__init__.py rename vllm_ascend/ops/{ => triton/mamba}/casual_conv1d.py (100%) diff --git a/vllm_ascend/ops/triton/__init__.py b/vllm_ascend/ops/triton/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/vllm_ascend/ops/triton/fla/__init__.py b/vllm_ascend/ops/triton/fla/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/vllm_ascend/ops/fla.py b/vllm_ascend/ops/triton/fla/fla.py similarity index 100% rename from vllm_ascend/ops/fla.py rename to vllm_ascend/ops/triton/fla/fla.py diff --git a/vllm_ascend/ops/sigmoid_gating.py b/vllm_ascend/ops/triton/fla/sigmoid_gating.py similarity index 100% rename from vllm_ascend/ops/sigmoid_gating.py rename to vllm_ascend/ops/triton/fla/sigmoid_gating.py diff --git a/vllm_ascend/ops/triton/mamba/__init__.py b/vllm_ascend/ops/triton/mamba/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/vllm_ascend/ops/casual_conv1d.py b/vllm_ascend/ops/triton/mamba/casual_conv1d.py similarity index 100% rename from vllm_ascend/ops/casual_conv1d.py rename to vllm_ascend/ops/triton/mamba/casual_conv1d.py diff --git a/vllm_ascend/patch/worker/patch_triton.py b/vllm_ascend/patch/worker/patch_triton.py index cc550ccc..eb3f300b 100644 --- a/vllm_ascend/patch/worker/patch_triton.py +++ b/vllm_ascend/patch/worker/patch_triton.py @@ -3,11 +3,12 @@ import vllm.model_executor.layers.fla.ops.fused_recurrent import vllm.model_executor.layers.fla.ops.layernorm_guard import vllm.model_executor.layers.mamba.ops.causal_conv1d -from vllm_ascend.ops.casual_conv1d import (causal_conv1d_fn, - causal_conv1d_update_npu) -from vllm_ascend.ops.fla import LayerNormFn, torch_chunk_gated_delta_rule -from vllm_ascend.ops.sigmoid_gating import \ +from vllm_ascend.ops.triton.fla.fla import (LayerNormFn, + torch_chunk_gated_delta_rule) +from vllm_ascend.ops.triton.fla.sigmoid_gating import \ fused_recurrent_gated_delta_rule_fwd_kernel +from vllm_ascend.ops.triton.mamba.casual_conv1d import ( + causal_conv1d_fn, causal_conv1d_update_npu) vllm.model_executor.layers.mamba.ops.causal_conv1d.causal_conv1d_update = causal_conv1d_update_npu vllm.model_executor.layers.mamba.ops.causal_conv1d.causal_conv1d_fn = causal_conv1d_fn