Class ParamFusePass

Inheritance Relationships

Base Type

  • public Pass

Class Documentation

class mgb::gopt::ParamFusePass : public Pass

fuse SharedDeviceTensor oprs

This would treat all SharedDeviceTensor operators as constant, and replace oprs that only depend on them by the evaluated value at compile time.

Usually this pass is used after ParamRedistributePass.

Public Functions

ParamFusePass &param_grow_limit(size_t val)

set the limit for max param size growth due to merging

Param size may grow if param fusing causes low-rank result (i.e. by broadcasting). Size growth is defined to be the difference between new param size and max size of source oprs that it depends on.

This limit is given in bytes

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