[Mlir-commits] [mlir] [mlir][bufferization] Support custom types (1/N) (PR #142986)
Matthias Springer
llvmlistbot at llvm.org
Wed Jun 18 00:26:38 PDT 2025
================
@@ -57,7 +57,40 @@ struct BufferizationInlinerInterface : public DialectInlinerInterface {
template <typename Tensor>
struct BuiltinTensorExternalModel
: TensorLikeType::ExternalModel<BuiltinTensorExternalModel<Tensor>,
- Tensor> {};
+ Tensor> {
+ llvm::FailureOr<BufferLikeType> getBufferType(
+ mlir::Type tensor, const BufferizationOptions &options,
+ const BufferizationState &state,
+ llvm::function_ref<mlir::InFlightDiagnostic()> emitError) const {
+ auto tensorType = cast<TensorType>(tensor);
+ // Fall back to tensor -> memref conversion.
----------------
matthias-springer wrote:
I'm a bit confused about the comment. Why is this a "fall back"?
https://github.com/llvm/llvm-project/pull/142986
More information about the Mlir-commits
mailing list