[all-commits] [llvm/llvm-project] 1abd8d: [mlir][Interfaces] Add `SubsetOpInterface` and `Su...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Tue Oct 31 18:26:45 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1abd8d1a8d962a14ca96e19c0f6da4f9ac394d0a
https://github.com/llvm/llvm-project/commit/1abd8d1a8d962a14ca96e19c0f6da4f9ac394d0a
Author: Matthias Springer <me at m-sp.org>
Date: 2023-11-01 (Wed, 01 Nov 2023)
Changed paths:
M mlir/include/mlir/Dialect/Bufferization/IR/Bufferization.h
M mlir/include/mlir/Dialect/Bufferization/IR/BufferizationOps.td
M mlir/include/mlir/Dialect/Linalg/Transforms/SubsetInsertionOpInterfaceImpl.h
M mlir/include/mlir/Dialect/Tensor/Transforms/SubsetInsertionOpInterfaceImpl.h
M mlir/include/mlir/InitAllDialects.h
M mlir/include/mlir/Interfaces/CMakeLists.txt
R mlir/include/mlir/Interfaces/SubsetInsertionOpInterface.h
R mlir/include/mlir/Interfaces/SubsetInsertionOpInterface.td
A mlir/include/mlir/Interfaces/SubsetOpInterface.h
A mlir/include/mlir/Interfaces/SubsetOpInterface.td
M mlir/include/mlir/Interfaces/ValueBoundsOpInterface.h
M mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
M mlir/lib/Dialect/Bufferization/IR/CMakeLists.txt
M mlir/lib/Dialect/Bufferization/Transforms/CMakeLists.txt
M mlir/lib/Dialect/Bufferization/Transforms/EmptyTensorElimination.cpp
M mlir/lib/Dialect/Bufferization/Transforms/OneShotAnalysis.cpp
M mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
M mlir/lib/Dialect/Linalg/Transforms/SubsetInsertionOpInterfaceImpl.cpp
M mlir/lib/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.cpp
M mlir/lib/Dialect/Tensor/Transforms/CMakeLists.txt
M mlir/lib/Dialect/Tensor/Transforms/SubsetInsertionOpInterfaceImpl.cpp
M mlir/lib/Interfaces/CMakeLists.txt
R mlir/lib/Interfaces/SubsetInsertionOpInterface.cpp
A mlir/lib/Interfaces/SubsetOpInterface.cpp
M mlir/lib/Interfaces/ValueBoundsOpInterface.cpp
M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
M utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel
Log Message:
-----------
[mlir][Interfaces] Add `SubsetOpInterface` and `SubsetExtractionOpInterface` (#70617)
There is currently an op interface for subset insertion ops
(`SubsetInsertionOpInterface`), but not for subset extraction ops. This
commit adds `SubsetExtractionOpInterface` to `mlir/Interfaces`, as well
as a common dependent op interface: `SubsetOpInterface`.
- `SubsetOpInterface` is for ops that operate on tensor subsets. It
provides interface methods to check if two subset ops operate on
equivalent or disjoint subsets. Ops that implement this interface must
implement either `SubsetExtractionOpInterface` or
`SubsetInsertionOpInterface`.
- `SubsetExtractionOpInterface` is for ops that extract from a tensor at
a subset. E.g., `tensor.extract_slice`, `tensor.gather`,
`vector.transfer_read`. Current implemented only on
`tensor.extract_slice`.
- `SubsetInsertionOpInterface` is for ops that insert into a destination
tensor at a subset. E.g., `tensor.insert_slice`,
`tensor.parallel_insert_slice`, `tensor.scatter`,
`vector.transfer_write`. Currently only implemented on
`tensor.insert_slice`, `tensor.parallel_insert_slice`.
Other changes:
- Rename `SubsetInsertionOpInterface.td` to `SubsetOpInterface.td`.
- Add helper functions to `ValueBoundsOpInterface.cpp` for checking
whether two slices are disjoint.
The new interfaces will be utilized by a new "loop-invariant subset
hoisting"
transformation. (This new transform is roughly
what `Linalg/Transforms/SubsetHoisting.cpp` is doing, but in a generic
and interface-driven way.)
More information about the All-commits
mailing list