| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[mlir][tensor] Add runtime verification for cast/dim/extract/insert/extract_slice (#141332) Add RuntimeVerifiableOpInterface implementations for the following ops. These were mostly copied from the respective memref implementations. Only the part that deals with offsets and strides was removed. * tensor.cast: memref.cast * tensor.dim: memref.dim * tensor.extract: memref.load * tensor.insert: memref.store * tensor.extract_slice: memref.subview | 1 年前 | |
[mlir] Remove unused includes (NFC) (#148119) These are identified by misc-include-cleaner. I've filtered out those that break builds. Also, I'm staying away from llvm-config.h, config.h, and Compiler.h, which likely cause platform- or compiler-specific build failures. | 1 年前 | |
[mlir][Interfaces] Add interface methods to allow reifying single result/single dim of result. (#162924) Current implementation of reifyResultShapes forces all implementations to return all dimensions of all results. This can be wasteful when you only require dimensions of one result, or a single dimension of a result. Further this also creates issues with using patterns to resolve the tensor.dim and memref.dim operations since the extra operations created result in the pattern rewriter entering an infinite loop (eventually breaking out of the loop due to the iteration limit on the pattern rewriter). This is demonstrated by some of the test cases added here that hit this limit when using --resolve-shaped-type-result-dims and --resolve-ranked-shaped-type-result-dims. To resolve this issue the interface should allow for creating just the operations needed. This change is the first step in resolving this. The original implementation was done with the restriction in mind that it might not always be possible to compute dimension of a single result or one dimension of a single result in all cases. To account for such cases, two additional interface methods are added - reifyShapeOfResult (which allows reifying dimensions of just one result), has a default implementation that calls reifyResultShapes and returns the dimensions of a single result. - reifyDimOfResult (which allows reifying a single dimension of a single result) has a default implementation that calls reifyDimOfResult and returns the value for the dimension of the result (which in turn for the default case would call reifyDimOfResult). While this change sets up the interface, ideally most operations will implement the refiyDimOfResult when possible. For almost all operations in tree this is true. Subsequent commits will change those incrementally. Some of the tests added here that check that the default implementations for the above method work as expected, also end up hitting the pattern rewriter limit when using --resolve-ranked-shaped-type-result-dims/ --resolve-ranked-shaped-type-result-dims. For testing purposes, a flag is added to these passes that ignore the error returned by the pattern application (this flag is left on by default to maintain current state). Changes required downstream to integrate this change 1. In operation definitions in .td files, for those operations that implement the ReifyRankedShapedTypeOpInterface. def <op-name> : Op<..., [..., DeclareOpInterfaceMethods[ReifyRankedShapedTypeOpInterface]]> should be changed to def <op-name> : Op<..., [..., DeclareOpInterfaceMethods[ReifyRankedShapedTypeOpInterface, [ "reifyResultShapes"]]]> --------- Signed-off-by: MaheshRavishankar <mahesh.ravishankar@gmail.com> | 8 个月前 | |
[mlir] Adopt cast function objects. NFC. (#168228) These were added in https://github.com/llvm/llvm-project/pull/165803. | 8 个月前 | |
[mlir][NFC] update mlir/Dialect create APIs (23/n) (#149930) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
[mlir][ValueBounds] memref.dim and tensor.dim are always positive (#122804) Add the constraint that the length of a memref or tensor dimension is always non-negative (at least 0) even if we don't know which dimension we're querying the length of. | 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 1 年前 |