Skip to content

Commit

Permalink
Pass symboltable to onnx shape inference
Browse files Browse the repository at this point in the history
  • Loading branch information
gramalingam committed Jun 16, 2022
1 parent 32d1e80 commit 9e5af64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion onnxruntime/core/graph/function_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,10 @@ std::unique_ptr<ONNX_NAMESPACE::OpSchema> CreateSchema(const std::string& functi
std::unordered_map<std::string, const ONNX_NAMESPACE::FunctionProto*> map_copy(model_local_functions.begin(),
model_local_functions.end());
std::unordered_map<std::string, TensorShapeProto> empty_map;
ONNX_NAMESPACE::shape_inference::SymbolTableImpl symbolTable;
ONNX_NAMESPACE::shape_inference::InferShapeForFunctionNode(*onnx_func_proto, func_domain_to_version,
schema_registry, ctx, options, map_copy,
nullptr, &empty_map);
&symbolTable, &empty_map);
});

op_schema->Finalize();
Expand Down
2 changes: 2 additions & 0 deletions onnxruntime/core/graph/function_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#include <string>

#include "core/common/common.h"
#include "onnx/onnx_pb.h"
#include "core/graph/graph.h"
Expand Down

0 comments on commit 9e5af64

Please sign in to comment.