File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -471,10 +471,11 @@ class RuntimeInferShapeContext : public InferShapeContext {
471
471
return false ;
472
472
}
473
473
const auto & in = it->second ;
474
-
475
- if (in.size () != 1 || in[0 ] == kEmptyVarName ) {
474
+ if (in.size () == 0 || in[0 ] == kEmptyVarName ) {
476
475
return false ;
477
476
}
477
+ PADDLE_ENFORCE_EQ (in.size (), 1UL ,
478
+ " Input %s should not have more than one inputs" , name);
478
479
return scope_.FindVar (in[0 ]) != nullptr ;
479
480
}
480
481
@@ -486,9 +487,11 @@ class RuntimeInferShapeContext : public InferShapeContext {
486
487
return false ;
487
488
}
488
489
const auto & out = it->second ;
489
- if (out.size () != 1 || out[0 ] == kEmptyVarName ) {
490
+ if (out.size () == 0 || out[0 ] == kEmptyVarName ) {
490
491
return false ;
491
492
}
493
+ PADDLE_ENFORCE_EQ (out.size (), 1UL ,
494
+ " Output %s should not have more than one outputs" , name);
492
495
return scope_.FindVar (out[0 ]) != nullptr ;
493
496
}
494
497
You can’t perform that action at this time.
0 commit comments