Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
8 changes: 8 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,13 @@ on:
type: string
default: 'false'
required: False
benchmark_profiler_type:
description: |
Type of profiler to use for benchmarks. Options are "timer" and
"cpuCounter". Default is "cpuCounter".
type: string
default: 'cpuCounter'
required: False

workflow_dispatch:
inputs:
Expand Down Expand Up @@ -359,6 +366,7 @@ jobs:
preset: ${{ inputs.benchmark_preset }}
dry_run: ${{ inputs.benchmark_dry_run }}
build_ref: ${{ inputs.repo_ref }}
profiler_type: ${{ inputs.benchmark_profiler_type }}
env:
RUNNER_TAG: ${{ inputs.runner }}
GITHUB_TOKEN: ${{ secrets.LLVM_SYCL_BENCHMARK_TOKEN }}
10 changes: 10 additions & 0 deletions .github/workflows/sycl-ur-perf-benchmarking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ on:
- Normal
- Test
default: 'Minimal' # Only compute-benchmarks
benchmark_profiler_type:
description: |
Type of profiler to use for benchmarks. Options are "timer" and
"cpuCounter". Default is "cpuCounter".
type: choice
options:
- timer
- cpuCounter
default: 'cpuCounter'
pr_no:
type: string
description: |
Expand Down Expand Up @@ -192,6 +201,7 @@ jobs:
benchmark_upload_results: ${{ inputs.upload_results }}
benchmark_save_name: ${{ needs.sanitize_inputs.outputs.benchmark_save_name }}
benchmark_preset: ${{ inputs.preset }}
benchmark_profiler_type: ${{ inputs.benchmark_profiler_type }}
repo_ref: ${{ needs.sanitize_inputs.outputs.build_ref }}
toolchain_artifact: ${{ needs.build_sycl.outputs.toolchain_artifact }}
toolchain_artifact_filename: ${{ needs.build_sycl.outputs.toolchain_artifact_filename }}
Expand Down
19 changes: 18 additions & 1 deletion 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
profiler_type:
type: string
required: False
default: "cpuCounter" # Other option is "timer"

runs:
using: "composite"
Expand All @@ -41,6 +45,7 @@ runs:
env:
TARGET_DEVICE: ${{ inputs.target_devices }}
PRESET: ${{ inputs.preset }}
PROFILER_TYPE: ${{ inputs.profiler_type }}
run: |
case "$RUNNER_TAG" in
'["PVC_PERF"]' ) ;;
Expand Down Expand Up @@ -75,6 +80,17 @@ runs:
python3 ./devops/scripts/benchmarks/presets.py query "$PRESET"
[ "$?" -ne 0 ] && exit 1 # Stop workflow if invalid preset
echo "PRESET=$PRESET" >> $GITHUB_ENV

# Validate profiler type input
case "$PROFILER_TYPE" in
"timer") PROFILER_TYPE="timer" ;;
"cpuCounter") PROFILER_TYPE="cpuCounter" ;;
*)
echo "Invalid profiler type specified: $PROFILER_TYPE"
exit 1
;;
esac
echo "PROFILER_TYPE=$PROFILER_TYPE" >> $GITHUB_ENV
- name: Compute CPU core range to run benchmarks on
shell: bash
run: |
Expand Down Expand Up @@ -204,7 +220,8 @@ runs:
--preset "$PRESET" \
--timestamp-override "$SAVE_TIMESTAMP" \
--detect-version sycl,compute_runtime \
--flamegraph inclusive
--flamegraph inclusive \
--profiler-type "$PROFILER_TYPE"

echo "-----"
python3 ./devops/scripts/benchmarks/compare.py to_hist \
Expand Down
Loading