力争自助餐队代码评注 #11
|
|
@ -0,0 +1,38 @@
|
|||
/**
|
||||
* Copyright 2019 Huawei Technologies Co., Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "transform/graph_ir/op_declare/logging_ops_declare.h"
|
||||
|
||||
namespace mindspore::transform {
|
||||
// Print
|
||||
INPUT_MAP(Print) = EMPTY_INPUT_MAP;
|
||||
//输入映射,设为空
|
||||
DYN_INPUT_MAP(Print) = {{1, DYN_INPUT_DESC(x)}};
|
||||
//动态输入映射,将索引为1的动态输入与名称为x的动态输入描述关联起来,用于后续操作
|
||||
ATTR_MAP(Print) = EMPTY_ATTR_MAP;
|
||||
//属性映射,设为空
|
||||
REG_ADPT_DESC(Print, kNamePrint, ADPT_DESC(Print))
|
||||
//注册Print操作的适配器描述kNamePrint
|
||||
|
||||
INPUT_MAP(Assert) = {{1, INPUT_DESC(input_condition)}};
|
||||
//输入映射,input_condition索引为1
|
||||
DYN_INPUT_MAP(Assert) = {{2, DYN_INPUT_DESC(input_data)}};
|
||||
//动态输入映射,将索引为2的动态输入与名称为input_data的动态输入描述关联起来,用于后续操作
|
||||
ATTR_MAP(Assert) = {{"summarize", ATTR_DESC(summarize, AnyTraits<int64_t>())}};
|
||||
//属性映射,属性summarize类型为int64_t
|
||||
REG_ADPT_DESC(Assert, kNameAssert, ADPT_DESC(Assert))
|
||||
//注册Assert操作的适配器描述kNameAssert
|
||||
} // namespace mindspore::transform
|
||||
Loading…
Reference in New Issue