Skip to content

Commit

Permalink
fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
cyber-pioneer committed Jan 12, 2024
1 parent 4db0c0a commit 91548f0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
20 changes: 8 additions & 12 deletions paddle/fluid/primitive/base/decomp_trans.cc
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,11 @@ void DecompProgram::decomp_program() {
for (size_t i = 0; i < src_vars_.size(); i++) {
orig_vars_dict[src_vars_[i]] = static_cast<int>(i);
}
if (VLOG_IS_ON(4)) {
std::ostringstream orig_prog_stream;
program_->Print(orig_prog_stream);
std::cout << "[Prim] Origin program before decomp :\n"
<< orig_prog_stream.str();
}
std::ostringstream orig_prog_stream;
program_->Print(orig_prog_stream);
VLOG(4) << "[Prim] Origin program bofore decomp :\n"
<< orig_prog_stream.str();

if (!paddle::prim::PrimCommonUtils::IsFwdPrimEnabled()) {
return;
}
Expand Down Expand Up @@ -339,12 +338,9 @@ void DecompProgram::decomp_program() {
}
auto& builder = *(paddle::dialect::ApiBuilder::Instance().GetBuilder());
builder.SetInsertionPointToBlockEnd(block);
if (VLOG_IS_ON(4)) {
std::ostringstream decomp_prog_stream;
program_->Print(decomp_prog_stream);
std::cout << "[Prim] New program after decomp :\n"
<< decomp_prog_stream.str();
}
std::ostringstream decomp_prog_stream;
program_->Print(decomp_prog_stream);
VLOG(4) << "[Prim] New program after decomp :\n" << decomp_prog_stream.str();
dst_vars_ = tar_vars;
return;
}
Expand Down
4 changes: 2 additions & 2 deletions test/legacy_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -995,8 +995,8 @@ else()
set_tests_properties(test_conv3d_transpose_part2_op PROPERTIES TIMEOUT 120)
set_tests_properties(test_conv3d_op PROPERTIES TIMEOUT 120)
set_tests_properties(test_norm_op PROPERTIES TIMEOUT 150)
set_tests_properties(test_batch_norm_op_prim_nchw PROPERTIES TIMEOUT 300)
set_tests_properties(test_batch_norm_op_prim_nhwc PROPERTIES TIMEOUT 300)
set_tests_properties(test_batch_norm_op_prim_nchw PROPERTIES TIMEOUT 250)
set_tests_properties(test_batch_norm_op_prim_nhwc PROPERTIES TIMEOUT 250)
set_tests_properties(test_layer_norm_op PROPERTIES TIMEOUT 250)
set_tests_properties(test_pool3d_op PROPERTIES TIMEOUT 150)
endif()
Expand Down

0 comments on commit 91548f0

Please sign in to comment.