From 7dd07e315a3f822b205a472b217a244e282bd579 Mon Sep 17 00:00:00 2001 From: Bezulj Marko Date: Fri, 1 Nov 2024 15:32:59 +0000 Subject: [PATCH] replacing commented out block, with the actual call to TTNNOpBackend::isOpLegal --- lib/Dialect/TTNN/Analysis/LegalGridAnalysis.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/Dialect/TTNN/Analysis/LegalGridAnalysis.cpp b/lib/Dialect/TTNN/Analysis/LegalGridAnalysis.cpp index 08f0a0212b..d903ba448f 100644 --- a/lib/Dialect/TTNN/Analysis/LegalGridAnalysis.cpp +++ b/lib/Dialect/TTNN/Analysis/LegalGridAnalysis.cpp @@ -12,16 +12,11 @@ namespace mlir::tt::ttnn { bool mock_is_output_tensor_legal_for_op(Operation *op, tt::LayoutAttr layout) { // Placeholder, needs to be replaced with a call the the TTNN op interface. - // This block is a placeholder for the actual call to the TTNN op interface. - - // if (TTNNOpBackend backend = dyn_cast(op)) { - // llvm::outs() << op->getName() << "=" << layout << "\n"; - // llvm::outs() << "\t[Perf] = " << backend.getOpPerfCycles(layout) << "\n"; - // llvm::outs() << "\t[L1] = " << backend.getOpL1Usage(layout) << "\n"; - // llvm::outs() << "\t[Legal] = " << backend.isOpLegal(layout) << "\n"; - // } + if (TTNNOpBackend backend = dyn_cast(op)) { + return backend.isOpLegal(layout); + } - return true; + return false; } bool tensor_shape_compatible_with_shard(Operation *op, tt::LayoutAttr layout) {