Browse Source

fix(imperative): fix broadcast extra assert of output shape

GitOrigin-RevId: e8dc7c4229
master
Megvii Engine Team 2 years ago
parent
commit
5c84305f19
1 changed files with 0 additions and 1 deletions
  1. +0
    -1
      imperative/src/impl/ops/broadcast.cpp

+ 0
- 1
imperative/src/impl/ops/broadcast.cpp View File

@@ -290,7 +290,6 @@ std::tuple<SmallVector<LogicalTensorDesc>, bool> infer_output_attrs_fallible(
} }
} }
if (op.axis != opr::Reshape::Param::INVALID_AXIS) { if (op.axis != opr::Reshape::Param::INVALID_AXIS) {
mgb_assert(out_shape[op.axis] == -1);
out_shape[op.axis] = 1; out_shape[op.axis] = 1;
mgb_assert( mgb_assert(
src.layout.total_nr_elems() % out_shape.total_nr_elems() == 0, src.layout.total_nr_elems() % out_shape.total_nr_elems() == 0,


Loading…
Cancel
Save