Skip to content

Remove torchcomm::<backend>:: prefix from hint keys#978

Open
pavanbalaji wants to merge 4 commits intometa-pytorch:mainfrom
pavanbalaji:export-D95712701
Open

Remove torchcomm::<backend>:: prefix from hint keys#978
pavanbalaji wants to merge 4 commits intometa-pytorch:mainfrom
pavanbalaji:export-D95712701

Conversation

@pavanbalaji
Copy link
Copy Markdown
Contributor

Summary:
A CommOptions always goes to exactly one backend, so the
torchcomm:::: prefix on hint keys is unnecessary
and overly verbose. This change simplifies all hint keys to
bare names (e.g., "high_priority_stream" instead of
"torchcomm::nccl::high_priority_stream").

The prefix-based filtering loop (starts_with + throw on
unrecognized) was also a latent bug: only high_priority_stream
was handled, so passing both high_priority_stream and
max_event_pool_size would throw on the second key.

Replace the starts_with loops in NCCL/NCCLX/RCCL/RCCLX/XCCL
with direct contains() lookups, matching the pattern already
used for max_event_pool_size and other keys. Add skip sets
in the bootstrap populateNcclConfigFromHints functions so the
TorchComm-layer keys don't trigger spurious "unsupported hint"
warnings. Update all tests and documentation accordingly.

No external callers use the torchcomm:: prefix -- the change
is fully contained within comms/torchcomms/.

Differential Revision: D95712701

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

meta-codesync bot commented Mar 8, 2026

@pavanbalaji has exported this pull request. If you are a Meta employee, you can view the originating Diff in D95712701.

Summary:
Move StoreManager.hpp/cpp from the top-level directory to
utils/ to reflect its internal utility status. Update all
include paths across backend bootstrap files and BUCK. Remove
unused includes from utils/Utils.cpp.

Differential Revision: D94889993
Summary:
Move the internal logging utility header from the top-level
torchcomms directory into utils/ alongside other utility files
(Utils.hpp, StoreManager.hpp), and rename it to Logging.hpp
for consistency with the project's naming conventions.

Update all source files that include the header to use the
new path, preserving the existing include style (double-quote,
angle-bracket, and manual tag variants).

Also remove unused caffe2:torch-cpp-cpu dep from
tests/integration/cpp/BUCK (linter fix).

Differential Revision: D94889992
Summary:
Move TorchCommTracingGuard from TorchCommTracing.hpp/.cpp to
utils/TracingGuard.hpp/.cpp and rename the class to TracingGuard.
This matches the existing utils pattern (utils/Logging.hpp,
utils/Utils.hpp, utils/StoreManager.hpp) and reflects that
the class is an internal utility, not a public API.

Updated include paths and class references across all backends
(nccl, ncclx, rccl, rcclx, xccl, gloo, hccl, mccl). The BUCK
target name torchcomms-tracing-cpp is unchanged so downstream
deps are unaffected.

Differential Revision: D95017391
Summary:
Pull Request resolved: meta-pytorch#978

A CommOptions always goes to exactly one backend, so the
torchcomm::<backend>:: prefix on hint keys is unnecessary
and overly verbose. This change simplifies all hint keys to
bare names (e.g., "high_priority_stream" instead of
"torchcomm::nccl::high_priority_stream").

The prefix-based filtering loop (starts_with + throw on
unrecognized) was also a latent bug: only high_priority_stream
was handled, so passing both high_priority_stream and
max_event_pool_size would throw on the second key.

Replace the starts_with loops in NCCL/NCCLX/RCCL/RCCLX/XCCL
with direct contains() lookups, matching the pattern already
used for max_event_pool_size and other keys. Add skip sets
in the bootstrap populateNcclConfigFromHints functions so the
TorchComm-layer keys don't trigger spurious "unsupported hint"
warnings. Update all tests and documentation accordingly.

No external callers use the torchcomm:: prefix -- the change
is fully contained within comms/torchcomms/.

Reviewed By: kapilsh

Differential Revision: D95712701
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