From 0c488c404cd19f5e924b6659781a1aa6306cc06f Mon Sep 17 00:00:00 2001 From: zrr1999 <2742392377@qq.com> Date: Sun, 21 Aug 2022 22:47:59 +0800 Subject: [PATCH] fix bug --- cinn/frontend/net_builder_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cinn/frontend/net_builder_test.cc b/cinn/frontend/net_builder_test.cc index 711eadeaca..2230baec71 100644 --- a/cinn/frontend/net_builder_test.cc +++ b/cinn/frontend/net_builder_test.cc @@ -239,7 +239,7 @@ TEST(net_build, program_execute_gather) { auto input1_tensor = scope->GetTensor(std::string(input1.id())); SetFloatRandData(input1_tensor, target); - int* input1_data = input1_tensor->mutable_data(target); + float* input1_data = input1_tensor->mutable_data(target); auto input2_tensor = scope->GetTensor(std::string(input2.id())); SetIntRandData(input2_tensor, target); @@ -293,7 +293,7 @@ TEST(net_build, program_execute_gather_nd) { auto input1_tensor = scope->GetTensor(std::string(input1.id())); SetFloatRandData(input1_tensor, target); - int* input1_data = input1_tensor->mutable_data(target); + float* input1_data = input1_tensor->mutable_data(target); auto input2_tensor = scope->GetTensor(std::string(input2.id())); SetIntRandData(input2_tensor, target);