You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: devops/scripts/benchmarks/CONTRIB.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,8 @@ The suite is structured around three main components: Suites, Benchmarks, and Re
29
29
*`unstable()`: If it returns a string reason, the benchmark is hidden by default and marked unstable.
30
30
*`get_tags()`: Returns a list of string tags (e.g., "SYCL", "UR", "micro", "application"). See `benches/base.py` for predefined tags.
31
31
*`stddev_threshold()`: Returns a custom standard deviation threshold (float) for stability checks, overriding the global default.
32
+
*`display_name()`: Returns a user-friendly name for the benchmark (default: `name()`).
33
+
*`explicit_group()`: Returns an explicit group name for results (string). If not set, results are grouped by the benchmark's `name()`. This is useful for grouping related results in visualizations.
32
34
***Helper Methods (Base Class):**
33
35
*`run_bench(command, env_vars, ld_library=[], add_sycl=True)`: Executes a command with appropriate environment setup (UR adapter, SYCL paths, extra env vars/libs). Returns stdout.
34
36
*`download(name, url, file, ...)`: Downloads and optionally extracts data dependencies into the working directory.
@@ -45,7 +47,6 @@ The suite is structured around three main components: Suites, Benchmarks, and Re
45
47
*`env`: Environment variables used (`dict[str, str]`).
46
48
*`stdout`: Full standard output of the benchmark run (string).
47
49
*`passed`: Boolean indicating if verification passed (default: `True`).
48
-
*`explicit_group`: Name for grouping results in visualization (string). Benchmarks in the same group are compared in tables/charts. Ensure consistent units and value ranges within a group.
49
50
*`stddev`: Standard deviation, if calculated by the benchmark itself (float, default: 0.0).
50
51
*`git_url`, `git_hash`: Git info for the benchmark's source code (string).
51
52
***Fields (set by Framework):**
@@ -63,6 +64,8 @@ The suite is structured around three main components: Suites, Benchmarks, and Re
63
64
*`unstable`: Reason if unstable, otherwise `None` (string).
64
65
*`tags`: List of associated tags (`list[str]`).
65
66
*`range_min`, `range_max`: Optional minimum/maximum value for the Y-axis range in charts. Defaults to `None`, with range determined automatically.
67
+
*`display_name`: Optional user-friendly name for the benchmark (string). Defaults to `name()`.
68
+
*`explicit_group`: Optional explicit group name for results (string). Used to group results in visualizations.
66
69
67
70
## Adding New Benchmarks
68
71
@@ -79,7 +82,7 @@ The suite is structured around three main components: Suites, Benchmarks, and Re
79
82
***Ensure determinism:** Minimize run-to-run variance. High standard deviation (`> stddev_threshold`) triggers reruns.
80
83
***Handle configuration:** If a benchmark requires specific hardware/software, detect it in `setup()` and potentially skip gracefully if requirements aren't met (e.g., return an empty list from `run` or don't add it in the Suite's `benchmarks()` method).
81
84
***Use unique names:** Ensure `benchmark.name()` and `result.label` are descriptive and unique.
82
-
***Group related results:** Use `result.explicit_group` consistently for results you want to compare directly in outputs. Ensure units match within a group. If defining group-level metadata in the Suite, ensure the chosen explicit_group name starts with the corresponding key defined in additional_metadata.
85
+
***Group related results:** Use `benchmark.explicit_group()` consistently for results you want to compare directly in outputs. Ensure units match within a group. If defining group-level metadata in the Suite, ensure the chosen explicit_group name starts with the corresponding key defined in additional_metadata.
83
86
***Test locally:** Before submitting changes, test with relevant drivers/backends (e.g., using `--compute-runtime --build-igc` for L0). Check the visualization locally if possible (--output-markdown --output-html, then open the generated files).
0 commit comments