Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions xla/service/hlo_graph_dumper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2221,7 +2221,7 @@ static std::string GraphTitle(const HloComputation& computation) {

absl::StatusOr<std::string> WrapFusionExplorer(
const HloComputation& computation) {
absl::MutexLock lock(&fusion_visualizer_state_mu);
absl::MutexLock lock(fusion_visualizer_state_mu);
const FusionVisualizerProgress& visualizer_progress =
fusion_visualizer_states[FusionVisualizerStateKey(computation)];
return WrapFusionExplorer(visualizer_progress, GraphTitle(computation));
Expand Down Expand Up @@ -2257,7 +2257,7 @@ static absl::StatusOr<std::string> WrapDotInFormat(

void RegisterGraphToURLRenderer(
std::function<absl::StatusOr<std::string>(absl::string_view)> renderer) {
absl::MutexLock lock(&url_renderer_mu);
absl::MutexLock lock(url_renderer_mu);
if (url_renderer != nullptr) {
LOG(WARNING) << "Multiple calls to RegisterGraphToURLRenderer. Last call "
"wins, but because order of initialization in C++ is "
Expand All @@ -2273,7 +2273,7 @@ void RegisterFusionState(const HloComputation& computation,
absl::string_view label,
const HloInstruction& consumer,
const HloInstruction* producer) {
absl::MutexLock lock(&fusion_visualizer_state_mu);
absl::MutexLock lock(fusion_visualizer_state_mu);
FusionVisualizerProgress& fusion_progress =
fusion_visualizer_states[FusionVisualizerStateKey(computation)];

Expand Down Expand Up @@ -2306,7 +2306,7 @@ absl::StatusOr<std::string> RenderGraph(
HloRenderOptions hlo_render_options,
std::optional<absl::flat_hash_map<const HloInstruction*, ColorStats>>
color_map) {
absl::MutexLock lock(&url_renderer_mu);
absl::MutexLock lock(url_renderer_mu);
if (format == RenderedGraphFormat::kUrl && url_renderer == nullptr) {
return Unavailable("Can't render as URL; no URL renderer was registered.");
}
Expand Down Expand Up @@ -2363,7 +2363,7 @@ absl::StatusOr<std::string> RenderNeighborhoodAround(
const absl::flat_hash_set<const HloInstruction*>& boundary,
std::optional<absl::flat_hash_map<const HloInstruction*, ColorStats>>
color_map) {
absl::MutexLock lock(&url_renderer_mu);
absl::MutexLock lock(url_renderer_mu);
if (format == RenderedGraphFormat::kUrl && url_renderer == nullptr) {
return FailedPrecondition(
"Can't render as URL; no URL renderer was registered.");
Expand All @@ -2383,7 +2383,7 @@ absl::StatusOr<std::string> RenderNeighborhoodAround(
absl::StatusOr<std::string> RenderAllPathsFromTo(
const HloInstruction& from, const HloInstruction& to, int64_t max_nodes,
RenderedGraphFormat format, HloRenderOptions hlo_render_options) {
absl::MutexLock lock(&url_renderer_mu);
absl::MutexLock lock(url_renderer_mu);
if (format == RenderedGraphFormat::kUrl && url_renderer == nullptr) {
return FailedPrecondition(
"Can't render as URL; no URL renderer was registered.");
Expand Down
8 changes: 4 additions & 4 deletions xla/service/hlo_runner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ HloRunner::HloRunner(se::Platform* platform, int intra_op_parallelism_threads) {
HloRunner::~HloRunner() {}

se::DeviceMemoryAllocator* HloRunner::GetAllocator() {
absl::MutexLock lock(&mu_);
absl::MutexLock lock(mu_);
if (allocator_ == nullptr) {
allocator_ = std::make_unique<se::StreamExecutorMemoryAllocator>(
backend().default_stream_executor());
Expand Down Expand Up @@ -649,7 +649,7 @@ absl::StatusOr<std::vector<Literal>> HloRunner::ExecuteReplicated(
pool.Schedule([&, i] {
auto result = executable->ExecuteOnStream(
&service_run_options[i], argument_buffer_slices[i]);
absl::MutexLock lock(&mutex);
absl::MutexLock lock(mutex);
thread_results[i] = std::move(result);
});
}
Expand Down Expand Up @@ -710,7 +710,7 @@ absl::StatusOr<std::vector<Literal>> HloRunner::ExecuteReplicated(
pool.Schedule([&, i, executable] {
auto result = executable->executable()->ExecuteOnStream(
&service_run_options[i], argument_buffer_slices[i]);
absl::MutexLock lock(&mutex);
absl::MutexLock lock(mutex);
thread_results[i] = std::move(result);
});
}
Expand Down Expand Up @@ -870,7 +870,7 @@ absl::StatusOr<const HloProto* absl_nonnull> HloRunner::HloProtoFromWrapped(
}

void HloRunner::MaybeUpdateEntryComputationLayout(HloModule* module) {
absl::MutexLock lock(&mu_);
absl::MutexLock lock(mu_);
if (module_ids_with_updated_layouts_.insert(module->unique_id()).second) {
xla::UpdateEntryComputationLayout(module, device_shape_representation_fn_);
}
Expand Down
4 changes: 2 additions & 2 deletions xla/service/hlo_runner_pjrt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ absl::StatusOr<std::vector<Literal>> HloRunnerPjRt::ExecuteReplicatedImpl(
VLOG(1) << "Infeed step " << step;
}
}
absl::MutexLock lock(&infeed_outfeed_status_mu);
absl::MutexLock lock(infeed_outfeed_status_mu);
infeed_outfeed_status.Update(per_feed_status);
});
}
Expand Down Expand Up @@ -767,7 +767,7 @@ absl::StatusOr<std::vector<Literal>> HloRunnerPjRt::ExecuteReplicatedImpl(
VLOG(1) << "Outfeed step " << step;
}
}
absl::MutexLock lock(&infeed_outfeed_status_mu);
absl::MutexLock lock(infeed_outfeed_status_mu);
infeed_outfeed_status.Update(per_feed_status);
});
}
Expand Down
Loading