Browse Source

Fix ut.

tags/v1.2.0
unknown 3 years ago
parent
commit
e331dee2b9
2 changed files with 4 additions and 7 deletions
  1. +1
    -1
      tests/ut/ge/graph/load/kernel_ex_task_info_unittest.cc
  2. +3
    -6
      tests/ut/ge/graph/load/kernel_task_info_unittest.cc

+ 1
- 1
tests/ut/ge/graph/load/kernel_ex_task_info_unittest.cc View File

@@ -138,7 +138,7 @@ TEST_F(UtestKernelExTaskInfo, kernel_ex_task_info_calculate_args) {
}

TEST_F(UtestKernelExTaskInfo, kernel_ex_task_ext_info) {
const char ext_info[4] = {0, 0, 0, 4};
const string ext_info = {1, 1, 1, 1, 0, 0, 0, 0};
const OpDescPtr op_desc = CreateOpDesc("FrameworkOp", "FrameworkOp");

KernelExTaskInfo kernel_ex_task_info;


+ 3
- 6
tests/ut/ge/graph/load/kernel_task_info_unittest.cc View File

@@ -413,6 +413,9 @@ TEST_F(UtestKernelTaskInfo, init_kernel_taskInfo_with_aicpu_kernel_type_fail) {
// rtMemcpy -> RT_ERROR_INVALID_VALUE
EXPECT_EQ(kernel_task_info.Init(task_def, &model), SUCCESS);

const string ext_info = {1, 1, 1, 1, 0, 0, 0, 0};
EXPECT_EQ(kernel_task_info.InitAicpuTaskExtInfo(ext_info), SUCCESS);

EXPECT_EQ(kernel_task_info.Distribute(), SUCCESS);
EXPECT_EQ(kernel_task_info.Release(), SUCCESS);

@@ -1195,10 +1198,4 @@ TEST_F(UtestKernelTaskInfo, kernel_task_info_super_kernel_info) {
EXPECT_EQ(kernel_task_info.SKTFinalize(), SUCCESS);
}

TEST_F(UtestKernelTaskInfo, kernel_ask_ext_info) {
const char ext_info[4] = {0, 0, 0, 4};
KernelTaskInfo kernel_task_info;
EXPECT_EQ(kernel_task_info.InitAicpuTaskExtInfo(ext_info), SUCCESS);
}

} // namespace ge

Loading…
Cancel
Save