ADD file via upload

This commit is contained in:
Dengrx 2023-08-27 15:15:38 +08:00
parent a0e16f00ff
commit 173c6d5ddb
1 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,49 @@
/**
* 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/npu_loss_scale_ops_declare.h"
namespace mindspore::transform {
// NPUGetFloatStatus
INPUT_MAP(NPUGetFloatStatus) = {{1, INPUT_DESC(addr)}};
// 输入映射addr索引为1
OUTPUT_MAP(NPUGetFloatStatus) = {{0, OUTPUT_DESC(data)}};
// 输出映射data索引为0
ATTR_MAP(NPUGetFloatStatus) = EMPTY_ATTR_MAP;
//属性映射,空
REG_ADPT_DESC(NPUGetFloatStatus, kNameNPUGetFloatStatus, ADPT_DESC(NPUGetFloatStatus))
// 注册NPUGetFloatStatus操作的适配器描述kNameNPUGetFloatStatus
// NPUAllocFloatStatus
INPUT_MAP(NPUAllocFloatStatus) = EMPTY_INPUT_MAP;
// 输入映射,空
ATTR_MAP(NPUAllocFloatStatus) = EMPTY_ATTR_MAP;
// 属性映射,空
OUTPUT_MAP(NPUAllocFloatStatus) = {{0, OUTPUT_DESC(data)}};
// 输出映射data索引为0
REG_ADPT_DESC(NPUAllocFloatStatus, kNameNPUAllocFloatStatus, ADPT_DESC(NPUAllocFloatStatus))
// 注册NPUAllocFloatStatus操作的适配器描述kNameNPUAllocFloatStatus
// NPUClearFloatStatus
INPUT_MAP(NPUClearFloatStatus) = {{1, INPUT_DESC(addr)}};
// 输入映射addr索引为1
OUTPUT_MAP(NPUClearFloatStatus) = {{0, OUTPUT_DESC(data)}};
// 输出映射data索引为0
ATTR_MAP(NPUClearFloatStatus) = EMPTY_ATTR_MAP;
//属性映射,空
REG_ADPT_DESC(NPUClearFloatStatus, kNameNPUClearFloatStatus, ADPT_DESC(NPUClearFloatStatus))
// 注册NPUClearFloatStatus操作的适配器描述kNameNPUClearFloatStatus
} // namespace mindspore::transform