Skip to main content

Module pruning

Module pruning 

Source
Expand description

Structured sparsity patterns and pruning for TensorLogic.

Provides magnitude-based and structured pruning to reduce model size while maintaining hardware efficiency through regular sparsity patterns.

Structs§

MagnitudePruner
Magnitude-based pruner: zero out elements with smallest absolute values.
PruningConfig
Configuration for the pruning process.
SparsityStats
Statistics about the sparsity of a pruned tensor.

Enums§

PruningError
Errors from pruning operations.
SparsityPattern
Structured sparsity pattern types.

Functions§

compute_sparsity
Compute sparsity statistics for an N-D tensor.
row_norms
Compute per-row L2 norms for a 2D matrix.