diff --git a/paddle/fluid/framework/data_layout_transform_test.cc b/paddle/fluid/framework/data_layout_transform_test.cc index 96746e397e0b5eebb88bd74a929e0142ba659e72..dd17cac0e10db0d058d399cc725e18dcb14be507 100644 --- a/paddle/fluid/framework/data_layout_transform_test.cc +++ b/paddle/fluid/framework/data_layout_transform_test.cc @@ -27,9 +27,9 @@ TEST(DataTransform, DataLayoutFunction) { in.mutable_data(make_ddim({2, 3, 1, 2}), place); in.set_layout(DataLayout::kNHWC); - auto kernel_nhwc = OpKernelType(proto::VarType::Type::FP32, place, + auto kernel_nhwc = OpKernelType(proto::VarType::FP32, place, DataLayout::kNHWC, LibraryType::kPlain); - auto kernel_ncwh = OpKernelType(proto::VarType::Type::FP32, place, + auto kernel_ncwh = OpKernelType(proto::VarType::FP32, place, DataLayout::kNCHW, LibraryType::kPlain); TransDataLayout(kernel_nhwc, kernel_ncwh, in, &out); diff --git a/paddle/fluid/framework/op_kernel_type_test.cc b/paddle/fluid/framework/op_kernel_type_test.cc index 8d20b3766a376f731e356a2017dff9e359260f06..ac5fcb26b92db5a6f8f14e5c77066ad2f3cfef1e 100644 --- a/paddle/fluid/framework/op_kernel_type_test.cc +++ b/paddle/fluid/framework/op_kernel_type_test.cc @@ -23,7 +23,7 @@ TEST(OpKernelType, ToString) { using DataLayout = paddle::framework::DataLayout; using LibraryType = paddle::framework::LibraryType; - OpKernelType op_kernel_type(proto::VarType::FP32, CPUPlace(), DataLayout::kNCHW, + OpKernelType op_kernel_type(DataType::FP32, CPUPlace(), DataLayout::kNCHW, LibraryType::kCUDNN); ASSERT_EQ(paddle::framework::KernelTypeToString(op_kernel_type), @@ -39,9 +39,9 @@ TEST(OpKernelType, Hash) { using DataLayout = paddle::framework::DataLayout; using LibraryType = paddle::framework::LibraryType; - OpKernelType op_kernel_type_1(proto::VarType::FP32, CPUPlace(), DataLayout::kNCHW, + OpKernelType op_kernel_type_1(DataType::FP32, CPUPlace(), DataLayout::kNCHW, LibraryType::kCUDNN); - OpKernelType op_kernel_type_2(proto::VarType::FP32, CUDAPlace(0), DataLayout::kNCHW, + OpKernelType op_kernel_type_2(DataType::FP32, CUDAPlace(0), DataLayout::kNCHW, LibraryType::kCUDNN); OpKernelType::Hash hasher;