10000 [AutoAccept][Codemod][FBSourceClangFormatLinter] Daily `arc lint --ta… · pytorch/pytorch@7a8c64d · GitHub
[go: up one dir, main page]

Skip to content

Commit 7a8c64d

Browse files
generatedunixname89002005325676facebook-github-bot
generatedunixname89002005325676
authored andcommitted
[AutoAccept][Codemod][FBSourceClangFormatLinter] Daily arc lint --take CLANGFORMAT
Reviewed By: zertosh Differential Revision: D26122735 fbshipit-source-id: 0ff54a67192835c2daa331c1f13c252a96f494cb
1 parent 0e8e739 commit 7a8c64d

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

torch/csrc/distributed/rpc/request_callback_no_python.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -345,13 +345,12 @@ void RequestCallbackNoPython::processForwardAutogradReq(
345345
const std::shared_ptr<JitFuture>& responseFuture) const {
346346
auto& rpcWithAutograd = static_cast<RpcWithAutograd&>(rpc);
347347

348-
// Need to reverse the device map for the backward pass of distributed
349-
// autograd.
350-
std::unordered_map<c10::DeviceIndex, c10::DeviceIndex> reverseDeviceMap;
351-
for (const auto& mapEntry : rpcWithAutograd.deviceMap()) {
352-
reverseDeviceMap.insert({mapEntry.second, mapEntry.first});
353-
}
354-
348+
// Need to reverse the device map for the backward pass of distributed
349+
// autograd.
350+
std::unordered_map<c10::DeviceIndex, c10::DeviceIndex> reverseDeviceMap;
351+
for (const auto& mapEntry : rpcWithAutograd.deviceMap()) {
352+
reverseDeviceMap.insert({mapEntry.second, mapEntry.first});
353+
}
355354

356355
// Attach 'recv' autograd function.
357356
auto autogradContext = addRecvRpcBackward(

torch/csrc/distributed/rpc/tensorpipe_utils.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ std::tuple<tensorpipe::Message, TensorpipeWriteBuffers> tensorpipeSerialize(
9090
jit::getWriteableTensorData(tensorDataVec[i], /* toCpu */ false);
9191
// Enforce memory copy if tensor is created from torch::from_blob, means
9292
// that the tensor doesn't own the memory.
93-
std::string metadata =
94-
deviceIndices.empty() || deviceIndices[i] == -1
95-
? "" : std::to_string(deviceIndices[i]);
93+
std::string metadata = deviceIndices.empty() || deviceIndices[i] == -1
94+
? ""
95+
: std::to_string(deviceIndices[i]);
9696

9797
if (!tensorData.storageHasDeleter()) {
9898
std::vector<char> storageData(

0 commit comments

Comments
 (0)
0