Skip to content

Handle unused function inputs#15130

Merged
justinchuby merged 2 commits into
mainfrom
rama/create_schema_bug_fix
Mar 23, 2023
Merged

Handle unused function inputs#15130
justinchuby merged 2 commits into
mainfrom
rama/create_schema_bug_fix

Conversation

@gramalingam
Copy link
Copy Markdown
Contributor

@gramalingam gramalingam commented Mar 20, 2023

Description

Fix issue relating to unused inputs of model-local functions. ORT creates a schema for all such functions. The creation of this schema does not handle unused function-inputs. The schema-creation relies on the use of the function-inputs to infer type-constraints for the input, and the code ends up creating an erroneous input-descriptor when there is no use of the function-input.

The fix is to create an input with the given name, with a type-constraint that allows all types.

Motivation and Context

Fix #15046

Fix microsoft/onnxscript#524

Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>
skottmckay
skottmckay previously approved these changes Mar 21, 2023
Comment thread onnxruntime/core/graph/function_utils.cc Outdated
Co-authored-by: Scott McKay <skottmckay@gmail.com>
@justinchuby justinchuby merged commit efa1262 into main Mar 23, 2023
@justinchuby justinchuby deleted the rama/create_schema_bug_fix branch March 23, 2023 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core runtime issues related to core runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ORT fails on unused input in a function ORT fails on unused input in a function

3 participants