Skip to content

Commit

Permalink
fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
will-cromar committed Nov 27, 2023
1 parent 80926b3 commit f51ae47
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions torch_xla/csrc/runtime/pjrt_computation_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -641,14 +641,14 @@ PjRtComputationClient::ExecuteReplicated(
const PjRtComputation& pjrt_computation =
dynamic_cast<const PjRtComputation&>(computation);

std::vector<std::vector<xla::PjRtBuffer*>> argument_handles(
devices.size(), std::vector<xla::PjRtBuffer*>(arguments.size()));
{
tsl::profiler::TraceMe activity(
"PjRtComputationClient::ExecuteReplicated_argument_handle",
tsl::profiler::TraceMeLevel::kInfo);

absl::BlockingCounter counter(arguments.size());
std::vector<std::vector<xla::PjRtBuffer*>> argument_handles(
devices.size(), std::vector<xla::PjRtBuffer*>(arguments.size()));
// TODO: tune and document cost estimate
pool_.ParallelFor(arguments.size(), 30000, [&](int64_t start, int64_t end) {
tsl::profiler::TraceMe activity(
Expand All @@ -671,7 +671,6 @@ PjRtComputationClient::ExecuteReplicated(
}
counter.DecrementCount();
};
thread::Schedule(std::move(buffer_converter));
});
counter.Wait();
}
Expand Down

0 comments on commit f51ae47

Please sign in to comment.