This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Handle unknown ops in dynamic_tensor_from_elements bufferization
ClosedPublic

Authored by silvas on Dec 14 2020, 6:33 PM.

Details

Summary

Due to how the conversion infra works, the "clone" call that this
pattern was using required all the cloned ops to be immediately
legalized as part of this dialect conversion invocation.

That was previously working due to a couple factors:

  • In the test case, there was scf.if, which we happen to mark as legal as part of marking the entire SCF dialect as legal for the scf.parallel we generate here.
  • Originally, this test case had std.extract_element in the body, which we happened to have a pattern for in this pass. After I migrated that to tensor.extract (which removed the tensor.extract bufferization from here), I hacked this up to use std.dim which we still have patterns for in this pass.

This patch updates the test case to use a truly opaque op test.source
that properly stresses this aspect of the pattern.

(this also removes a stray dependency on the tensor dialect that I
must have left behind as part of my hacking this pass up when migrating
to tensor.extract)

Diff Detail

Event Timeline

silvas created this revision.Dec 14 2020, 6:33 PM
silvas requested review of this revision.Dec 14 2020, 6:33 PM
herhut accepted this revision.Dec 15 2020, 1:21 AM

Thanks!

This revision is now accepted and ready to land.Dec 15 2020, 1:21 AM
This revision was landed with ongoing or failed builds.Dec 15 2020, 12:51 PM
This revision was automatically updated to reflect the committed changes.