add fast test to check with bfloat16#2581
Open
xadupre wants to merge 6 commits into
Open
Conversation
Member
Author
|
@copilot in test_bf16_precision, do you check that speedup is here with no error? |
Contributor
It wasn't — fixed in the latest commit. The run call now passes
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new CLI smoke test intended to exercise the olive optimize + olive run --test flow when targeting BF16 precision, and to validate that the discrepancy report is produced with a speedup metric.
Changes:
- Add
test_bf16_precision/_assert_bf16_precisionto run an optimize+run workflow with--precision bf16. - Validate that
discrepancy_check_results.jsonis written and includes a numeric, positivespeedupvalue.
Comment on lines
+265
to
+268
| "--device", | ||
| "cpu", | ||
| "--provider", | ||
| "CPUExecutionProvider", |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Member
Author
|
@copilot resolve the merge conflicts in this pull request |
Contributor
xiaoyu-work
reviewed
Jul 23, 2026
Comment on lines
+378
to
+382
| try: | ||
| import onnxruntime as ort | ||
| import torch | ||
| except ImportError: | ||
| return False |
Collaborator
There was a problem hiding this comment.
do we need this check? test env will always install onnxruntime and torch.
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.
fix discrepancy tests for bfloat16