parent
cd365aa247
commit
24b8bc1cba
@ -0,0 +1,51 @@
|
|||||||
|
/**
|
||||||
|
* Copyright 2019-2020 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef INC_COMMON_OPSKERNELUTILS_OPS_KERNEL_INFO_UTILS_H_
|
||||||
|
#define INC_COMMON_OPSKERNELUTILS_OPS_KERNEL_INFO_UTILS_H_
|
||||||
|
|
||||||
|
#include "external/ge/ge_api_error_codes.h"
|
||||||
|
#include "cce/aicpu_engine_struct.h"
|
||||||
|
#include "common/opskernel/ops_kernel_info_types.h"
|
||||||
|
#include "graph/node.h"
|
||||||
|
#include "proto/task.pb.h"
|
||||||
|
|
||||||
|
namespace ge {
|
||||||
|
class OpsKernelBuilder {
|
||||||
|
public:
|
||||||
|
OpsKernelBuilder() = default;
|
||||||
|
virtual ~OpsKernelBuilder() = default;
|
||||||
|
|
||||||
|
// initialize OpsKernelBuilder
|
||||||
|
virtual Status Initialize(const std::map<std::string, std::string> &options) = 0;
|
||||||
|
|
||||||
|
// finalize OpsKernelBuilder
|
||||||
|
virtual Status Finalize() = 0;
|
||||||
|
|
||||||
|
// memory allocation requirement
|
||||||
|
virtual Status CalcOpRunningParam(Node &node) = 0;
|
||||||
|
|
||||||
|
// generate task for op
|
||||||
|
virtual Status GenerateTask(const Node &node, RunContext &context, std::vector<domi::TaskDef> &tasks) = 0;
|
||||||
|
|
||||||
|
// only call aicpu interface to generate task struct
|
||||||
|
virtual Status GenSingleOpRunTask(const NodePtr &node, STR_FWK_OP_KERNEL &task, string &task_info) { return FAILED; }
|
||||||
|
|
||||||
|
// only call aicpu interface to generate task struct
|
||||||
|
virtual Status GenMemCopyTask(uint64_t count, STR_FWK_OP_KERNEL &task, string &task_info) { return FAILED; }
|
||||||
|
};
|
||||||
|
} // namespace ge
|
||||||
|
#endif // INC_COMMON_OPSKERNELUTILS_OPS_KERNEL_INFO_UTILS_H_
|
@ -0,0 +1,48 @@
|
|||||||
|
/**
|
||||||
|
* Copyright 2019-2020 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef AICORE_UTIL_MANAGER_H_
|
||||||
|
#define AICORE_UTIL_MANAGER_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include "register/graph_optimizer/graph_optimize_register_error_codes.h"
|
||||||
|
|
||||||
|
namespace fe {
|
||||||
|
class AICoreUtilManager {
|
||||||
|
public:
|
||||||
|
static AICoreUtilManager &Instance();
|
||||||
|
/*
|
||||||
|
* to initialize the aicore configuration
|
||||||
|
* param[in] the options of init
|
||||||
|
* param[in] engine Name
|
||||||
|
* param[in] socVersion soc version from ge
|
||||||
|
* return Status(SUCCESS/FAILED)
|
||||||
|
*/
|
||||||
|
Status Initialize(const std::map<std::string, std::string> &options, std::string &soc_version);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* to release the source of fusion manager
|
||||||
|
* return Status(SUCCESS/FAILED)
|
||||||
|
*/
|
||||||
|
Status Finalize();
|
||||||
|
|
||||||
|
private:
|
||||||
|
AICoreUtilManager();
|
||||||
|
~AICoreUtilManager();
|
||||||
|
bool is_init_;
|
||||||
|
};
|
||||||
|
} // namespace fe
|
||||||
|
#endif // AICORE_UTIL_MANAGER_H
|
@ -0,0 +1,54 @@
|
|||||||
|
/**
|
||||||
|
* Copyright 2019-2020 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef INC_COMMON_UTILS_AI_CORE_COMMON_CONSTANTS_H_
|
||||||
|
#define INC_COMMON_UTILS_AI_CORE_COMMON_CONSTANTS_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace fe {
|
||||||
|
static const std::string CORE_TYPE = "_coretype";
|
||||||
|
/* engine name of AI core and vector core */
|
||||||
|
static const std::string AI_CORE_NAME = "AIcoreEngine";
|
||||||
|
static const std::string VECTOR_CORE_NAME = "VectorEngine";
|
||||||
|
|
||||||
|
static const int64_t IS_UNKNOWN_SHAPE_VALUE = 1;
|
||||||
|
|
||||||
|
static const int64_t SHAPE_UNKNOWN_DIM = -1;
|
||||||
|
|
||||||
|
static const int64_t SHAPE_UNKNOWN_DIM_NUM = -2;
|
||||||
|
|
||||||
|
static const std::string SOC_VERSION_ASCEND310 = "Ascend310";
|
||||||
|
static const std::string SOC_VERSION_ASCEND610 = "Ascend610";
|
||||||
|
static const std::string SOC_VERSION_ASCEND615 = "Ascend615";
|
||||||
|
static const std::string SOC_VERSION_ASCEND710 = "Ascend710";
|
||||||
|
static const std::string SOC_VERSION_ASCEND710P = "Ascend710Pro";
|
||||||
|
static const std::string SOC_VERSION_ASCEND910A = "Ascend910A";
|
||||||
|
static const std::string SOC_VERSION_ASCEND910B = "Ascend910B";
|
||||||
|
static const std::string SOC_VERSION_ASCEND910PROA = "Ascend910ProA";
|
||||||
|
static const std::string SOC_VERSION_ASCEND910PROB = "Ascend910ProB";
|
||||||
|
static const std::string SOC_VERSION_ASCEND910PREMIUMA = "Ascend910PremiumA";
|
||||||
|
static const std::string SOC_VERSION_HI3796CV300ES = "Hi3796CV300ES";
|
||||||
|
static const std::string SOC_VERSION_HI3796CV300CS = "Hi3796CV300CS";
|
||||||
|
|
||||||
|
static const std::vector<std::string> SOC_VERSION_CLOUD_LIST = {SOC_VERSION_ASCEND910A, SOC_VERSION_ASCEND910B,
|
||||||
|
SOC_VERSION_ASCEND910PROA, SOC_VERSION_ASCEND910PROB,
|
||||||
|
SOC_VERSION_ASCEND910PREMIUMA};
|
||||||
|
|
||||||
|
static const std::vector<std::string> SOC_VERSION_DC_LIST = {SOC_VERSION_ASCEND610, SOC_VERSION_ASCEND615,
|
||||||
|
SOC_VERSION_ASCEND710, SOC_VERSION_ASCEND710P};
|
||||||
|
} // namespace fe
|
||||||
|
#endif
|
@ -0,0 +1,54 @@
|
|||||||
|
/**
|
||||||
|
* Copyright 2019-2020 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PROJECT_JSON_UTIL_H
|
||||||
|
#define PROJECT_JSON_UTIL_H
|
||||||
|
|
||||||
|
#include "graph/compute_graph.h"
|
||||||
|
|
||||||
|
#include "common/aicore_util_types.h"
|
||||||
|
#include "fusion_engine/graph_tuner/graph_tuner_errorcode.h"
|
||||||
|
|
||||||
|
const std::string L1_FUSION_EXTEND_CONTENT = "_l1_fusion_extend_content";
|
||||||
|
const std::string L2_FUSION_EXTEND_CONTENT = "l2_fusion_extend_content";
|
||||||
|
const std::string TASK_L2_FUSION_INFO_EXTEND_CONTENT = "task_l2_fusion_info_extend_content";
|
||||||
|
const std::string L1_FUSION_TO_OP_STRUCT = "_l1fusion_ToOpStruct";
|
||||||
|
const std::string L2_FUSION_TO_OP_STRUCT = "_l2fusion_ToOpStruct";
|
||||||
|
const std::string TASK_L2_FUSION_INFO = "_task_L2FusionInfo";
|
||||||
|
|
||||||
|
namespace tune {
|
||||||
|
using ToOpStructPtr = std::shared_ptr<fe::ToOpStruct_t>;
|
||||||
|
using L2FusionInfoPtr = std::shared_ptr<fe::TaskL2FusionInfo_t>;
|
||||||
|
|
||||||
|
Status GetL1InfoFromJson(ge::OpDescPtr opDescPtr);
|
||||||
|
|
||||||
|
Status GetL2InfoFromJson(ge::OpDescPtr opDescPtr);
|
||||||
|
|
||||||
|
Status GetTaskL2FusionInfoFromJson(ge::OpDescPtr opDescPtr);
|
||||||
|
|
||||||
|
Status ReadGraphInfoFromJson(ge::ComputeGraph &graph);
|
||||||
|
|
||||||
|
Status WriteGraphInfoToJson(ge::ComputeGraph &graph);
|
||||||
|
|
||||||
|
void GetL2ToOpStructFromJson(ge::OpDescPtr &opDescPtr, ToOpStructPtr &l2InfoPtr);
|
||||||
|
|
||||||
|
void GetL1ToOpStructFromJson(ge::OpDescPtr &opDescPtr, ToOpStructPtr &l1InfoPtr);
|
||||||
|
|
||||||
|
L2FusionInfoPtr GetL2FusionInfoFromJson(ge::OpDescPtr &opDescPtr);
|
||||||
|
|
||||||
|
void SetL2FusionInfoToNode(ge::OpDescPtr &opDescPtr, L2FusionInfoPtr &l2FusionInfoPtr);
|
||||||
|
} // namespace tune
|
||||||
|
#endif // PROJECT_JSON_UTIL_H
|
@ -0,0 +1,44 @@
|
|||||||
|
/**
|
||||||
|
* Copyright 2019-2020 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef L2_STREAM_INFO_H_
|
||||||
|
#define L2_STREAM_INFO_H_
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
#include <string>
|
||||||
|
#include <mutex>
|
||||||
|
#include "register/graph_optimizer/graph_optimize_register_error_codes.h"
|
||||||
|
#include "runtime/base.h"
|
||||||
|
#include "cce/l2fusion_struct.hpp"
|
||||||
|
|
||||||
|
namespace fe {
|
||||||
|
class StreamL2Info {
|
||||||
|
public:
|
||||||
|
StreamL2Info(const StreamL2Info &) = delete;
|
||||||
|
StreamL2Info &operator=(const StreamL2Info &) = delete;
|
||||||
|
static StreamL2Info &Instance();
|
||||||
|
Status GetStreamL2Info(rtStream_t stream_id, string node_name, fusion::TaskL2Info_t *&l2_data);
|
||||||
|
Status SetStreamL2Info(const rtStream_t &stream_id, fusion::TaskL2InfoFEMap_t &l2_alloc_res);
|
||||||
|
|
||||||
|
private:
|
||||||
|
StreamL2Info();
|
||||||
|
~StreamL2Info();
|
||||||
|
mutable std::mutex stream_l2_mutex_;
|
||||||
|
std::map<rtStream_t, fusion::TaskL2InfoFEMap_t> stream_l2_map_;
|
||||||
|
};
|
||||||
|
} // namespace fe
|
||||||
|
|
||||||
|
#endif // L2_STREAM_INFO_H_
|
@ -0,0 +1,38 @@
|
|||||||
|
/**
|
||||||
|
* Copyright 2019-2020 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef INC_EXTERNAL_GRAPH_ASCEND_STRING_H_
|
||||||
|
#define INC_EXTERNAL_GRAPH_ASCEND_STRING_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
namespace ge {
|
||||||
|
class AscendString {
|
||||||
|
public:
|
||||||
|
AscendString() = default;
|
||||||
|
|
||||||
|
~AscendString() = default;
|
||||||
|
|
||||||
|
explicit AscendString(const char* name);
|
||||||
|
|
||||||
|
const char* GetString() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::shared_ptr<std::string> name_;
|
||||||
|
};
|
||||||
|
} // namespace ge
|
||||||
|
#endif // INC_EXTERNAL_GRAPH_ASCEND_STRING_H_
|
@ -0,0 +1,129 @@
|
|||||||
|
/**
|
||||||
|
* Copyright 2019-2020 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef INC_EXTERNAL_GRAPH_NODE_H_
|
||||||
|
#define INC_EXTERNAL_GRAPH_NODE_H_
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
#include "./ge_error_codes.h"
|
||||||
|
#include "./types.h"
|
||||||
|
#include "./tensor.h"
|
||||||
|
#include "./ascend_string.h"
|
||||||
|
|
||||||
|
namespace ge {
|
||||||
|
class AttrValue;
|
||||||
|
class GNode;
|
||||||
|
class OpDesc;
|
||||||
|
class Graph;
|
||||||
|
class ComputeGraph;
|
||||||
|
using GNodePtr = std::shared_ptr<GNode>;
|
||||||
|
using GraphPtr = std::shared_ptr<Graph>;
|
||||||
|
using OpBytes = std::vector<uint8_t>;
|
||||||
|
using OpDescPtr = std::shared_ptr<OpDesc>;
|
||||||
|
using ComputeGraphPtr = std::shared_ptr<ComputeGraph>;
|
||||||
|
|
||||||
|
class NodeImpl;
|
||||||
|
class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY GNode {
|
||||||
|
public:
|
||||||
|
GNode();
|
||||||
|
|
||||||
|
~GNode() = default;
|
||||||
|
|
||||||
|
graphStatus GetType(ge::AscendString &type) const;
|
||||||
|
|
||||||
|
graphStatus GetName(ge::AscendString &name) const;
|
||||||
|
|
||||||
|
std::pair<GNodePtr, int32_t> GetInDataNodesAndPortIndexs(const int32_t index) const;
|
||||||
|
|
||||||
|
std::vector<GNodePtr> GetInControlNodes() const;
|
||||||
|
|
||||||
|
std::vector<std::pair<GNodePtr, int32_t>> GetOutDataNodesAndPortIndexs(const int32_t index) const;
|
||||||
|
|
||||||
|
std::vector<GNodePtr> GetOutControlNodes() const;
|
||||||
|
|
||||||
|
graphStatus GetInputConstData(const int32_t index, Tensor &data) const;
|
||||||
|
|
||||||
|
graphStatus GetInputIndexByName(const ge::AscendString &name, int32_t &index);
|
||||||
|
|
||||||
|
graphStatus GetOutputIndexByName(const ge::AscendString &name, int32_t &index);
|
||||||
|
|
||||||
|
size_t GetInputsSize() const;
|
||||||
|
|
||||||
|
size_t GetOutputsSize() const;
|
||||||
|
|
||||||
|
graphStatus GetInputDesc(const int32_t index, TensorDesc &tensor_desc) const;
|
||||||
|
|
||||||
|
graphStatus UpdateInputDesc(const int32_t index, const TensorDesc &tensor_desc);
|
||||||
|
|
||||||
|
graphStatus GetOutputDesc(const int32_t index, TensorDesc &tensor_desc) const;
|
||||||
|
|
||||||
|
graphStatus UpdateOutputDesc(const int32_t index, const TensorDesc &tensor_desc);
|
||||||
|
|
||||||
|
graphStatus GetAttr(const ge::AscendString &name, int64_t &attr_value) const;
|
||||||
|
graphStatus GetAttr(const ge::AscendString &name, int32_t &attr_value) const;
|
||||||
|
graphStatus GetAttr(const ge::AscendString &name, uint32_t &attr_value) const;
|
||||||
|
graphStatus GetAttr(const ge::AscendString &name, float &attr_value) const;
|
||||||
|
graphStatus GetAttr(const ge::AscendString &name, ge::AscendString &attr_value) const;
|
||||||
|
graphStatus GetAttr(const ge::AscendString &name, bool &attr_value) const;
|
||||||
|
graphStatus GetAttr(const ge::AscendString &name, Tensor &attr_value) const;
|
||||||
|
graphStatus GetAttr(const ge::AscendString &name, std::vector<int64_t> &attr_value) const;
|
||||||
|
graphStatus GetAttr(const ge::AscendString &name, std::vector<int32_t> &attr_value) const;
|
||||||
|
graphStatus GetAttr(const ge::AscendString &name, std::vector<uint32_t> &attr_value) const;
|
||||||
|
graphStatus GetAttr(const ge::AscendString &name, std::vector<float> &attr_value) const;
|
||||||
|
graphStatus GetAttr(const ge::AscendString &name, std::vector<ge::AscendString> &attr_values) const;
|
||||||
|
graphStatus GetAttr(const ge::AscendString &name, std::vector<bool> &attr_value) const;
|
||||||
|
graphStatus GetAttr(const ge::AscendString &name, std::vector<Tensor> &attr_value) const;
|
||||||
|
graphStatus GetAttr(const ge::AscendString &name, OpBytes &attr_value) const;
|
||||||
|
graphStatus GetAttr(const ge::AscendString &name, std::vector<std::vector<int64_t>> &attr_value) const;
|
||||||
|
graphStatus GetAttr(const ge::AscendString &name, std::vector<ge::DataType> &attr_value) const;
|
||||||
|
graphStatus GetAttr(const ge::AscendString &name, ge::DataType &attr_value) const;
|
||||||
|
graphStatus GetAttr(const ge::AscendString &name, AttrValue &attr_value) const;
|
||||||
|
|
||||||
|
graphStatus SetAttr(const ge::AscendString &name, int64_t &attr_value) const;
|
||||||
|
graphStatus SetAttr(const ge::AscendString &name, int32_t &attr_value) const;
|
||||||
|
graphStatus SetAttr(const ge::AscendString &name, uint32_t &attr_value) const;
|
||||||
|
graphStatus SetAttr(const ge::AscendString &name, float &attr_value) const;
|
||||||
|
graphStatus SetAttr(const ge::AscendString &name, ge::AscendString &attr_value) const;
|
||||||
|
graphStatus SetAttr(const ge::AscendString &name, bool &attr_value) const;
|
||||||
|
graphStatus SetAttr(const ge::AscendString &name, Tensor &attr_value) const;
|
||||||
|
graphStatus SetAttr(const ge::AscendString &name, std::vector<int64_t> &attr_value) const;
|
||||||
|
graphStatus SetAttr(const ge::AscendString &name, std::vector<int32_t> &attr_value) const;
|
||||||
|
graphStatus SetAttr(const ge::AscendString &name, std::vector<uint32_t> &attr_value) const;
|
||||||
|
graphStatus SetAttr(const ge::AscendString &name, std::vector<float> &attr_value) const;
|
||||||
|
graphStatus SetAttr(const ge::AscendString &name, std::vector<ge::AscendString> &attr_values) const;
|
||||||
|
graphStatus SetAttr(const ge::AscendString &name, std::vector<bool> &attr_value) const;
|
||||||
|
graphStatus SetAttr(const ge::AscendString &name, std::vector<Tensor> &attr_value) const;
|
||||||
|
graphStatus SetAttr(const ge::AscendString &name, OpBytes &attr_value) const;
|
||||||
|
graphStatus SetAttr(const ge::AscendString &name, std::vector<std::vector<int64_t>> &attr_value) const;
|
||||||
|
graphStatus SetAttr(const ge::AscendString &name, std::vector<ge::DataType> &attr_value) const;
|
||||||
|
graphStatus SetAttr(const ge::AscendString &name, ge::DataType &attr_value) const;
|
||||||
|
graphStatus SetAttr(const ge::AscendString &name, AttrValue &attr_value) const;
|
||||||
|
|
||||||
|
bool HasAttr(const ge::AscendString &name);
|
||||||
|
|
||||||
|
graphStatus GetSubgraph(uint32_t index, GraphPtr graph) const;
|
||||||
|
|
||||||
|
graphStatus GetALLSubgraphs(std::vector<GraphPtr> graph_list) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::shared_ptr<NodeImpl> impl_;
|
||||||
|
friend class NodeAdapter;
|
||||||
|
};
|
||||||
|
} // namespace ge
|
||||||
|
|
||||||
|
#endif // INC_EXTERNAL_GRAPH_NODE_H_
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue