switch more test cases to use MultithreadTestCase
#108.744 geöffnet am 7. Sept. 2023
Repository-Metriken
- Stars
- (99.916 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 1T 10h) (42 gemergte PRs in 30 T)
Beschreibung
MultithreadTestCase allow us to run less resouce by spawning threads instead of processes, which could make distributed tests run faster. We have the following test files still not using MultithreadTestCase, and we should switch those test case to use it.
[ ] https://github.com/pytorch/pytorch/blob/main/test/distributed/_tensor/test_math_ops.py [ ] https://github.com/pytorch/pytorch/blob/main/test/distributed/_tensor/test_matrix_ops.py [ ] https://github.com/pytorch/pytorch/blob/main/test/distributed/_tensor/test_tensor_ops.py [ ] https://github.com/pytorch/pytorch/blob/main/test/distributed/_tensor/test_embedding_ops.py
Example test case that already uses multithreaded test case, see https://github.com/pytorch/pytorch/blob/main/test/distributed/_tensor/test_pointwise_ops.py#L75
one just need to extend the DTensorOpTestBase for the above test files, should be relatively simple