Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unique group struct #58940

Merged
merged 4 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,7 @@ std::unique_ptr<pir::Program> CINNGroupLoweringPass(::pir::Program* program) {
auto ir_compiler = std::make_shared<cinn::hlir::framework::PirCompiler>(
*program, target, scope);
hlir::framework::PirCompilerManager::Instance().insert(ir_compiler);
auto group1 =
std::make_shared<cinn::hlir::framework::pir::Group>(group->ops);
auto fn_ptr_res = ir_compiler->BuildCUDAJITInfo({group1});
auto fn_ptr_res = ir_compiler->BuildCUDAJITInfo({group});
std::unordered_map<std::string, ::pir::Attribute> op_attrs{
{cinn::dialect::JitKernelOp::kAttrName,
cinn::dialect::CUDAJITInfoAttribute::get(ctx, fn_ptr_res[0])},
Expand All @@ -174,9 +172,9 @@ std::unique_ptr<pir::Program> CINNGroupLoweringPass(::pir::Program* program) {
std::unordered_map<size_t, size_t> codegen2orig;

std::vector<pir::Type> vec_types;
for (size_t i = 0; i < group1->output_values.size(); ++i) {
vec_types.push_back(group1->output_values[i].type());
codegen2orig[value2id.at(group1->output_values[i])] = i;
for (size_t i = 0; i < group->output_values.size(); ++i) {
vec_types.push_back(group->output_values[i].type());
codegen2orig[value2id.at(group->output_values[i])] = i;
}

::pir::Operation* cinn_op =
Expand Down
2 changes: 1 addition & 1 deletion paddle/cinn/hlir/framework/pir/op_lowering_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ ir::Expr OpLowererImpl::DoGroupSchedule(
LoopAssignReduce(
ir_sch, op, greducer, this->target_, tensor_map, tmp_tensor_info);
}
} else {
} else if (master) {
VLOG(3) << "Before assign node " << op_name
<< " into horizontal link reducer, ir is:\n"
<< ir_sch.GetModule().GetExprs().at(0);
Expand Down