• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright 2024 Huawei Technologies Co., Ltd
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #ifndef MINDSPORE_CCSRC_TRANSFORM_SYMBOL_ACL_COMPILER_SYMBOL_H_
17 #define MINDSPORE_CCSRC_TRANSFORM_SYMBOL_ACL_COMPILER_SYMBOL_H_
18 #include <string>
19 #include "acl/acl_op_compiler.h"
20 #include "utils/dlopen_macro.h"
21 
22 namespace mindspore {
23 namespace transform {
24 
25 ORIGIN_METHOD(aclopCompileAndExecute, aclError, const char *, int, const aclTensorDesc *const[],
26               const aclDataBuffer *const[], int, const aclTensorDesc *const[], aclDataBuffer *const[],
27               const aclopAttr *, aclopEngineType, aclopCompileType, const char *, aclrtStream);
28 ORIGIN_METHOD(aclopCompileAndExecuteV2, aclError, const char *, int, aclTensorDesc *[], aclDataBuffer *[], int,
29               aclTensorDesc *[], aclDataBuffer *[], aclopAttr *, aclopEngineType, aclopCompileType, const char *,
30               aclrtStream);
31 ORIGIN_METHOD(aclSetCompileopt, aclError, aclCompileOpt, const char *);
32 ORIGIN_METHOD(aclopSetCompileFlag, aclError, aclOpCompileFlag);
33 ORIGIN_METHOD(aclGenGraphAndDumpForOp, aclError, const char *, int, const aclTensorDesc *const[],
34               const aclDataBuffer *const[], int, const aclTensorDesc *const[], aclDataBuffer *const[],
35               const aclopAttr *, aclopEngineType, const char *, const aclGraphDumpOption *);
36 
37 extern aclopCompileAndExecuteFunObj aclopCompileAndExecute_;
38 extern aclopCompileAndExecuteV2FunObj aclopCompileAndExecuteV2_;
39 extern aclSetCompileoptFunObj aclSetCompileopt_;
40 extern aclopSetCompileFlagFunObj aclopSetCompileFlag_;
41 extern aclGenGraphAndDumpForOpFunObj aclGenGraphAndDumpForOp_;
42 
43 void LoadAclOpCompilerApiSymbol(const std::string &ascend_path);
44 }  // namespace transform
45 }  // namespace mindspore
46 
47 #endif  // MINDSPORE_CCSRC_TRANSFORM_SYMBOL_ACL_COMPILER_SYMBOL_H_
48