Skip to content

Fix Assertion Const Node Tensor Request when Node has value_int Rather than Value#181

Merged
justinchuby merged 2 commits intoonnx:mainfrom
jsmonson:bugfix/fix-const-value-int-assertion-failure
Jul 1, 2025
Merged

Fix Assertion Const Node Tensor Request when Node has value_int Rather than Value#181
justinchuby merged 2 commits intoonnx:mainfrom
jsmonson:bugfix/fix-const-value-int-assertion-failure

Conversation

@jsmonson
Copy link
Copy Markdown
Contributor

@jsmonson jsmonson commented May 1, 2025

This PR adds a check to extract_constant_to_initializer and the FetchConstantTensor function (in pass_util.h) that ensures the constant node actually contains a Tensor (rather than a value_int or some other type). If not checked, this causes an assertion failure when these pass and function are used.

See Issue: #173

…g for a tensor and not another attribute like value_int

Signed-off-by: Joshua Monson <joshmonson@microsoft.com>
@jsmonson jsmonson force-pushed the bugfix/fix-const-value-int-assertion-failure branch from 169b80b to 2d93792 Compare May 6, 2025 21:10
@justinchuby justinchuby enabled auto-merge (squash) June 27, 2025 05:46
@justinchuby justinchuby merged commit bd6573d into onnx:main Jul 1, 2025
14 of 15 checks passed
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.

2 participants