From bd689c2b9d1bfeef8c70c255e35adca8b3003986 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Tue, 14 Nov 2023 16:27:31 +0000 Subject: [PATCH] one one comment --- onnxruntime/core/session/custom_ops.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/onnxruntime/core/session/custom_ops.cc b/onnxruntime/core/session/custom_ops.cc index e88d6512e0a7..666c9dc10502 100644 --- a/onnxruntime/core/session/custom_ops.cc +++ b/onnxruntime/core/session/custom_ops.cc @@ -840,6 +840,7 @@ ONNX_NAMESPACE::OpSchema CreateSchema(const std::string& domain, const OrtCustom const ONNX_NAMESPACE::TypeProto* type_proto = DataTypeImpl::TensorTypeFromONNXEnum(static_cast(output_type))->GetTypeProto(); schema.TypeConstraint(output_name, {*ONNX_NAMESPACE::Utils::DataTypeUtils::ToType(*type_proto)}, "one type"); } else { + // Type inference fails if the schema does not return one unique option when IsHomogeneous is false. schema.TypeConstraint(output_name, DataTypeImpl::ToString(SUPPORTED_TENSOR_TYPES), "all types"); } }