torch-mlir/lib/Dialect/Torch
Stella Laurenzo 860be09a39
Elide dynamic broadcast checks when in strict symbolic shapes mode. (#2496)
When importing dynamic shaped programs from Dynamo, via torch.compile or
torch.export, we can assume that strict symbolic shape checks have been
done prior to generating torch IR. Among other shape checking, this
eliminates the case where an unknown dimension can be dynamically '1' in
a way that signals a broadcast.

Adds a `isAssumingStrictSymbolicShapes` utility which consults a
`torch.assume_strict_symbolic_shapes` attribute on an enclosing scope
and returns true if present.

In the linalg pipeline, many runtime checks are elided when this returns
true.
2023-09-29 16:45:48 -07:00
..
IR Integrate llvm-project and mlir-hlo. (#2454) 2023-09-12 15:09:57 -07:00
Transforms Elide dynamic broadcast checks when in strict symbolic shapes mode. (#2496) 2023-09-29 16:45:48 -07:00
Utils Elide dynamic broadcast checks when in strict symbolic shapes mode. (#2496) 2023-09-29 16:45:48 -07:00
CMakeLists.txt E2e support for aten.softmax.int and aten.embedding 2021-10-18 17:57:45 -04:00