2626 - self-hosted
2727 - linux
2828 - cpu-generic
29- defaults :
30- run :
31- shell : bash -noprofile --norc -eo pipefail -c "source /opt/intel/oneapi/setvars.sh > /dev/null; source {0}"
29+ # defaults:
30+ # run:
31+ # shell: bash -noprofile --norc -eo pipefail -c "source /opt/intel/oneapi/setvars.sh > /dev/null; source {0}"
3232 steps :
3333 - name : Checkout repository
3434 uses : actions/checkout@v4
5353 run : |
5454 # PYTHON_VERSION=$(python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
5555 REPO="intel/intel-xpu-backend-for-triton"
56- RUN_ID=$(gh run list --workflow nightly-wheels.yml -R "$REPO" --json databaseId,conclusion | jq -r '[.[] | select(.conclusion=="success")][0].databaseId')
56+ RUN_ID=$(gh run list --workflow nightly-wheels.yml -R "$REPO" --branch main -- json databaseId,conclusion | jq -r '[.[] | select(.conclusion=="success")][0].databaseId')
5757 echo "Run id - $RUN_ID"
58+ echo "RUN_ID=$RUN_ID" >> $GITHUB_ENV
5859 mkdir -p wheels
5960 WHEEL_PATTERN="wheels-pytorch-py${PYTHON_VERSION}*"
6061 echo "WHEEL_PATTERN=$WHEEL_PATTERN"
@@ -75,55 +76,79 @@ jobs:
7576 pip install packaging
7677 pip install wheels/*
7778 TRITON_COMMIT=$(python -c "import importlib.metadata; import packaging.version; print(packaging.version.Version(importlib.metadata.version('triton')).local[3:])")
78- git clone --single-branch -b main --recurse-submodules https://github.com/intel/intel-xpu-backend-for-triton.git
79- cd intel-xpu-backend-for-triton
79+ git clone --single-branch -b main --recurse-submodules https://github.com/intel/intel-xpu-backend-for-triton.git snapshot
80+ cd snapshot
81+ echo "Checking out Triton commit $TRITON_COMMIT"
8082 git checkout "$TRITON_COMMIT"
8183
82- - name : Setup Triton kernels benchmark
83- uses : ./.github/actions/setup-triton-kernels-benchmark
84- with :
85- clone_repo : false
86- conda_env : wheels
84+ # TODO: https://github.com/intel-tools/intel-xpu-backend-for-triton/issues/501
85+ # - name: Setup Triton kernels benchmark
86+ # uses: ./.github/actions/setup-triton-kernels-benchmark
87+ # with:
88+ # clone_repo: false
89+ # conda_env: wheels
8790
8891 - name : Prepare all binary artifacts to be packaged in the installer
92+ env :
93+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
8994 run : |
9095 source ~/miniforge3/bin/activate
9196
9297 conda activate wheels
9398
94- pip install -r intel-xpu-backend-for-triton/scripts/requirements-test.txt
99+ gh auth status
100+
101+ pip install -r scripts/requirements-test.txt
95102 pip install defusedxml
96103
97104 pip install build
98- cd intel-xpu-backend-for-triton/ scripts/triton_utils
105+ cd scripts/triton_utils
99106 python -m build --wheel
100107 pip install dist/triton_utils-*.whl
101- cd ../../..
102- cp intel-xpu-backend-for-triton/scripts/triton_utils/dist/*.whl wheels/
108+ cd ../..
109+ cp scripts/triton_utils/dist/*.whl wheels/
110+
111+ # TODO: use pinned nightly gh run id from step "Get nightly wheels" instead of latest
112+ python scripts/gta_integration/constructor/abn_metadata.py
103113
104- pip uninstall -y torch triton triton-kernels-benchmark triton_utils
114+ # TODO: https://github.com/intel-tools/intel-xpu-backend-for-triton/issues/501
115+ # pip uninstall -y torch triton triton-kernels-benchmark triton_utils
116+ pip uninstall -y torch triton triton_utils
105117 pip freeze >requirements-offline.txt
106118 pip download -r requirements-offline.txt -d wheels
107119
108120 # Create Triton test env wheels and repo tarballs
109- cp -L intel-xpu-backend-for-triton/benchmarks/dist/*.whl wheels/
121+ # TODO: https://github.com/intel-tools/intel-xpu-backend-for-triton/issues/501
122+ # cp -L intel-xpu-backend-for-triton/benchmarks/dist/*.whl wheels/
123+ cp scripts/gta_integration/constructor/test_triton.py snapshot/scripts/test_triton.py
124+ cp scripts/gta_integration/constructor/test_triton_config.json snapshot/scripts/test_triton_config.json
110125 tar -czvf wheels.tar.gz wheels
111- tar -czvf intel-xpu-backend-for-triton.tar.gz intel-xpu-backend-for-triton
126+ tar -czvf intel-xpu-backend-for-triton.tar.gz snapshot
112127
113128 # Download DLE and Vulkan SDK
114129 wget -O intel-deep-learning-essentials_offline.sh "${ONEAPI_DOWNLOAD_URL}${DLE_INSTALLER}"
115130 wget -O vulkan-sdk.tar.xz https://sdk.lunarg.com/sdk/download/latest/linux/vulkan-sdk.tar.xz
116131
117- # Prepare run_triton_tests.sh script for upload
118- cp gta_integration/constructor/run_triton_tests.sh .
119- # cp scripts/pass_rate_utils.py .
132+ - name : Upload test reports
133+ uses : actions/upload-artifact@v4
134+ with :
135+ name : test_reports
136+ path : |
137+ reports-nightly/**
138+
139+ - name : Upload abn_metadata
140+ uses : actions/upload-artifact@v4
141+ with :
142+ name : abn_metadata
143+ path : |
144+ abn_metadata.json
120145
121146 - name : Build constructor installer
122147 run : |
123148 source ~/miniforge3/bin/activate
124149 conda create -n constructor python=$PYTHON_VERSION constructor
125150 conda activate constructor
126- constructor gta_integration/constructor/
151+ constructor scripts/ gta_integration/constructor/
127152
128153 - name : Upload built installer artifact and tests runner script
129154 uses : actions/upload-artifact@v4
@@ -133,99 +158,14 @@ jobs:
133158 TritonXPU-GTA.sh
134159 run_triton_tests.sh
135160
136-
137- test-installer :
138- name : Test GTA installer
139- needs : [build-installer]
140- runs-on :
141- - glados
142- - pvc
143-
144- strategy :
145- matrix :
146- suite :
147- - language
148- # - triton-benchmarks
149- # - tutorials
150-
151- steps :
152- - name : Checkout repository
153- uses : actions/checkout@v4
154-
155- - name : Download built installer artifact
156- uses : actions/download-artifact@v4
157- with :
158- name : triton-xpu-installer
159-
160- - name : Install Python
161- uses : actions/setup-python@v5
162- with :
163- python-version : ${{ inputs.python }}
164-
165- - name : Run the installer in silent mode
166- continue-on-error : true
167- run : |
168- sudo rm -rf /home/runner/intel
169- # FIX for the offline installer issue - https://jira.devtools.intel.com/browse/INST-26161
170- sudo chown -R runner:runner /tmp/runner
171- export LC_ALL=C.UTF-8
172- /bin/sh -x TritonXPU-GTA.sh -b
173-
174- - name : Run ${{ matrix.suite }} tests
175- continue-on-error : true
176- run : |
177- bash -x run_triton_tests.sh ${{ matrix.suite }}
178-
179- - name : Upload test reports
180- uses : actions/upload-artifact@v4
181- with :
182- name : test_reports_${{ matrix.suite }}
183- path : |
184- /home/runner/reports/*.xml
185- /home/runner/reports/**/*.csv
186-
187-
188- # test-installer-benchmarks:
189- # name: Generate abn_metadata.json
190- # needs: [test-installer]
191- # runs-on:
192- # - glados
193-
194- # steps:
195- # - name: Checkout repository
196- # uses: actions/checkout@v4
197-
198- # - name: Install Python
199- # uses: actions/setup-python@v5
200- # with:
201- # python-version: ${{ inputs.python }}
202-
203- # - name: Download all matrix test reports
204- # uses: actions/download-artifact@v4
205- # with:
206- # pattern: test_reports_*
207- # path: reports
208- # merge-multiple: true
209-
210- # # - name: Merge downloaded report files
211- # # run: |
212- # # mkdir -p reports
213- # # for entry in reports_raw/*; do
214- # # if [ -d "$entry" ]; then
215- # # cp "$entry"/* reports/ 2>/dev/null || true
216- # # elif [ -f "$entry" ]; then
217- # # cp "$entry" reports/ 2>/dev/null || true
218- # # fi
219- # # done
220-
221- # - name: Generate abn_metadata.json
222- # run: |
223- # pip install defusedxml
224- # python scripts/pass_rate_utils.py --reports reports
225-
226- # - name: Upload generated abn_metadata.json
227- # uses: actions/upload-artifact@v4
228- # with:
229- # name: testmetadata
230- # path: |
231- # abn_metadata.json
161+ # - name: Upload asset to GTA artifactory
162+ # run: |
163+ # TIMESTAMP=$(date '+%Y%m%d_%H-%M-%S')
164+ # echo "TIMESTAMP=$TIMESTAMP" >> "${GITHUB_ENV}"
165+ # mkdir triton-xpu-installer
166+ # mv TritonXPU-GTA.sh triton-xpu-installer/
167+ # mv run_triton_tests.sh triton-xpu-installer/
168+ # mv abn_metadata.json triton-xpu-installer/
169+ # /gta/gta-asset push gfx-ocl-abn-assets-igk/oneAPI/linux triton-xpu ${{ env.TIMESTAMP }} triton-xpu-installer \
170+ # --root-url=https://gfx-assets.igk.intel.com/ \
171+ # -u glados --password ${{ secrets.GLADOS_DEVTOOLS_ARTIFACTORY_TOKEN }}
0 commit comments