Commit Graph

8 Commits (63fb1e5aad7b0c346527d1814234ecf5d98a505e)

Author SHA1 Message Date
Vigilans 63fb1e5aad Bump LLVM at 8361c5da30588d3d4a48eae648f53be1feb5cfad 2022-03-18 13:16:14 -04:00
Yi Zhang 8a4388ea7b Fix convert_to_loops.mlir format 2022-03-16 11:42:37 -04:00
Yi Zhang 3510b2ba9d Fix scatter op bufferization to alway copy original tensor 2022-03-09 18:19:44 -05:00
Yi Zhang af7f42fd93 Add a README.md to torch-mlir-dialects 2022-03-07 16:08:30 -05:00
Yi Zhang 486f95e84f Add bufferization pass for TMTensor ops
The pass is mostly borrowed from the BufferizeAnyLinalgOp pass in mlir
upstream with some minor changes. At a high level, it's a naive partial
bufferization pass which allocate new buffers for all the output
tensors. The initial value of an output buffer is copied from the
original buffer if there are uses of the original value.

One difference from linalg bufferization pass is the way to tell if
the loop body uses the init value of output operand. For TMTensor ops,
it differs from op to op because the payload region doesn't represent
the entire loop body.
2022-03-03 11:39:14 -05:00
Vivek Khandelwal 5dbace239b Extend tm_tensor.scatter op semantic to carry unique_indices attribute
There are cases where the op may update the same indices multiple
times. In this context, we can not parallelize updates. Instead,
we have to execute them sequentially. Adding a boolean attribute
to control the behavior.

Also adding test cases for invalid IR.
2022-02-22 22:02:10 +05:30
Nirvedh f8cb32faf0 LLVM bump
Major changes: opTrait changed to Trait, selectOp moved to arith dialect
assertOp moved to cf dialect
2022-02-16 15:28:13 -05:00
Yi Zhang 869daf3c22 Add TMTensor dialect to torch-mlir
This is intended to explore support for non-structured ops that can't
be modeled by Linalg dialect. `tm_tensor.scan` and `tm_tensor.scatter`
are added as the first such ops. The dialect should aim to be
upstreamed in the future.
2022-02-15 16:45:38 -05:00