* 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.
*/
#ifndef INC_FRAMEWORK_COMMON_TASKDOWN_COMMON_H_
#define INC_FRAMEWORK_COMMON_TASKDOWN_COMMON_H_
#include "runtime/rt.h"
#include <stdint.h>
#include "ge/framework/common/taskdown_common.h"
namespace ge {
constexpr int32_t CC_FUSION_OP_MAX = 32;
enum class ccStatus_t : uint32_t {
CC_STATUS_SUCCESS = 0,
CC_STATUS_NOT_INITIALIZED = 1,
CC_STATUS_ALLOC_FAILED = 2,
CC_STATUS_BAD_PARAM = 3,
CC_STATUS_INTERNAL_ERROR = 4,
CC_STATUS_KERNEL_ERROR = 5,
CC_STATUS_RUNTIME_ERROR = 6,
CC_STATUS_NOT_SUPPORTED = 7,
CC_STATUS_INVALID_VALUE = 7,
CC_STATUS_RESERVED = 8,
};
using ccOpContext = struct tagOpContext {
ccKernelType kernelType;
uint32_t opId;
uint32_t kernelFuncId;
uint32_t opIndex;
uint32_t opCount;
uint32_t opIndex2[CC_FUSION_OP_MAX];
bool isFlowtable;
uint16_t *argsOffset;
uint32_t argsCount;
uint64_t genDataBaseAddr;
uint64_t genDataBaseSize;
uint64_t genWeightBaseAddr;
uint64_t genWeightBaseSize;
uint64_t genVariableBaseAddr;
uint64_t genVariableBaseSize;
uint64_t l2ctrlSize;
};
enum class tagOpTensorFormat : uint32_t {
OP_TENSOR_FORMAT_NC1HWC0 = 0,
OP_TENSOR_FORMAT_ND,
OP_TENSOR_FORMAT_RESERVED
};
enum class tagOpDataType : uint32_t {
OP_DATA_FLOAT = 0,
OP_DATA_HALF,
OP_DATA_INT8,
OP_DATA_INT32,
OP_DATA_UINT8,
OP_DATA_HALF_UINT16_PROPOSAL,
OP_DATA_RESERVED
};
using ccAICPUTensor = struct tagOpTensor {
tagOpTensorFormat format;
tagOpDataType data_type;
int32_t dim_cnt;
int32_t mm;
int32_t dim[8];
};
}
#endif