-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mlir][bufferization] Generalize tensor slice rules to subset ops #65619
[mlir][bufferization] Generalize tensor slice rules to subset ops #65619
Conversation
41ff6b3
to
caf328e
Compare
caf328e
to
593f62a
Compare
mlir/include/mlir/Dialect/Bufferization/IR/SubsetOpInterface.td
Outdated
Show resolved
Hide resolved
mlir/include/mlir/Dialect/Bufferization/IR/SubsetOpInterface.td
Outdated
Show resolved
Hide resolved
mlir/include/mlir/Dialect/Bufferization/IR/SubsetOpInterface.td
Outdated
Show resolved
Hide resolved
mlir/lib/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.cpp
Outdated
Show resolved
Hide resolved
mlir/lib/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.cpp
Outdated
Show resolved
Hide resolved
mlir/include/mlir/Dialect/Bufferization/IR/SubsetOpInterface.td
Outdated
Show resolved
Hide resolved
d14933a
to
952f9ca
Compare
namespace mlir { | ||
namespace tensor { | ||
namespace { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why nest an anonymous namespace in mlir/tensor when there is already a using namespace
for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make sure that the function is not visible outside of this file. It's the same as making the functions static
.
952f9ca
to
4e6f145
Compare
This commit generalizes the special tensor.extract_slice/tensor.insert_slice bufferization rules to tensor subset ops. Ops that insert a tensor into a tensor at a specified subset (e.g., tensor.insert_slice, tensor.scatter) can implement the `SubsetOpInterface`. Apart from adding a new op interface (extending the API), this change is NFC. The only ops that currently implement the new interface are tensor.insert_slice and tensor.parallel_insert_slice, and those ops were are supported by One-Shot Bufferize.
4e6f145
to
5ca4a37
Compare
…vm#65619) This commit generalizes the special tensor.extract_slice/tensor.insert_slice bufferization rules to tensor subset ops. Ops that insert a tensor into a tensor at a specified subset (e.g., tensor.insert_slice, tensor.scatter) can implement the `SubsetInsertionOpInterface`. Apart from adding a new op interface (extending the API), this change is NFC. The only ops that currently implement the new interface are tensor.insert_slice and tensor.parallel_insert_slice, and those ops were are supported by One-Shot Bufferize.
This commit generalizes the special tensor.extract_slice/tensor.insert_slice bufferization rules to tensor subset ops.
Ops that insert a tensor into a tensor at a specified subset (e.g., tensor.insert_slice, tensor.scatter) can implement the
SubsetInsertionOpInterface
.Apart from adding a new op interface (extending the API), this change is NFC. The only ops that currently implement the new interface are tensor.insert_slice and tensor.parallel_insert_slice, and those ops were are supported by One-Shot Bufferize.