Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests/test_utils/recipes/h100/mamba.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ products:

- test_case: [hybrid_nemotron_v3_pico_7b_a1b_tp1_ep8_QAD_dgx_h100_1N8G]
products:
# Marked broken: the `total loss` exact/deterministic golden comparison is
# flaky (passes the approximate rtol=0.05 check but not bit-exact),
# repeatedly dequeuing PRs from the merge queue. Tracked by a dedicated
# flaky-test issue for this test case.
- environment: [dev]
scope: [mr, mr-github]
scope: [mr-broken, mr-github-broken]
platforms: [dgx_h100]
16 changes: 16 additions & 0 deletions tests/unit_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@
from tests.unit_tests.test_utilities import Utils


def pytest_configure(config):
"""Set NCCL defaults for the unit-test suite.

These previously lived as ``export``s in ``tests/unit_tests/run_ci_test.sh``.
They reduce NCCL memory usage / SM contention and were originally added to
fix NCCL hangs observed for FSDP v1 (among other MCore algorithms). Setting
them here — at session start, before any test initializes NCCL communicators
— keeps that default while moving the test-bucket configuration out of the
CI launch script and into pytest. Individual buckets that want
production-like NCCL settings (e.g. MFSDP v2) can pop these in their own
conftest before initializing their process group.
"""
os.environ.setdefault("NCCL_MAX_NCHANNELS", "1")
os.environ.setdefault("NCCL_NVLS_ENABLE", "0")


def pytest_addoption(parser):
"""
Additional command-line arguments passed to pytest.
Expand Down
5 changes: 3 additions & 2 deletions tests/unit_tests/distributed/mfsdp_v2/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ class DistributedSetup:
def distributed_setup() -> Iterator[DistributedSetup]:
"""Read torchrun rank state and set up this rank's local device."""
# Some MFSDP v2 tests are sensitive to NCCL algorithm/channel choices. Clear
# CI launcher overrides before init_device_mesh initializes NCCL communicators
# so this bucket uses NCCL settings closer to production.
# the suite-wide NCCL defaults (set in the top-level conftest.py) before
# init_device_mesh initializes NCCL communicators so this bucket uses NCCL
# settings closer to production.
os.environ.pop("NCCL_MAX_NCHANNELS", None)
os.environ.pop("NCCL_NVLS_ENABLE", None)

Expand Down
3 changes: 0 additions & 3 deletions tests/unit_tests/run_ci_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,6 @@ DISTRIBUTED_ARGS=(
--redirects "3"
)

# Reduce memory usage by NCCL
export NCCL_MAX_NCHANNELS=1
export NCCL_NVLS_ENABLE=0
export ONE_LOGGER_JOB_CATEGORY=test

# Run a pytest command. On marker-driven platforms a bucket can legitimately
Expand Down
Loading