Move hint key constants to headers#995
Open
pavanbalaji wants to merge 5 commits intometa-pytorch:mainfrom
Open
Move hint key constants to headers#995pavanbalaji wants to merge 5 commits intometa-pytorch:mainfrom
pavanbalaji wants to merge 5 commits intometa-pytorch:mainfrom
Conversation
Contributor
|
@pavanbalaji has exported this pull request. If you are a Meta employee, you can view the originating Diff in D95748619. |
3df92aa to
3a36ce9
Compare
6d7816e to
ef39e64
Compare
06eaa77 to
93bc3cf
Compare
93bc3cf to
4d7768c
Compare
4d7768c to
cb873eb
Compare
cb873eb to
610a4cb
Compare
610a4cb to
9571962
Compare
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: 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/. Differential Revision: D95712701
9571962 to
2a1e3c7
Compare
Summary: Pull Request resolved: meta-pytorch#995 Move hint key string constants (e.g. kHintHighPriorityStream, kHintMaxEventPoolSize) from anonymous namespaces in .cpp files to their respective headers across all backends (NCCL, NCCLX, RCCL, RCCLX, XCCL, MCCL). This makes the constants accessible to tests and other translation units. Update tests and bootstrap skip sets to use the named constants instead of duplicated magic strings. Reviewed By: kapilsh Differential Revision: D95748619
2a1e3c7 to
d04a7ba
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Move hint key string constants (e.g. kHintHighPriorityStream,
kHintMaxEventPoolSize) from anonymous namespaces in .cpp files
to their respective headers across all backends (NCCL, NCCLX,
RCCL, RCCLX, XCCL, MCCL). This makes the constants accessible
to tests and other translation units.
Update tests and bootstrap skip sets to use the named constants
instead of duplicated magic strings.
Differential Revision: D95748619