Repository navigation
feat(tune-strategy): tune with every backend for the device by default - #55
Open
lslusarczyk wants to merge 2 commits into
Open
lslusarczyk wants to merge 2 commits into
lslusarczyk wants to merge 2 commits into
Conversation
lslusarczyk
force-pushed
the
feat/default-strategy
branch
from
October 29, 2026 14:47
e27f664 to
6edd20b
Compare
lslusarczyk
marked this pull request as ready for review
October 29, 2026 14:47
A module without a strategy is now tuned with tt.default_strategy(device). It is HighestThroughputStrategy over default_backends(device). On XPU these are XPU graph, Torch Inductor, OpenVINO, and Torch Eager. On CPU these are Torch Inductor, OpenVINO, and Torch Eager. TorchAO is left out because quantization changes the results. The old default was one FirstWinsStrategy instance shared by every module. FirstWins keeps the first backend that builds, not the fastest one. The shared instance also carried state from one module to the next. Each graph now gets its own strategy, built for the device it is tuned on. FirstWinsStrategy and HighestThroughputStrategy without backends use the same default_backends(device). FirstWinsStrategy keeps its order, XPU graph first. HighestThroughputStrategy() now also measures OpenVINO. On CPU neither strategy tries XPU graph. Without backends, a device other than XPU or CPU raises ValueError. On an Arc Pro B70 the default strategy was the fastest or close to it on five of six models. OpenVINO wins on whole ViT and DistilBERT models and loses on small modules, so it is measured, not excluded. Signed-off-by: Łukasz Ślusarczyk <lukasz.slusarczyk@intel.com>
lslusarczyk
force-pushed
the
feat/default-strategy
branch
from
October 29, 2026 14:50
6edd20b to
6fa7a28
Compare
lslusarczyk
enabled auto-merge (squash)
October 29, 2026 16:43
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A module without a strategy is now tuned with
tt.default_strategy(device).It measures every backend that runs on the device and keeps the fastest.
tt.default_strategy(device)isHighestThroughputStrategyoverdefault_backends(device):TorchAO is left out because quantization changes the results.
The old default was one
FirstWinsStrategyinstance shared by every module.FirstWins keeps the first backend that builds, not the fastest one.
The shared instance also carried state from one module to the next.
Each graph now gets its own strategy, built for the device it is tuned on.
FirstWinsStrategyandHighestThroughputStrategywithout backends use the samedefault_backends(device).FirstWinsStrategykeeps its order, XPU graph first.HighestThroughputStrategy()now also measures OpenVINO.On CPU neither strategy tries XPU graph.
On an Arc Pro B70 the default strategy was the fastest or close to it on five of six models.
OpenVINO wins on whole ViT and DistilBERT models and loses on small modules, so it is measured, not excluded.
Breaking:
ValueError.