Skip to content

Remove unused variable in MultiCommTest#932

Open
pavanbalaji wants to merge 10 commits intometa-pytorch:mainfrom
pavanbalaji:export-D95155994
Open

Remove unused variable in MultiCommTest#932
pavanbalaji wants to merge 10 commits intometa-pytorch:mainfrom
pavanbalaji:export-D95155994

Conversation

@pavanbalaji
Copy link
Contributor

Summary:
Remove unused device = torchcomm.get_device() assignment in
the test setup helper. The variable was not referenced after
assignment.

Differential Revision: D95155994

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

meta-codesync bot commented Mar 4, 2026

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

@pavanbalaji pavanbalaji force-pushed the export-D95155994 branch 2 times, most recently from b670bc6 to 75c19f4 Compare March 5, 2026 04:08
pavanbalaji added a commit to pavanbalaji/torchcomms-1 that referenced this pull request Mar 5, 2026
Summary:
Pull Request resolved: meta-pytorch#932

Remove unused `device = torchcomm.get_device()` assignment in
the test setup helper. The variable was not referenced after
assignment.

Reviewed By: mingrany

Differential Revision: D95155994
pavanbalaji added a commit to pavanbalaji/torchcomms-1 that referenced this pull request Mar 5, 2026
Summary:
Pull Request resolved: meta-pytorch#932

Remove unused `device = torchcomm.get_device()` assignment in
the test setup helper. The variable was not referenced after
assignment.

Reviewed By: mingrany

Differential Revision: D95155994
@pavanbalaji pavanbalaji force-pushed the export-D95155994 branch 4 times, most recently from e970273 to 73634a8 Compare March 6, 2026 06:05
pavanbalaji added a commit to pavanbalaji/torchcomms-1 that referenced this pull request Mar 6, 2026
Summary:
Pull Request resolved: meta-pytorch#932

Remove unused `device = torchcomm.get_device()` assignment in
the test setup helper. The variable was not referenced after
assignment.

Reviewed By: mingrany

Differential Revision: D95155994
@pavanbalaji pavanbalaji force-pushed the export-D95155994 branch 2 times, most recently from 15a3500 to ab83bf4 Compare March 6, 2026 07:12
pavanbalaji added a commit to pavanbalaji/torchcomms-1 that referenced this pull request Mar 6, 2026
Summary:
Pull Request resolved: meta-pytorch#932

Remove unused `device = torchcomm.get_device()` assignment in
the test setup helper. The variable was not referenced after
assignment.

Reviewed By: mingrany

Differential Revision: D95155994
Summary:
The explicit template instantiation of env_to_value<uint64_t>
in Utils.cpp requires uint64_t to be defined. Add #include
<cstdint> to the header so the type is available both for
the implementation and for callers.

Differential Revision: D95509323
Summary:
StoreManager was a singleton that cached a root TCPStore on
MASTER_PORT for the entire process lifetime.  This caused two
problems: the port was held forever (preventing reuse), and
integration tests that create their own TCPStore on the same
port would hit "address already in use" errors.

Replace the singleton class with a plain free function
createPrefixedStore() that creates a fresh root store on every
call.  When the returned PrefixStore is destroyed, the root is
also destroyed and the port is freed.  Callers are expected to
perform a process barrier after destroying the store to ensure
all ranks have released it before the port is reused.

Other changes:
- Test helpers: createStore() now returns a plain TCPStore
  instead of a static-root PrefixStore, so the port is freed
  when destroyStore() is called.
- Remove test_duplciate_store (tested the now-removed
  prefix-reuse detection).

Differential Revision: D95622310
Summary:
Change anonymous enum alias to a named enum to fix
-Wsubobject-linkage warning. The using alias to an
anonymous enum has no linkage, which is invalid when
used as a member of a class with external linkage.
This only shows up in the OSS builds.

Differential Revision: D95487118
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:
RCCLX was already migrated to TorchCommTracingGuard but had a
leftover unused tracing_ member and its include. Remove both.

Differential Revision: D94998999
Summary:
All backends have been migrated to TorchCommTracingGuard. Remove
the legacy TorchCommTracing class and its three method
implementations from TorchCommTracing.hpp/.cpp.

Differential Revision: D94999001
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:
The fbcode-nonempty-init-py patternlint rule recommends keeping
__init__.py files empty and moving initialization code to a
separate module. However, for torchcomms this would not help:
we would still need to import those modules from __init__.py
to ensure they run at package import time (e.g., loading
libtorchcomms.so, registering metaclasses, setting up backends).
Moving the code out and re-importing it just adds indirection
with no benefit.

Add patternlint-disable comments to suppress the advice-level
warnings in the affected __init__.py files.

Differential Revision: D95155993
Summary:
Remove unused `device = torchcomm.get_device()` assignment in
the test setup helper. The variable was not referenced after
assignment.

Reviewed By: mingrany

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