Skip to content

Commit

Permalink
Add AttachMetalLayout to the metal backend pipeline (#1968)
Browse files Browse the repository at this point in the history
Set pipeline pass option default memory space to L1
  • Loading branch information
nsmithtt authored Jan 28, 2025
1 parent d739ed9 commit b7596a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/ttmlir/Dialect/TTIR/Transforms/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def TTIRAttachMetalLayout: Pass<"ttir-attach-metal-layout", "::mlir::ModuleOp">
let options = [
Option<"initMemorySpace", "init-memory-space",
"::mlir::tt::MemorySpace",
/*default=*/"::mlir::tt::MemorySpace::System",
/*default=*/"::mlir::tt::MemorySpace::DeviceL1",
"Set the initial memory space for tensors to start in">
];
}
Expand Down
1 change: 1 addition & 0 deletions lib/Dialect/TTMetal/Pipelines/TTMetalPipelines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ void createTTIRToTTMetalBackendPipeline(
options.meshShape.begin(), options.meshShape.end());
pm.addPass(mlir::tt::ttir::createTTIRImplicitDevice(implicitDeviceOptions));
pm.addPass(mlir::tt::ttir::createTTIRConstantAsFill());
pm.addPass(mlir::tt::ttir::createTTIRAttachMetalLayout());
pm.addPass(mlir::tt::ttir::createTTIRGenericRegion());
mlir::tt::ttir::TTIRLayoutOptions layoutOptions;
layoutOptions.initMemorySpace = mlir::tt::MemorySpace::DeviceL1;
Expand Down

0 comments on commit b7596a4

Please sign in to comment.