Skip to content

Commit

Permalink
fix NetBuilder API Name bug in cinn_lib_test (#40392)
Browse files Browse the repository at this point in the history
* fix NetBuilder API Name bug in cinn_lib_test

* update cinn version to newest
  • Loading branch information
thisjiang authored Mar 12, 2022
1 parent 70f83f1 commit 69a01c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmake/external/cinn.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ add_definitions(-w)
######################################
include(ExternalProject)
set(CINN_PREFIX_DIR ${THIRD_PARTY_PATH}/CINN)
set(CINN_GIT_TAG release/v0.1)
set(CINN_GIT_TAG 56879b637e2c4db19091eedad03d7cc674e092a2)
set(CINN_OPTIONAL_ARGS -DPY_VERSION=${PY_VERSION}
-DWITH_CUDA=${WITH_GPU}
-DWITH_CUDNN=${WITH_GPU}
Expand Down
8 changes: 4 additions & 4 deletions paddle/fluid/framework/paddle2cinn/cinn_lib_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ Program CreateAddProgram() {
NetBuilder builder("net_builder");
auto a = builder.CreateInput(Float(32), {M, N});
auto b = builder.CreateInput(Float(32), {M, N});
auto c = builder.add(a, b);
auto d = builder.add(a, c);
auto c = builder.Add(a, b);
auto d = builder.Add(a, c);
auto program = builder.Build();

return program;
Expand Down Expand Up @@ -116,8 +116,8 @@ TEST(net_build, program_execute_fc) {
auto w = builder.CreateInput(Float(32), {N, K}, "W"); // weight
auto b = builder.CreateInput(Float(32), {N}, "B"); // bias

auto mul_out = builder.mul(a, w, 2, 1);
auto add_out = builder.add(mul_out, b);
auto mul_out = builder.Mul(a, w, 2, 1);
auto add_out = builder.Add(mul_out, b);
auto program = builder.Build();

#ifdef PADDLE_WITH_CUDA
Expand Down

0 comments on commit 69a01c4

Please sign in to comment.