| 512 | } |
| 513 | |
| 514 | ValueRefList identity_rule_helper( |
| 515 | const OpDef& op, const Span<ValueRef>& inputs, const FormatTransformation& t) { |
| 516 | // mgb_assert(inputs.size() == 1); |
| 517 | if (auto& src = inputs[0].as_ref(t.value_type())) { |
| 518 | return t.wrap_outputs( |
| 519 | imperative::apply(op, t.unwrap_inputs(inputs)), src->format()); |
| 520 | } else { |
| 521 | return t.wrap_outputs(imperative::apply(op, t.unwrap_inputs(inputs))); |
| 522 | } |
| 523 | } |
| 524 | |
| 525 | ValueRefList batchnorm_rule( |
| 526 | const BatchNorm& op, Span<ValueRef>& inputs, const bool& auto_convert, |
no test coverage detected