Browse Source

aicpu engine

tags/v1.3.0
guopeian 3 years ago
parent
commit
217c3e4b8a
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      ge/plugin/engine/dnnengines.cc
  2. +2
    -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;


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

@@ -92,7 +92,7 @@ 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, "make vm_engine_ptr failed");
@@ -107,7 +107,7 @@ 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, "make vm_engine_ptr failed");


Loading…
Cancel
Save