Skip to content

Commit 4aca8f3

Browse files
mingyueliuhmingyueHectorSVC
authored
[Bug Fix] Missing CustomOp SchemaRegister when generator EPContext ONNX model (#23091)
### Description Enhancements to EPContext Operations: 1. Introduced support for the bfloat16 data type in EPContext operations. 2. Bug Fix: Missing Custom OP Schema Registration when generator EPContext ONNX model --------- Co-authored-by: mingyue <mingyue@xilinx.com> Co-authored-by: Hector Li <hecli@microsoft.com>
1 parent 7c782f6 commit 4aca8f3

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

docs/ContribOperators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1625,7 +1625,7 @@ This version of the operator has been available since version 1 of the 'com.micr
16251625
#### Type Constraints
16261626

16271627
<dl>
1628-
<dt><tt>T</tt> : tensor(int8), tensor(int16), tensor(int32), tensor(int64), tensor(uint8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(float16), tensor(float), tensor(double)</dt>
1628+
<dt><tt>T</tt> : tensor(int8), tensor(int16), tensor(int32), tensor(int64), tensor(uint8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(float16), tensor(float), tensor(double), tensor(bfloat16)</dt>
16291629
<dd>Constrain input and output types.</dd>
16301630
</dl>
16311631

onnxruntime/core/framework/graph_partitioner.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ static Status CreateEpContextModel(const ExecutionProviders& execution_providers
681681
context_cache_path, "' exist already.");
682682
}
683683

684-
Model ep_context_model(graph.Name(), false, graph.GetModel().MetaData(), PathString(), IOnnxRuntimeOpSchemaRegistryList(),
684+
Model ep_context_model(graph.Name(), false, graph.GetModel().MetaData(), PathString(), IOnnxRuntimeOpSchemaRegistryList{graph.GetSchemaRegistry()},
685685
graph.DomainToVersionMap(), {}, logger);
686686
auto& ep_graph = ep_context_model.MainGraph();
687687
ep_graph.SetDescription(graph.Description());

onnxruntime/core/graph/contrib_ops/contrib_defs.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3371,7 +3371,8 @@ void RegisterContribSchemas() {
33713371
"tensor(uint64)",
33723372
"tensor(float16)",
33733373
"tensor(float)",
3374-
"tensor(double)"},
3374+
"tensor(double)",
3375+
"tensor(bfloat16)"},
33753376
"Constrain input and output types.");
33763377

33773378
static const char* BitmaskDropout_ver1_doc = R"DOC(

0 commit comments

Comments
 (0)