Fix 'isLoopParallel' utility so that 'iter_args' is taken into account
and loops with loop-carried dependences are not classified as parallel.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Hi Diego,
Does this patch handle iter_args in an inner loop? For example:
%cst = constant 0.000000e+00 : f32 affine.for %arg1 = 0 to 10 { %0 = affine.for %arg2 = 0 to 10 iter_args(%arg3 = %cst) -> (f32) { %1 = affine.load %arg0[%arg1, %arg2] : memref<10x10xf32> %2 = addf %arg3, %1 : f32 affine.yield %2 : f32 } }
Thanks,
Tung.
mlir/test/Dialect/Affine/parallelize.mlir | ||
---|---|---|
166 | How about using consecutive numbering for arg, and starting from %0 instead of %5? |
Comment Actions
Does this patch handle iter_args in an inner loop? For example:
Good point! I'll add a test for that but, yes, AffineParallelize pass is processing each loop independently so a parallel loop will be generated for the outer loop but not for the inner loop.
Thanks!
mlir/test/Dialect/Affine/parallelize.mlir | ||
---|---|---|
166 | Thanks! I'll use more relevant names :) |
How about using consecutive numbering for arg, and starting from %0 instead of %5?