mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
`Sparsity` as a term doesn't reflect the tools that are developed by the AO. The `torch/ao/sparsity` also has utilities for structured pruning, which internally we always referred to as just "pruning". To avoid any confusion, we renamed `Sparsity` to `Prune`. We will not be introducing the backwards compatibility, as so far this toolset was kept under silent development. This change will reflect the changes in the documentation as well. **TODO:** - [ ] Change the tutorials - [ ] Confirm no bc-breakages - [ ] Reflect the changes in the trackers and RFC docs Fixes #ISSUE_NUMBER Pull Request resolved: https://github.com/pytorch/pytorch/pull/84867 Approved by: https://github.com/supriyar
19 lines
578 B
Python
19 lines
578 B
Python
__all__ = [
|
|
"get_static_sparse_quantized_mapping",
|
|
"get_dynamic_sparse_quantized_mapping",
|
|
]
|
|
|
|
def get_static_sparse_quantized_mapping():
|
|
import torch.ao.nn.sparse
|
|
_static_sparse_quantized_mapping = dict({
|
|
torch.nn.Linear: torch.ao.nn.sparse.quantized.Linear,
|
|
})
|
|
return _static_sparse_quantized_mapping
|
|
|
|
def get_dynamic_sparse_quantized_mapping():
|
|
import torch.ao.nn.sparse
|
|
_dynamic_sparse_quantized_mapping = dict({
|
|
torch.nn.Linear: torch.ao.nn.sparse.quantized.dynamic.Linear,
|
|
})
|
|
return _dynamic_sparse_quantized_mapping
|