Skip to content

Commit 5c7ea2c

Browse files
committed
refactor: migrate base GDN and causal convolution kernels.
1 parent a6ff7f7 commit 5c7ea2c

93 files changed

Lines changed: 47111 additions & 128 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitmodules‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,6 @@
5050
path = xllm-kernel/third_party/catlass
5151
url = https://gitcode.com/cann/catlass.git
5252
fetchRecurseSubmodules = false
53+
[submodule "xllm-kernel/third_party/pto-isa"]
54+
path = xllm-kernel/third_party/pto-isa
55+
url = https://gitcode.com/cann/pto-isa.git

‎MANIFEST.in‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ include .gitmodules
55
recursive-include src *.*
66
recursive-include xllm *.py
77
recursive-include xllm-kernel *.py *.toml *.md *.cpp *.h
8-
recursive-include xllm-kernel/csrc/ascendc CMakeLists.txt *.cmake *.txt *.hpp
8+
recursive-include xllm-kernel/csrc/ascendc CMakeLists.txt *.cmake *.txt *.hpp *.inc
99
prune xllm-kernel/third_party/catlass
1010
recursive-include xllm-kernel/third_party/catlass/include *.h *.hpp
1111
include xllm-kernel/third_party/catlass/LICENSE
12+
prune xllm-kernel/third_party/pto-isa
13+
recursive-include xllm-kernel/third_party/pto-isa/include *.h *.hpp *.inc
14+
include xllm-kernel/third_party/pto-isa/LICENSE
1215
recursive-include xllm/auto_config *.json
1316
recursive-include examples *.py
1417
recursive-include third_party *

‎tests/python/conftest.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ def native_conv(
6666
state[sequence].copy_(window[-state.shape[1] :])
6767
return output.view_as(inputs)
6868

69-
monkeypatch.setattr(torch.ops.xllm_ops, "causal_conv1d", native_conv, raising=False)
69+
from xllm.python.attention import kda_linear_attention
70+
71+
monkeypatch.setattr(kda_linear_attention, "causal_conv1d", native_conv)
7072
return calls
7173

7274

‎tests/python/test_glm5_next_kda.py‎

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -482,77 +482,6 @@ def npu_runtime() -> ModuleType:
482482
return pytest.importorskip("torch_npu")
483483

484484

485-
@pytest.fixture(scope="module")
486-
def native_causal_conv1d(npu_runtime: ModuleType) -> Callable[..., torch.Tensor]:
487-
"""Load an operator-only library, not an application embedding Python modules."""
488-
library_path = os.getenv("XLLM_KDA_TEST_OP_LIBRARY")
489-
if library_path:
490-
torch.ops.load_library(library_path)
491-
if not hasattr(torch.ops.xllm_ops, "causal_conv1d"):
492-
pytest.fail("Set XLLM_KDA_TEST_OP_LIBRARY to an operator-only library registering xllm_ops::causal_conv1d")
493-
return torch.ops.xllm_ops.causal_conv1d
494-
495-
496-
@pytest.mark.skipif(not os.getenv("XLLM_KDA_TEST_NPU_DEVICE"), reason="NPU device not configured")
497-
@pytest.mark.parametrize("dtype", [torch.float16, torch.bfloat16])
498-
@pytest.mark.parametrize("kernel_width", [2, 4])
499-
@pytest.mark.parametrize("rows", [1, 4])
500-
@pytest.mark.parametrize("activation_mode", [0, 1])
501-
@pytest.mark.parametrize("run_mode", [0, 1])
502-
@pytest.mark.parametrize("packed", [False, True])
503-
@torch.inference_mode()
504-
def test_native_causal_conv1d_output_state_and_graph_replay(
505-
npu_runtime: ModuleType,
506-
native_causal_conv1d: Callable[..., torch.Tensor],
507-
dtype: torch.dtype,
508-
kernel_width: int,
509-
rows: int,
510-
activation_mode: int,
511-
run_mode: int,
512-
packed: bool,
513-
) -> None:
514-
device = torch.device(os.environ["XLLM_KDA_TEST_NPU_DEVICE"])
515-
torch.npu.set_device(device)
516-
generator = torch.Generator().manual_seed(42)
517-
sequence_lengths = (rows, rows + 1) if packed else (rows, rows)
518-
input_shape = (sum(sequence_lengths), 16) if packed else (2, rows, 16)
519-
query_start_loc = [0, rows, sum(sequence_lengths)] if packed else []
520-
inputs = torch.randn(input_shape, generator=generator).to(device=device, dtype=dtype)
521-
weight = torch.randn(kernel_width, 16, generator=generator).to(device=device, dtype=dtype)
522-
state = torch.randn(2, kernel_width - 1, 16, generator=generator).to(device=device, dtype=dtype)
523-
for _ in range(3):
524-
native_causal_conv1d(inputs, weight, state, query_start_loc, activation_mode, run_mode)
525-
torch.npu.synchronize()
526-
graph = npu_runtime.npu.NPUGraph()
527-
with npu_runtime.npu.graph(graph):
528-
captured = native_causal_conv1d(inputs, weight, state, query_start_loc, activation_mode, run_mode)
529-
for _ in range(3):
530-
input_cpu = torch.randn(input_shape, generator=generator).to(dtype)
531-
state_cpu = torch.randn(2, kernel_width - 1, 16, generator=generator).to(dtype)
532-
expected_outputs = []
533-
expected_states = []
534-
for initial_state, sequence_input in zip(state_cpu, input_cpu.reshape(-1, 16).split(sequence_lengths)):
535-
window = torch.cat((initial_state, sequence_input), dim=0)
536-
convolved = functional.conv1d(
537-
window.float().t().unsqueeze(0), weight.cpu().float().t().unsqueeze(1), groups=16
538-
)
539-
expected_outputs.append(convolved.squeeze(0).t())
540-
expected_states.append(window[-(kernel_width - 1) :])
541-
expected = torch.cat(expected_outputs).reshape(input_shape)
542-
if activation_mode == 1:
543-
expected = functional.silu(expected)
544-
inputs.copy_(input_cpu)
545-
state.copy_(state_cpu)
546-
graph.replay()
547-
torch.npu.synchronize()
548-
eager_state = state_cpu.to(device)
549-
eager = native_causal_conv1d(inputs, weight, eager_state, query_start_loc, activation_mode, run_mode)
550-
torch.testing.assert_close(captured, eager, rtol=0, atol=0)
551-
torch.testing.assert_close(state, eager_state, rtol=0, atol=0)
552-
torch.testing.assert_close(state.cpu(), torch.stack(expected_states), rtol=0, atol=0)
553-
torch.testing.assert_close(captured.cpu(), expected.to(dtype), rtol=2 * torch.finfo(dtype).eps, atol=1e-3)
554-
555-
556485
@pytest.mark.skipif(not os.getenv("XLLM_KDA_TEST_NPU_DEVICE"), reason="NPU device not configured")
557486
@pytest.mark.parametrize("num_tokens", [1, 4, 17, 128])
558487
@torch.inference_mode()

‎tests/python/test_npu_paged_attention.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1795,7 +1795,9 @@ def native_conv(
17951795
dense_state.fill_(7)
17961796
return expected_conv.clone()
17971797

1798-
monkeypatch.setattr(torch.ops.xllm_ops, "causal_conv1d", native_conv)
1798+
from xllm.python.attention import kda_linear_attention
1799+
1800+
monkeypatch.setattr(kda_linear_attention, "causal_conv1d", native_conv)
17991801
output = backend._causal_conv1d(value, state, layer.conv_weight_t, activation, is_prefill=is_prefill)
18001802
torch.testing.assert_close(output, expected_conv.transpose(1, 2), rtol=0, atol=0)
18011803
assert output.dtype == torch.bfloat16

‎xllm-kernel/MANIFEST.in‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Copyright 2026 The xLLM Authors. Licensed under Apache-2.0.
22
recursive-include csrc *.cpp *.h
3-
recursive-include csrc/ascendc CMakeLists.txt *.cmake *.txt *.hpp
3+
recursive-include csrc/ascendc CMakeLists.txt *.cmake *.txt *.hpp *.inc
44
recursive-include third_party/catlass/include *.h *.hpp
55
include third_party/catlass/LICENSE
6+
recursive-include third_party/pto-isa/include *.h *.hpp *.inc
7+
include third_party/pto-isa/LICENSE
68
global-exclude *.so *.pyc

‎xllm-kernel/csrc/ascendc/CMakeLists.txt‎

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,36 @@ set(moe_hash_host "${CMAKE_CURRENT_SOURCE_DIR}/moe_gating_top_k_hash/op_host")
4040
set(moe_routing_host "${CMAKE_CURRENT_SOURCE_DIR}/moe_init_routing_v3/op_host")
4141
set(moe_gmm_host "${CMAKE_CURRENT_SOURCE_DIR}/moe_grouped_matmul_swiglu_quant/op_host")
4242
set(moe_dequant_host "${CMAKE_CURRENT_SOURCE_DIR}/dequant_swiglu_quant/op_host")
43+
set(conv_host "${CMAKE_CURRENT_SOURCE_DIR}/causal_conv1d/op_host")
44+
set(conv_qkv_host "${CMAKE_CURRENT_SOURCE_DIR}/causal_conv1d_qkv/op_host")
45+
set(chunk_gdn_host "${CMAKE_CURRENT_SOURCE_DIR}/mega_chunk_gdn/op_host")
46+
set(recurrent_gdn_host "${CMAKE_CURRENT_SOURCE_DIR}/recurrent_gated_delta_rule/op_host")
47+
set(pto_include "${CMAKE_CURRENT_SOURCE_DIR}/../../third_party/pto-isa/include")
48+
if(NOT EXISTS "${pto_include}/pto/pto-inst.hpp")
49+
message(FATAL_ERROR "MegaChunkGdn needs PTO headers. "
50+
"In a Git checkout run git submodule update --init xllm-kernel/third_party/pto-isa.")
51+
endif()
4352
list(APPEND op_definitions
4453
"${moe_hash_host}/moe_gating_top_k_hash_def.cpp"
4554
"${moe_gmm_host}/moe_grouped_matmul_swiglu_quant_def.cpp"
4655
"${moe_dequant_host}/dequant_swiglu_quant_def.cpp"
56+
"${conv_host}/causal_conv1d_def.cpp"
57+
"${conv_qkv_host}/causal_conv1d_qkv_def.cpp"
58+
"${chunk_gdn_host}/mega_chunk_gdn_def.cpp"
4759
)
4860
if("ascend910b" IN_LIST ASCEND_COMPUTE_UNIT OR "ascend910_93" IN_LIST ASCEND_COMPUTE_UNIT)
49-
list(APPEND op_definitions "${moe_routing_host}/moe_init_routing_v3_def.cpp")
61+
list(APPEND op_definitions
62+
"${moe_routing_host}/moe_init_routing_v3_def.cpp"
63+
"${recurrent_gdn_host}/recurrent_gated_delta_rule_def.cpp"
64+
)
65+
set(recurrent_gdn_api
66+
"${recurrent_gdn_host}/op_api/aclnn_recurrent_gated_delta_rule.cpp"
67+
"${recurrent_gdn_host}/op_api/recurrent_gated_delta_rule_l0.cpp"
68+
)
69+
set(recurrent_gdn_tiling
70+
"${recurrent_gdn_host}/recurrent_gated_delta_rule_tiling.cpp"
71+
"${recurrent_gdn_host}/recurrent_gated_delta_rule_proto.cpp"
72+
)
5073
set(moe_routing_api
5174
"${moe_routing_host}/op_api/aclnn_moe_init_routing_v3.cpp"
5275
"${moe_routing_host}/op_api/moe_init_routing_v3_l0.cpp"
@@ -100,9 +123,18 @@ npu_op_library(cust_opapi ACLNN
100123
"${moe_gmm_host}/op_api/moe_grouped_matmul_swiglu_quant_l0.cpp"
101124
"${ASCEND_AUTOGEN_PATH}/aclnn_xllm_kernel_dequant_swiglu_quant.cpp"
102125
"${ASCEND_AUTOGEN_PATH}/aclnn_xllm_kernel_dequant_swiglu_quant_v2.cpp"
126+
"${ASCEND_AUTOGEN_PATH}/aclnn_xllm_kernel_causal_conv1d.cpp"
127+
"${ASCEND_AUTOGEN_PATH}/aclnn_xllm_kernel_causal_conv1d_qkv.cpp"
128+
"${conv_qkv_host}/causal_conv1d_qkv_abi.cpp"
129+
"${chunk_gdn_host}/op_api/aclnn_mega_chunk_gdn.cpp"
130+
"${chunk_gdn_host}/op_api/mega_chunk_gdn_l0.cpp"
131+
${recurrent_gdn_api}
103132
${a2_aclnn_sources}
104133
)
105-
target_include_directories(cust_opapi PRIVATE "${ASCEND_CANN_PACKAGE_PATH}/include/aclnn")
134+
target_include_directories(cust_opapi PRIVATE
135+
"${ASCEND_CANN_PACKAGE_PATH}/include/aclnn"
136+
"${ASCEND_AUTOGEN_PATH}"
137+
)
106138
target_link_libraries(cust_opapi PRIVATE
107139
"${ASCEND_CANN_PACKAGE_PATH}/lib64/libopapi.so"
108140
"${ASCEND_CANN_PACKAGE_PATH}/lib64/libnnopbase.so"
@@ -136,6 +168,13 @@ npu_op_library(cust_optiling TILING
136168
"${moe_dequant_host}/dequant_swiglu_quant_tiling.cpp"
137169
"${moe_dequant_host}/dequant_swiglu_quant_tiling_base.cpp"
138170
"${moe_dequant_host}/dequant_swiglu_quant_tiling_arch35.cpp"
171+
"${conv_host}/causal_conv1d_proto.cpp"
172+
"${conv_host}/causal_conv1d_tiling.cpp"
173+
"${conv_qkv_host}/causal_conv1d_qkv_proto.cpp"
174+
"${conv_qkv_host}/causal_conv1d_qkv_tiling.cpp"
175+
"${chunk_gdn_host}/mega_chunk_gdn_infershape.cpp"
176+
"${chunk_gdn_host}/mega_chunk_gdn_tiling.cpp"
177+
${recurrent_gdn_tiling}
139178
${a2_tiling_sources}
140179
${generated_fallback}
141180
)
@@ -204,6 +243,26 @@ npu_op_kernel_options(ascendc_kernels XllmKernelMoeGatingTopKHash
204243
-mllvm -cce-aicore-hoist-movemask=false --op_relocatable_kernel_binary=true)
205244
npu_op_kernel_options(ascendc_kernels XllmKernelMoeGroupedMatmulSwigluQuant
206245
OPTIONS --cce-auto-sync=on -Wno-deprecated-declarations -Wno-error)
246+
npu_op_kernel_sources(ascendc_kernels OP_TYPE XllmKernelCausalConv1d
247+
KERNEL_DIR causal_conv1d/op_kernel KERNEL_FILE xllm_kernel_causal_conv1d.cpp)
248+
npu_op_kernel_sources(ascendc_kernels OP_TYPE XllmKernelCausalConv1dQkv
249+
KERNEL_DIR causal_conv1d_qkv/op_kernel KERNEL_FILE xllm_kernel_causal_conv1d_qkv.cpp)
250+
foreach(op_type XllmKernelCausalConv1d XllmKernelCausalConv1dQkv)
251+
npu_op_kernel_options(ascendc_kernels ${op_type}
252+
OPTIONS --cce-auto-sync=on -Wno-deprecated-declarations -Werror "-I${CMAKE_CURRENT_SOURCE_DIR}")
253+
endforeach()
254+
npu_op_kernel_sources(ascendc_kernels OP_TYPE XllmKernelMegaChunkGdn
255+
KERNEL_DIR mega_chunk_gdn/op_kernel KERNEL_FILE xllm_kernel_mega_chunk_gdn.cpp)
256+
npu_op_kernel_options(ascendc_kernels XllmKernelMegaChunkGdn
257+
OPTIONS --cce-auto-sync=on -Wno-deprecated-declarations -Wno-error
258+
-DGDN_KERNEL_NAME=xllm_kernel_mega_chunk_gdn -DGDN_D=128 -DGDN_C=128
259+
"-I${CMAKE_CURRENT_SOURCE_DIR}" "-I${pto_include}" "-I${ASCEND_CANN_PACKAGE_PATH}/include")
260+
if(recurrent_gdn_api)
261+
npu_op_kernel_sources(ascendc_kernels OP_TYPE XllmKernelRecurrentGatedDeltaRule
262+
KERNEL_DIR recurrent_gated_delta_rule/op_kernel KERNEL_FILE xllm_kernel_recurrent_gated_delta_rule.cpp)
263+
npu_op_kernel_options(ascendc_kernels XllmKernelRecurrentGatedDeltaRule
264+
OPTIONS --cce-auto-sync=off -Wno-deprecated-declarations -Wno-error)
265+
endif()
207266
if(a2_aclnn_sources)
208267
npu_op_kernel_sources(ascendc_kernels OP_TYPE XllmKernelQuantMatmulNzDecode
209268
KERNEL_DIR quant_matmul_nz_decode/op_kernel KERNEL_FILE xllm_kernel_quant_matmul_nz_decode.cpp)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CausalConv1d AscendC implementation
2+
3+
Source: https://gitcode.com/xLLM-AI/xllm_ops
4+
Revision: 8bd2b014c38fec33ecf14dd33e05e8ad792ec5c8
5+
Directory: xllm_ops/causal_conv1d
6+
7+
Packaged under a private CANN operator type.
8+
Imported sources retain their CANN license and copyright notices.
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
/**
2+
* This program is free software, you can redistribute it and/or modify it.
3+
* Copyright (c) 2025 Huawei Technologies Co., Ltd.
4+
* This file is a part of the CANN Open Software.
5+
* Licensed under CANN Open Software License Agreement Version 2.0 (the
6+
* "License"). Please refer to the License for details. You may not use this
7+
* file except in compliance with the License. THIS SOFTWARE IS PROVIDED ON AN
8+
* "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
9+
* INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS
10+
* FOR A PARTICULAR PURPOSE. See LICENSE in the root of the software repository
11+
* for the full text of the License.
12+
*/
13+
14+
/*!
15+
* \file causal_conv1d_def.cpp
16+
* \brief
17+
*/
18+
#include "register/op_def_registry.h"
19+
20+
namespace ops {
21+
22+
class XllmKernelCausalConv1d : public OpDef {
23+
public:
24+
explicit XllmKernelCausalConv1d(const char* name) : OpDef(name) {
25+
this->Input("x")
26+
.ParamType(REQUIRED)
27+
.DataType({ge::DT_FLOAT16, ge::DT_BF16})
28+
.FormatList({ge::FORMAT_ND})
29+
.AutoContiguous();
30+
this->Input("weight")
31+
.ParamType(REQUIRED)
32+
.DataType({ge::DT_FLOAT16, ge::DT_BF16})
33+
.FormatList({ge::FORMAT_ND})
34+
.AutoContiguous();
35+
this->Input("bias")
36+
.ParamType(OPTIONAL)
37+
.DataType({ge::DT_FLOAT16, ge::DT_BF16})
38+
.FormatList({ge::FORMAT_ND})
39+
.AutoContiguous();
40+
this->Input("convStates")
41+
.ParamType(REQUIRED)
42+
.DataType({ge::DT_FLOAT16, ge::DT_BF16})
43+
.FormatList({ge::FORMAT_ND})
44+
.AutoContiguous();
45+
this->Input("queryStartLoc")
46+
.ParamType(OPTIONAL)
47+
.DataTypeList({ge::DT_INT64})
48+
.FormatList({ge::FORMAT_ND})
49+
.ValueDepend(OPTIONAL)
50+
.AutoContiguous();
51+
this->Input("cacheIndices")
52+
.ParamType(OPTIONAL)
53+
.DataTypeList({ge::DT_INT64})
54+
.FormatList({ge::FORMAT_ND})
55+
.ValueDepend(OPTIONAL)
56+
.AutoContiguous();
57+
this->Input("initialStateMode")
58+
.ParamType(OPTIONAL)
59+
.DataTypeList({ge::DT_INT64})
60+
.FormatList({ge::FORMAT_ND})
61+
.ValueDepend(OPTIONAL)
62+
.AutoContiguous();
63+
this->Input("numAcceptedTokens")
64+
.ParamType(OPTIONAL)
65+
.DataTypeList({ge::DT_INT64})
66+
.FormatList({ge::FORMAT_ND})
67+
.ValueDepend(OPTIONAL)
68+
.AutoContiguous();
69+
70+
this->Output("y")
71+
.ParamType(REQUIRED)
72+
.DataType({ge::DT_FLOAT16, ge::DT_BF16})
73+
.FormatList({ge::FORMAT_ND})
74+
.AutoContiguous();
75+
76+
this->Attr("activationMode").AttrType(OPTIONAL).Int(0);
77+
this->Attr("padSlotId").AttrType(OPTIONAL).Int(-1);
78+
this->Attr("runMode").AttrType(OPTIONAL).Int(0);
79+
80+
OpAICoreConfig aicoreConfig;
81+
aicoreConfig.DynamicCompileStaticFlag(true)
82+
.DynamicFormatFlag(false)
83+
.DynamicRankSupportFlag(true)
84+
.DynamicShapeSupportFlag(true)
85+
.NeedCheckSupportFlag(false)
86+
.PrecisionReduceFlag(true)
87+
.ExtendCfgInfo("coreType.value", "AiCore");
88+
this->AICore().AddConfig("ascend910b", aicoreConfig);
89+
this->AICore().AddConfig("ascend910_93", aicoreConfig);
90+
this->AICore().AddConfig("ascend950", aicoreConfig);
91+
}
92+
};
93+
OP_ADD(XllmKernelCausalConv1d);
94+
95+
} // namespace ops
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* This program is free software, you can redistribute it and/or modify it.
3+
* Copyright (c) 2025 Huawei Technologies Co., Ltd.
4+
* This file is a part of the CANN Open Software.
5+
* Licensed under CANN Open Software License Agreement Version 2.0 (the
6+
* "License"). Please refer to the License for details. You may not use this
7+
* file except in compliance with the License. THIS SOFTWARE IS PROVIDED ON AN
8+
* "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
9+
* INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS
10+
* FOR A PARTICULAR PURPOSE. See LICENSE in the root of the software repository
11+
* for the full text of the License.
12+
*/
13+
14+
/*!
15+
* \file causal_conv1d_infershape.cpp
16+
* \brief
17+
*/
18+
#include "common/error/tiling_error_log.h"
19+
#include "register/op_impl_registry.h"
20+
21+
using namespace ge;
22+
23+
namespace ops {
24+
static constexpr int64_t IDX_0 = 0;
25+
26+
static ge::graphStatus InferShapeCausalConv1d(
27+
gert::InferShapeContext* context) {
28+
OP_LOGD(context->GetNodeName(), "Begin to do InferShapeCausalConv1d");
29+
30+
const gert::Shape* xShape = context->GetInputShape(IDX_0);
31+
OP_CHECK_NULL_WITH_CONTEXT(context, xShape);
32+
33+
gert::Shape* yShape = context->GetOutputShape(IDX_0);
34+
OP_CHECK_NULL_WITH_CONTEXT(context, yShape);
35+
36+
*yShape = *xShape;
37+
38+
OP_LOGD(context->GetNodeName(), "End to do InferShapeCausalConv1d");
39+
return GRAPH_SUCCESS;
40+
}
41+
42+
IMPL_OP_INFERSHAPE(XllmKernelCausalConv1d).InferShape(InferShapeCausalConv1d);
43+
} // namespace ops

0 commit comments

Comments
 (0)