-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Open
Description
ORT was leveraging on implicit api ONNX_NAMESPACE::OpSchemaRegistry::OpSchemaRegisterOnce
https://github.com/microsoft/onnxruntime/blob/fe97f8b608bbd9131a8de25b0d6b57a9ee30c388/onnxruntime/core/graph/contrib_ops/contrib_defs.h#L39C10-L39C64 to do fluent chaining style as following
onnxruntime/onnxruntime/core/graph/contrib_ops/collective_defs.cc
Lines 17 to 28 in fe97f8b
ONNX_CONTRIB_OPERATOR_SCHEMA(AllReduce) | |
.SetDomain(kMSDomain) | |
.SinceVersion(1) | |
.Input(0, "input", "tensors to be reduced", "T", OpSchema::Variadic) | |
.Output(0, "output", "reduced tensors", "T", OpSchema::Variadic) | |
.TypeConstraint( | |
"T", | |
{"tensor(float16)", "tensor(float)", "tensor(double)"}, | |
"Constrain to float, float16 and double tensors.") | |
.TypeAndShapeInferenceFunction([](ONNX_NAMESPACE::InferenceContext& ctx) { | |
propagateShapeAndTypeFromFirstInput(ctx); | |
}); |
However, the api ONNX_NAMESPACE::OpSchemaRegistry::OpSchemaRegisterOnce
will be explicit starting from ONNX==1.18.0.
The PR: onnx/onnx#6378
The change: https://github.com/onnx/onnx/blob/9e379bdd51be054c89b29386f17a2fd731ce190f/onnx/defs/schema.h#L984
It's currently avoid from cmake/patches/onnx.patch within #24449
Metadata
Metadata
Assignees
Labels
No labels