Browse Source

Fix ut.

tags/v1.3.0
zhaozhixuan 4 years ago
parent
commit
e318f31e68
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      inc/framework/common/taskdown_common.h
  2. +1
    -1
      tests/ut/ge/hybrid/node_executor/host_cpu/host_cpu_node_task_unittest.cc

+ 2
- 2
inc/framework/common/taskdown_common.h View File

@@ -45,8 +45,8 @@ typedef enum tagccKernelType {
TE_AI_CPU = 5, /* te aicpu operator */ TE_AI_CPU = 5, /* te aicpu operator */
AI_CPU = 6, /* aicpu */ AI_CPU = 6, /* aicpu */
CUST_AI_CPU = 7, /* custom aicpu*/ CUST_AI_CPU = 7, /* custom aicpu*/
INVALID = 8, /* unknown kernel type */
HOST_CPU = 9 /* host cpu */
HOST_CPU = 8, /* host cpu */
INVALID = 10000 /* unknown kernel type */
} ccKernelType; } ccKernelType;


typedef struct tagOpContext { typedef struct tagOpContext {


+ 1
- 1
tests/ut/ge/hybrid/node_executor/host_cpu/host_cpu_node_task_unittest.cc View File

@@ -82,7 +82,7 @@ TEST_F(UtestHostCpuNodeTask, test_load) {
host_task_def.set_type(RT_MODEL_TASK_KERNEL); host_task_def.set_type(RT_MODEL_TASK_KERNEL);
ASSERT_EQ(node_executor.LoadTask(hybrid_model, node, task), INTERNAL_ERROR); ASSERT_EQ(node_executor.LoadTask(hybrid_model, node, task), INTERNAL_ERROR);
domi::KernelContext *context = host_task_def.mutable_kernel()->mutable_context(); domi::KernelContext *context = host_task_def.mutable_kernel()->mutable_context();
context->set_kernel_type(9); // ccKernelType::HOST_CPU
context->set_kernel_type(8); // ccKernelType::HOST_CPU
ASSERT_EQ(node_executor.LoadTask(hybrid_model, node, task), INTERNAL_ERROR); ASSERT_EQ(node_executor.LoadTask(hybrid_model, node, task), INTERNAL_ERROR);
HostCpuEngine::GetInstance().constant_folding_handle_ = (void *)0x01; HostCpuEngine::GetInstance().constant_folding_handle_ = (void *)0x01;
ASSERT_EQ(node_executor.LoadTask(hybrid_model, node, task), INTERNAL_ERROR); ASSERT_EQ(node_executor.LoadTask(hybrid_model, node, task), INTERNAL_ERROR);


Loading…
Cancel
Save