Skip to content

Create Profiler when caller injects a reporter, bypassing NCCL_CTRAN_TRANSPORT_PROFILER gate (#2005)#2005

Open
mlunar-meta wants to merge 2 commits intometa-pytorch:mainfrom
mlunar-meta:export-D100086191
Open

Create Profiler when caller injects a reporter, bypassing NCCL_CTRAN_TRANSPORT_PROFILER gate (#2005)#2005
mlunar-meta wants to merge 2 commits intometa-pytorch:mainfrom
mlunar-meta:export-D100086191

Conversation

@mlunar-meta
Copy link
Copy Markdown
Contributor

@mlunar-meta mlunar-meta commented Apr 9, 2026

Summary:

MCCL injects its own McclAlgoProfilerReporter into ctran via ctranInit(),
but the ctran::Profiler was only created when NCCL_CTRAN_TRANSPORT_PROFILER=true
(default: false). This silently dropped the MCCL reporter, preventing all algo
profiler data from reaching the mccl_operation_trace Scuba table.

Fix: create the Profiler whenever a custom reporter is injected (reporter != nullptr),
regardless of NCCL_CTRAN_TRANSPORT_PROFILER. The NCCLx path (no reporter, defaults to
DefaultAlgoProfilerReporter) retains the existing CVAR gate.

MCCL already has its own enable gate (MCCL_SCUBA_ENABLED) inside
McclAlgoProfilerReporter, so requiring a second NCCL-prefixed CVAR is redundant.

Differential Revision: D100086191

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 9, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync bot commented Apr 9, 2026

@mlunar-meta has exported this pull request. If you are a Meta employee, you can view the originating Diff in D100086191.

Summary:

Add a new MCCL-level CVAR to control ctran transport profiling from MCCL.
Defaults to true so MCCL enables profiling without requiring users to set
the NCCL_CTRAN_TRANSPORT_PROFILER env var.

Differential Revision: D100181757
…TRANSPORT_PROFILER gate (meta-pytorch#2005)

Summary:

MCCL injects its own McclAlgoProfilerReporter into ctran via ctranInit(),
but the ctran::Profiler was only created when NCCL_CTRAN_TRANSPORT_PROFILER=true
(default: false). This silently dropped the MCCL reporter, preventing all algo
profiler data from reaching the mccl_operation_trace Scuba table.

Fix: create the Profiler whenever a custom reporter is injected (reporter != nullptr),
regardless of NCCL_CTRAN_TRANSPORT_PROFILER. The NCCLx path (no reporter, defaults to
DefaultAlgoProfilerReporter) retains the existing CVAR gate.

MCCL already has its own enable gate (MCCL_SCUBA_ENABLED) inside
McclAlgoProfilerReporter, so requiring a second NCCL-prefixed CVAR is redundant.

Differential Revision: D100086191
@meta-codesync meta-codesync bot changed the title Create Profiler when caller injects a reporter, bypassing NCCL_CTRAN_TRANSPORT_PROFILER gate Create Profiler when caller injects a reporter, bypassing NCCL_CTRAN_TRANSPORT_PROFILER gate (#2005) Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant