onnxruntime/include/onnxruntime/core
Dmitri Smirnov a033df8c31
Implement CustomOp Output Type Inference function (#19906)
### Description
<!-- Describe your changes. -->
This change addresses the following issues with the current CustomOP
Output Type inference
- The function does not take into account optional inputs. When input is
absent the inference is silently aborted, and no output type is inferred
(P1 customer issue)
- Inferring output type based on the input type for multi-kernel custom
ops is done based on the latest in sequence kernel definition. There is
not an attempt made to match the kernel based on the input type.
- Inference is aborted when variadic inputs/outputs are detected when
the generated input/output names fail to obtain type constraints. This
is not immediately clear from the code, because custom op schema is not
available within the inference function.
- No error reporting.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

Most of CustomOPs lack their own type and shape inference function as it
was recently introduced. For that reason, it is important to fix this.
This change is inspired by a customer issue.

This is a follow up on:
- https://github.com/microsoft/onnxruntime/pull/15184
- https://github.com/cbourjau/ort-custom-op/pull/11
- https://github.com/microsoft/onnxruntime-extensions/issues/451
2024-03-18 10:28:39 -07:00
..
common ORT ETW dynamic logging that improves ORT diagnosability & performance (#18882) 2024-01-11 12:43:27 -08:00
eager
framework Add new API KernelContext_GetScratchBuffer (#19809) 2024-03-13 19:41:15 -07:00
graph [On-Device-Training] Upgrade Flatbuffers to Support 2GB+ Checkpoints. (#19770) 2024-03-14 16:36:24 -07:00
optimizer fix compilation error in no absl build (#15769) 2023-05-02 08:20:49 -07:00
platform Bump linter versions (#18341) 2023-11-08 13:04:40 -08:00
providers Don't reduce warning level for CUDA build on Windows (#19663) 2024-03-06 15:03:55 +10:00
session Implement CustomOp Output Type Inference function (#19906) 2024-03-18 10:28:39 -07:00