pytorch/test/test_ao_sparsity.py
Yuanhao Ji b3504af56e Enable UFMT on test/scripts and some files (#124137)
Part of: #123062

Ran lintrunner on:

- `test/scripts`
- `test/simulate_nccl_errors.py`
- `test/test_ao_sparsity.py`
- `test/test_autocast.py`
- `test/test_binary_ufuncs.py`
- `test/test_bundled_images.py`
- `test/test_bundled_inputs.py`
- `test/test_comparison_utils.py`
- `test/test_compile_benchmark_util.py`
- `test/test_complex.py`
- `test/test_cpp_api_parity.py`
- `test/test_cpp_extensions_aot.py`
- `test/test_cpp_extensions_jit.py`
- `test/test_cpp_extensions_open_device_registration.py`

Detail:

```bash
$ lintrunner -a --take UFMT --all-files
ok No lint issues.
Successfully applied all patches.
```

Pull Request resolved: https://github.com/pytorch/pytorch/pull/124137
Approved by: https://github.com/soulitzer
2024-04-19 22:01:27 +00:00

60 lines
1.5 KiB
Python

# Owner(s): ["module: unknown"]
# Kernels
from ao.sparsity.test_kernels import ( # noqa: F401 # noqa: F401
TestQuantizedSparseKernels,
TestQuantizedSparseLayers,
)
# Parametrizations
from ao.sparsity.test_parametrization import TestFakeSparsity # noqa: F401
# Scheduler
from ao.sparsity.test_scheduler import ( # noqa: F401 # noqa: F401
TestCubicScheduler,
TestScheduler,
)
# Sparsifier
from ao.sparsity.test_sparsifier import ( # noqa: F401 # noqa: F401 # noqa: F401
TestBaseSparsifier,
TestNearlyDiagonalSparsifier,
TestWeightNormSparsifier,
)
# Structured Pruning
from ao.sparsity.test_structured_sparsifier import ( # noqa: F401 # noqa: F401 # 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 # 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 # noqa: F401 # noqa: F401
TestBaseDataSparsifier,
TestNormDataSparsifiers,
TestQuantizationUtils,
)
# Utilities
from ao.sparsity.test_sparsity_utils import TestSparsityUtilFunctions # noqa: F401
if __name__ == "__main__":
run_tests()