Skip to content

Commit 837d1ce

Browse files
committed
[MLIR] Add native Bytecode support for properties
This is adding a new interface (`BytecodeOpInterface`) to allow operations to opt-in skipping conversion to attribute and serializing properties to native bytecode. The scheme relies on a new section where properties are stored in sequence { size, serialize_properties }, ... The operations are storing the index of a properties, a table of offset is built when loading the properties section the first time. Back-deployment to version prior to 4 are relying on getAttrDictionnary() which we intend to deprecate and remove: that is putting a de-factor end-of-support horizon for supporting deployments to version older than 4. Differential Revision: https://reviews.llvm.org/D151065
1 parent a6d09d4 commit 837d1ce

File tree

62 files changed

+766
-46
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+766
-46
lines changed

mlir/examples/standalone/include/Standalone/StandaloneDialect.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef STANDALONE_STANDALONEDIALECT_H
1010
#define STANDALONE_STANDALONEDIALECT_H
1111

12+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1213
#include "mlir/IR/Dialect.h"
1314

1415
#include "Standalone/StandaloneOpsDialect.h.inc"

mlir/include/mlir/Bytecode/BytecodeImplementation.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ class DialectBytecodeReader {
7474

7575
/// Read a reference to the given attribute.
7676
virtual LogicalResult readAttribute(Attribute &result) = 0;
77+
/// Read an optional reference to the given attribute. Returns success even if
78+
/// the Attribute isn't present.
79+
virtual LogicalResult readOptionalAttribute(Attribute &attr) = 0;
80+
7781
template <typename T>
7882
LogicalResult readAttributes(SmallVectorImpl<T> &attrs) {
7983
return readList(attrs, [this](T &attr) { return readAttribute(attr); });
@@ -88,6 +92,18 @@ class DialectBytecodeReader {
8892
return emitError() << "expected " << llvm::getTypeName<T>()
8993
<< ", but got: " << baseResult;
9094
}
95+
template <typename T>
96+
LogicalResult readOptionalAttribute(T &result) {
97+
Attribute baseResult;
98+
if (failed(readOptionalAttribute(baseResult)))
99+
return failure();
100+
if (!baseResult)
101+
return success();
102+
if ((result = dyn_cast<T>(baseResult)))
103+
return success();
104+
return emitError() << "expected " << llvm::getTypeName<T>()
105+
<< ", but got: " << baseResult;
106+
}
91107

92108
/// Read a reference to the given type.
93109
virtual LogicalResult readType(Type &result) = 0;
@@ -179,6 +195,7 @@ class DialectBytecodeWriter {
179195

180196
/// Write a reference to the given attribute.
181197
virtual void writeAttribute(Attribute attr) = 0;
198+
virtual void writeOptionalAttribute(Attribute attr) = 0;
182199
template <typename T>
183200
void writeAttributes(ArrayRef<T> attrs) {
184201
writeList(attrs, [this](T attr) { writeAttribute(attr); });
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//===- CallInterfaces.h - Call Interfaces for MLIR --------------*- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// This file contains the definitions of the BytecodeOpInterface defined in
10+
// `BytecodeOpInterface.td`.
11+
//
12+
//===----------------------------------------------------------------------===//
13+
14+
#ifndef MLIR_BYTECODE_BYTECODEOPINTERFACE_H
15+
#define MLIR_BYTECODE_BYTECODEOPINTERFACE_H
16+
17+
#include "mlir/Bytecode/BytecodeImplementation.h"
18+
#include "mlir/Bytecode/BytecodeOpInterface.h"
19+
#include "mlir/Bytecode/BytecodeReader.h"
20+
#include "mlir/Bytecode/BytecodeWriter.h"
21+
#include "mlir/IR/OpDefinition.h"
22+
#include "mlir/Support/LogicalResult.h"
23+
24+
/// Include the generated interface declarations.
25+
#include "mlir/Bytecode/BytecodeOpInterface.h.inc"
26+
27+
#endif // MLIR_BYTECODE_BYTECODEOPINTERFACE_H
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
//===- BytecodeOpInterface.td - Bytecode OpInterface -------*- tablegen -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// This file contains an interface for operation interactions with the bytecode
10+
// serialization/deserialization, in particular for properties.
11+
//
12+
//===----------------------------------------------------------------------===//
13+
14+
#ifndef MLIR_BYTECODE_BYTECODEOPINTERFACES
15+
#define MLIR_BYTECODE_BYTECODEOPINTERFACES
16+
17+
include "mlir/IR/OpBase.td"
18+
19+
// `BytecodeOpInterface`
20+
def BytecodeOpInterface : OpInterface<"BytecodeOpInterface"> {
21+
let description = [{
22+
This interface allows operation to control the serialization of their
23+
properties.
24+
}];
25+
let cppNamespace = "::mlir";
26+
27+
let methods = [
28+
StaticInterfaceMethod<[{
29+
Read the properties for this operation from the bytecode and populate the state.
30+
}],
31+
"LogicalResult", "readProperties", (ins
32+
"::mlir::DialectBytecodeReader &":$reader,
33+
"::mlir::OperationState &":$state)
34+
>,
35+
InterfaceMethod<[{
36+
Write the properties for this operation to the bytecode.
37+
}],
38+
"void", "writeProperties", (ins "::mlir::DialectBytecodeWriter &":$writer)
39+
>,
40+
];
41+
}
42+
43+
#endif // MLIR_BYTECODE_BYTECODEOPINTERFACES

mlir/include/mlir/Bytecode/BytecodeWriter.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ class BytecodeWriterConfig {
4646
/// is returned by bytecode writer entry point.
4747
void setDesiredBytecodeVersion(int64_t bytecodeVersion);
4848

49+
/// Get the set desired bytecode version to emit.
50+
int64_t getDesiredBytecodeVersion() const;
51+
4952
//===--------------------------------------------------------------------===//
5053
// Resources
5154
//===--------------------------------------------------------------------===//
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
add_mlir_interface(BytecodeOpInterface)

mlir/include/mlir/Bytecode/Encoding.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,11 @@ enum ID : uint8_t {
6969
/// This section contains the versions of each dialect.
7070
kDialectVersions = 7,
7171

72+
/// This section contains the properties for the operations.
73+
kProperties = 8,
74+
7275
/// The total number of section types.
73-
kNumSections = 8,
76+
kNumSections = 9,
7477
};
7578
} // namespace Section
7679

@@ -90,6 +93,7 @@ enum : uint8_t {
9093
kHasSuccessors = 0b00001000,
9194
kHasInlineRegions = 0b00010000,
9295
kHasUseListOrders = 0b00100000,
96+
kHasProperties = 0b01000000,
9397
// clang-format on
9498
};
9599
} // namespace OpEncodingMask

mlir/include/mlir/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
add_subdirectory(Bytecode)
12
add_subdirectory(Conversion)
23
add_subdirectory(Dialect)
34
add_subdirectory(IR)

mlir/include/mlir/Dialect/AMDGPU/IR/AMDGPUDialect.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#ifndef MLIR_DIALECT_AMDGPU_IR_AMDGPUDIALECT_H_
1515
#define MLIR_DIALECT_AMDGPU_IR_AMDGPUDIALECT_H_
1616

17+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1718
#include "mlir/IR/BuiltinTypes.h"
1819
#include "mlir/IR/Dialect.h"
1920
#include "mlir/IR/OpDefinition.h"

mlir/include/mlir/Dialect/AMX/AMXDialect.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#ifndef MLIR_DIALECT_AMX_AMXDIALECT_H_
1414
#define MLIR_DIALECT_AMX_AMXDIALECT_H_
1515

16+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1617
#include "mlir/IR/BuiltinTypes.h"
1718
#include "mlir/IR/Dialect.h"
1819
#include "mlir/IR/OpDefinition.h"

mlir/include/mlir/Dialect/Affine/TransformOps/AffineTransformOps.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef MLIR_DIALECT_AFFINE_TRANSFORMOPS_AFFINETRANSFORMOPS_H
1010
#define MLIR_DIALECT_AFFINE_TRANSFORMOPS_AFFINETRANSFORMOPS_H
1111

12+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1213
#include "mlir/Dialect/Transform/IR/TransformInterfaces.h"
1314
#include "mlir/Dialect/Transform/IR/TransformTypes.h"
1415
#include "mlir/IR/OpImplementation.h"

mlir/include/mlir/Dialect/Arith/IR/Arith.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef MLIR_DIALECT_ARITH_IR_ARITH_H_
1010
#define MLIR_DIALECT_ARITH_IR_ARITH_H_
1111

12+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1213
#include "mlir/IR/Dialect.h"
1314
#include "mlir/IR/OpDefinition.h"
1415
#include "mlir/IR/OpImplementation.h"

mlir/include/mlir/Dialect/ArmNeon/ArmNeonDialect.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#ifndef MLIR_DIALECT_ARMNEON_ARMNEONDIALECT_H_
1414
#define MLIR_DIALECT_ARMNEON_ARMNEONDIALECT_H_
1515

16+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1617
#include "mlir/IR/BuiltinTypes.h"
1718
#include "mlir/IR/Dialect.h"
1819
#include "mlir/IR/OpDefinition.h"

mlir/include/mlir/Dialect/ArmSVE/ArmSVEDialect.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#ifndef MLIR_DIALECT_ARMSVE_ARMSVEDIALECT_H
1414
#define MLIR_DIALECT_ARMSVE_ARMSVEDIALECT_H
1515

16+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1617
#include "mlir/IR/BuiltinTypes.h"
1718
#include "mlir/IR/Dialect.h"
1819
#include "mlir/IR/OpDefinition.h"

mlir/include/mlir/Dialect/Async/IR/Async.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#ifndef MLIR_DIALECT_ASYNC_IR_ASYNC_H
1515
#define MLIR_DIALECT_ASYNC_IR_ASYNC_H
1616

17+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1718
#include "mlir/Dialect/Async/IR/AsyncTypes.h"
1819
#include "mlir/IR/Builders.h"
1920
#include "mlir/IR/BuiltinTypes.h"

mlir/include/mlir/Dialect/Bufferization/IR/Bufferization.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef MLIR_DIALECT_BUFFERIZATION_IR_BUFFERIZATION_H_
1010
#define MLIR_DIALECT_BUFFERIZATION_IR_BUFFERIZATION_H_
1111

12+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1213
#include "mlir/Dialect/Bufferization/IR/AllocationOpInterface.h"
1314
#include "mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h"
1415
#include "mlir/Interfaces/CopyOpInterface.h"

mlir/include/mlir/Dialect/Bufferization/TransformOps/BufferizationTransformOps.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef MLIR_DIALECT_BUFFERIZATION_TRANSFORMOPS_BUFFERIZATIONTRANSFORMOPS_H
1010
#define MLIR_DIALECT_BUFFERIZATION_TRANSFORMOPS_BUFFERIZATIONTRANSFORMOPS_H
1111

12+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1213
#include "mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h"
1314
#include "mlir/Dialect/Transform/IR/TransformInterfaces.h"
1415
#include "mlir/Dialect/Transform/IR/TransformTypes.h"

mlir/include/mlir/Dialect/Complex/IR/Complex.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef MLIR_DIALECT_COMPLEX_IR_COMPLEX_H_
1010
#define MLIR_DIALECT_COMPLEX_IR_COMPLEX_H_
1111

12+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1213
#include "mlir/IR/BuiltinTypes.h"
1314
#include "mlir/IR/OpImplementation.h"
1415
#include "mlir/Interfaces/InferTypeOpInterface.h"

mlir/include/mlir/Dialect/ControlFlow/IR/ControlFlow.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#ifndef MLIR_DIALECT_CONTROLFLOW_IR_CONTROLFLOW_H
1414
#define MLIR_DIALECT_CONTROLFLOW_IR_CONTROLFLOW_H
1515

16+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1617
#include "mlir/IR/Dialect.h"
1718

1819
#include "mlir/Dialect/ControlFlow/IR/ControlFlowOpsDialect.h.inc"

mlir/include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#ifndef MLIR_DIALECT_CONTROLFLOW_IR_CONTROLFLOWOPS_H
1414
#define MLIR_DIALECT_CONTROLFLOW_IR_CONTROLFLOWOPS_H
1515

16+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1617
#include "mlir/Dialect/ControlFlow/IR/ControlFlow.h"
1718
#include "mlir/IR/Builders.h"
1819
#include "mlir/IR/BuiltinTypes.h"

mlir/include/mlir/Dialect/EmitC/IR/EmitC.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#ifndef MLIR_DIALECT_EMITC_IR_EMITC_H
1414
#define MLIR_DIALECT_EMITC_IR_EMITC_H
1515

16+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1617
#include "mlir/IR/BuiltinOps.h"
1718
#include "mlir/IR/BuiltinTypes.h"
1819
#include "mlir/IR/Dialect.h"

mlir/include/mlir/Dialect/Func/IR/FuncOps.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef MLIR_DIALECT_FUNC_IR_OPS_H
1010
#define MLIR_DIALECT_FUNC_IR_OPS_H
1111

12+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1213
#include "mlir/IR/Builders.h"
1314
#include "mlir/IR/BuiltinTypes.h"
1415
#include "mlir/IR/Dialect.h"

mlir/include/mlir/Dialect/GPU/IR/GPUDialect.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#ifndef MLIR_DIALECT_GPU_IR_GPUDIALECT_H
1515
#define MLIR_DIALECT_GPU_IR_GPUDIALECT_H
1616

17+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1718
#include "mlir/Dialect/DLTI/Traits.h"
1819
#include "mlir/IR/Builders.h"
1920
#include "mlir/IR/BuiltinTypes.h"

mlir/include/mlir/Dialect/IRDL/IR/IRDL.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
#ifndef MLIR_DIALECT_IRDL_IR_IRDL_H_
1414
#define MLIR_DIALECT_IRDL_IR_IRDL_H_
1515

16+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1617
#include "mlir/Dialect/IRDL/IR/IRDLInterfaces.h"
1718
#include "mlir/Dialect/IRDL/IR/IRDLTraits.h"
1819
#include "mlir/IR/SymbolTable.h"
1920
#include "mlir/Interfaces/InferTypeOpInterface.h"
2021
#include "mlir/Interfaces/SideEffectInterfaces.h"
22+
2123
#include <memory>
2224

2325
// Forward declaration.

mlir/include/mlir/Dialect/Index/IR/IndexOps.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef MLIR_DIALECT_INDEX_IR_INDEXOPS_H
1010
#define MLIR_DIALECT_INDEX_IR_INDEXOPS_H
1111

12+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1213
#include "mlir/Dialect/Index/IR/IndexAttrs.h"
1314
#include "mlir/IR/BuiltinTypes.h"
1415
#include "mlir/IR/OpDefinition.h"

mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#ifndef MLIR_DIALECT_LLVMIR_LLVMDIALECT_H_
1515
#define MLIR_DIALECT_LLVMIR_LLVMDIALECT_H_
1616

17+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1718
#include "mlir/Dialect/LLVMIR/LLVMAttrs.h"
1819
#include "mlir/Dialect/LLVMIR/LLVMInterfaces.h"
1920
#include "mlir/Dialect/LLVMIR/LLVMTypes.h"

mlir/include/mlir/Dialect/LLVMIR/NVVMDialect.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#ifndef MLIR_DIALECT_LLVMIR_NVVMDIALECT_H_
1515
#define MLIR_DIALECT_LLVMIR_NVVMDIALECT_H_
1616

17+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1718
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
1819
#include "mlir/IR/Dialect.h"
1920
#include "mlir/IR/OpDefinition.h"

mlir/include/mlir/Dialect/LLVMIR/ROCDLDialect.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#ifndef MLIR_DIALECT_LLVMIR_ROCDLDIALECT_H_
2323
#define MLIR_DIALECT_LLVMIR_ROCDLDIALECT_H_
2424

25+
#include "mlir/Bytecode/BytecodeOpInterface.h"
2526
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
2627
#include "mlir/IR/Dialect.h"
2728
#include "mlir/IR/OpDefinition.h"

mlir/include/mlir/Dialect/Linalg/IR/Linalg.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef MLIR_DIALECT_LINALG_IR_LINALG_H
1010
#define MLIR_DIALECT_LINALG_IR_LINALG_H
1111

12+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1213
#include "mlir/Dialect/Utils/ReshapeOpsUtils.h"
1314
#include "mlir/Dialect/Utils/StructuredOpsUtils.h"
1415
#include "mlir/IR/AffineExpr.h"

mlir/include/mlir/Dialect/MLProgram/IR/MLProgram.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#ifndef MLIR_DIALECT_MLPROGRAM_IR_MLPROGRAM_H_
99
#define MLIR_DIALECT_MLPROGRAM_IR_MLPROGRAM_H_
1010

11+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1112
#include "mlir/Dialect/MLProgram/IR/MLProgramAttributes.h"
1213
#include "mlir/Dialect/MLProgram/IR/MLProgramTypes.h"
1314
#include "mlir/IR/Dialect.h"

mlir/include/mlir/Dialect/Math/IR/Math.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef MLIR_DIALECT_MATH_IR_MATH_H_
1010
#define MLIR_DIALECT_MATH_IR_MATH_H_
1111

12+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1213
#include "mlir/Dialect/Arith/IR/Arith.h"
1314
#include "mlir/IR/BuiltinTypes.h"
1415
#include "mlir/IR/Dialect.h"

mlir/include/mlir/Dialect/MemRef/IR/MemRef.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef MLIR_DIALECT_MEMREF_IR_MEMREF_H_
1010
#define MLIR_DIALECT_MEMREF_IR_MEMREF_H_
1111

12+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1213
#include "mlir/Dialect/Arith/IR/Arith.h"
1314
#include "mlir/Dialect/Utils/ReshapeOpsUtils.h"
1415
#include "mlir/IR/Dialect.h"
@@ -21,6 +22,7 @@
2122
#include "mlir/Interfaces/ShapedOpInterfaces.h"
2223
#include "mlir/Interfaces/SideEffectInterfaces.h"
2324
#include "mlir/Interfaces/ViewLikeInterface.h"
25+
2426
#include <optional>
2527

2628
namespace mlir {

mlir/include/mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef MLIR_DIALECT_MEMREF_TRANSFORMOPS_MEMREFTRANSFORMOPS_H
1010
#define MLIR_DIALECT_MEMREF_TRANSFORMOPS_MEMREFTRANSFORMOPS_H
1111

12+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1213
#include "mlir/Dialect/Transform/IR/TransformInterfaces.h"
1314
#include "mlir/IR/OpImplementation.h"
1415

mlir/include/mlir/Dialect/NVGPU/IR/NVGPUDialect.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#ifndef MLIR_DIALECT_NVGPU_NVGPUDIALECT_H_
1414
#define MLIR_DIALECT_NVGPU_NVGPUDIALECT_H_
1515

16+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1617
#include "mlir/IR/BuiltinTypes.h"
1718
#include "mlir/IR/Dialect.h"
1819
#include "mlir/IR/OpDefinition.h"

mlir/include/mlir/Dialect/OpenACC/OpenACC.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "mlir/IR/OpDefinition.h"
1919
#include "mlir/IR/SymbolTable.h"
2020

21+
#include "mlir/Bytecode/BytecodeOpInterface.h"
2122
#include "mlir/Dialect/OpenACC/OpenACCOpsDialect.h.inc"
2223
#include "mlir/Dialect/OpenACC/OpenACCOpsEnums.h.inc"
2324
#include "mlir/Dialect/OpenACC/OpenACCTypeInterfaces.h.inc"

mlir/include/mlir/Dialect/PDL/IR/PDLOps.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#ifndef MLIR_DIALECT_PDL_IR_PDLOPS_H_
1414
#define MLIR_DIALECT_PDL_IR_PDLOPS_H_
1515

16+
#include "mlir/Bytecode/BytecodeOpInterface.h"
1617
#include "mlir/Dialect/PDL/IR/PDLTypes.h"
1718
#include "mlir/IR/Builders.h"
1819
#include "mlir/IR/OpImplementation.h"

0 commit comments

Comments
 (0)