MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / if_convert_format

Function if_convert_format

imperative/src/impl/transformations/format.cpp:438–445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436}
437
438inline bool if_convert_format(const Format src_fmt, const FT& dst_fmt) {
439 if ((src_fmt == FT::NCHW && dst_fmt == FT::DEFAULT) ||
440 (src_fmt == FT::DEFAULT && dst_fmt == FT::NCHW)) {
441 return false;
442 } else {
443 return true;
444 }
445}
446
447inline ValueRefList unify_inputs_format(
448 const Span<ValueRef>& inputs, const FT& dst_fmt, const std::string& scope,

Callers 1

unify_inputs_formatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected