From e42a6afeab9113fe1c60fea25658fe0bffbb94cd Mon Sep 17 00:00:00 2001 From: Hector Li Date: Mon, 17 Mar 2025 09:59:23 -0700 Subject: [PATCH 1/2] add bool support for EPContext to unblock some models --- onnxruntime/core/graph/contrib_ops/contrib_defs.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/onnxruntime/core/graph/contrib_ops/contrib_defs.cc b/onnxruntime/core/graph/contrib_ops/contrib_defs.cc index e45787299f3ad..7b4a45ce8aa0f 100644 --- a/onnxruntime/core/graph/contrib_ops/contrib_defs.cc +++ b/onnxruntime/core/graph/contrib_ops/contrib_defs.cc @@ -3361,7 +3361,8 @@ void RegisterContribSchemas() { OpSchema::NonDifferentiable) .TypeConstraint( "T", - {"tensor(int8)", + {"tensor(bool)", + "tensor(int8)", "tensor(int16)", "tensor(int32)", "tensor(int64)", From f6fcc5bab903c4316445f70301fea79b24883250 Mon Sep 17 00:00:00 2001 From: Hector Li Date: Mon, 17 Mar 2025 11:27:46 -0700 Subject: [PATCH 2/2] update doc --- docs/ContribOperators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ContribOperators.md b/docs/ContribOperators.md index b64641230f249..f582abca34706 100644 --- a/docs/ContribOperators.md +++ b/docs/ContribOperators.md @@ -1625,7 +1625,7 @@ This version of the operator has been available since version 1 of the 'com.micr #### Type Constraints
-
T : tensor(int8), tensor(int16), tensor(int32), tensor(int64), tensor(uint8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(float16), tensor(float), tensor(double), tensor(bfloat16)
+
T : tensor(bool), tensor(int8), tensor(int16), tensor(int32), tensor(int64), tensor(uint8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(float16), tensor(float), tensor(double), tensor(bfloat16)
Constrain input and output types.