Class ShuffleShuffleRemovePass

Inheritance Relationships

Base Type

  • public Pass

Class Documentation

class mgb::gopt::ShuffleShuffleRemovePass : public Pass

transform consecutive tensor shuffle operations into one shuffle operator or a Nop

Transform shuffle/typecvt operator chains to one shuffle operator and multiple typecvt operators. For example, a operator chain like reformat(nchw -> nchw4), asQuantizedS8, reformat(nchw4 -> nchw), asFloat32, would be changed to asQuantizedS8, asFloat32. Since the reciprocal reformat operations have been removed from the operator chain, the computation can be speed up with fewer memory operations. This pass is usually used after EnableTensorCorePass, TensorRTReplacePass.

Public Functions

const char *name() const override
void apply(OptState &opt) const override