mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-26 22:35:43 +00:00
Fix TRT custom op issue (#12283)
* Pass schema registry on CreateModel. * Fix ORT_MINIMAL_BUILD. * Fix build issue.
This commit is contained in:
parent
6514069749
commit
c579497134
2 changed files with 8 additions and 0 deletions
|
|
@ -187,6 +187,10 @@ class GraphViewer {
|
|||
*/
|
||||
const IndexedSubGraph* GetFilterInfo() const { return filter_info_; }
|
||||
|
||||
#if !defined(ORT_MINIMAL_BUILD)
|
||||
IOnnxRuntimeOpSchemaCollectionPtr GetSchemaRegistry() const { return graph_->GetSchemaRegistry(); }
|
||||
#endif
|
||||
|
||||
private:
|
||||
ORT_DISALLOW_COPY_ASSIGNMENT_AND_MOVE(GraphViewer);
|
||||
GraphViewer(const Graph& graph, const IndexedSubGraph* filter_info);
|
||||
|
|
|
|||
|
|
@ -743,7 +743,11 @@ struct ProviderHostImpl : ProviderHost {
|
|||
void GraphViewer__operator_delete(GraphViewer* p) override { delete p; }
|
||||
std::unique_ptr<Model> GraphViewer__CreateModel(const GraphViewer* graph_viewer, const logging::Logger& logger) override {
|
||||
return std::make_unique<Model>(graph_viewer->Name(), true, ModelMetaData(), PathString(),
|
||||
#if !defined(ORT_MINIMAL_BUILD)
|
||||
IOnnxRuntimeOpSchemaRegistryList({graph_viewer->GetSchemaRegistry()}), graph_viewer->DomainToVersionMap(),
|
||||
#else
|
||||
IOnnxRuntimeOpSchemaRegistryList(), graph_viewer->DomainToVersionMap(),
|
||||
#endif // ORT_MINIMAL_BUILD
|
||||
std::vector<ONNX_NAMESPACE::FunctionProto>(), logger);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue