Skip to content

Commit

Permalink
[CINN] remove_fake_test_of_args_parse (#59504)
Browse files Browse the repository at this point in the history
  • Loading branch information
BiynXu authored Nov 30, 2023
1 parent b53e5ea commit f038758
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
10 changes: 0 additions & 10 deletions paddle/cinn/hlir/framework/pir/op_lowering_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -502,16 +502,6 @@ std::vector<ir::LoweredFunc> OpLowererImpl::PostProcess(
}
}

// add fake symbolic args for test
if (FLAGS_cinn_bucket_compile) {
group_func_args.emplace_back(ir::_Var_::Make("fake_symbol1", Int(32)),
ir::Argument::IO::kOutput);
group_func_args.emplace_back(ir::_Var_::Make("fake_symbol2", Int(32)),
ir::Argument::IO::kOutput);
group->output_names.push_back("fake_symbol1");
group->output_names.push_back("fake_symbol2");
}

#ifdef CINN_WITH_CUDA
optim::OptimizeExprGPU(&(func_body));
#endif
Expand Down
8 changes: 1 addition & 7 deletions test/cpp/pir/cinn/compilation_task_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,7 @@ TEST(CompilationTask, CompileGroup) {
auto runtime_program = ir_compiler.Build(groups);

// Step 3: Execute Runtime Instruction and check Scope.
std::string arg_name = "var_0";
cinn_buffer_t* buffer = scope->GetTensor(arg_name)->buffer();
std::map<std::string, cinn_pod_value_t> name2podargs = {
{arg_name, cinn_pod_value_t(buffer)},
{"fake_symbol1", cinn_pod_value_t(int32_t(4096))},
{"fake_symbol2", cinn_pod_value_t(int32_t(128))}};
ASSERT_NO_THROW(runtime_program->Execute(&name2podargs));
ASSERT_NO_THROW(runtime_program->Execute());
for (auto& var_name : scope->var_names()) {
std::string name = {var_name.begin(), var_name.end()};
int64_t numel = scope->GetTensor(name)->shape().numel();
Expand Down

0 comments on commit f038758

Please sign in to comment.