Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zrr1999 committed Aug 9, 2022
1 parent 2e67010 commit 0aeec66
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cinn/frontend/net_builder_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ TEST(net_build, program_execute_pool2d_grad) {

NetBuilder builder("net_builder");
Placeholder input = builder.CreateInput(Float(32), {B, C, H, W}, "In");
Variable output = builder.Squeeze(Float(32), {1, 3});
Variable output = builder.Squeeze(input, {1, 3});
auto program = builder.Build();

Target target = common::DefaultHostTarget();
Expand Down Expand Up @@ -232,7 +232,7 @@ TEST(net_build, program_execute_pool2d_grad) {
int index = w + W * (h + H * (c + C * b));
float in_data = input_data[index];
float out_data = output_data[index];
line += (std::to_string(data) + ", ");
line += (std::to_string(out_data) + ", ");
EXPECT_EQ(in_data, out_data);
}
VLOG(6) << line;
Expand Down
2 changes: 1 addition & 1 deletion cinn/hlir/op/contrib/squeeze.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace cinn {
namespace hlir {
namespace op {

ir::Tensor Squeeze(const ir::Tensor& A, const std::vector<int>& axis, poly::StageMap stages, const std::string& name);
ir::Tensor Squeeze(const ir::Tensor& A, const std::vector<int>& axis, const std::string& name);

} // namespace op
} // namespace hlir
Expand Down
4 changes: 2 additions & 2 deletions cinn/hlir/op/contrib/squeeze_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace cinn {
namespace hlir {
namespace op {

TEST(Squeeze, SqueezeCase0) {
TEST(GenerateCode_Cpu, Squeeze) {
common::Context::Global().ResetNameId();

common::Target target = common::DefaultHostTarget();
Expand All @@ -47,7 +47,7 @@ TEST(Squeeze, SqueezeCase0) {

poly::StageMap stages = poly::CreateStages({res});
std::vector<ir::LoweredFunc> funcs =
lang::LowerVec("TestGenerateCodeCpu_Squeeze", stages, res, {}, {}, nullptr, target, true);
lang::LowerVec("TestGenerateCodeCpu_Squeeze", stages, {res}, {}, {}, nullptr, target, true);

VLOG(6) << "Expr before CPU codegen:";
VLOG(6) << funcs[0]->body;
Expand Down

0 comments on commit 0aeec66

Please sign in to comment.