forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_ao_sparsity.py
59 lines (45 loc) · 1.41 KB
/
test_ao_sparsity.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Owner(s): ["module: unknown"]
# Kernels
from ao.sparsity.test_kernels import ( # noqa: F401
TestQuantizedSparseKernels,
TestQuantizedSparseLayers,
)
# Parametrizations
from ao.sparsity.test_parametrization import TestFakeSparsity # noqa: F401
# Scheduler
from ao.sparsity.test_scheduler import TestCubicScheduler, TestScheduler # noqa: F401
# Sparsifier
from ao.sparsity.test_sparsifier import ( # noqa: F401
TestBaseSparsifier,
TestNearlyDiagonalSparsifier,
TestWeightNormSparsifier,
)
# Structured Pruning
from ao.sparsity.test_structured_sparsifier import ( # noqa: F401
TestBaseStructuredSparsifier,
TestFPGMPruner,
TestSaliencyPruner,
)
from torch.testing._internal.common_utils import IS_ARM64, run_tests
# Composability
if not IS_ARM64:
from ao.sparsity.test_composability import ( # noqa: F401
TestComposability,
TestFxComposability,
)
# Activation Sparsifier
from ao.sparsity.test_activation_sparsifier import ( # noqa: F401
TestActivationSparsifier,
)
# Data Scheduler
from ao.sparsity.test_data_scheduler import TestBaseDataScheduler # noqa: F401
# Data Sparsifier
from ao.sparsity.test_data_sparsifier import ( # noqa: F401
TestBaseDataSparsifier,
TestNormDataSparsifiers,
TestQuantizationUtils,
)
# Utilities
from ao.sparsity.test_sparsity_utils import TestSparsityUtilFunctions # noqa: F401
if __name__ == "__main__":
run_tests()