Skip to content

Conversation

@einnesTT
Copy link
Contributor

@einnesTT einnesTT commented Aug 6, 2025

Ticket

Link to Github Issue

Problem description

Add information about enabling the optimizer in TT-Forge-FE

What's changed

Write up the details from reviewing the code.

Checklist

  • New/Existing tests provide coverage for changes

@einnesTT einnesTT self-assigned this Aug 6, 2025
@einnesTT einnesTT marked this pull request as draft August 6, 2025 17:41
@einnesTT einnesTT requested a review from odjuricicTT August 6, 2025 17:41
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.36%. Comparing base (5edb06c) to head (d855074).
⚠️ Report is 161 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2754      +/-   ##
==========================================
+ Coverage   45.45%   50.36%   +4.91%     
==========================================
  Files          57      171     +114     
  Lines        8261    13042    +4781     
==========================================
+ Hits         3755     6569    +2814     
- Misses       4506     6473    +1967     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

compiler_cfg.mlir_config = (
MLIRConfig()
.set_enable_optimizer(True)
.set_enable_fusing(True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is on by default and is no longer needed.

## Prerequisites

To use the AI compiler optimizer with TT-Forge-FE, you need the following:
* TT-Forge set up, using the [Getting Started with Building TT-Forge-FE From Source](getting_started_build_from_source.md) instructions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think a build from source is needed just for setting this config.

Comment on lines +22 to +25
.set_enable_optimizer(True)
.set_enable_fusing(True)
.set_enable_fusing_conv2d_with_multiply_pattern(True)
.set_enable_memory_layout_analysis(False)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Context: this way, we wouldn't need to update the docs each time the options change - they would be read directly from code. Ideally, we also communicate default values by reading them from code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants