Skip to content
Merged
Changes from 2 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
13 changes: 13 additions & 0 deletions BackendBench/scripts/dataset_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
"_fft_c2c.default", # cuFFT only supports dimensions whose sizes are powers of two when computing in half precision
]

UNTESTABLE_OPERATORS = [
"empty_like",
Copy link
Member

Choose a reason for hiding this comment

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

we can test metadata if not the values, like we expect the output to have a certain shape

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same reply as above, I'll add comments to talk about this

"new_empty",
"new_empty_strided",
"bernoulli",
Copy link
Member

@msaroufim msaroufim Aug 21, 2025

Choose a reason for hiding this comment

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

I feel like this one is different from the others, it is testable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think fixing the error message to say we don't support them yet is correct. There is a way to test these but it would require some custom work

]


def apply_skip_ops_filter(ops):
for op in ops:
Expand All @@ -28,6 +35,12 @@ def apply_skip_ops_filter(ops):
op["why_excluded"].append("We cannot run this op on backendbench yet")
op["runnable"] = False

if any(skip_op in op["op_name"] for skip_op in UNTESTABLE_OPERATORS):
op["included_in_benchmark"] = False
op["why_excluded"].append(
"This op creates a unpredictable output, and therefore cannot be tested for correctness"
)

if op["is_synthetic"]:
op["included_in_benchmark"] = False
op["why_excluded"].append(
Expand Down