onnxruntime/onnxruntime/test/shared_lib
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
..
cuda_ops.cu
custom_op_utils.cc Create a new C API KernelContext_GetAllocator() for Custom Op scenario (#15591) 2023-04-23 21:54:35 -07:00
custom_op_utils.h Single-schema-multi-kernel (#15184) 2023-04-27 13:39:59 -07:00
fns_candy_style_transfer.c
onnx_protobuf.h
rocm_ops.hip EP context for custom op (#16454) 2023-08-16 13:03:40 -07:00
test_allocator.cc Run clang-format in CI (#15524) 2023-04-18 09:26:58 -07:00
test_fixture.h Run clang-format in CI (#15524) 2023-04-18 09:26:58 -07:00
test_inference.cc Implement CustomOp Output Type Inference function (#19906) 2024-03-18 10:28:39 -07:00
test_io_types.cc Run clang-format in CI (#15524) 2023-04-18 09:26:58 -07:00
test_model_loading.cc Fix builds (#16646) 2023-07-11 19:21:25 -07:00
test_nontensor_types.cc [C#, CPP] Introduce Float16/BFloat16 support and tests for C#, C++ (#16506) 2023-07-14 10:46:52 -07:00
test_ort_format_models.cc Enable Address Sanitizer in CI (#19073) 2024-01-12 07:24:40 -08:00
test_run_options.cc
test_session_options.cc Add SessionOptions use_deterministic_compute to the C and C++ APIs. (#18944) 2024-01-04 11:12:48 +10:00
utils.cc
utils.h