Skip to content

Conversation

@gramalingam
Copy link
Collaborator

Fix scalar constant check.

TODO: for some optimizations, generalizations are possible, but they must be done on a rule-by-rule basis. Eg., for eliminating an addition of zero to x: eliminating this is always safe zero is a scalar, but if it is multi-dimensional, then it is safe if its rank is less than that of x.

Signed-off-by: Ganesan Ramalingam <[email protected]>
@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

❌ Patch coverage is 36.84211% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.43%. Comparing base (9b699ae) to head (6f5b379).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
onnxscript/rewriter/models/_smollm_2.py 0.00% 7 Missing ⚠️
...script/rewriter/models/_rotary_embedding_models.py 0.00% 6 Missing ⚠️
onnxscript/rewriter/models/_smollm_1.py 0.00% 5 Missing ⚠️
onnxscript/rewriter/ort_fusions/gqa_test.py 0.00% 4 Missing ⚠️
onnxscript/rewriter/_matcher.py 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2672   +/-   ##
=======================================
  Coverage   70.43%   70.43%           
=======================================
  Files         224      224           
  Lines       26771    26778    +7     
  Branches     2680     2680           
=======================================
+ Hits        18855    18862    +7     
  Misses       6985     6985           
  Partials      931      931           

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

Signed-off-by: Ganesan Ramalingam <[email protected]>
Signed-off-by: Ganesan Ramalingam <[email protected]>
Signed-off-by: Ganesan Ramalingam <[email protected]>
@justinchuby justinchuby merged commit 5be9d3b into main Oct 31, 2025
33 checks passed
@justinchuby justinchuby deleted the rama/scalar0 branch October 31, 2025 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants