[Mlir-commits] [mlir] [mlir][bufferization] Empty tensor elimination for materialize_in_destination (PR #65468)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Sep 6 14:24:16 PDT 2023
================
@@ -0,0 +1,103 @@
+//===-- InferDestinationOpInterface.td - Infer destination -*- tablegen -*-===//
+//
+// 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 INFER_DESTINATION_OP_INTERFACE
+#define INFER_DESTINATION_OP_INTERFACE
+
+include "mlir/IR/OpBase.td"
+
+def InferDestinationOpInterface : OpInterface<"InferDestinationOpInterface"> {
+ let description = [{
+ This interface can be implemented by ops that read data from an "input"
+ tensor and store the result into an "output"/"init" tensor (i.e., the
+ "destination" tensor). It drives the empty tensor elimination pass.
----------------
srcarroll wrote:
would you say the tensor elimination pass would be the only use for this interface? Or do you think this will have other uses later?
https://github.com/llvm/llvm-project/pull/65468
More information about the Mlir-commits
mailing list