mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Add check that the first 2 Loop subgraph inputs have an shape (could be explicit or inferred) as we need to know the rank the subgraph expects. Other inputs to the subgraph are more opaque so we can just pass them through. (#6891)
This commit is contained in:
parent
d01006fc22
commit
54cdb6af71
1 changed files with 6 additions and 0 deletions
|
|
@ -399,6 +399,12 @@ Status LoopImpl::Initialize() {
|
|||
|
||||
auto& subgraph_inputs = info_.subgraph.GetInputs();
|
||||
|
||||
// we need to know if the subgraph expects a rank 0 or rank 1 value for these, so a shape is required.
|
||||
ORT_RETURN_IF(subgraph_inputs[0]->Shape() == nullptr, "Loop subgraph input 0 has unknown shape: ",
|
||||
subgraph_inputs[0]->Name());
|
||||
ORT_RETURN_IF(subgraph_inputs[1]->Shape() == nullptr, "Loop subgraph input 1 has unknown shape: ",
|
||||
subgraph_inputs[1]->Name());
|
||||
|
||||
auto iter_num_rank = subgraph_inputs[0]->Shape()->dim_size();
|
||||
auto condition_rank = subgraph_inputs[1]->Shape()->dim_size();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue