Skip to content

Add graph surgery for scalar tensor constants - #2791

Draft
ananyaa-ms wants to merge 1 commit into
mainfrom
aamancherla/gemma4-onehot-depth-surgery
Draft

ananyaa-ms wants to merge 1 commit into
mainfrom
aamancherla/gemma4-onehot-depth-surgery

Conversation

@ananyaa-ms

Copy link
Copy Markdown
Contributor

Describe your changes

Add  ReplaceTensorWithConstant , a graph surgery that replaces a named scalar INT64 tensor’s producer with an integer  Constant  and removes unused upstream nodes. Add focused tests for shared outputs and invalid inputs.

Checklist before requesting a review

  • Add unit tests for this change.
  • Make sure all tests can pass.
  • Update documents if necessary.
  • Lint and apply fixes to your code by running lintrunner -a
  • Is this a user-facing change? If yes, give a description of this change to be included in the release notes.

(Optional) Issue link

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

1 participant