Skip to content

Commit

Permalink
replace uses of suffixes as list-of-two to tuple in DataFrame.merge i…
Browse files Browse the repository at this point in the history
…nvocations (#182)

Summary:
X-link: facebookincubator/zstrong#978

Pull Request resolved: #182

Differential Revision: D62041393

fbshipit-source-id: 5c032fe5e542b975862e28a9ff1d7c7737e788a6
  • Loading branch information
igorsugak authored and facebook-github-bot committed Aug 31, 2024
1 parent e818c24 commit fc8f5cb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions hta/analyzers/critical_path_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ def _get_cuda_runtime_calls_df(self, retain_index: bool = True) -> pd.DataFrame:
gpu_kernels[["stream", "index", "pid"]],
left_on="index_correlation",
right_on="index",
suffixes=["", "_kernel"],
suffixes=("", "_kernel"),
)
.set_index("index")
).rename(columns={"pid_kernel": "gpu_kernel"})
Expand Down Expand Up @@ -688,7 +688,7 @@ def find_previous_launch(gpu, stream):
left_on="previous_launch_id",
right_on="launch_id",
how="left",
suffixes=["", "_launch_event"],
suffixes=("", "_launch_event"),
# multiple CUDA records can have same previous launch ID, but not vice versa
validate="many_to_one",
)
Expand Down Expand Up @@ -771,7 +771,7 @@ def _get_cuda_stream_wait_event_df(self) -> Optional[pd.DataFrame]:
gpu_kernels[["stream", "index"]],
left_on="index_correlation",
right_on="index",
suffixes=["", "_kernel"],
suffixes=("", "_kernel"),
)
.set_index("index")
)
Expand Down Expand Up @@ -805,7 +805,7 @@ def find_next_launch(pid, tid, stream):
left_on="next_launch_id",
right_on="launch_id",
how="left",
suffixes=["", "_launch_event"],
suffixes=("", "_launch_event"),
)

pid_tid_streams = (
Expand Down Expand Up @@ -929,7 +929,7 @@ def _construct_graph_from_kernels(self) -> None:
left_on="wait_on_cuda_event_record_corr_id",
right_on="correlation",
how="left",
suffixes=["", "_cuda_record"],
suffixes=("", "_cuda_record"),
)
.fillna(-1)
.astype(int)
Expand Down

0 comments on commit fc8f5cb

Please sign in to comment.