* Copyright (c) 2025 Huawei Technologies Co., Ltd.
* This program is free software, you can redistribute it and/or modify it under the terms and conditions of
* CANN Open Software License Agreement Version 2.0 (the "License").
* Please refer to the License for details. You may not use this file except in compliance with the License.
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
* See LICENSE in the root of the software repository for the full text of the License.
*/
* @ingroup FE_ERROR_CODES_GROUP
*/
#ifndef FUSION_ENGINE_UTILS_COMMON_COMM_ERROR_CODES_H_
#define FUSION_ENGINE_UTILS_COMMON_COMM_ERROR_CODES_H_
#include <string>
#include "graph_optimizer/graph_optimize_register_error_codes.h"
namespace fe {
const uint8_t FE_MODID_OP_CALCULATE = 62;
#define FE_DEF_ERRORNO_OP_CALCULATOR(name, value, desc) \
FE_DEF_ERRORNO(SYSID_FE, FE_MODID_OP_CALCULATE, name, value, desc)
FE_DEF_ERRORNO_COMMON(INVALID_FILE_PATH, 8, "Failed to get the valid file path.");
FE_DEF_ERRORNO_COMMON(LACK_MANDATORY_CONFIG_KEY, 9, "The mandatory key is not configured in files.");
FE_DEF_ERRORNO_COMMON(OPSTORE_NAME_EMPTY, 10, "The name of opstore config is empty.");
FE_DEF_ERRORNO_COMMON(OPSTORE_VALUE_EMPTY, 11, "The value of opstore config is empty.");
FE_DEF_ERRORNO_COMMON(OPSTORE_VALUE_ITEM_SIZE_INCORRECT, 12, "The size of opstore items is incorrect.");
FE_DEF_ERRORNO_COMMON(OPSTORE_VALUE_ITEM_EMPTY, 13, "At least one of the opstore item is empty.");
FE_DEF_ERRORNO_COMMON(OPSTORE_EMPTY, 14, "There is no OP store in configuration files.");
FE_DEF_ERRORNO_COMMON(OPSTORE_OPIMPLTYPE_REPEAT, 15, "Op impl type of OP stores cannot be repeated.");
FE_DEF_ERRORNO_COMMON(OPSTORE_OPIMPLTYPE_INVALID, 16, "The op impl type of OP store is invalid.");
FE_DEF_ERRORNO_COMMON(OPSTORE_PRIORITY_INVALID, 17, "The priority of OP stores is invalid.");
FE_DEF_ERRORNO_COMMON(OPSTORE_CONFIG_NOT_INTEGRAL, 18, "The content of ops store is not integral.");
FE_DEF_ERRORNO_OP_CALCULATOR(FAIL_GET_OP_IMPL_TYPE, 0, "Failed to get the op impl type of op desc.");
FE_DEF_ERRORNO_OP_CALCULATOR(TENSOR_FORMAT_INVALID, 1, "This format is not valid.");
FE_DEF_ERRORNO_OP_CALCULATOR(TENSOR_DATATYPE_INVALID, 2, "This data type is not valid.");
FE_DEF_ERRORNO_OP_CALCULATOR(DIM_VALUE_INVALID, 3, "The dim value must be great than zero.");
FE_DEF_ERRORNO_OP_CALCULATOR(TENSOR_DATATYPE_NOT_SUPPORT, 4, "This tensor format is not supported.");
}
#endif