Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add is_constant_initializer in ir.h #4336

Merged
merged 1 commit into from Jul 2, 2022

Conversation

daquexian
Copy link
Member

Description
Add Graph::is_constant_initializer(const Value*) const in ir.h

Motivation and Context

  • Why is this change required? What problem does it solve?

    I'm developing onnx optimizer and find that it is helpful to have an is_constant_initializer method to check whether a Value is an initializer but not an input (a.k.a. a constant initializer). Only constant initializers can be safely eliminated or fused.

Signed-off-by: daquexian <daquexian566@gmail.com>
@daquexian daquexian requested a review from a team as a code owner July 1, 2022 10:16
@jcwchen jcwchen merged commit 3f0c006 into onnx:main Jul 2, 2022
@daquexian daquexian deleted the add_is_constant_initializer branch July 3, 2022 01:07
broune pushed a commit to broune/onnx that referenced this pull request May 6, 2023
Signed-off-by: daquexian <daquexian566@gmail.com>
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.

None yet

2 participants