已合并
fix: fix clean code warnings #3941
fix: fix clean code warnings #3941
已合并
likun104创建于 7月9日
41 个文件变更+186-147
Mapi/acl/acl_model/model/acl_resource_manager.h+1-1
@@ -43,7 +43,7 @@ class ExternalAllocatorDesc {
43 freeFunc(freeFunction),43 freeFunc(freeFunction),
44 allocAdviseFunc(allocAdviseFunction),44 allocAdviseFunc(allocAdviseFunction),
45 getAddrFromBlockFunc(getAddrFromBlockFunction) {}45 getAddrFromBlockFunc(getAddrFromBlockFunction) {}
46- ~ExternalAllocatorDesc() {}46+ ~ExternalAllocatorDesc() = default;
47 bool operator==(const ExternalAllocatorDesc &allocatorDesc) const {47 bool operator==(const ExternalAllocatorDesc &allocatorDesc) const {
48 return obj == allocatorDesc.obj && allocFunc == allocatorDesc.allocFunc && freeFunc == allocatorDesc.freeFunc &&48 return obj == allocatorDesc.obj && allocFunc == allocatorDesc.allocFunc && freeFunc == allocatorDesc.freeFunc &&
49 allocAdviseFunc == allocatorDesc.allocAdviseFunc &&49 allocAdviseFunc == allocatorDesc.allocAdviseFunc &&
Mapi/acl/acl_model/model/aipp_param_check.h+1-1
@@ -25,7 +25,7 @@
25namespace acl {25namespace acl {
26aclError AippScfSizeCheck(const aclmdlAIPP *const aippParmsSet, const size_t batchIndex);26aclError AippScfSizeCheck(const aclmdlAIPP *const aippParmsSet, const size_t batchIndex);
27uint64_t GetSrcImageSize(const aclmdlAIPP *const aippParmsSet);27uint64_t GetSrcImageSize(const aclmdlAIPP *const aippParmsSet);
28-aclError AippParamsCheck(const aclmdlAIPP *const aippParmsSet, const std::string &socVersion);28+aclError AippParamsCheck(const aclmdlAIPP *const aippParmsSet, const std::string &npuArch);
29aclError GetAippOutputHW(const aclmdlAIPP *const aippParmsSet, const size_t batchIndex, const std::string &socVersion,29aclError GetAippOutputHW(const aclmdlAIPP *const aippParmsSet, const size_t batchIndex, const std::string &socVersion,
30 int32_t &aippOutputW, int32_t &aippOutputH);30 int32_t &aippOutputW, int32_t &aippOutputH);
31} // namespace acl31} // namespace acl
Mapi/acl/acl_model/model/model_common.cpp+54-54
@@ -574,7 +574,7 @@ ACL_FUNC_VISIBILITY aclError SetIODims(const ge::InputOutputDims &oriDims, aclmd
574 return ACL_SUCCESS;574 return ACL_SUCCESS;
575}575}
576 576 
577-ACL_FUNC_VISIBILITY std::string AippInfoDebugString(const aclAippInfo *const aippInfo) {577+ACL_FUNC_VISIBILITY std::string AippInfoDebugString(const aclAippInfo *aippInfo) {
578 if (aippInfo == nullptr) {578 if (aippInfo == nullptr) {
579 ACL_LOG_INNER_ERROR("[Check][aippInfo]param aippInfo must not be null");579 ACL_LOG_INNER_ERROR("[Check][aippInfo]param aippInfo must not be null");
580 return "";580 return "";
@@ -656,7 +656,7 @@ ACL_FUNC_VISIBILITY std::string DimsDebugString(const aclmdlIODims &ioDims) {
656 return ss.str();656 return ss.str();
657}657}
658 658 
659-ACL_FUNC_VISIBILITY std::string AippDimsDebugString(const aclAippDims *const aippDims, const size_t shapeCount) {659+ACL_FUNC_VISIBILITY std::string AippDimsDebugString(const aclAippDims *aippDims, size_t shapeCount) {
660 if (aippDims == nullptr) {660 if (aippDims == nullptr) {
661 ACL_LOG_INNER_ERROR("[Check][aippDims]param aippDims must not be null");661 ACL_LOG_INNER_ERROR("[Check][aippDims]param aippDims must not be null");
662 return "";662 return "";
@@ -721,66 +721,66 @@ static float32_t Fp16ToFloat(const uint16_t val) {
721 return type_union.fVal;721 return type_union.fVal;
722}722}
723 723 
724-ACL_FUNC_VISIBILITY std::string AippParmsDebugString(const kAippDynamicPara &aipp_parms) {724+ACL_FUNC_VISIBILITY std::string AippParmsDebugString(const kAippDynamicPara &aippParms) {
725 std::stringstream ss;725 std::stringstream ss;
726 ss << "kAippDynamicPara[";726 ss << "kAippDynamicPara[";
727- ss << " inputFormat:" << static_cast<uint32_t>(aipp_parms.inputFormat);727+ ss << " inputFormat:" << static_cast<uint32_t>(aippParms.inputFormat);
728- ss << " cscSwitch:" << static_cast<int32_t>(aipp_parms.cscSwitch);728+ ss << " cscSwitch:" << static_cast<int32_t>(aippParms.cscSwitch);
729- ss << " rbuvSwapSwitch:" << static_cast<int32_t>(aipp_parms.rbuvSwapSwitch);729+ ss << " rbuvSwapSwitch:" << static_cast<int32_t>(aippParms.rbuvSwapSwitch);
730- ss << " axSwapSwitch:" << static_cast<int32_t>(aipp_parms.axSwapSwitch);730+ ss << " axSwapSwitch:" << static_cast<int32_t>(aippParms.axSwapSwitch);
731- ss << " batchNum:" << static_cast<int32_t>(aipp_parms.batchNum);731+ ss << " batchNum:" << static_cast<int32_t>(aippParms.batchNum);
732- ss << " srcImageSizeW:" << aipp_parms.srcImageSizeW;732+ ss << " srcImageSizeW:" << aippParms.srcImageSizeW;
733- ss << " srcImageSizeH:" << aipp_parms.srcImageSizeH;733+ ss << " srcImageSizeH:" << aippParms.srcImageSizeH;
734- ss << " cscMatrixR0C0:" << static_cast<int32_t>(aipp_parms.cscMatrixR0C0);734+ ss << " cscMatrixR0C0:" << static_cast<int32_t>(aippParms.cscMatrixR0C0);
735- ss << " cscMatrixR0C1:" << static_cast<int32_t>(aipp_parms.cscMatrixR0C1);735+ ss << " cscMatrixR0C1:" << static_cast<int32_t>(aippParms.cscMatrixR0C1);
736- ss << " cscMatrixR0C2:" << static_cast<int32_t>(aipp_parms.cscMatrixR0C2);736+ ss << " cscMatrixR0C2:" << static_cast<int32_t>(aippParms.cscMatrixR0C2);
737- ss << " cscMatrixR1C0:" << static_cast<int32_t>(aipp_parms.cscMatrixR1C0);737+ ss << " cscMatrixR1C0:" << static_cast<int32_t>(aippParms.cscMatrixR1C0);
738- ss << " cscMatrixR1C1:" << static_cast<int32_t>(aipp_parms.cscMatrixR1C1);738+ ss << " cscMatrixR1C1:" << static_cast<int32_t>(aippParms.cscMatrixR1C1);
739- ss << " cscMatrixR1C2:" << static_cast<int32_t>(aipp_parms.cscMatrixR1C2);739+ ss << " cscMatrixR1C2:" << static_cast<int32_t>(aippParms.cscMatrixR1C2);
740- ss << " cscMatrixR2C0:" << static_cast<int32_t>(aipp_parms.cscMatrixR2C0);740+ ss << " cscMatrixR2C0:" << static_cast<int32_t>(aippParms.cscMatrixR2C0);
741- ss << " cscMatrixR2C1:" << static_cast<int32_t>(aipp_parms.cscMatrixR2C1);741+ ss << " cscMatrixR2C1:" << static_cast<int32_t>(aippParms.cscMatrixR2C1);
742- ss << " cscMatrixR2C2:" << static_cast<int32_t>(aipp_parms.cscMatrixR2C2);742+ ss << " cscMatrixR2C2:" << static_cast<int32_t>(aippParms.cscMatrixR2C2);
743- ss << " cscOutputBiasR0:" << static_cast<uint32_t>(aipp_parms.cscOutputBiasR0);743+ ss << " cscOutputBiasR0:" << static_cast<uint32_t>(aippParms.cscOutputBiasR0);
744- ss << " cscOutputBiasR1:" << static_cast<uint32_t>(aipp_parms.cscOutputBiasR1);744+ ss << " cscOutputBiasR1:" << static_cast<uint32_t>(aippParms.cscOutputBiasR1);
745- ss << " cscOutputBiasR2:" << static_cast<uint32_t>(aipp_parms.cscOutputBiasR2);745+ ss << " cscOutputBiasR2:" << static_cast<uint32_t>(aippParms.cscOutputBiasR2);
746- ss << " cscInputBiasR0:" << static_cast<uint32_t>(aipp_parms.cscInputBiasR0);746+ ss << " cscInputBiasR0:" << static_cast<uint32_t>(aippParms.cscInputBiasR0);
747- ss << " cscInputBiasR1:" << static_cast<uint32_t>(aipp_parms.cscInputBiasR1);747+ ss << " cscInputBiasR1:" << static_cast<uint32_t>(aippParms.cscInputBiasR1);
748- ss << " cscInputBiasR2:" << static_cast<uint32_t>(aipp_parms.cscInputBiasR2);748+ ss << " cscInputBiasR2:" << static_cast<uint32_t>(aippParms.cscInputBiasR2);
749 ss << " ]";749 ss << " ]";
750 return ss.str();750 return ss.str();
751}751}
752 752 
753-ACL_FUNC_VISIBILITY std::string AippBatchParaDebugString(const kAippDynamicBatchPara &aipp_batch_para) {753+ACL_FUNC_VISIBILITY std::string AippBatchParaDebugString(const kAippDynamicBatchPara &aippBatchPara) {
754 std::stringstream ss;754 std::stringstream ss;
755 ss << "kAippDynamicBatchPara[";755 ss << "kAippDynamicBatchPara[";
756- ss << " cropSwitch:" << static_cast<int32_t>(aipp_batch_para.cropSwitch);756+ ss << " cropSwitch:" << static_cast<int32_t>(aippBatchPara.cropSwitch);
757- ss << " cropStartPosW:" << aipp_batch_para.cropStartPosW;757+ ss << " cropStartPosW:" << aippBatchPara.cropStartPosW;
758- ss << " cropStartPosH:" << aipp_batch_para.cropStartPosH;758+ ss << " cropStartPosH:" << aippBatchPara.cropStartPosH;
759- ss << " cropSizeW:" << aipp_batch_para.cropSizeW;759+ ss << " cropSizeW:" << aippBatchPara.cropSizeW;
760- ss << " cropSizeH:" << aipp_batch_para.cropSizeH;760+ ss << " cropSizeH:" << aippBatchPara.cropSizeH;
761- ss << " scfSwitch:" << static_cast<int32_t>(aipp_batch_para.scfSwitch);761+ ss << " scfSwitch:" << static_cast<int32_t>(aippBatchPara.scfSwitch);
762- ss << " scfInputSizeW:" << aipp_batch_para.scfInputSizeW;762+ ss << " scfInputSizeW:" << aippBatchPara.scfInputSizeW;
763- ss << " scfInputSizeH:" << aipp_batch_para.scfInputSizeH;763+ ss << " scfInputSizeH:" << aippBatchPara.scfInputSizeH;
764- ss << " scfOutputSizeW:" << aipp_batch_para.scfOutputSizeW;764+ ss << " scfOutputSizeW:" << aippBatchPara.scfOutputSizeW;
765- ss << " scfOutputSizeH:" << aipp_batch_para.scfOutputSizeH;765+ ss << " scfOutputSizeH:" << aippBatchPara.scfOutputSizeH;
766- ss << " paddingSwitch:" << static_cast<int32_t>(aipp_batch_para.paddingSwitch);766+ ss << " paddingSwitch:" << static_cast<int32_t>(aippBatchPara.paddingSwitch);
767- ss << " paddingSizeTop:" << aipp_batch_para.paddingSizeTop;767+ ss << " paddingSizeTop:" << aippBatchPara.paddingSizeTop;
768- ss << " paddingSizeBottom:" << aipp_batch_para.paddingSizeBottom;768+ ss << " paddingSizeBottom:" << aippBatchPara.paddingSizeBottom;
769- ss << " paddingSizeLeft:" << aipp_batch_para.paddingSizeLeft;769+ ss << " paddingSizeLeft:" << aippBatchPara.paddingSizeLeft;
770- ss << " paddingSizeRight:" << aipp_batch_para.paddingSizeRight;770+ ss << " paddingSizeRight:" << aippBatchPara.paddingSizeRight;
771- ss << " rotateSwitch:" << static_cast<int32_t>(aipp_batch_para.rotateSwitch);771+ ss << " rotateSwitch:" << static_cast<int32_t>(aippBatchPara.rotateSwitch);
772- ss << " dtcPixelMeanChn0:" << static_cast<int32_t>(aipp_batch_para.dtcPixelMeanChn0);772+ ss << " dtcPixelMeanChn0:" << static_cast<int32_t>(aippBatchPara.dtcPixelMeanChn0);
773- ss << " dtcPixelMeanChn1:" << static_cast<int32_t>(aipp_batch_para.dtcPixelMeanChn1);773+ ss << " dtcPixelMeanChn1:" << static_cast<int32_t>(aippBatchPara.dtcPixelMeanChn1);
774- ss << " dtcPixelMeanChn2:" << static_cast<int32_t>(aipp_batch_para.dtcPixelMeanChn2);774+ ss << " dtcPixelMeanChn2:" << static_cast<int32_t>(aippBatchPara.dtcPixelMeanChn2);
775- ss << " dtcPixelMeanChn3:" << static_cast<int32_t>(aipp_batch_para.dtcPixelMeanChn3);775+ ss << " dtcPixelMeanChn3:" << static_cast<int32_t>(aippBatchPara.dtcPixelMeanChn3);
776- ss << " dtcPixelMinChn0:" << static_cast<uint32_t>(aipp_batch_para.dtcPixelMinChn0);776+ ss << " dtcPixelMinChn0:" << static_cast<uint32_t>(aippBatchPara.dtcPixelMinChn0);
777- ss << " dtcPixelMinChn1:" << static_cast<uint32_t>(aipp_batch_para.dtcPixelMinChn1);777+ ss << " dtcPixelMinChn1:" << static_cast<uint32_t>(aippBatchPara.dtcPixelMinChn1);
778- ss << " dtcPixelMinChn2:" << static_cast<uint32_t>(aipp_batch_para.dtcPixelMinChn2);778+ ss << " dtcPixelMinChn2:" << static_cast<uint32_t>(aippBatchPara.dtcPixelMinChn2);
779- ss << " dtcPixelMinChn3:" << static_cast<uint32_t>(aipp_batch_para.dtcPixelMinChn3);779+ ss << " dtcPixelMinChn3:" << static_cast<uint32_t>(aippBatchPara.dtcPixelMinChn3);
780- ss << " dtcPixelVarReciChn0:" << Fp16ToFloat(aipp_batch_para.dtcPixelVarReciChn0);780+ ss << " dtcPixelVarReciChn0:" << Fp16ToFloat(aippBatchPara.dtcPixelVarReciChn0);
781- ss << " dtcPixelVarReciChn1:" << Fp16ToFloat(aipp_batch_para.dtcPixelVarReciChn1);781+ ss << " dtcPixelVarReciChn1:" << Fp16ToFloat(aippBatchPara.dtcPixelVarReciChn1);
782- ss << " dtcPixelVarReciChn2:" << Fp16ToFloat(aipp_batch_para.dtcPixelVarReciChn2);782+ ss << " dtcPixelVarReciChn2:" << Fp16ToFloat(aippBatchPara.dtcPixelVarReciChn2);
783- ss << " dtcPixelVarReciChn3:" << Fp16ToFloat(aipp_batch_para.dtcPixelVarReciChn3);783+ ss << " dtcPixelVarReciChn3:" << Fp16ToFloat(aippBatchPara.dtcPixelVarReciChn3);
784 ss << " ]";784 ss << " ]";
785 return ss.str();785 return ss.str();
786}786}
Mapi/acl/acl_op_executor/single_op/op.cpp+2-2
@@ -41,12 +41,12 @@ std::mutex aclLoadOpsProtoMutex;
41} // namespace41} // namespace
42 42 
43struct aclopHandle {43struct aclopHandle {
44- aclopHandle() : opHandle(nullptr) {}44+ aclopHandle() {}
45 ~aclopHandle() {45 ~aclopHandle() {
46 ACL_DELETE_AND_SET_NULL(opHandle);46 ACL_DELETE_AND_SET_NULL(opHandle);
47 }47 }
48 48 
49- acl::OpHandle *opHandle;49+ acl::OpHandle *opHandle = nullptr;
50};50};
51 51 
52aclError aclopSetModelDirImpl(const char *modelDir) {52aclError aclopSetModelDirImpl(const char *modelDir) {
Mapi/acl/utils/acl_attr_utils.h+3-8
@@ -8,14 +8,9 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10 10 
11-#ifndef ACL_UTILS_ATTR_UTILS_H_11+#ifndef ACL_UTILS_ACL_ATTR_UTILS_H_
12-#define ACL_UTILS_ATTR_UTILS_H_12+#define ACL_UTILS_ACL_ATTR_UTILS_H_
13 13 
14-#include <string>
15-#include <sstream>
16-#include <map>
17- 
18-#include "graph/op_desc.h"
19#include "utils/acl_string_utils.h"14#include "utils/acl_string_utils.h"
20#include "types/op_attr.h"15#include "types/op_attr.h"
21#include "types/acl_op_inner.h"16#include "types/acl_op_inner.h"
@@ -49,4 +44,4 @@ bool IsListFloatEquals(const std::vector<float32_t> &lhsValue, const std::vector
49} // namespace attr_utils44} // namespace attr_utils
50} // namespace acl45} // namespace acl
51 46 
52-#endif // ACL_UTILS_ATTR_UTILS_H_47+#endif // ACL_UTILS_ACL_ATTR_UTILS_H_
Mapi/acl/utils/acl_file_utils.h+3-3
@@ -8,8 +8,8 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10 10 
11-#ifndef ACL_UTILS_FILE_UTILS_H11+#ifndef ACL_UTILS_ACL_FILE_UTILS_H
12-#define ACL_UTILS_FILE_UTILS_H12+#define ACL_UTILS_ACL_FILE_UTILS_H
13 13 
14#include <string>14#include <string>
15#include <vector>15#include <vector>
@@ -25,4 +25,4 @@ aclError ListFiles(const std::string &dirName, FileNameFilterFn filter, std::vec
25} // namespace file_utils25} // namespace file_utils
26} // namespace acl26} // namespace acl
27 27 
28-#endif // ACL_UTILS_FILE_UTILS_H28+#endif // ACL_UTILS_ACL_FILE_UTILS_H
Mapi/acl/utils/acl_hash_utils.h+3-3
@@ -8,8 +8,8 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10 10 
11-#ifndef ACL_UTILS_HASH_UTILS_H11+#ifndef ACL_UTILS_ACL_HASH_UTILS_H
12-#define ACL_UTILS_HASH_UTILS_H12+#define ACL_UTILS_ACL_HASH_UTILS_H
13#include "acl/acl_base.h"13#include "acl/acl_base.h"
14#include "utils/acl_string_utils.h"14#include "utils/acl_string_utils.h"
15#include "utils/acl_attr_utils.h"15#include "utils/acl_attr_utils.h"
@@ -118,4 +118,4 @@ bool CheckModelAndAttrMatchDynamic(const AclOp &aclOp, const aclopAttr *const op
118} // namespace hash_utils118} // namespace hash_utils
119} // namespace acl119} // namespace acl
120 120 
121-#endif // ACL_UTILS_HASH_UTILS_H121+#endif // ACL_UTILS_ACL_HASH_UTILS_H
Mbase/common/dump/exception_dumper.h+0-1
@@ -20,7 +20,6 @@
20#include "exe_graph/runtime/dfx_info_filler.h"20#include "exe_graph/runtime/dfx_info_filler.h"
21#include "common/dump/kernel_tracing_utils.h"21#include "common/dump/kernel_tracing_utils.h"
22#include "framework/common/debug/ge_log.h"22#include "framework/common/debug/ge_log.h"
23-#include "rt_external_mem.h"
24#include "graph_metadef/common/ge_common/util.h"23#include "graph_metadef/common/ge_common/util.h"
25#include "common/aclrt_malloc_helper.h"24#include "common/aclrt_malloc_helper.h"
26 25 
Mbase/common/kernel_handles_manager/aicore_kernel_handles_manager.h+3-3
@@ -8,8 +8,8 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10 10 
11-#ifndef BASE_COMMON_KERNEL_HANDLES_MANAGER_AICORE_KERBEL_HANDLES_MANAGER_H11+#ifndef BASE_COMMON_KERNEL_HANDLES_MANAGER_AICORE_KERNEL_HANDLES_MANAGER_H
12-#define BASE_COMMON_KERNEL_HANDLES_MANAGER_AICORE_KERBEL_HANDLES_MANAGER_H12+#define BASE_COMMON_KERNEL_HANDLES_MANAGER_AICORE_KERNEL_HANDLES_MANAGER_H
13 13 
14#include "kernel_handles_manager.h"14#include "kernel_handles_manager.h"
15 15 
@@ -25,4 +25,4 @@ class AicoreKernelHandlesManager : public KernelHandlesManager {
25};25};
26} // namespace ge26} // namespace ge
27 27 
28-#endif // BASE_COMMON_KERNEL_HANDLES_MANAGER_AICORE_KERBEL_HANDLES_MANAGER_H28+#endif // BASE_COMMON_KERNEL_HANDLES_MANAGER_AICORE_KERNEL_HANDLES_MANAGER_H
Mbase/common/kernel_handles_manager/aicpu_kernel_handles_manager.h+3-3
@@ -8,8 +8,8 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10 10 
11-#ifndef BASE_COMMON_KERNEL_HANDLES_MANAGER_AICPU_KERBEL_HANDLES_MANAGER_H11+#ifndef BASE_COMMON_KERNEL_HANDLES_MANAGER_AICPU_KERNEL_HANDLES_MANAGER_H
12-#define BASE_COMMON_KERNEL_HANDLES_MANAGER_AICPU_KERBEL_HANDLES_MANAGER_H12+#define BASE_COMMON_KERNEL_HANDLES_MANAGER_AICPU_KERNEL_HANDLES_MANAGER_H
13 13 
14#include "kernel_handles_manager.h"14#include "kernel_handles_manager.h"
15 15 
@@ -25,4 +25,4 @@ class AicpuKernelHandlesManager : public KernelHandlesManager {
25};25};
26} // namespace ge26} // namespace ge
27 27 
28-#endif // BASE_COMMON_KERNEL_HANDLES_MANAGER_AICPU_KERBEL_HANDLES_MANAGER_H28+#endif // BASE_COMMON_KERNEL_HANDLES_MANAGER_AICPU_KERNEL_HANDLES_MANAGER_H
Mbase/common/kernel_handles_manager/cust_aicpu_kernel_handles_manager.h+3-3
@@ -8,8 +8,8 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10 10 
11-#ifndef BASE_COMMON_KERNEL_HANDLES_MANAGER_CUST_AICPU_KERBEL_HANDLES_MANAGER_H11+#ifndef BASE_COMMON_KERNEL_HANDLES_MANAGER_CUST_AICPU_KERNEL_HANDLES_MANAGER_H
12-#define BASE_COMMON_KERNEL_HANDLES_MANAGER_CUST_AICPU_KERBEL_HANDLES_MANAGER_H12+#define BASE_COMMON_KERNEL_HANDLES_MANAGER_CUST_AICPU_KERNEL_HANDLES_MANAGER_H
13 13 
14#include "kernel_handles_manager.h"14#include "kernel_handles_manager.h"
15 15 
@@ -25,4 +25,4 @@ class CustAicpuKernelHandlesManager : public KernelHandlesManager {
25};25};
26} // namespace ge26} // namespace ge
27 27 
28-#endif // BASE_COMMON_KERNEL_HANDLES_MANAGER_CUST_AICPU_KERBEL_HANDLES_MANAGER_H28+#endif // BASE_COMMON_KERNEL_HANDLES_MANAGER_CUST_AICPU_KERNEL_HANDLES_MANAGER_H
Mbase/common/kernel_handles_manager/kernel_handle_utils.h+3-3
@@ -8,8 +8,8 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10 10 
11-#ifndef EXECUTOR_GRAPH_LOAD_MODEL_MANAGER_KERNEL_MANAGER_KERBEL_HANDLE_UTILS_H11+#ifndef BASE_COMMON_KERNEL_HANDLES_MANAGER_KERNEL_HANDLE_UTILS_H
12-#define EXECUTOR_GRAPH_LOAD_MODEL_MANAGER_KERNEL_MANAGER_KERBEL_HANDLE_UTILS_H12+#define BASE_COMMON_KERNEL_HANDLES_MANAGER_KERNEL_HANDLE_UTILS_H
13 13 
14#include <string>14#include <string>
15#include "acl/acl_rt.h"15#include "acl/acl_rt.h"
@@ -48,4 +48,4 @@ class KernelHandleUtils {
48};48};
49} // namespace ge49} // namespace ge
50 50 
51-#endif // #ifndef EXECUTOR_GRAPH_LOAD_MODEL_MANAGER_KERNEL_MANAGER_KERBEL_HANDLE_UTILS_H51+#endif // #ifndef BASE_COMMON_KERNEL_HANDLES_MANAGER_KERNEL_HANDLE_UTILS_H
Mbase/common/om2/codegen/task_code_builder/fe/dsa_task_code_builder.cc+4-4
@@ -131,7 +131,7 @@ void DSATaskCodeBuilder::InitBuildDataFields(const uint32_t task_type) {
131 build_data_.hbm_table_index = static_cast<uint32_t>(hbm_entry_.has_value() ? hbm_entry_->table_index : 0U);131 build_data_.hbm_table_index = static_cast<uint32_t>(hbm_entry_.has_value() ? hbm_entry_->table_index : 0U);
132 build_data_.hbm_args_size = static_cast<uint32_t>(hbm_entry_.has_value() ? hbm_entry_->args_size : 0U);132 build_data_.hbm_args_size = static_cast<uint32_t>(hbm_entry_.has_value() ? hbm_entry_->args_size : 0U);
133 build_data_.idx_output = num_inputs;133 build_data_.idx_output = num_inputs;
134- build_data_.state_addr_idx = state_from_ws ? ws_base : (num_inputs - 1U);134+ build_data_.state_addr_idx = (state_from_ws > 0U) ? ws_base : (num_inputs - 1U);
135 build_data_.idx_seed = 1U;135 build_data_.idx_seed = 1U;
136 build_data_.idx_count = 0U;136 build_data_.idx_count = 0U;
137 build_data_.idx_input1 = kDSAInput1AddrIndex;137 build_data_.idx_input1 = kDSAInput1AddrIndex;
@@ -169,7 +169,7 @@ Status DSATaskCodeBuilder::Contribute(TaskSemanticContributeContext &context) {
169 GELOGI("DSA Task Codegen: op[%s], sqe_type[%u], stream_id[%u].", header_.op_name.c_str(), build_data_.sqe_type,169 GELOGI("DSA Task Codegen: op[%s], sqe_type[%u], stream_id[%u].", header_.op_name.c_str(), build_data_.sqe_type,
170 header_.stream_id);170 header_.stream_id);
171 uint64_t current_args_offset = 0U;171 uint64_t current_args_offset = 0U;
172- auto add_addr_entries = [&](const std::vector<AddrSemantic> &addrs) {172+ auto add_addr_entries = [&current_args_offset, this](const std::vector<AddrSemantic> &addrs) {
173 for (const auto &addr : addrs) {173 for (const auto &addr : addrs) {
174 OpArgDesc arg = TaskCodeBuilderUtil::ConvertAddrDesc(addr);174 OpArgDesc arg = TaskCodeBuilderUtil::ConvertAddrDesc(addr);
175 arg.args_offset = current_args_offset;175 arg.args_offset = current_args_offset;
@@ -226,7 +226,7 @@ Status DSATaskCodeBuilder::RenderDispatchFunc(std::vector<DeclNode *> &items) {
226 GE_ASSERT_SUCCESS(RenderSqeAddrFields(body, dsa_data, ctx, sqe, addrs));226 GE_ASSERT_SUCCESS(RenderSqeAddrFields(body, dsa_data, ctx, sqe, addrs));
227 GE_ASSERT_SUCCESS(RenderHbmIoArgs(body, dsa_data, ctx, addrs));227 GE_ASSERT_SUCCESS(RenderHbmIoArgs(body, dsa_data, ctx, addrs));
228 auto launch_begin = ast_.Var("uint64_t", "_launch_begin");228 auto launch_begin = ast_.Var("uint64_t", "_launch_begin");
229- body.emplace_back(ast_.VarDecl(launch_begin, ast_.Call("MsprofSysCycleTime", {})));229+ (void)body.emplace_back(ast_.VarDecl(launch_begin, ast_.Call("MsprofSysCycleTime", {})));
230 GE_ASSERT_SUCCESS(RenderDispatchFuncLaunch(body, op, ctx, dsa_data, sqe));230 GE_ASSERT_SUCCESS(RenderDispatchFuncLaunch(body, op, ctx, dsa_data, sqe));
231 GE_ASSERT_SUCCESS(RenderDispatchFuncReport(body, op, ctx, dsa_data, addrs, launch_begin));231 GE_ASSERT_SUCCESS(RenderDispatchFuncReport(body, op, ctx, dsa_data, addrs, launch_begin));
232 232 
@@ -426,7 +426,7 @@ Status DSATaskCodeBuilder::RenderDispatchFuncReportIo(std::vector<BodyItem> &bod
426Status DSATaskCodeBuilder::RenderDispatchFuncReportSubmit(426Status DSATaskCodeBuilder::RenderDispatchFuncReportSubmit(
427 std::vector<BodyItem> &body, const VarRef &op, const VarRef &ctx, const ExprRef &dsa_data,427 std::vector<BodyItem> &body, const VarRef &op, const VarRef &ctx, const ExprRef &dsa_data,
428 const VarRef &dsa_report_inputs, const VarRef &dsa_report_outputs, const VarRef &dsa_report_ws_addrs,428 const VarRef &dsa_report_inputs, const VarRef &dsa_report_outputs, const VarRef &dsa_report_ws_addrs,
429- const VarRef &dsa_report_ws_sizes, const VarRef &launch_begin) {429+ const VarRef &dsa_report_ws_sizes, const VarRef &launch_begin) const {
430 auto hbm_ai = ast_.Var("ArgsInfo *", "hbm_ai");430 auto hbm_ai = ast_.Var("ArgsInfo *", "hbm_ai");
431 (void)body.push_back(431 (void)body.push_back(
432 ast_.VarDecl(hbm_ai, ctx.Attr("args_table").Attr("GetArgsInfo")(dsa_data.Attr("hbm_table_index"))));432 ast_.VarDecl(hbm_ai, ctx.Attr("args_table").Attr("GetArgsInfo")(dsa_data.Attr("hbm_table_index"))));
Mbase/common/om2/codegen/task_code_builder/fe/dsa_task_code_builder.h+1-1
@@ -81,7 +81,7 @@ class DSATaskCodeBuilder : public TaskCodeBuilder {
81 Status RenderDispatchFuncReportSubmit(std::vector<BodyItem> &body, const VarRef &op, const VarRef &ctx,81 Status RenderDispatchFuncReportSubmit(std::vector<BodyItem> &body, const VarRef &op, const VarRef &ctx,
82 const ExprRef &dsa_data, const VarRef &dsa_report_inputs,82 const ExprRef &dsa_data, const VarRef &dsa_report_inputs,
83 const VarRef &dsa_report_outputs, const VarRef &dsa_report_ws_addrs,83 const VarRef &dsa_report_outputs, const VarRef &dsa_report_ws_addrs,
84- const VarRef &dsa_report_ws_sizes, const VarRef &launch_begin);84+ const VarRef &dsa_report_ws_sizes, const VarRef &launch_begin) const;
85 85 
86 // Address semantics86 // Address semantics
87 std::vector<AddrSemantic> input_addrs_;87 std::vector<AddrSemantic> input_addrs_;
Mbase/common/op/ge_op_utils.cc+1-1
@@ -60,7 +60,7 @@
60#define AIPP_CONVERT_LIST_INT(KEY, REQUIRED, PROTO_TYPE) \60#define AIPP_CONVERT_LIST_INT(KEY, REQUIRED, PROTO_TYPE) \
61 AIPP_CONVERT_LIST_FORMAT(KEY, int64_t, REQUIRED, GeAttrValue::INT, PROTO_TYPE)61 AIPP_CONVERT_LIST_FORMAT(KEY, int64_t, REQUIRED, GeAttrValue::INT, PROTO_TYPE)
62 62 
63-#define AIPP_CONVERT_LIST_BOOL(KEY, REQUIRED) AIPP_CONVERT_LIST_FORMAT(KEY, bool, REQUIRED, GeAttrValue::BOOL, bool)63+#define AIPP_CONVERT_LIST_BOOL(KEY, REQUIRED) AIPP_CONVERT_LIST_FORMAT((KEY), bool, (REQUIRED), GeAttrValue::BOOL, bool)
64 64 
65#define AIPP_CONVERT_LIST_FLOAT(KEY, REQUIRED) \65#define AIPP_CONVERT_LIST_FLOAT(KEY, REQUIRED) \
66 AIPP_CONVERT_LIST_FORMAT(KEY, float32_t, REQUIRED, GeAttrValue::FLOAT, float32_t)66 AIPP_CONVERT_LIST_FORMAT(KEY, float32_t, REQUIRED, GeAttrValue::FLOAT, float32_t)
Mcompiler/graph/eager_style_graph_builder/es_generator/history/overload_planner.cc+1-1
@@ -303,7 +303,7 @@ std::vector<size_t> OverloadPlanner::CollectBaselineIndices(const size_t version
303}303}
304 304 
305bool OverloadPlanner::TryAdoptModeSignatures(const IrOpProto &current, const std::vector<const IrOpProto *> &versions,305bool OverloadPlanner::TryAdoptModeSignatures(const IrOpProto &current, const std::vector<const IrOpProto *> &versions,
306- const std::vector<BoundaryInfo> &boundaries, const MultiBaselineMode mode,306+ const std::vector<BoundaryInfo> &boundaries, MultiBaselineMode mode,
307 std::vector<Warning> *warnings,307 std::vector<Warning> *warnings,
308 std::vector<Signature> &accepted_signatures) const {308 std::vector<Signature> &accepted_signatures) const {
309 std::vector<Warning> mode_warnings;309 std::vector<Warning> mode_warnings;
Mcompiler/graph/fusion/pass/fusion_pass_executor.cc+0-1
@@ -9,7 +9,6 @@
9 */9 */
10#include "fusion_pass_executor.h"10#include "fusion_pass_executor.h"
11#include "pass_registry.h"11#include "pass_registry.h"
12-#include "common/debug/ge_log.h"
13#include "graph_metadef/common/ge_common/util.h"12#include "graph_metadef/common/ge_common/util.h"
14#include "common/checker.h"13#include "common/checker.h"
15#include "common/util/trace_manager/trace_manager.h"14#include "common/util/trace_manager/trace_manager.h"
Mcompiler/graph/optimize/autofuse/autofuse/can_fuse/strategy/fusion_strategy.h+0-1
@@ -10,7 +10,6 @@
10 10 
11#ifndef AUTOFUSE_CAN_FUSE_FUSION_STRATEGY_H_11#ifndef AUTOFUSE_CAN_FUSE_FUSION_STRATEGY_H_
12#define AUTOFUSE_CAN_FUSE_FUSION_STRATEGY_H_12#define AUTOFUSE_CAN_FUSE_FUSION_STRATEGY_H_
13-#include "ge_common/ge_common_api_types.h"
14#include "graph/node.h"13#include "graph/node.h"
15#include "fusion/autofuse_attrs.h"14#include "fusion/autofuse_attrs.h"
16#include "can_fuse/backend/asc_graph_axis_mapping.h"15#include "can_fuse/backend/asc_graph_axis_mapping.h"
Mcompiler/graph/optimize/autofuse/autofuse/post_process/scheduler_adapter/asc_backend_scheduler_adapter.cpp+0-4
@@ -41,10 +41,6 @@ Status AscBackendSchedulerAdapter::DoBeforePass(const ComputeGraphPtr &graph) co
41 // 把fp16和bf16的node改为fp32,以提高精度41 // 把fp16和bf16的node改为fp32,以提高精度
42 GE_ASSERT_SUCCESS(PrecisionImprover::ImprovePrecisionToFp32(graph));42 GE_ASSERT_SUCCESS(PrecisionImprover::ImprovePrecisionToFp32(graph));
43 43 
44- // 为scalar增加broadcast
45- // GE_ASSERT_SUCCESS(asc_adapt::FallbackScalarToBroadcastWithoutCheckType(graph));
46- // 统一在OptimizedFallback中插入broadcast
47- 
48 return SUCCESS;44 return SUCCESS;
49}45}
50 46 
Mcompiler/graph/optimize/autofuse/temporary_dependencies/graph/ascendc_ir/ascendc_ir_core/serialization/attr_serializer.h+0-2
@@ -18,8 +18,6 @@
18#include "proto/af_ir.pb.h"18#include "proto/af_ir.pb.h"
19#endif19#endif
20 20 
21-#include "graph/any_value.h"
22- 
23namespace af {21namespace af {
24using ge::AnyValue;22using ge::AnyValue;
25using ge::GetTypeId;23using ge::GetTypeId;
Mcompiler/graph/optimize/mem_layout_conflict_optimize/mem_layout_conflict_util.cc+2-1
@@ -1467,7 +1467,8 @@ void MemLayoutConflictUtil::ConstructSingleNodeSymbolTable(const std::string &in
1467 AnchorToSymbol &out_anchor_to_symbol,1467 AnchorToSymbol &out_anchor_to_symbol,
1468 SymbolToAnchors &out_symbol_to_anchors) {1468 SymbolToAnchors &out_symbol_to_anchors) {
1469 // 直接从 symbol_to_anchors 精确提取,不遍历整个 anchor_to_symbol1469 // 直接从 symbol_to_anchors 精确提取,不遍历整个 anchor_to_symbol
1470- auto copy_symbol_anchors = [&](const std::string &symbol, const std::string &target_symbol) {1470+ auto copy_symbol_anchors = [&orig_symbol_to_anchors, &orig_anchor_to_symbol, &out_anchor_to_symbol,
1471+ &out_symbol_to_anchors](const std::string &symbol, const std::string &target_symbol) {
1471 auto sym_iter = orig_symbol_to_anchors.find(symbol);1472 auto sym_iter = orig_symbol_to_anchors.find(symbol);
1472 if (sym_iter == orig_symbol_to_anchors.end()) {1473 if (sym_iter == orig_symbol_to_anchors.end()) {
1473 return;1474 return;
Mcompiler/graph/optimize/symbolic/infer_symbolic_shape/symbolic_shape_inference.h+0-1
@@ -15,7 +15,6 @@
15#include "graph/ge_tensor.h"15#include "graph/ge_tensor.h"
16#include "graph/gnode.h"16#include "graph/gnode.h"
17#include "graph/node.h"17#include "graph/node.h"
18-#include "register/op_impl_kernel_registry.h"
19#include "graph/optimize/symbolic/symbolic_kernel_factory.h"18#include "graph/optimize/symbolic/symbolic_kernel_factory.h"
20#include "symbolic_shape_symbolizer.h"19#include "symbolic_shape_symbolizer.h"
21 20 
Mcompiler/graph/passes/base_pass.cc+0-1
@@ -13,7 +13,6 @@
13#include <queue>13#include <queue>
14#include <unordered_set>14#include <unordered_set>
15 15 
16-#include "common/debug/log.h"
17#include "common/checker.h"16#include "common/checker.h"
18#include "graph/utils/graph_utils.h"17#include "graph/utils/graph_utils.h"
19#include "graph/utils/type_utils_inner.h"18#include "graph/utils/type_utils_inner.h"
Mcompiler/graph/passes/pass_manager.cc+0-1
@@ -11,7 +11,6 @@
11#include "graph/passes/pass_manager.h"11#include "graph/passes/pass_manager.h"
12#include "framework/common/debug/log.h"12#include "framework/common/debug/log.h"
13#include "framework/common/framework_types_internal.h"13#include "framework/common/framework_types_internal.h"
14-#include "framework/common/util.h"
15#include "graph/ge_context.h"14#include "graph/ge_context.h"
16#include "graph/passes/pass_utils.h"15#include "graph/passes/pass_utils.h"
17#include "graph/utils/node_utils.h"16#include "graph/utils/node_utils.h"
Mcompiler/graph/preprocess/insert_op/base_insert_op.h+0-1
@@ -13,7 +13,6 @@
13 13 
14#include <memory>14#include <memory>
15#include <string>15#include <string>
16-#include <utility>
17#include <vector>16#include <vector>
18#include "framework/common/fmk_error_codes.h"17#include "framework/common/fmk_error_codes.h"
19#include "framework/common/framework_types_internal.h"18#include "framework/common/framework_types_internal.h"
Mdflow/udf/flow_func/flow_func_manager.cpp+12-12
@@ -41,29 +41,29 @@ bool RegisterFlowFunc(const char *flow_func_name, const FLOW_FUNC_CREATOR_FUNC &
41 return true;41 return true;
42}42}
43 43 
44-bool RegisterMultiFunc(const char *flow_func_name, const MULTI_FUNC_CREATOR_FUNC &func_creator) noexcept {44+bool RegisterMultiFunc(const char *flowFuncName, const MULTI_FUNC_CREATOR_FUNC &funcCreator) noexcept {
45- if (flow_func_name == nullptr) {45+ if (flowFuncName == nullptr) {
46- UDF_LOG_ERROR("flow_func_name is null.");46+ UDF_LOG_ERROR("flowFuncName is null.");
47 return false;47 return false;
48 }48 }
49- if (func_creator == nullptr) {49+ if (funcCreator == nullptr) {
50- UDF_LOG_ERROR("func_creator is null, flow_func_name=%s.", flow_func_name);50+ UDF_LOG_ERROR("funcCreator is null, flowFuncName=%s.", flowFuncName);
51 return false;51 return false;
52 }52 }
53- FlowFuncManager::Instance().Register(flow_func_name, func_creator);53+ FlowFuncManager::Instance().Register(flowFuncName, funcCreator);
54 return true;54 return true;
55}55}
56 56 
57-bool RegisterMultiFunc(const char *flow_func_name, const MULTI_FUNC_WITH_Q_CREATOR_FUNC &func_with_q_creator) noexcept {57+bool RegisterMultiFunc(const char *flowFuncName, const MULTI_FUNC_WITH_Q_CREATOR_FUNC &funcWithQCreator) noexcept {
58- if (flow_func_name == nullptr) {58+ if (flowFuncName == nullptr) {
59- UDF_LOG_ERROR("flow_func_name is null.");59+ UDF_LOG_ERROR("flowFuncName is null.");
60 return false;60 return false;
61 }61 }
62- if (func_with_q_creator == nullptr) {62+ if (funcWithQCreator == nullptr) {
63- UDF_LOG_ERROR("func_creator is null, flow_func_name=%s.", flow_func_name);63+ UDF_LOG_ERROR("funcCreator is null, flowFuncName=%s.", flowFuncName);
64 return false;64 return false;
65 }65 }
66- FlowFuncManager::Instance().Register(flow_func_name, func_with_q_creator);66+ FlowFuncManager::Instance().Register(flowFuncName, funcWithQCreator);
67 return true;67 return true;
68}68}
69 69 
Mgraph_metadef/graph/CMakeLists.txt+3-0
@@ -196,6 +196,9 @@ target_link_libraries(graph_base
196)196)
197 197 
198target_link_libraries(graph_base PRIVATE ascend_protobuf error_manager)198target_link_libraries(graph_base PRIVATE ascend_protobuf error_manager)
199+if(TARGET third_party_json)
200+ add_dependencies(graph_base third_party_json)
201+endif()
199target_compile_options(graph_base PRIVATE ${OPTIMIZE_OPTION} -DNO_METADEF_ABI_COMPATIABLE)202target_compile_options(graph_base PRIVATE ${OPTIMIZE_OPTION} -DNO_METADEF_ABI_COMPATIABLE)
200 203 
201######### libgraph_base.a #############204######### libgraph_base.a #############
Minc/common/scope_tracing_recorder.h+1-1
@@ -39,7 +39,7 @@ void ReportTracingRecordDuration(const ge::TracingModule stage);
39#define CONCAT_(x, y) x##y39#define CONCAT_(x, y) x##y
40// 记录函数级打点40// 记录函数级打点
41#define TRACING_PERF_SCOPE(module, ...) \41#define TRACING_PERF_SCOPE(module, ...) \
42- ge::ScopeTracingRecorder scope##__COUNTER__(module, std::vector<std::string>{__VA_ARGS__})42+ ge::ScopeTracingRecorder scope##__COUNTER__((module), std::vector<std::string>{__VA_ARGS__})
43 43 
44// 记录代码片段耗时,START和END需要成对使用44// 记录代码片段耗时,START和END需要成对使用
45#define TRACING_DURATION_START(tag) const uint64_t CONCAT_(startUsec, tag) = CurrentTimeNanos()45#define TRACING_DURATION_START(tag) const uint64_t CONCAT_(startUsec, tag) = CurrentTimeNanos()
Minc/external/acl/acl_base_mdl.h+3-3
@@ -8,8 +8,8 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10 10 
11-#ifndef INC_EXTERNAL_ACL_ACL_BASE_MODEL_H_11+#ifndef INC_EXTERNAL_ACL_ACL_BASE_MDL_H_
12-#define INC_EXTERNAL_ACL_ACL_BASE_MODEL_H_12+#define INC_EXTERNAL_ACL_ACL_BASE_MDL_H_
13 13 
14#include <stdint.h>14#include <stdint.h>
15#include <stddef.h>15#include <stddef.h>
@@ -352,4 +352,4 @@ ACL_FUNC_VISIBILITY aclError aclSetTensorPlaceMent(aclTensorDesc *desc, aclMemTy
352}352}
353#endif353#endif
354 354 
355-#endif // INC_EXTERNAL_ACL_ACL_BASE_MODEL_H_355+#endif // INC_EXTERNAL_ACL_ACL_BASE_MDL_H_
Minc/framework/common/framework_op_types.h+3-3
@@ -46,8 +46,8 @@ class GE_FUNC_VISIBILITY OpTypeContainer {
46 FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char_t *var_name46 FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char_t *var_name
47 47 
48#define REGISTER_OPTYPE_DEFINE(var_name, str_name) \48#define REGISTER_OPTYPE_DEFINE(var_name, str_name) \
49- const char_t *var_name = str_name; \49+ const char_t *var_name = (str_name); \
50- const bool VAR_UNUSED g_##var_name##_reg = OpTypeContainer::Instance()->Register(str_name)50+ const bool VAR_UNUSED g_##var_name##_reg = OpTypeContainer::Instance()->Register((str_name))
51 51 
52-#define IS_OPTYPE_EXISTING(str_name) (ge::OpTypeContainer::Instance()->IsExisting(str_name))52+#define IS_OPTYPE_EXISTING(str_name) (ge::OpTypeContainer::Instance()->IsExisting((str_name)))
53#endif // INC_FRAMEWORK_COMMON_FRAMEWORK_OP_TYPES_H_53#endif // INC_FRAMEWORK_COMMON_FRAMEWORK_OP_TYPES_H_
Minc/framework/common/runtime_model_ge.h+4-4
@@ -8,8 +8,8 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10 10 
11-#ifndef CCE_RUNTIME_ACL_RT_MODEL_H11+#ifndef FRAMEWORK_COMMON_RUNTIME_MODEL_GE_H
12-#define CCE_RUNTIME_ACL_RT_MODEL_H12+#define FRAMEWORK_COMMON_RUNTIME_MODEL_GE_H
13 13 
14typedef enum acltagModelTaskType {14typedef enum acltagModelTaskType {
15 ACL_RT_MODEL_TASK_KERNEL = 0,15 ACL_RT_MODEL_TASK_KERNEL = 0,
@@ -111,5 +111,5 @@ typedef aclrtModelTaskType_t rtModelTaskType_t;
111#define RT_MODEL_TASK_MEM_EVENT_RECORD ACL_RT_MODEL_TASK_MEM_EVENT_RECORD111#define RT_MODEL_TASK_MEM_EVENT_RECORD ACL_RT_MODEL_TASK_MEM_EVENT_RECORD
112#define RT_MODEL_TASK_MEM_EVENT_WAIT ACL_RT_MODEL_TASK_MEM_EVENT_WAIT112#define RT_MODEL_TASK_MEM_EVENT_WAIT ACL_RT_MODEL_TASK_MEM_EVENT_WAIT
113#define RT_MODEL_TASK_FUSION_KERNEL (ACL_RT_MODEL_TASK_MEM_EVENT_WAIT + 1)113#define RT_MODEL_TASK_FUSION_KERNEL (ACL_RT_MODEL_TASK_MEM_EVENT_WAIT + 1)
114-#endif114+#endif // CCE_RUNTIME_RT_MODEL_H
115-#endif115+#endif // FRAMEWORK_COMMON_RUNTIME_MODEL_GE_H
Minc/graph_metadef/register/kernel_registry.h+3-3
@@ -8,8 +8,8 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10 10 
11-#ifndef B369E37D560547C2B8DC137404F9713E_H11+#ifndef INC_GRAPH_METADEF_REGISTER_KERNEL_REGISTRY_H
12-#define B369E37D560547C2B8DC137404F9713E_H12+#define INC_GRAPH_METADEF_REGISTER_KERNEL_REGISTRY_H
13#include <functional>13#include <functional>
14#include <string>14#include <string>
15#include <memory>15#include <memory>
@@ -89,4 +89,4 @@ class KernelRegisterV2 {
89#define REGISTER_KERNEL_COUNTER(type, counter) REGISTER_KERNEL_COUNTER2(type, counter)89#define REGISTER_KERNEL_COUNTER(type, counter) REGISTER_KERNEL_COUNTER2(type, counter)
90#define REGISTER_KERNEL(type) REGISTER_KERNEL_COUNTER(type, __COUNTER__)90#define REGISTER_KERNEL(type) REGISTER_KERNEL_COUNTER(type, __COUNTER__)
91 91 
92-#endif92+#endif // INC_GRAPH_METADEF_REGISTER_KERNEL_REGISTRY_H
Minc/graph_metadef/register/kernel_registry_impl.h+3-3
@@ -8,8 +8,8 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10 10 
11-#ifndef INC_EXTERNAL_REGISTER_KERNEL_REGISTER_IMPL_H_11+#ifndef INC_GRAPH_METADEF_REGISTER_KERNEL_REGISTRY_IMPL_H_
12-#define INC_EXTERNAL_REGISTER_KERNEL_REGISTER_IMPL_H_12+#define INC_GRAPH_METADEF_REGISTER_KERNEL_REGISTRY_IMPL_H_
13#include <unordered_map>13#include <unordered_map>
14#include <string>14#include <string>
15 15 
@@ -30,4 +30,4 @@ class KernelRegistryImpl : public KernelRegistry {
30};30};
31} // namespace gert31} // namespace gert
32 32 
33-#endif // INC_EXTERNAL_REGISTER_KERNEL_REGISTER_IMPL_H_33+#endif // INC_GRAPH_METADEF_REGISTER_KERNEL_REGISTRY_IMPL_H_
Minc/graph_metadef/register/op_ext_calc_param_registry.h+1-1
@@ -47,5 +47,5 @@ class OpExtGenCalcParamRegister {
47 fe::OpExtGenCalcParamRegister(type, func)47 fe::OpExtGenCalcParamRegister(type, func)
48#define REGISTER_NODE_EXT_CALC_PARAM_COUNTER(type, func, counter) \48#define REGISTER_NODE_EXT_CALC_PARAM_COUNTER(type, func, counter) \
49 REGISTER_NODE_EXT_CALC_PARAM_COUNTER2(type, func, counter)49 REGISTER_NODE_EXT_CALC_PARAM_COUNTER2(type, func, counter)
50-#define REGISTER_NODE_EXT_CALC_PARAM(type, func) REGISTER_NODE_EXT_CALC_PARAM_COUNTER(type, func, __COUNTER__)50+#define REGISTER_NODE_EXT_CALC_PARAM(type, func) REGISTER_NODE_EXT_CALC_PARAM_COUNTER((type), (func), __COUNTER__)
51#endif // INC_REGISTER_OP_EXT_CALC_PARAM_REGISTRY_H_51#endif // INC_REGISTER_OP_EXT_CALC_PARAM_REGISTRY_H_
Minc/graph_metadef/register/op_ext_gentask_registry.h+9-8
@@ -8,8 +8,8 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10 10 
11-#ifndef INC_REGISTER_OP_EXTRA_GENTASK_REGISTRY_H11+#ifndef INC_GRAPH_METADEF_REGISTER_OP_EXT_GENTASK_REGISTRY_H
12-#define INC_REGISTER_OP_EXTRA_GENTASK_REGISTRY_H12+#define INC_GRAPH_METADEF_REGISTER_OP_EXT_GENTASK_REGISTRY_H
13#include <string>13#include <string>
14#include <functional>14#include <functional>
15#include <vector>15#include <vector>
@@ -68,19 +68,20 @@ class ExtTaskTypeRegister {
68#define REGISTER_NODE_EXT_GENTASK_COUNTER2(type, func, counter) \68#define REGISTER_NODE_EXT_GENTASK_COUNTER2(type, func, counter) \
69 static const fe::OpExtGenTaskRegister g_reg_op_ext_gentask_##counter ATTRIBUTE_USED = \69 static const fe::OpExtGenTaskRegister g_reg_op_ext_gentask_##counter ATTRIBUTE_USED = \
70 fe::OpExtGenTaskRegister(type, func)70 fe::OpExtGenTaskRegister(type, func)
71-#define REGISTER_NODE_EXT_GENTASK_COUNTER(type, func, counter) REGISTER_NODE_EXT_GENTASK_COUNTER2(type, func, counter)71+#define REGISTER_NODE_EXT_GENTASK_COUNTER(type, func, counter) \
72-#define REGISTER_NODE_EXT_GENTASK(type, func) REGISTER_NODE_EXT_GENTASK_COUNTER(type, func, __COUNTER__)72+ REGISTER_NODE_EXT_GENTASK_COUNTER2((type), (func), counter)
73+#define REGISTER_NODE_EXT_GENTASK(type, func) REGISTER_NODE_EXT_GENTASK_COUNTER((type), (func), __COUNTER__)
73 74 
74#define REGISTER_SK_EXT_GENTASK_COUNTER2(type, func, counter) \75#define REGISTER_SK_EXT_GENTASK_COUNTER2(type, func, counter) \
75 static const fe::SKExtGenTaskRegister g_reg_op_ext_gentask_##counter ATTRIBUTE_USED = \76 static const fe::SKExtGenTaskRegister g_reg_op_ext_gentask_##counter ATTRIBUTE_USED = \
76 fe::SKExtGenTaskRegister(type, func)77 fe::SKExtGenTaskRegister(type, func)
77-#define REGISTER_SK_EXT_GENTASK_COUNTER(type, func, counter) REGISTER_SK_EXT_GENTASK_COUNTER2(type, func, counter)78+#define REGISTER_SK_EXT_GENTASK_COUNTER(type, func, counter) REGISTER_SK_EXT_GENTASK_COUNTER2((type), (func), counter)
78-#define REGISTER_SK_EXT_GENTASK(type, func) REGISTER_SK_EXT_GENTASK_COUNTER(type, func, __COUNTER__)79+#define REGISTER_SK_EXT_GENTASK(type, func) REGISTER_SK_EXT_GENTASK_COUNTER((type), (func), __COUNTER__)
79 80 
80#define REGISTER_EXT_TASK_TYPE_COUNTER2(type, task_type, counter) \81#define REGISTER_EXT_TASK_TYPE_COUNTER2(type, task_type, counter) \
81 static const fe::ExtTaskTypeRegister g_reg_op_ext_gentask_##counter ATTRIBUTE_USED = \82 static const fe::ExtTaskTypeRegister g_reg_op_ext_gentask_##counter ATTRIBUTE_USED = \
82 fe::ExtTaskTypeRegister(#type, task_type)83 fe::ExtTaskTypeRegister(#type, task_type)
83#define REGISTER_EXT_TASK_TYPE_COUNTER(type, task_type, counter) \84#define REGISTER_EXT_TASK_TYPE_COUNTER(type, task_type, counter) \
84 REGISTER_EXT_TASK_TYPE_COUNTER2(type, task_type, counter)85 REGISTER_EXT_TASK_TYPE_COUNTER2(type, task_type, counter)
85-#define REGISTER_EXT_TASK_TYPE(type, task_type) REGISTER_EXT_TASK_TYPE_COUNTER(type, task_type, __COUNTER__)86+#define REGISTER_EXT_TASK_TYPE(type, task_type) REGISTER_EXT_TASK_TYPE_COUNTER(type, (task_type), __COUNTER__)
86-#endif // INC_REGISTER_OP_EXTRA_GENTASK_REGISTRY_H87+#endif // INC_GRAPH_METADEF_REGISTER_OP_EXT_GENTASK_REGISTRY_H
Mruntime/v1/common/dump/data_dumper.h+0-1
@@ -22,7 +22,6 @@
22#include "graph/compute_graph.h"22#include "graph/compute_graph.h"
23#include "proto/ge_ir.pb.h"23#include "proto/ge_ir.pb.h"
24#include "proto/op_mapping.pb.h"24#include "proto/op_mapping.pb.h"
25-#include "rt_external_mem.h"
26#include "graph/load/model_manager/task_info/task_info.h"25#include "graph/load/model_manager/task_info/task_info.h"
27#include "framework/common/ge_types.h"26#include "framework/common/ge_types.h"
28#include "rt_external_base.h"27#include "rt_external_base.h"
Mruntime/v1/common/profiling/profiling_init.h+0-1
@@ -17,7 +17,6 @@
17 17 
18#include "common/profiling/profiling_properties.h"18#include "common/profiling/profiling_properties.h"
19#include "framework/common/ge_inner_error_codes.h"19#include "framework/common/ge_inner_error_codes.h"
20-#include "aprof_pub.h"
21 20 
22struct MsprofOptions {21struct MsprofOptions {
23 char jobId[2048];22 char jobId[2048];
Mruntime/v1/graph/load/model_manager/model_args_manager.h+0-1
@@ -56,7 +56,6 @@
56#include "model_args_layout_planner.h"56#include "model_args_layout_planner.h"
57#include "proto/task.pb.h"57#include "proto/task.pb.h"
58#include "task_args_refresh_type_classifier.h"58#include "task_args_refresh_type_classifier.h"
59-#include "aprof_pub.h"
60 59 
61namespace ge {60namespace ge {
62constexpr uint32_t kAddrRefreshOpParamOffset = 48U;61constexpr uint32_t kAddrRefreshOpParamOffset = 48U;
Mruntime/v2/api/api.cc+0-1
@@ -21,7 +21,6 @@
21#include "kernel/memory/host_mem_allocator.h"21#include "kernel/memory/host_mem_allocator.h"
22#include "kernel/memory/caching_mem_allocator.h"22#include "kernel/memory/caching_mem_allocator.h"
23#include "kernel/memory/external_allocator.h"23#include "kernel/memory/external_allocator.h"
24-#include "rt_external_mem.h"
25#include "graph/utils/graph_utils.h"24#include "graph/utils/graph_utils.h"
26#include "graph/load/model_manager/model_manager.h"25#include "graph/load/model_manager/model_manager.h"
27#include "acl/acl_rt.h"26#include "acl/acl_rt.h"
Mtests/dflow/udf/st/testcase/udf_executor/flow_func_manager_stest.cpp+28-0
@@ -71,6 +71,34 @@ TEST_F(FlowFuncManagerSTest, register_func_null) {
71 EXPECT_FALSE(ret);71 EXPECT_FALSE(ret);
72}72}
73 73 
74+TEST_F(FlowFuncManagerSTest, register_multi_func_name_null) {
75+ MULTI_FUNC_CREATOR_FUNC func = [](std::shared_ptr<MetaMultiFunc> &,
76+ std::map<AscendString, PROC_FUNC_WITH_CONTEXT> &) -> int32_t {
77+ return FLOW_FUNC_SUCCESS;
78+ };
79+ auto ret = RegisterMultiFunc(nullptr, func);
80+ EXPECT_FALSE(ret);
81+}
82+ 
83+TEST_F(FlowFuncManagerSTest, register_multi_func_null) {
84+ auto ret = RegisterMultiFunc("test_multi_func_null", MULTI_FUNC_CREATOR_FUNC());
85+ EXPECT_FALSE(ret);
86+}
87+ 
88+TEST_F(FlowFuncManagerSTest, register_multi_func_with_q_name_null) {
89+ MULTI_FUNC_WITH_Q_CREATOR_FUNC func = [](std::shared_ptr<MetaMultiFunc> &,
90+ std::map<AscendString, PROC_FUNC_WITH_CONTEXT_Q> &) -> int32_t {
91+ return FLOW_FUNC_SUCCESS;
92+ };
93+ auto ret = RegisterMultiFunc(nullptr, func);
94+ EXPECT_FALSE(ret);
95+}
96+ 
97+TEST_F(FlowFuncManagerSTest, register_multi_func_with_q_null) {
98+ auto ret = RegisterMultiFunc("test_multi_func_with_q_null", MULTI_FUNC_WITH_Q_CREATOR_FUNC());
99+ EXPECT_FALSE(ret);
100+}
101+ 
74TEST_F(FlowFuncManagerSTest, not_register) {102TEST_F(FlowFuncManagerSTest, not_register) {
75 FlowFuncManager &instance = FlowFuncManager::Instance();103 FlowFuncManager &instance = FlowFuncManager::Instance();
76 std::string instance_name = "pp0";104 std::string instance_name = "pp0";
Mtests/dflow/udf/ut/testcase/udf_executor/flow_func_manager_utest.cpp+28-0
@@ -82,6 +82,34 @@ TEST_F(FlowFuncManagerUTest, register_func_null) {
82 EXPECT_FALSE(ret);82 EXPECT_FALSE(ret);
83}83}
84 84 
85+TEST_F(FlowFuncManagerUTest, register_multi_func_name_null) {
86+ MULTI_FUNC_CREATOR_FUNC func = [](std::shared_ptr<MetaMultiFunc> &,
87+ std::map<AscendString, PROC_FUNC_WITH_CONTEXT> &) -> int32_t {
88+ return FLOW_FUNC_SUCCESS;
89+ };
90+ auto ret = RegisterMultiFunc(nullptr, func);
91+ EXPECT_FALSE(ret);
92+}
93+ 
94+TEST_F(FlowFuncManagerUTest, register_multi_func_null) {
95+ auto ret = RegisterMultiFunc("test_multi_func_null", MULTI_FUNC_CREATOR_FUNC());
96+ EXPECT_FALSE(ret);
97+}
98+ 
99+TEST_F(FlowFuncManagerUTest, register_multi_func_with_q_name_null) {
100+ MULTI_FUNC_WITH_Q_CREATOR_FUNC func = [](std::shared_ptr<MetaMultiFunc> &,
101+ std::map<AscendString, PROC_FUNC_WITH_CONTEXT_Q> &) -> int32_t {
102+ return FLOW_FUNC_SUCCESS;
103+ };
104+ auto ret = RegisterMultiFunc(nullptr, func);
105+ EXPECT_FALSE(ret);
106+}
107+ 
108+TEST_F(FlowFuncManagerUTest, register_multi_func_with_q_null) {
109+ auto ret = RegisterMultiFunc("test_multi_func_with_q_null", MULTI_FUNC_WITH_Q_CREATOR_FUNC());
110+ EXPECT_FALSE(ret);
111+}
112+ 
85TEST_F(FlowFuncManagerUTest, not_register) {113TEST_F(FlowFuncManagerUTest, not_register) {
86 FlowFuncManager &instance = FlowFuncManager::Instance();114 FlowFuncManager &instance = FlowFuncManager::Instance();
87 std::string instance_name = "pp0";115 std::string instance_name = "pp0";