Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Richard Mckinsey authored and Michael Richard Mckinsey committed Oct 9, 2023
1 parent d995c5c commit 739d4aa
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions thicket/ncu.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,13 @@ def _read_ncu(thicket, ncu_report_mapping):
# Grab first action
first_action = range.action_by_idx(0)
# Metric names
metric_names = [first_action[name].name() for name in first_action.metric_names()]
metric_names = [
first_action[name].name() for name in first_action.metric_names()
]
# Setup rollup dict
rollup_dict = {name: first_action[name].rollup_operation() for name in metric_names}
rollup_dict = {
name: first_action[name].rollup_operation() for name in metric_names
}

# Query action in range
for action in tqdm(range):
Expand Down Expand Up @@ -143,9 +147,10 @@ def _read_ncu(thicket, ncu_report_mapping):
# Set mapping
kernel_map[kernel_name] = matched_node


metric_values = [action[name].value() for name in metric_names]
assert len(metric_names) == len(metric_values)
data_dict[(matched_node, ncu_hash)].append(dict(zip(metric_names, metric_values)))
data_dict[(matched_node, ncu_hash)].append(
dict(zip(metric_names, metric_values))
)

return data_dict, rollup_dict

0 comments on commit 739d4aa

Please sign in to comment.