Skip to content

Commit

Permalink
Skip op verification in opDebugString (#2157)
Browse files Browse the repository at this point in the history
### Ticket
#2156

### Problem description
As described here #1782
`getOpDebugString` was taking more than 99% of the time of
`ttmlir-translate -ttnn-to-flatbuffer` execution. From that time, 99%
was spent on op verification.

### What's changed
- added `assumeVefied()` to `printFlags` that are used for printing ops
(the way we are running our pipelines I believe this is a safe
assumption)
- greatly lowers TTNN->Flatbuffer compile time (on LlamaPrefill example
from #2144) compile time was
lowered from ~70s -> ~1.5s (around 0.8s was spent on op printing)
  • Loading branch information
azecevicTT authored Feb 10, 2025
1 parent c86135d commit a4bdb21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/ttmlir/Target/Utils/FuncOpToProgram.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ Program<OpT> funcOpToProgram(FlatbufferObjectCache &cache, func::FuncOp entry,
printFlags = printFlags.elideLargeElementsAttrs()
.elideLargeResourceString()
.skipRegions()
.enableDebugInfo();
.enableDebugInfo()
.assumeVerified();

Program<OpT> program;
program.name = entry.getSymName().data();
Expand Down

0 comments on commit a4bdb21

Please sign in to comment.