neural_compressor.experimental.pruning_recipes.patterns.tile_pattern

Tile pattern classes.

Module Contents

Classes

TilePatternBase

Parent class for all NxM tile patterns.

TilePattern_1x1

1x1 tile pattern (unstructured).

TilePattern_2x2

2x2 tile pattern (unstructured).

TilePattern_1x16

1x16 tile pattern (unstructured).

TilePattern_4x1

4x1 tile pattern (unstructured).

TilePattern_1x2

1x2 tile pattern (unstructured).

class neural_compressor.experimental.pruning_recipes.patterns.tile_pattern.TilePatternBase(mask_shape)

Bases: neural_compressor.experimental.pruning_recipes.patterns.pattern.PatternBase

Parent class for all NxM tile patterns.

compute_sparsity(tensor)

Calculate the sparsity of a tensor (weight matrix).

repeat_mask(mask, ori_shape=None)

Repeat mask in 2 dimensions.

class neural_compressor.experimental.pruning_recipes.patterns.tile_pattern.TilePattern_1x1

Bases: TilePatternBase

1x1 tile pattern (unstructured).

class neural_compressor.experimental.pruning_recipes.patterns.tile_pattern.TilePattern_2x2

Bases: TilePatternBase

2x2 tile pattern (unstructured).

class neural_compressor.experimental.pruning_recipes.patterns.tile_pattern.TilePattern_1x16

Bases: TilePatternBase

1x16 tile pattern (unstructured).

class neural_compressor.experimental.pruning_recipes.patterns.tile_pattern.TilePattern_4x1

Bases: TilePatternBase

4x1 tile pattern (unstructured).

class neural_compressor.experimental.pruning_recipes.patterns.tile_pattern.TilePattern_1x2

Bases: TilePatternBase

1x2 tile pattern (unstructured).