neural_compressor.experimental.pruning_recipes.patterns.tile_pattern
¶
Tile pattern classes.
Module Contents¶
Classes¶
Parent class for all NxM tile patterns. |
|
1x1 tile pattern (unstructured). |
|
2x2 tile pattern (unstructured). |
|
1x16 tile pattern (unstructured). |
|
4x1 tile pattern (unstructured). |
|
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).