Skip to content

Commit 966030f

Browse files
XilunWupytorchmergebot
authored andcommitted
[DTensor][fix] MultiThreadedTestCase misses _tls object and it won't reflect in CI (#93832)
Pull Request resolved: #93832 Approved by: https://github.com/wanchaol
1 parent b82f93d commit 966030f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

torch/testing/_internal/common_distributed.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,6 +1025,7 @@ def _run(cls, test_name, rank, world_size):
10251025
# every thread have the same value. This would be relevant when we use op db tests, where it
10261026
# needs those states to be set i.e. using instantiate_device_type_tests()
10271027
# TODO: figure out a better way to do this
1028+
self._tls = threading.local()
10281029
self._tls.precision = TestCase._precision
10291030
self._tls.rel_tol = TestCase._rel_tol
10301031

0 commit comments

Comments
 (0)