[Mlir-commits] [mlir] [mlir][bufferization] Support custom types (1/N) (PR #142986)
Andrei Golubev
llvmlistbot at llvm.org
Fri Jun 6 01:48:30 PDT 2025
================
@@ -0,0 +1,72 @@
+//===- BufferizationConversionInterface.h - Dialect Interface ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef MLIR_DIALECT_BUFFERIZATION_IR_BUFFERIZATIONCONVERSIONINTERFACE_H_
+#define MLIR_DIALECT_BUFFERIZATION_IR_BUFFERIZATIONCONVERSIONINTERFACE_H_
+
+#include "mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h"
+#include "mlir/Dialect/Bufferization/IR/BufferizationTypeInterfaces.h"
+#include "mlir/IR/DialectInterface.h"
+
+namespace mlir {
+namespace bufferization {
+
+/// This class defines a virtual interface for conversions between tensor-like
+/// and buffer-like types.
+struct ConversionDialectInterface
----------------
andrey-golubev wrote:
Do you mean why specifically dialect interface or why not the functionality a part of TensorLike/BufferLike API?
For the former, this is just the only way of doing this that I know of.
For the latter, see roughly [this place](https://discourse.llvm.org/t/rfc-continuing-with-bufferization-tensorlike-bufferlike-op-semantics-update-in-bufferization/85983/6?u=andrey-golubev)
https://github.com/llvm/llvm-project/pull/142986
More information about the Mlir-commits
mailing list