|
@@ -341,7 +341,8 @@ static int narrow_conv_backprop(NarrowConv *nc, IRRef ref, int depth)
|
|
NarrowIns *savesp = nc->sp;
|
|
NarrowIns *savesp = nc->sp;
|
|
int count = narrow_conv_backprop(nc, ir->op1, depth);
|
|
int count = narrow_conv_backprop(nc, ir->op1, depth);
|
|
count += narrow_conv_backprop(nc, ir->op2, depth);
|
|
count += narrow_conv_backprop(nc, ir->op2, depth);
|
|
- if (count <= 1) { /* Limit total number of conversions. */
|
|
|
|
|
|
+ /* Limit total number of conversions. */
|
|
|
|
+ if (count <= 1 && nc->sp < nc->maxsp) {
|
|
*nc->sp++ = NARROWINS(IRT(ir->o, nc->t), ref);
|
|
*nc->sp++ = NARROWINS(IRT(ir->o, nc->t), ref);
|
|
return count;
|
|
return count;
|
|
}
|
|
}
|