Skip to content

Commit

Permalink
[Lang] Migrate irpass::scalarize() after irpass::offload()
Browse files Browse the repository at this point in the history
  • Loading branch information
jim19930609 committed May 4, 2023
1 parent aeb0f39 commit c9e5993
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions taichi/transforms/compile_to_offloads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,6 @@ void compile_to_offloads(IRNode *ir,
irpass::analysis::verify(ir);
}

if (config.real_matrix_scalarize) {
irpass::scalarize(ir);

// Remove redundant MatrixInitStmt inserted during scalarization
irpass::die(ir);
print("Scalarized");
}

irpass::flag_access(ir);
print("Access flagged I");
irpass::analysis::verify(ir);
Expand All @@ -143,6 +135,14 @@ void compile_to_offloads(IRNode *ir,
print("Offloaded");
irpass::analysis::verify(ir);

if (config.real_matrix_scalarize) {
irpass::scalarize(ir);

// Remove redundant MatrixInitStmt inserted during scalarization
irpass::die(ir);
print("Scalarized");
}

// TODO: This pass may be redundant as cfg_optimization() is already called
// in full_simplify().
if (config.opt_level > 0 && config.cfg_optimization) {
Expand Down

0 comments on commit c9e5993

Please sign in to comment.