Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
e6ca992
Move UR devops scripts to devops folder
ianayl Feb 27, 2025
3d42db2
Restrict number of cores used
ianayl Feb 28, 2025
fc70520
Merge branch 'sycl' of https://github.com/intel/llvm into unify-bench…
ianayl Mar 4, 2025
4f08dd6
Restore ur-benchmark*.yml
ianayl Mar 4, 2025
497dcce
[benchmarks] improve HTML and Markdown output
pbalcer Mar 5, 2025
3cbed5e
Test UR benchmarking suite
ianayl Mar 5, 2025
1936207
Merge branch 'unify-benchmark-ci' of https://github.com/intel/llvm in…
ianayl Mar 5, 2025
f79bbbf
Bump tolerance to 7%
ianayl Mar 5, 2025
ffc8139
Revert "Bump tolerance to 7%"
ianayl Mar 5, 2025
0a34e0d
[benchmarks] fix failing benchmarks, improve html output
pbalcer Mar 6, 2025
3f42420
[benchmarks] fix python formatting with black
pbalcer Mar 6, 2025
1c7b189
update driver version
pbalcer Mar 6, 2025
ad13e93
simplify preset implementation and fix normal preset
pbalcer Mar 6, 2025
68ed0c4
Add PVC and BMG as runners
ianayl Mar 6, 2025
18fff93
Merge branch 'unify-benchmark-ci' of https://github.com/intel/llvm in…
ianayl Mar 6, 2025
3a65b98
Install dependencies before running UR script
ianayl Mar 6, 2025
220121a
Use venv for python packages
ianayl Mar 6, 2025
37d361c
Install venv before using venv
ianayl Mar 6, 2025
07f1e10
[benchmarks] allow specifying custom results directories
pbalcer Mar 7, 2025
64cf79c
[benchmarks] sort runs by date for html output
pbalcer Mar 7, 2025
6c28d33
simplify presets, remove suites if all set
pbalcer Mar 10, 2025
e15b94f
[benchmarks] use python venv for scripts
pbalcer Mar 10, 2025
78fd037
Run apt with sudo
ianayl Mar 10, 2025
0ed1599
Merge branch 'unify-benchmark-ci' of https://github.com/intel/llvm in…
ianayl Mar 10, 2025
82b6e55
Ignore "missing" apt packages in workflow
ianayl Mar 10, 2025
162cba0
Change pip to install to user
ianayl Mar 10, 2025
848f741
Ignore system controlled python env
ianayl Mar 10, 2025
918604e
[CI] use realpaths when referring to SYCL
ianayl Mar 10, 2025
72d8730
[CI] use minimal preset when running benchmarks
ianayl Mar 10, 2025
066f5a6
[CI] Allow 2 bench scripts locations (#17394)
lukaszstolarczuk Mar 12, 2025
18e5291
add ulls compute benchmarks
pbalcer Mar 12, 2025
237750e
[CI][Benchmark] Decouple results from existing file structure, fetch …
ianayl Mar 11, 2025
ba1297f
[benchmark] Disabling UR test suites
ianayl Mar 12, 2025
cd6097f
update compute benchmarks and fix requirements
pbalcer Mar 13, 2025
c4e92c6
fix url updates
pbalcer Mar 13, 2025
ed8eecc
use timestamps in result file names
pbalcer Mar 13, 2025
130212d
add hostname to benchmark run
pbalcer Mar 13, 2025
a884df8
Merge branch 'sycl' of https://github.com/intel/llvm into unify-bench…
ianayl Mar 13, 2025
5323386
add SubmitGraph benchmark
pbalcer Mar 13, 2025
5bd1d56
Restore sycl-linux-run-tests benchmarking action
ianayl Mar 13, 2025
e9b1375
Restore old SYCL benchmarking CI
ianayl Mar 13, 2025
a3edf7a
Add benchmarking results to sycl-docs.yml
ianayl Mar 13, 2025
6620e4a
[CI] Bump compute bench (#17431)
lukaszstolarczuk Mar 13, 2025
f4a2e39
Initial implementation of unified benchmark workflow
ianayl Mar 13, 2025
5d3b0d9
Merge branch 'unify-benchmark-ci' of https://github.com/intel/llvm in…
ianayl Mar 13, 2025
38394bb
[CI] Use commit hash instead, fix issues with run
ianayl Mar 13, 2025
f232b93
add benchmark metadata
pbalcer Mar 14, 2025
30cd308
apply formatting
pbalcer Mar 14, 2025
5e0539a
fix multiple descriptions/notes
pbalcer Mar 14, 2025
137407a
fix benchmark descriptions
pbalcer Mar 14, 2025
e0f5ca6
fix remote html output
pbalcer Mar 14, 2025
1041db6
fix metadata collection with dry run
pbalcer Mar 14, 2025
fae04f4
cleanup compute bench, fix readme, use newer sycl-bench
pbalcer Mar 14, 2025
cfa4a9c
[CI] configure upload results
ianayl Mar 14, 2025
ca963e6
[CI] Change config to update during workflow run instead
ianayl Mar 14, 2025
45a02e1
[CI] Change save name depending on build
ianayl Mar 14, 2025
98f9d38
bump to 2024-2025
ianayl Mar 14, 2025
ef88ea0
[CI] Enforce commit hash to be string regardless
ianayl Mar 14, 2025
b7acba2
cleanup options in js scripts and fix ordering on bar charts
pbalcer Mar 18, 2025
e330a50
use day on x axis for timeseries
pbalcer Mar 18, 2025
cde744c
Merge branch 'sycl' of https://github.com/intel/llvm into unify-bench…
ianayl Mar 19, 2025
cae7049
[benchmarks] Undo merging in prior tests
ianayl Mar 19, 2025
6bff3d6
add an option to limit build parallelism
pbalcer Mar 20, 2025
3662b43
tiny tweaks for benchmark tags
pbalcer Mar 20, 2025
d2610c3
add support for benchmark tags
pbalcer Mar 20, 2025
ffc60bf
support for tags in html
pbalcer Mar 20, 2025
75dd229
better and more tags
pbalcer Mar 20, 2025
cec8f05
formatting
pbalcer Mar 20, 2025
a0d8370
fix fetching tags from remote json
pbalcer Mar 20, 2025
c7f8d10
fix results /w descriptions and add url/commit of benchmarks
pbalcer Mar 20, 2025
1dad513
fix git repo/hash for benchmarks
pbalcer Mar 20, 2025
8437b89
Merge branch 'sycl' of https://github.com/intel/llvm into unify-bench…
ianayl Mar 21, 2025
2dbf350
Revert changes to workflow files
ianayl Mar 21, 2025
a4a9907
Revert changes to composite actions
ianayl Mar 21, 2025
bdef08b
Revert changes to get_system_info.sh
ianayl Mar 21, 2025
9e51c86
Revert changes not related to metadata
ianayl Mar 22, 2025
6fa722b
Merge branch 'sycl' of https://github.com/intel/llvm into benchmark-m…
ianayl Mar 22, 2025
5cc02c5
Revert changes to html
ianayl Mar 22, 2025
b49ff88
Revert presets.py
ianayl Mar 22, 2025
9357df2
Revert benchmark.yml
ianayl Mar 22, 2025
115dd5e
Merge branch 'benchmark-metadata' of https://github.com/ianayl/sycl i…
ianayl Mar 24, 2025
03bfd15
Update imports to reflect result.py move
ianayl Mar 24, 2025
0ff0142
Add benchmark history updates
ianayl Mar 24, 2025
1ef9251
Correct bad conflict resolution over cudnn/cublas flags
ianayl Mar 25, 2025
31c6695
Remove use of typing to stay consistent across files
ianayl Mar 25, 2025
136f64e
Remove debug comments
ianayl Mar 25, 2025
ccb2a9c
Remove trailing spaces
ianayl Mar 25, 2025
f8ccc30
Specify that git metadata is modifiable
ianayl Mar 25, 2025
c54cd76
Remove unused metadata variable for now
ianayl Mar 25, 2025
8b78c64
Add markdown output changes from unify-benchmark-ci
ianayl Mar 25, 2025
43d3503
Re-enable output-dir option
ianayl Mar 25, 2025
9e43173
Merge branch 'benchmark-scripts-markdown' of https://github.com/ianay…
ianayl Mar 26, 2025
b954976
Fix typo in argparse help message
ianayl Mar 27, 2025
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
28 changes: 18 additions & 10 deletions devops/scripts/benchmarks/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,14 +270,18 @@ def main(directory, additional_env_vars, save_name, compare_names, filter):

if options.output_markdown:
markdown_content = generate_markdown(
this_name, chart_data, options.output_markdown
this_name, chart_data, failures, options.output_markdown
)

with open("benchmark_results.md", "w") as file:
md_path = options.output_directory
if options.output_directory is None:
md_path = os.getcwd()

with open(os.path.join(md_path, "benchmark_results.md"), "w") as file:
file.write(markdown_content)

print(
f"Markdown with benchmark results has been written to {os.getcwd()}/benchmark_results.md"
f"Markdown with benchmark results has been written to {md_path}/benchmark_results.md"
)

saved_name = save_name if save_name is not None else this_name
Expand Down Expand Up @@ -381,12 +385,6 @@ def validate_and_parse_env_args(env_args):
help="Regex pattern to filter benchmarks by name.",
default=None,
)
parser.add_argument(
"--epsilon",
type=float,
help="Threshold to consider change of performance significant",
default=options.epsilon,
)
parser.add_argument(
"--verbose", help="Print output of all the commands.", action="store_true"
)
Expand Down Expand Up @@ -415,6 +413,12 @@ def validate_and_parse_env_args(env_args):
parser.add_argument(
"--output-html", help="Create HTML output", action="store_true", default=False
)
parser.add_argument(
"--output-dir",
type=str,
help="Location for output files, if --output-html or --output-markdown was specified.",
default=None,
)
parser.add_argument(
"--dry-run",
help="Do not run any actual benchmarks",
Expand Down Expand Up @@ -480,7 +484,6 @@ def validate_and_parse_env_args(env_args):
options.sycl = args.sycl
options.iterations = args.iterations
options.timeout = args.timeout
options.epsilon = args.epsilon
options.ur = args.ur
options.ur_adapter = args.adapter
options.exit_on_failure = args.exit_on_failure
Expand All @@ -503,6 +506,11 @@ def validate_and_parse_env_args(env_args):
if args.compute_runtime is not None:
options.build_compute_runtime = True
options.compute_runtime_tag = args.compute_runtime
if args.output_dir is not None:
if not os.path.isdir(args.output_dir):
parser.error("Specified --output-dir is not a valid path")
options.output_directory = os.path.abspath(args.output_dir)


benchmark_filter = re.compile(args.filter) if args.filter else None

Expand Down
3 changes: 1 addition & 2 deletions devops/scripts/benchmarks/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ class Options:
compare_max: int = 10 # average/median over how many results
output_markdown: MarkdownSize = MarkdownSize.SHORT
output_html: bool = False
output_directory: str = None
dry_run: bool = False
# these two should probably be merged into one setting
stddev_threshold: float = 0.02
epsilon: float = 0.02
iterations_stddev: int = 5
build_compute_runtime: bool = False
extra_ld_libraries: list[str] = field(default_factory=list)
Expand Down
42 changes: 25 additions & 17 deletions devops/scripts/benchmarks/output_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def get_improved_regressed_summary(is_improved: bool, rows_count: int):
"\n<details>\n"
"<summary>\n"
f"{title} {rows_count} "
f"(threshold {options.epsilon*100:.2f}%)\n"
f"(threshold {options.stddev_threshold*100:.2f}%)\n"
"</summary>\n\n"
)

Expand Down Expand Up @@ -138,17 +138,6 @@ def generate_markdown_details(
env_dict = res.env
command = res.command

# If data is collected from already saved results,
# the content is parsed as strings
if isinstance(res.env, str):
# Since the scripts would be used solely on data prepared
# by our scripts, this should be safe
# However, maybe needs an additional blessing
# https://docs.python.org/3/library/ast.html#ast.literal_eval
env_dict = ast.literal_eval(res.env)
if isinstance(res.command, str):
command = ast.literal_eval(res.command)

section = (
"\n<details>\n"
f"<summary>{res.label}</summary>\n\n"
Expand Down Expand Up @@ -179,7 +168,7 @@ def generate_markdown_details(
return "\nBenchmark details contain too many chars to display\n"


def generate_summary_table_and_chart(
def generate_summary_table(
chart_data: dict[str, list[Result]], baseline_name: str, markdown_size: MarkdownSize
):
summary_table = get_chart_markdown_header(
Expand Down Expand Up @@ -276,7 +265,7 @@ def generate_summary_table_and_chart(
delta = oln.diff - 1
oln.row += f" {delta*100:.2f}%"

if abs(delta) > options.epsilon:
if abs(delta) > options.stddev_threshold:
if delta > 0:
improved_rows.append(oln.row + " | \n")
else:
Expand Down Expand Up @@ -374,10 +363,27 @@ def generate_summary_table_and_chart(
return "\n# Summary\n" "Benchmark output is too large to display\n\n"


def generate_failures_section(failures: dict[str, str]) -> str:
if not failures:
return ""

section = "\n# Failures\n"
section += "| Name | Failure |\n"
section += "|---|---|\n"

for name, failure in failures.items():
section += f"| {name} | {failure} |\n"

return section


def generate_markdown(
name: str, chart_data: dict[str, list[Result]], markdown_size: MarkdownSize
name: str,
chart_data: dict[str, list[Result]],
failures: dict[str, str],
markdown_size: MarkdownSize,
):
(summary_line, summary_table) = generate_summary_table_and_chart(
(summary_line, summary_table) = generate_summary_table(
chart_data, name, markdown_size
)

Expand All @@ -396,4 +402,6 @@ def generate_markdown(
)
generated_markdown += "\n# Details\n" f"{markdown_details}\n"

return generated_markdown
failures_section = generate_failures_section(failures)

return failures_section + generated_markdown
Loading