pytorch/pytorch

switch more test cases to use MultithreadTestCase

Open

#108.744 aperta il 7 set 2023

Vedi su GitHub
 (5 commenti) (0 reazioni) (0 assegnatari)Python (27.795 fork)batch import
good first issuemodule: dtensortriaged

Metriche repository

Star
 (99.916 star)
Metriche merge PR
 (Merge medio 1g 10h) (42 PR mergiate in 30 g)

Descrizione

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

Guida contributor