Skip to content

Commit c415c15

Browse files
committed
Merge branch 'sycl' into cperkins-win-fix-sycl-unregister-lib
2 parents d1c48c8 + b05f808 commit c415c15

File tree

34 files changed

+643
-154
lines changed

34 files changed

+643
-154
lines changed

.github/workflows/sycl-ur-perf-benchmarking.yml

Lines changed: 73 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,18 @@ on:
2828
deployment branch will be used.
2929
required: false
3030
default: ''
31+
save_name:
32+
type: string
33+
description: |
34+
Specify a custom name to use for the benchmark result: If uploading
35+
results, this will be the name used to refer results from the current
36+
run.
37+
required: false
38+
default: ''
3139
upload_results:
3240
type: string # true/false: workflow_dispatch does not support booleans
41+
description: |
42+
Upload results to https://intel.github.io/llvm/benchmarks/.
3343
required: true
3444
runner:
3545
type: string
@@ -67,8 +77,14 @@ on:
6777
Leave both pr_no and commit_hash empty to use latest commit.
6878
required: false
6979
default: ''
80+
save_name:
81+
type: string
82+
description: |
83+
Name to use for the benchmark result:
84+
required: false
85+
default: ''
7086
upload_results:
71-
description: 'Save and upload results'
87+
description: 'Save and upload results (to https://intel.github.io/llvm/benchmarks)'
7288
type: choice
7389
options:
7490
- false
@@ -90,16 +106,61 @@ on:
90106
permissions: read-all
91107

92108
jobs:
109+
sanitize_inputs:
110+
name: Sanitize inputs
111+
runs-on: ubuntu-latest
112+
env:
113+
COMMIT_HASH: ${{ inputs.commit_hash }}
114+
PR_NO: ${{ inputs.pr_no }}
115+
SAVE_NAME: ${{ inputs.save_name }}
116+
outputs:
117+
benchmark_save_name: ${{ steps.sanitize.outputs.benchmark_save_name }}
118+
build_ref: ${{ steps.sanitize.outputs.build_ref }}
119+
steps:
120+
- id: sanitize
121+
run: |
122+
# Validate user inputs:
123+
# usage: check_if_nonempty <var> <regex to check var against> <err message>
124+
check_nonempty() {
125+
[ -z "$1" ] && return
126+
if [ -z "$(echo "$1" | grep -P "$2")" ]; then
127+
echo "$3"
128+
exit 1
129+
fi
130+
}
131+
check_nonempty "$COMMIT_HASH" '^[0-9a-f]{7,}$' "Bad commit hash (or hash short)."
132+
check_nonempty "$PR_NO" '^[0-9]+$' "Bad PR number."
133+
check_nonempty "$SAVE_NAME" '^[A-Za-z][A-Za-z0-9_-]+$' "Bad save name."
134+
135+
BENCHMARK_SAVE_NAME=""
136+
BUILD_REF="${{ github.ref }}"
137+
if [ -n "$SAVE_NAME" ]; then
138+
BENCHMARK_SAVE_NAME="$(echo "$SAVE_NAME" | tr -cd 'A-Za-z0-9_-')"
139+
fi;
140+
if [ -n "$COMMIT_HASH" ]; then
141+
echo "Using commit hash $COMMIT_HASH for build..."
142+
BUILD_REF="$COMMIT_HASH"
143+
shortened_commit="$(echo "$COMMIT_HASH" | cut -c 1-7)"
144+
[ -z "$BENCHMARK_SAVE_NAME" ] && BENCHMARK_SAVE_NAME="Commit_${shortened_commit}"
145+
elif [ -n "$PR_NO" ]; then
146+
echo "Using PR no. $PR_NO for build..."
147+
BUILD_REF="refs/pull/$PR_NO/head"
148+
[ -z "$BENCHMARK_SAVE_NAME" ] && BENCHMARK_SAVE_NAME="PR_${PR_NO}"
149+
fi
150+
[ -z "$BENCHMARK_SAVE_NAME" ] && BENCHMARK_SAVE_NAME="Baseline"
151+
152+
echo "benchmark_save_name=$BENCHMARK_SAVE_NAME" >> $GITHUB_OUTPUT
153+
echo "build_ref=$BUILD_REF" >> $GITHUB_OUTPUT
154+
155+
echo "Final sanitized values:"
156+
cat $GITHUB_OUTPUT
157+
93158
build_sycl:
94159
name: Build SYCL
160+
needs: [ sanitize_inputs ]
95161
uses: ./.github/workflows/sycl-linux-build.yml
96162
with:
97-
build_ref: |
98-
${{
99-
inputs.commit_hash != '' && inputs.commit_hash ||
100-
inputs.pr_no != '' && format('refs/pull/{0}/head', inputs.pr_no) ||
101-
github.ref
102-
}}
163+
build_ref: ${{ needs.sanitize_inputs.outputs.build_ref }}
103164
build_cache_root: "/__w/"
104165
build_cache_suffix: "prod_noassert"
105166
build_configure_extra_args: "--no-assertions"
@@ -112,14 +173,12 @@ jobs:
112173

113174
run_benchmarks_build:
114175
name: Run Benchmarks on Build
115-
needs: [ build_sycl ]
176+
needs: [ build_sycl, sanitize_inputs ]
116177
strategy:
117178
matrix:
118179
include:
119-
- ref: ${{ inputs.commit_hash != '' && inputs.commit_hash || inputs.pr_no != '' && format('refs/pull/{0}/head', inputs.pr_no) || github.ref }}
120-
save_name: ${{ inputs.commit_hash != '' && format('Commit{0}', inputs.commit_hash) || inputs.pr_no != '' && format('PR{0}', inputs.pr_no) || 'Baseline' }}
121-
# Set default values if not specified:
122-
runner: ${{ inputs.runner || '["PVC_PERF"]' }}
180+
# Set default values if not specified:
181+
- runner: ${{ inputs.runner || '["PVC_PERF"]' }}
123182
backend: ${{ inputs.backend || 'level_zero:gpu' }}
124183
uses: ./.github/workflows/sycl-linux-run-tests.yml
125184
secrets: inherit
@@ -131,9 +190,9 @@ jobs:
131190
target_devices: ${{ matrix.backend }}
132191
tests_selector: benchmarks
133192
benchmark_upload_results: ${{ inputs.upload_results }}
134-
benchmark_save_name: ${{ matrix.save_name }}
193+
benchmark_save_name: ${{ needs.sanitize_inputs.outputs.benchmark_save_name }}
135194
benchmark_preset: ${{ inputs.preset }}
136-
repo_ref: ${{ matrix.ref }}
195+
repo_ref: ${{ needs.sanitize_inputs.outputs.build_ref }}
137196
toolchain_artifact: ${{ needs.build_sycl.outputs.toolchain_artifact }}
138197
toolchain_artifact_filename: ${{ needs.build_sycl.outputs.toolchain_artifact_filename }}
139198
toolchain_decompress_command: ${{ needs.build_sycl.outputs.toolchain_decompress_command }}

clang/include/clang/Driver/Options.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9265,14 +9265,11 @@ class CLRemainingArgsJoined<string name,
92659265
// (We don't put any of these in cl_compile_Group as the options they alias are
92669266
// already in the right group.)
92679267

9268-
// INTEL_CUSTOMIZATION
92699268
def _SLASH_Qfp_accuracy_EQ : CLJoined<"Qfp-accuracy=">,
92709269
Alias<ffp_accuracy_EQ>;
92719270
def _SLASH_Qfp_accuracy_COL : CLJoined<"Qfp-accuracy:">,
92729271
Alias<ffp_accuracy_EQ>,HelpText<"Specifies the required accuracy for "
92739272
"floating-point operations and library calls.">;
9274-
// END INTEL_CUSTOMIZATION
9275-
92769273
def _SLASH_Brepro : CLFlag<"Brepro">,
92779274
HelpText<"Do not write current time into COFF output (breaks link.exe /incremental)">,
92789275
Alias<mno_incremental_linker_compatible>;

devops/actions/run-tests/benchmark/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,19 @@ runs:
213213
--compare-file "./llvm-ci-perf-results/results/${SAVE_NAME}_${SAVE_TIMESTAMP}.json" \
214214
--results-dir "./llvm-ci-perf-results/results/" \
215215
--regression-filter '^[a-z_]+_sycl ' \
216+
--regression-filter-type 'SYCL' \
216217
--verbose \
218+
--produce-github-summary \
217219
${{ inputs.dry_run == 'true' && '--dry-run' || '' }} \
218220

219221
echo "-----"
220222

221-
- name: Cache changes to benchmark folder for archival purposes
223+
- name: Cache changes and upload github summary
222224
if: always()
223225
shell: bash
224226
run: |
227+
[ -f "github_summary.md" ] && cat github_summary.md >> $GITHUB_STEP_SUMMARY
228+
225229
cd "./llvm-ci-perf-results"
226230
git add .
227231
for diff in $(git diff HEAD --name-only); do

devops/dependencies-igc-dev.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"linux": {
33
"igc_dev": {
4-
"github_tag": "igc-dev-e9afb18",
5-
"version": "e9afb18",
6-
"updated_at": "2025-08-14T02:09:16Z",
7-
"url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/3761059372/zip",
4+
"github_tag": "igc-dev-3c9eb3b",
5+
"version": "3c9eb3b",
6+
"updated_at": "2025-08-16T05:10:12Z",
7+
"url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/3778774566/zip",
88
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
99
}
1010
}

devops/scripts/benchmarks/benches/compute.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
import csv
88
import io
99
import copy
10+
import math
11+
from enum import Enum
12+
1013
from utils.utils import run, git_clone, create_build_path
11-
from .base import Benchmark, Suite
1214
from utils.result import BenchmarkMetadata, Result
15+
from .base import Benchmark, Suite
1316
from options import options
14-
from enum import Enum
1517

1618

1719
class RUNTIMES(Enum):
@@ -402,6 +404,9 @@ def parse_output(self, output):
402404
median = float(data_row[2])
403405
# compute benchmarks report stddev as %
404406
stddev = mean * (float(data_row[3].strip("%")) / 100.0)
407+
if not math.isfinite(stddev):
408+
stddev = 0.0 # Default to 0.0 if stddev is invalid
409+
405410
unit = data_row[7]
406411
results.append((label, median, stddev, unit))
407412
except (ValueError, IndexError) as e:

devops/scripts/benchmarks/compare.py

Lines changed: 75 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,14 +340,25 @@ def to_hist(
340340
parser_avg.add_argument(
341341
"--regression-filter",
342342
type=str,
343-
help="If provided, only regressions matching provided regex will cause exit status 1.",
343+
help="If provided, only regressions in tests matching provided regex will cause exit status 1.",
344344
default=None,
345345
)
346+
parser_avg.add_argument(
347+
"--regression-filter-type",
348+
type=str,
349+
help="Name to use in logging for tests that fall within the filter defined by --regression-filter; i.e. if --regression-filter filters for SYCL benchmarks, --regression-filter-type could be 'SYCL'.",
350+
default="filtered",
351+
)
346352
parser_avg.add_argument(
347353
"--dry-run",
348354
action="store_true",
349355
help="Do not return error upon regressions.",
350356
)
357+
parser_avg.add_argument(
358+
"--produce-github-summary",
359+
action="store_true",
360+
help=f"Create a summary file '{options.github_summary_filename}' for Github workflow summaries.",
361+
)
351362

352363
args = parser.parse_args()
353364

@@ -365,6 +376,14 @@ def to_hist(
365376
args.avg_type, args.name, args.compare_file, args.results_dir, args.cutoff
366377
)
367378

379+
# Initialize Github summary variables:
380+
if args.produce_github_summary:
381+
gh_summary = []
382+
383+
filter_type_capitalized = (
384+
args.regression_filter_type[0].upper() + args.regression_filter_type[1:]
385+
)
386+
368387
# Not all regressions are of concern: if a filter is provided, filter
369388
# regressions using filter
370389
regressions_ignored = []
@@ -378,7 +397,7 @@ def to_hist(
378397
regressions_ignored.append(test)
379398

380399
def print_regression(entry: dict, is_warning: bool = False):
381-
"""Print an entry outputted from Compare.to_hist
400+
"""Print an entry outputted from Compare.to_hist()
382401
383402
Args:
384403
entry (dict): The entry to print
@@ -390,28 +409,80 @@ def print_regression(entry: dict, is_warning: bool = False):
390409
log_func(f"-- Run result: {entry['value']}")
391410
log_func(f"-- Delta: {entry['delta']}")
392411
log_func("")
412+
if args.produce_github_summary:
413+
gh_summary.append(f"#### {entry['name']}:")
414+
gh_summary.append(
415+
f"- Historic {entry['avg_type']}: {entry['hist_avg']}"
416+
)
417+
gh_summary.append(f"- Run result: {entry['value']}")
418+
gh_summary.append(
419+
# Since we are dealing with floats, our deltas have a lot
420+
# of decimal places. For easier readability, we round our
421+
# deltas and format our Github summary output as:
422+
#
423+
# Delta: <rounded number>% (<full number>)
424+
#
425+
f"- Delta: {round(entry['delta']*100, 2)}% ({entry['delta']})"
426+
)
427+
gh_summary.append("")
393428

394429
if improvements:
395430
log.info("#")
396431
log.info("# Improvements:")
397432
log.info("#")
433+
if args.produce_github_summary:
434+
gh_summary.append(f"### Improvements")
435+
gh_summary.append(
436+
f"<details><summary>{len(improvements)} improved tests:</summary>"
437+
)
438+
gh_summary.append("")
398439
for test in improvements:
399440
print_regression(test)
441+
if args.produce_github_summary:
442+
gh_summary.append("</details>")
443+
gh_summary.append("")
400444
if regressions_ignored:
401445
log.info("#")
402-
log.info("# Regressions (filtered out by regression-filter):")
446+
log.info("# Regressions (filtered out by --regression-filter):")
403447
log.info("#")
448+
if args.produce_github_summary:
449+
gh_summary.append(f"### Non-{filter_type_capitalized} Regressions")
450+
gh_summary.append(
451+
f"<details><summary>{len(regressions_ignored)} non-{args.regression_filter_type} regressions:</summary>"
452+
)
453+
gh_summary.append("")
404454
for test in regressions_ignored:
405455
print_regression(test)
456+
if args.produce_github_summary:
457+
gh_summary.append("</details>")
458+
gh_summary.append("")
406459
if regressions_of_concern:
407460
log.warning("#")
408461
log.warning("# Regressions:")
409462
log.warning("#")
463+
if args.produce_github_summary:
464+
gh_summary.append(f"### {filter_type_capitalized} Regressions")
465+
gh_summary.append(
466+
f"{len(regressions_of_concern)} {args.regression_filter_type} regressions. These regressions warrant a CI failure:"
467+
)
468+
gh_summary.append("")
410469
for test in regressions_of_concern:
411470
print_regression(test, is_warning=True)
471+
if args.produce_github_summary:
472+
gh_summary.append("")
473+
412474
if not args.dry_run:
413-
exit(1) # Exit 1 to trigger github test failure
475+
if args.produce_github_summary:
476+
with open(options.github_summary_filename, "w") as f:
477+
f.write("\n".join(gh_summary))
478+
exit(1) # Exit 1 to trigger Github test failure
479+
414480
log.info("No unexpected regressions found!")
481+
if args.produce_github_summary:
482+
gh_summary.append("No unexpected regressions found!")
483+
with open(options.github_summary_filename, "w") as f:
484+
f.write("\n".join(gh_summary))
485+
415486
else:
416487
log.error("Unsupported operation: exiting.")
417488
exit(1)

devops/scripts/benchmarks/options.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ class Options:
9292
# CI scripts vs SYCl build source.
9393
github_repo_override: str = None
9494
git_commit_override: str = None
95+
# Filename used to store Github summary files:
96+
github_summary_filename: str = "github_summary.md"
9597
# Archiving settings
9698
# Archived runs are stored separately from the main dataset but are still accessible
9799
# via the HTML UI when "Include archived runs" is enabled.

lldb/tools/lldb-dap/package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)