Skip to content

Commit 713b5b8

Browse files
authored
Use PTI and DLE for benchmarks (#3044)
Change `benchmarking_method` to `UPSTREAM_PYTORCH_PROFILER` and use DLE instead of PTDB by default. This is to change the default values, will remove IPEX and PTDB as available options in a separate PR. Fixes #2701, #2592.
1 parent 84c8ab4 commit 713b5b8

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

.github/actions/setup-pytorch/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ runs:
7474
- name: Generate PyTorch cache key
7575
shell: bash
7676
run: |
77+
ONEAPI_LINK=$(readlink /opt/intel/oneapi || true)
7778
ONEAPI_KEY=$(sha256sum /opt/intel/installed.txt 2> /dev/null | cut -d\ -f1 || true)
78-
PYTORCH_CACHE_KEY=$(echo $PYTHON_VERSION $PYTORCH_COMMIT_ID ${{ hashFiles('scripts/patch-pytorch.sh') }} ${{ inputs.mode }}$ONEAPI_KEY | sha256sum - | cut -d\ -f1)
79+
PYTORCH_CACHE_KEY=$(echo $PYTHON_VERSION $PYTORCH_COMMIT_ID ${{ hashFiles('scripts/patch-pytorch.sh') }} ${{ inputs.mode }}${ONEAPI_KEY}${ONEAPI_LINK} | sha256sum - | cut -d\ -f1)
7980
echo "PYTORCH_CACHE_KEY=$PYTORCH_CACHE_KEY" | tee -a "$GITHUB_ENV"
8081
8182
- name: Load PyTorch from a cache

.github/workflows/triton-benchmarks.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
- PYTORCH_LEGACY_PROFILER_USING_IPEX
2020
- ELAPSED_TIME
2121
- UPSTREAM_PYTORCH_PROFILER
22-
default: PYTORCH_LEGACY_PROFILER_USING_IPEX
22+
default: UPSTREAM_PYTORCH_PROFILER
2323
run_name:
2424
description: Run name
2525
type: string
@@ -32,6 +32,13 @@ on:
3232
description: Use Python built with pyenv
3333
type: boolean
3434
default: false
35+
oneapi_bundle:
36+
description: oneAPI bundle
37+
type: choice
38+
options:
39+
- PTDB
40+
- DLE
41+
default: DLE
3542

3643
schedule:
3744
- cron: "5 23 * * *"
@@ -46,8 +53,8 @@ permissions: read-all
4653

4754
env:
4855
PYTHON_VERSION: "3.10"
49-
BENCHMARKING_METHOD: ${{ inputs.benchmarking_method || 'PYTORCH_LEGACY_PROFILER_USING_IPEX' }}
50-
USE_IPEX: ${{ github.event_name != 'workflow_dispatch' && '1' || inputs.benchmarking_method == 'PYTORCH_LEGACY_PROFILER_USING_IPEX' && '1' || '0' }}
56+
BENCHMARKING_METHOD: ${{ inputs.benchmarking_method || 'UPSTREAM_PYTORCH_PROFILER' }}
57+
USE_IPEX: ${{ (inputs.benchmarking_method || 'UPSTREAM_PYTORCH_PROFILER') == 'PYTORCH_LEGACY_PROFILER_USING_IPEX' && '1' || '0' }}
5158
TAG: ${{ inputs.tag || (github.event_name == 'pull_request' && format('pr-{0}', github.event.number)) || (github.event_name == 'schedule' && 'ci') || 'test' }}
5259

5360
jobs:
@@ -66,6 +73,14 @@ jobs:
6673
${{ toJSON(inputs) }}
6774
EOF
6875
76+
- name: Use DLE
77+
if: ${{ (github.oneapi_bundle || 'DLE') == 'DLE' }}
78+
shell: bash
79+
run: |
80+
if [[ -e /opt/intel/dle ]]; then
81+
sudo ln -sfT /opt/intel/dle /opt/intel/oneapi
82+
fi
83+
6984
- name: Checkout repository
7085
uses: actions/checkout@v4
7186

0 commit comments

Comments
 (0)