Skip to content
Open
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions .github/workflows/sycl-linux-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ on:
type: string
default: 'false'
required: False
enable_unitrace:
Copy link
Contributor

Choose a reason for hiding this comment

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

is this option only for benchmarks? if so, I guess you can rename with prefix benchmark_ here

description: |
Enable --unitrace
type: string
default: 'false'
required: False

workflow_dispatch:
inputs:
Expand Down Expand Up @@ -359,6 +365,7 @@ jobs:
preset: ${{ inputs.benchmark_preset }}
dry_run: ${{ inputs.benchmark_dry_run }}
build_ref: ${{ inputs.repo_ref }}
enable_unitrace: ${{ inputs.enable_unitrace }}
env:
RUNNER_TAG: ${{ inputs.runner }}
GITHUB_TOKEN: ${{ secrets.LLVM_SYCL_BENCHMARK_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/sycl-ur-perf-benchmarking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ on:
backend:
type: string
required: true
enable_unitrace:
type: string # true/false: workflow_dispatch does not support booleans
description: |
Enable --unitrace
required: false
default: 'false'

workflow_dispatch:
inputs:
Expand Down Expand Up @@ -102,6 +108,13 @@ on:
- 'level_zero:gpu'
- 'level_zero_v2:gpu'
# As of #17407, sycl-linux-build now builds v2 by default
enable_unitrace:
description: Enable unitrace
type: choice
options:
- false
- true
default: false

permissions: read-all

Expand Down Expand Up @@ -196,3 +209,4 @@ jobs:
toolchain_artifact: ${{ needs.build_sycl.outputs.toolchain_artifact }}
toolchain_artifact_filename: ${{ needs.build_sycl.outputs.toolchain_artifact_filename }}
toolchain_decompress_command: ${{ needs.build_sycl.outputs.toolchain_decompress_command }}
enable_unitrace: ${{ inputs.enable_unitrace }}
19 changes: 16 additions & 3 deletions devops/actions/run-tests/benchmark/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ inputs:
dry_run:
type: string
required: False
enable_unitrace:
type: string # true/false: workflow_dispatch does not support booleans
required: False
default: "false"

runs:
using: "composite"
Expand Down Expand Up @@ -203,7 +207,9 @@ runs:
--output-dir "./llvm-ci-perf-results/" \
--preset "$PRESET" \
--timestamp-override "$SAVE_TIMESTAMP" \
--detect-version sycl,compute_runtime
--detect-version sycl,compute_runtime \
--flamegraph inclusive \
${{ inputs.enable_unitrace == 'true' && '--unitrace inclusive' || '' }}

echo "-----"
python3 ./devops/scripts/benchmarks/compare.py to_hist \
Expand All @@ -228,8 +234,8 @@ runs:

cd "./llvm-ci-perf-results"
git add .
for diff in $(git diff HEAD --name-only); do
mkdir -p "../cached_changes/$(dirname $diff)"
git diff HEAD --name-only | while IFS="$(printf '\n')" read -r diff; do
mkdir -p "../cached_changes/$(dirname "$diff")"
cp "$diff" "../cached_changes/$diff"
done
- name: Push benchmarks results
Expand Down Expand Up @@ -278,6 +284,13 @@ runs:
--dry-run
cd -
done
- name: Archive unitrace results
if: inputs.enable_unitrace == 'true' && always()
uses: actions/upload-artifact@v4
with:
name: Unitrace results ${{ github.run_id }} (${{ env.SAVE_NAME }})
path: ./llvm-ci-perf-results/traces
rentention-days: 31
- name: Archive benchmark results
if: always()
uses: actions/upload-artifact@v4
Expand Down
3 changes: 2 additions & 1 deletion devops/scripts/benchmarks/benches/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ def run_bench(
if extra_trace_opt is None:
extra_trace_opt = []
unitrace_output, command = get_unitrace().setup(
self.name(), command, extra_trace_opt
self.name().replace(":", "="), command, extra_trace_opt
)
# ':' is a problematic character for Github actions/artifacts
log.debug(f"Unitrace output: {unitrace_output}")
log.debug(f"Unitrace command: {' '.join(command)}")

Expand Down
Loading