reorganizing tests so that test1 and test2 are balanced in timing (#45778)
Summary:
used --shard option to split up python tests ran from `test/run_test.py` in the testing script run in CI
also revised a help message to be more accurate for --shard.
Test results:
BEFORE:
| EVENT | TIMING |
|---|---|
| **TEST1** | |
| | |
| test_python_nn | 35m19s |
| test_cpp_extensions | 30s |
| **total** | **35m49s** |
| **TEST2** | |
| | |
| install_torchvision | 35s |
| test_python_all_except_nn_and_cpp_extensions | 255m37s |
| test_aten | SKIPPED |
| test_libtorch | 9m8s |
| test_custom_script_ops | SKIPPED |
| test_custom_backend | SKIPPED |
| test_torch_function_benchmark | 10s |
| **total** | **4hr24m** |
AFTER THIS SHARD:
| EVENT | TIMING |
|---|---|
| **TEST1** | |
| | |
| test_autograd | 26m30s |
| test_foreach | 69m |
| test_nn | test_nn is 35m38s |
| **total** | **3h1m** |
| **TEST2** | |
| | |
| test-quantization | 41m28s |
| test_spectral_ops | 17m37s |
| test_torch | 8m56s |
| test_jit_legacy | 16m21s |
| **total** | **2h18m** |
Pull Request resolved: https://github.com/pytorch/pytorch/pull/45778
Reviewed By: albanD
Differential Revision: D24137156
Pulled By: janeyx99
fbshipit-source-id: 5873fec47aedb9f699ebbda653a4d32a9950fc13