| 445 | } |
| 446 | |
| 447 | inline ValueRefList unify_inputs_format( |
| 448 | const Span<ValueRef>& inputs, const FT& dst_fmt, const std::string& scope, |
| 449 | const FormatTransformation& t) { |
| 450 | ValueRefList unified_inputs(inputs.size()); |
| 451 | for (size_t i = 0; i < inputs.size(); ++i) { |
| 452 | auto&& inp = inputs[i].cast(t.value_type()); |
| 453 | if (inp.format() != dst_fmt && if_convert_format(inp.format(), dst_fmt)) { |
| 454 | unified_inputs[i] = t.to(inp, dst_fmt, scope); |
| 455 | } else { |
| 456 | unified_inputs[i] = inputs[i]; |
| 457 | } |
| 458 | } |
| 459 | return unified_inputs; |
| 460 | } |
| 461 | |
| 462 | ValueRefList elemwise_rule( |
| 463 | const Elemwise& op, Span<ValueRef>& inputs, const bool& auto_convert, |
no test coverage detected