Skip to content

Commit

Permalink
debug missing destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
xrsrke committed Feb 13, 2024
1 parent b2c71b0 commit 0d21bba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/small.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ jobs:
- name: Run tests
# NOTE: -m "not fa2" will run all the unit tests that don't have the mark
# "fa2" (these are FA2-related tests, we can't run it on T4)
run: pytest -n 1 --color=yes --durations=0 --verbose tests/test_clip_grads.py
run: pytest -n 1 --color=yes --durations=0 --verbose tests/test_clip_grads/test_clip_grads_with_tp
6 changes: 5 additions & 1 deletion tests/test_clip_grads.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,11 @@ def _test_clip_grads_with_tp(
)
torch.testing.assert_close(total_norm, ref_total_norm)

parallel_context.destroy()
try:
parallel_context.destroy()
except Exception:
print("Failed to destroy parallel context")
print(f"parallel_contex.type: {type(parallel_context)}")


@pytest.mark.skipif(available_gpus() < 2, reason="test_clip_grads_tied_weights requires at least 2 gpus")
Expand Down

0 comments on commit 0d21bba

Please sign in to comment.