diff --git a/graph/ascendc_ir/generator/ascir_register.cc b/graph/ascendc_ir/generator/ascir_register.cc index 1addc8ae47c360020c414b8123c5ad5210fab2c6..25e421832e8836fb8158cf217fcf2da6d1f5b85f 100644 --- a/graph/ascendc_ir/generator/ascir_register.cc +++ b/graph/ascendc_ir/generator/ascir_register.cc @@ -102,6 +102,7 @@ AscirRegister &AscirRegister::DynamicInput(const char_t *input_name, const char_ AscirRegister &AscirRegister::DynamicOutput(const char_t *output_name, const char_t *datatype_symbol) { ir_def_.AppendOutput(output_name, ge::IrOutputType::kIrOutputDynamic); + ir_def_.StoreOutputIrSymName(output_name, datatype_symbol); ir_def_.MutableDataTypeSymbolStore().SetOutputSymbol(output_name, ge::kIrOutputDynamic, datatype_symbol); return *this; } diff --git a/tests/ut/ascendc_ir/stub/ascir_stub_builtin_ops_v2.cc b/tests/ut/ascendc_ir/stub/ascir_stub_builtin_ops_v2.cc index 577b142ab6a41ac54959dede3f3e4df0bab8c4d9..1940c7234170372d256a5537ee4db9dcb0efbba2 100644 --- a/tests/ut/ascendc_ir/stub/ascir_stub_builtin_ops_v2.cc +++ b/tests/ut/ascendc_ir/stub/ascir_stub_builtin_ops_v2.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2025 Huawei Technologies Co., Ltd. + /* Copyright (c) 2025 Huawei Technologies Co., Ltd. * This file is a part of the CANN Open Software. * Licensed under CANN Open Software License Agreement Version 1.0 (the "License"). * Please refer to the License for details. You may not use this file except in compliance with the License. @@ -99,5 +99,12 @@ REG_ASC_IR(StubOp9New) {"T4", OrderedTensorTypeList{DT_BOOL, DT_DOUBLE, DT_FLOAT}}, {"T5", OrderedTensorTypeList{DT_BOOL, DT_COMPLEX128, DT_DUAL}}}}); +REG_ASC_IR(VFStub) + .DynamicInput("x", "T") + .DynamicOutput("y", "T") + .Impl({"socv2", "socv3"}, {nullptr, + nullptr, + {{"T", TensorType{DT_INT32, DT_INT64,DT_UINT16}}}}); + } // namespace ascir } // namespace ge diff --git a/tests/ut/ascendc_ir/testcase/ascendc_ir_unittest.cc b/tests/ut/ascendc_ir/testcase/ascendc_ir_unittest.cc index 3aef9048109966925113bc52a3071a51f6c8386e..bd4ab1a67a523e72ead5886fb375f6c57c3c5932 100644 --- a/tests/ut/ascendc_ir/testcase/ascendc_ir_unittest.cc +++ b/tests/ut/ascendc_ir/testcase/ascendc_ir_unittest.cc @@ -3676,7 +3676,8 @@ inline ge::Status CommonInferDtype(const std::string &type, const std::vectorsecond(input_dtypes, expect_output_dtypes); @@ -3767,6 +3768,7 @@ inline ge::Status CommonInferDtypeWithNoCheck(const std::string &type, const std {"StubOp10", ::ge::ascir_op::StubOp10::InferDataTypeWithNoCheck}, {"StubOp11", ::ge::ascir_op::StubOp11::InferDataTypeWithNoCheck}, {"StubRemovePad", ::ge::ascir_op::StubRemovePad::InferDataTypeWithNoCheck}, + {"VFStub", ::ge::ascir_op::VFStub::InferDataTypeWithNoCheck}, }; const auto &iter = func_table.find(type); if (iter != func_table.end()) {