neural_compressor.algorithm.algorithm

Register algorithms.

Module Contents

Classes

ALGORITHMS

Build a dict for registered algorithms.

AlgorithmScheduler

Control the Algorithm in different phase.

Algorithm

The base class of algorithm.

Functions

algorithm_registry(algorithm_type, location)

Decorate and register all Algorithm subclasses.

neural_compressor.algorithm.algorithm.algorithm_registry(algorithm_type, location)[source]

Decorate and register all Algorithm subclasses.

Parameters:
  • cls (class) – The class of register.

  • algorithm_type (str) – The algorithm registration name

  • location (str) – The location to call algorithms

Returns:

The class of register.

Return type:

cls

class neural_compressor.algorithm.algorithm.ALGORITHMS[source]

Build a dict for registered algorithms.

class neural_compressor.algorithm.algorithm.AlgorithmScheduler(conf)[source]

Control the Algorithm in different phase.

class neural_compressor.algorithm.algorithm.Algorithm[source]

The base class of algorithm.