Skip to content

Commit 7a02467

Browse files
authored
[CI][tutorials][Win] Report tutorials performance on windows (#4791)
PR adds reporting of tutorial performance on windows along with environment information. It also adds os and branch into on linux to distinguish results. Related: #4745 but that task also requires commits to upload infra. Closes: #4788
1 parent 53972f4 commit 7a02467

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

.github/workflows/build-test-reusable.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,9 @@ jobs:
267267
PYTORCH_COMMIT_ID=$PYTORCH_COMMIT_ID
268268
PYTORCH_VERSION=$PYTORCH_VERSION
269269
TRITON_REPO=$GITHUB_REPOSITORY
270+
TRITON_COMMIT_ID=$GITHUB_SHA
271+
TRITON_BRANCH=$GITHUB_REF_NAME
272+
OS=${{ runner.os }}
270273
EOF
271274
./scripts/capture-hw-details.sh | tee -a "$reports_file"
272275

.github/workflows/build-test-windows.yml

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ permissions: read-all
2121

2222
env:
2323
PYTHONIOENCODING: utf-8
24+
PYTHON_VERSION: "3.10"
2425
NEW_WORKSPACE: C:\gh${{ github.run_id }}
2526
SKIPLIST: --skip-list scripts/skiplist/${{ inputs.skip_list }}
2627
TRITON_TEST_CMD: bash -x scripts/test-triton.sh --skip-pytorch-install --skip-pip-install --skip-list scripts/skiplist/${{ inputs.skip_list }} --reports-dir reports --ignore-errors
@@ -71,7 +72,39 @@ jobs:
7172
run: |
7273
.venv\Scripts\activate.ps1
7374
Invoke-BatchFile "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
74-
python -c 'import torch;print(torch.__version__)'
75+
python -c 'import torch; print(torch.__version__)' | Tee-Object -Variable PYTORCH_VERSION
76+
echo "PYTORCH_VERSION=$PYTORCH_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
77+
78+
- name: Identify GPU
79+
run: |
80+
# Initializing oneAPI to enable sycl-ls, which is used in capture-hw-details.sh on Windows.
81+
Invoke-BatchFile "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
82+
bash -c './scripts/capture-hw-details.sh | tee -a $GITHUB_ENV'
83+
84+
- name: Report environment details
85+
shell: bash
86+
run: |
87+
cd /c/gh${{ github.run_id }}
88+
mkdir -p reports
89+
90+
cat <<EOF | tee /c/gh${{ github.run_id }}/reports/.env
91+
TIMESTAMP=$(date '+%Y%m%d%H%M%S')
92+
GITHUB_RUN_ID=$GITHUB_RUN_ID
93+
GITHUB_RUN_NUMBER=$GITHUB_RUN_NUMBER
94+
GITHUB_RUN_ATTEMPT=$GITHUB_RUN_ATTEMPT
95+
PYTHON_VERSION=$PYTHON_VERSION
96+
PYTORCH_REPO=pytorch/pytorch
97+
PYTORCH_COMMIT_ID=$(<.github/pins/pytorch.txt)"
98+
PYTORCH_VERSION=$PYTORCH_VERSION
99+
TRITON_REPO=$GITHUB_REPOSITORY
100+
TRITON_COMMIT_ID=$GITHUB_SHA
101+
TRITON_BRANCH=$GITHUB_REF_NAME
102+
OS=${{ runner.os }}
103+
LIBIGC1_VERSION=$LIBIGC1_VERSION
104+
LEVEL_ZERO_VERSION=$LEVEL_ZERO_VERSION
105+
AGAMA_VERSION=$AGAMA_VERSION
106+
GPU_DEVICE=$GPU_DEVICE
107+
EOF
75108
76109
- name: Clean up Triton cache
77110
shell: bash
@@ -160,6 +193,16 @@ jobs:
160193
name: pass_rate
161194
path: ${{ env.NEW_WORKSPACE }}\pass_rate*.json
162195

196+
- name: Upload tutorial performance
197+
uses: actions/upload-artifact@v4
198+
with:
199+
name: tutorials-report
200+
if-no-files-found: warn
201+
include-hidden-files: true
202+
path: |
203+
${{ env.NEW_WORKSPACE }}\reports\*\*.csv
204+
${{ env.NEW_WORKSPACE }}\reports\.env
205+
163206
- name: Clean up workspace
164207
if: ${{ always() }}
165208
run: |

0 commit comments

Comments
 (0)