Skip to content

Support outer scope value reference in script#2831

Merged
gramalingam merged 2 commits intomainfrom
rama/inliner
Feb 26, 2026
Merged

Support outer scope value reference in script#2831
gramalingam merged 2 commits intomainfrom
rama/inliner

Conversation

@gramalingam
Copy link
Collaborator

This extends onnxscript scripts to allow references to ir.Values defined outside the function. This allows the use of script functions within the construction of graphs using a GraphBuilder.

Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>
@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

❌ Patch coverage is 75.67568% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.78%. Comparing base (ef2bc22) to head (b5d76a2).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
onnxscript/testing/__init__.py 12.50% 6 Missing and 1 partial ⚠️
onnxscript/_internal/builder.py 83.33% 1 Missing ⚠️
onnxscript/_internal/builder_test.py 93.75% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2831   +/-   ##
=======================================
  Coverage   71.78%   71.78%           
=======================================
  Files         239      239           
  Lines       28989    29018   +29     
  Branches     2859     2864    +5     
=======================================
+ Hits        20809    20831   +22     
- Misses       7209     7214    +5     
- Partials      971      973    +2     

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

@gramalingam gramalingam enabled auto-merge (squash) February 26, 2026 18:05
@justinchuby
Copy link
Collaborator

@gramalingam there's some lint errors

Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>
@gramalingam gramalingam merged commit 3f197a2 into main Feb 26, 2026
29 of 31 checks passed
@gramalingam gramalingam deleted the rama/inliner branch February 26, 2026 21:58
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