Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter axis values in perf analysis #1304

Merged
Merged
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: 12 additions & 0 deletions benchmarks/scripts/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@ def iterate_case_dfs(args, callable):

pattern = re.compile(args.R)

exact_values = {}
if args.args:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be sure will that also catch -a or only --args

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That catches -a

for value in args.args:
name, val = value.split('=')
exact_values[name] = val

for algname in algnames:
if not pattern.match(algname):
continue
Expand All @@ -239,6 +245,10 @@ def iterate_case_dfs(args, callable):
target_df = target_df.drop(columns=['ctk', 'cccl', 'gpu'])
target_df = compute_speedup(target_df)

for key in exact_values:
if key in target_df.columns:
target_df = target_df[target_df[key] == exact_values[key]]

for ct_point in ct_space(target_df):
point_str = ", ".join(["{}={}".format(k, ct_point[k]) for k in ct_point])
case_df = extract_complete_variants(extract_case(target_df, ct_point))
Expand Down Expand Up @@ -742,6 +752,8 @@ def parse_arguments():
'--variants-pdf', type=str, help="Show matching variants data.")
parser.add_argument(
'--variants-ratio', type=str, help="Show matching variants data.")
parser.add_argument('-a', '--args', action='append',
type=str, help="Parameter in the format `Param=Value`.")
return parser.parse_args()


Expand Down
Loading