25 lines
826 B
TableGen
25 lines
826 B
TableGen
#ifndef SPATIAL_LAYOUT_INTERFACE_TD
|
|
#define SPATIAL_LAYOUT_INTERFACE_TD
|
|
|
|
include "mlir/IR/OpBase.td"
|
|
|
|
def SpatialLayoutCapabilityInterface : OpInterface<"SpatialLayoutCapabilityInterface"> {
|
|
let description = [{
|
|
Contract implemented by logical Spatial planning operations that expose
|
|
their legal physical layout alternatives to the Spatial planner.
|
|
}];
|
|
|
|
let methods = [
|
|
InterfaceMethod<
|
|
"Return legal physical layout alternatives for this operation and its current operand layouts.",
|
|
"::llvm::SmallVector<::onnx_mlir::spatial::LayoutAlternative>",
|
|
"getLayoutAlternatives",
|
|
(ins "const ::onnx_mlir::spatial::SpatialTargetInfo &":$target,
|
|
"::llvm::ArrayRef<::onnx_mlir::spatial::PhysicalLayout>":$operandLayouts)>
|
|
];
|
|
|
|
let cppNamespace = "::onnx_mlir::spatial";
|
|
}
|
|
|
|
#endif
|