Skip to content

Commit

Permalink
replacing commented out block, with the actual call to TTNNOpBackend:…
Browse files Browse the repository at this point in the history
…:isOpLegal
  • Loading branch information
mbezuljTT committed Nov 1, 2024
1 parent 2e5d293 commit 7dd07e3
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions lib/Dialect/TTNN/Analysis/LegalGridAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<TTNNOpBackend>(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<TTNNOpBackend>(op)) {
return backend.isOpLegal(layout);
}

return true;
return false;
}

bool tensor_shape_compatible_with_shard(Operation *op, tt::LayoutAttr layout) {
Expand Down

0 comments on commit 7dd07e3

Please sign in to comment.