Browse Source

!1261 aicpu算子优先级提升

From: @guopeian
Reviewed-by: @xchu42
Signed-off-by:
tags/v1.3.0
mindspore-ci-bot Gitee 3 years ago
parent
commit
ea027d1c67
2 changed files with 8 additions and 4 deletions
  1. +2
    -2
      ge/plugin/engine/dnnengines.cc
  2. +6
    -2
      ge/plugin/engine/engine_manage.cc

+ 2
- 2
ge/plugin/engine/dnnengines.cc View File

@@ -55,7 +55,7 @@ void VectorCoreDNNEngine::GetAttributes(DNNEngineAttribute &attrs) const { attrs

AICpuDNNEngine::AICpuDNNEngine(const std::string &engine_name) {
engine_attribute_.engine_name = engine_name;
engine_attribute_.compute_cost = COST_3;
engine_attribute_.compute_cost = COST_2;
engine_attribute_.runtime_type = DEVICE;
engine_attribute_.engine_input_format = FORMAT_RESERVED;
engine_attribute_.engine_output_format = FORMAT_RESERVED;
@@ -71,7 +71,7 @@ void AICpuDNNEngine::GetAttributes(DNNEngineAttribute &attrs) const { attrs = en

AICpuTFDNNEngine::AICpuTFDNNEngine(const std::string &engine_name) {
engine_attribute_.engine_name = engine_name;
engine_attribute_.compute_cost = COST_2;
engine_attribute_.compute_cost = COST_3;
engine_attribute_.runtime_type = DEVICE;
engine_attribute_.engine_input_format = FORMAT_RESERVED;
engine_attribute_.engine_output_format = FORMAT_RESERVED;


+ 6
- 2
ge/plugin/engine/engine_manage.cc View File

@@ -96,7 +96,9 @@ void RegisterAiCpuEngine() {
const std::string vm_aicpu = "DNN_VM_AICPU_ASCEND";
std::vector<std::string> mem_type_aicpu;
mem_type_aicpu.emplace_back(GE_ENGINE_ATTR_MEM_TYPE_HBM);
DNNEngineAttribute attr_aicpu = {vm_aicpu, mem_type_aicpu, COST_3, DEVICE, FORMAT_RESERVED, FORMAT_RESERVED};

DNNEngineAttribute attr_aicpu = {vm_aicpu, mem_type_aicpu, COST_2, DEVICE, FORMAT_RESERVED, FORMAT_RESERVED};

DNNEnginePtr vm_engine_ptr = MakeShared<AICpuDNNEngine>(attr_aicpu);
if (vm_engine_ptr == nullptr) {
GELOGE(ge::FAILED, "[Register][AiCpuEngine] failed, as malloc shared_ptr failed.");
@@ -112,7 +114,9 @@ void RegisterAiCpuTFEngine() {
const std::string vm_aicpu_tf = "DNN_VM_AICPU";
std::vector<std::string> mem_type_aicpu_tf;
mem_type_aicpu_tf.emplace_back(GE_ENGINE_ATTR_MEM_TYPE_HBM);
DNNEngineAttribute attr_aicpu_tf = {vm_aicpu_tf, mem_type_aicpu_tf, COST_2, DEVICE, FORMAT_RESERVED, FORMAT_RESERVED};

DNNEngineAttribute attr_aicpu_tf = {vm_aicpu_tf, mem_type_aicpu_tf, COST_3, DEVICE, FORMAT_RESERVED, FORMAT_RESERVED};

DNNEnginePtr vm_engine_ptr = MakeShared<AICpuTFDNNEngine>(attr_aicpu_tf);
if (vm_engine_ptr == nullptr) {
GELOGE(ge::FAILED, "[Register][AiCpuTFEngine]make vm_engine_ptr failed");


Loading…
Cancel
Save