Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
cyx-6 committed Sep 29, 2024
1 parent b604495 commit 007bcfc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/python/disco/test_nvshmem.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ def test_nvshmem_empty(num_workers):


if __name__ == "__main__":
# After the first call to `nvshmem_init``, a subsequent call to `nvshmem_init`
# or `nvshmem_init_thread` in the same program results in undefined behavior.
# So we always create a new process to run the test. Then no repeated nvshmem
# init happens in the same process, since the worker0 may share the same process.
for num_worker in [2, 4]:
for test_func in [test_nvshmem_init, test_nvshmem_empty]:
p = Process(target=test_func, args=[num_worker])
Expand Down

0 comments on commit 007bcfc

Please sign in to comment.