mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-10 17:37:14 +00:00
Handle nullptr for NodeArg.Shape() (#2009)
This commit is contained in:
parent
f528da35f2
commit
2a2e6e6641
1 changed files with 5 additions and 0 deletions
|
|
@ -13,6 +13,11 @@ namespace onnxruntime {
|
|||
|
||||
static bool CheckConstantInput(const Graph& graph, const NodeArg& input_arg, float expected_value) {
|
||||
auto shape = input_arg.Shape();
|
||||
if (shape == nullptr) {
|
||||
// shape inferencing wasn't able to populate shape information for this NodeArg
|
||||
return false;
|
||||
}
|
||||
|
||||
auto dim_size = shape->dim_size();
|
||||
if (dim_size != 0) {
|
||||
// only check scalar.
|
||||
|
|
|
|||
Loading…
Reference in a new issue