Skip to content

Commit e1185f0

Browse files
committed
Test dot
Signed-off-by: dchigarev <[email protected]> do not print everything Signed-off-by: dchigarev <[email protected]> print device details Signed-off-by: dchigarev <[email protected]>
1 parent d5b7656 commit e1185f0

File tree

4 files changed

+159
-92
lines changed

4 files changed

+159
-92
lines changed

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

Lines changed: 74 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -147,57 +147,9 @@ jobs:
147147
echo TRITON_TEST_CMD="bash -v -x scripts/test-triton.sh --warning-reports --skip-pytorch-install --reports-dir $GITHUB_WORKSPACE/reports ${{ inputs.ignore_errors && '--ignore-errors' || '' }} $skiplist"
148148
} | tee -a $GITHUB_ENV
149149
150-
- name: Run unit tests
151-
run: |
152-
${{ env.TRITON_TEST_CMD }} --unit
153-
154-
- name: Run core tests
155-
run: |
156-
${{ env.TRITON_TEST_CMD }} --core --skip-pip-install
157-
158-
- name: Run interpreter tests
159-
run: |
160-
${{ env.TRITON_TEST_CMD }} --interpreter --skip-pip-install
161-
162-
- name: Run Tutorials
163-
run: |
164-
${{ env.TRITON_TEST_CMD }} --tutorial --skip-pip-install
165-
166-
- name: Run instrumentation tests
167-
run: |
168-
${{ env.TRITON_TEST_CMD }} --instrumentation --skip-pip-install
169-
170-
- name: Get transformers version
171-
run: |
172-
cd pytorch
173-
TRANSFORMERS_VERSION="$(<.ci/docker/ci_commit_pins/huggingface.txt)"
174-
echo "TRANSFORMERS_VERSION=$TRANSFORMERS_VERSION" | tee -a $GITHUB_ENV
175-
176-
- name: Install transformers
177-
uses: ./.github/actions/install-dependency
178-
with:
179-
package: transformers
180-
repository: huggingface/transformers
181-
ref: ${{ env.TRANSFORMERS_VERSION }}
182-
try-tag-prefix: v
183-
184-
- name: Run E2E test
185-
run: |
186-
${{ env.TRITON_TEST_CMD }} --inductor --skip-pip-install
187-
188-
- name: Save pip cache
189-
if: ${{ steps.pip-cache.outputs.status == 'miss' }}
190-
uses: ./.github/actions/save
191-
with:
192-
path: ${{ steps.pip-cache.outputs.path }}
193-
dest: ${{ steps.pip-cache.outputs.dest }}
194-
195-
- name: Pass rate
196-
run: |
197-
source ./scripts/capture-hw-details.sh
198-
python scripts/pass_rate.py --reports reports ${{ env.SKIPLIST }}
199-
python scripts/pass_rate.py --reports reports --json ${{ env.SKIPLIST }} > pass_rate.json
200-
python scripts/pass_rate.py --reports reports --suite tutorials --json ${{ env.SKIPLIST }} > pass_rate_tutorials.json
150+
# - name: Run unit tests
151+
# run: |
152+
# ${{ env.TRITON_TEST_CMD }} --unit
201153

202154
- name: Report environment details
203155
run: |
@@ -218,27 +170,75 @@ jobs:
218170
AGAMA_VERSION=$AGAMA_VERSION
219171
EOF
220172
221-
- name: Upload pass rate report
222-
# upload reports only for the default branch
223-
if: github.ref_name == 'main'
224-
uses: actions/upload-artifact@v4
225-
with:
226-
name: pass_rate-${{ inputs.python_version }}-${{ inputs.runner_label || inputs.driver_version }}
227-
path: pass_rate*.json
173+
- name: Run core tests
174+
run: |
175+
${{ env.TRITON_TEST_CMD }} --core --skip-pip-install
228176
229-
- name: Upload tutorials performance report
230-
uses: actions/upload-artifact@v4
231-
with:
232-
name: tutorials-${{ inputs.python_version }}-${{ inputs.runner_label || inputs.driver_version }}
233-
if-no-files-found: warn
234-
include-hidden-files: true
235-
path: |
236-
reports/*/*.csv
237-
.env
238-
239-
- name: Upload test reports
240-
if: inputs.upload_test_reports
241-
uses: actions/upload-artifact@v4
242-
with:
243-
name: test-reports-${{ inputs.python_version }}-${{ inputs.runner_label || inputs.driver_version }}
244-
path: reports
177+
# - name: Run interpreter tests
178+
# run: |
179+
# ${{ env.TRITON_TEST_CMD }} --interpreter --skip-pip-install
180+
181+
# - name: Run Tutorials
182+
# run: |
183+
# ${{ env.TRITON_TEST_CMD }} --tutorial --skip-pip-install
184+
185+
# - name: Run instrumentation tests
186+
# run: |
187+
# ${{ env.TRITON_TEST_CMD }} --instrumentation --skip-pip-install
188+
189+
# - name: Get transformers version
190+
# run: |
191+
# cd pytorch
192+
# TRANSFORMERS_VERSION="$(<.ci/docker/ci_commit_pins/huggingface.txt)"
193+
# echo "TRANSFORMERS_VERSION=$TRANSFORMERS_VERSION" | tee -a $GITHUB_ENV
194+
195+
# - name: Install transformers
196+
# uses: ./.github/actions/install-dependency
197+
# with:
198+
# package: transformers
199+
# repository: huggingface/transformers
200+
# ref: ${{ env.TRANSFORMERS_VERSION }}
201+
# try-tag-prefix: v
202+
203+
# - name: Run E2E test
204+
# run: |
205+
# ${{ env.TRITON_TEST_CMD }} --inductor --skip-pip-install
206+
207+
# - name: Save pip cache
208+
# if: ${{ steps.pip-cache.outputs.status == 'miss' }}
209+
# uses: ./.github/actions/save
210+
# with:
211+
# path: ${{ steps.pip-cache.outputs.path }}
212+
# dest: ${{ steps.pip-cache.outputs.dest }}
213+
214+
# - name: Pass rate
215+
# run: |
216+
# source ./scripts/capture-hw-details.sh
217+
# python scripts/pass_rate.py --reports reports ${{ env.SKIPLIST }}
218+
# python scripts/pass_rate.py --reports reports --json ${{ env.SKIPLIST }} > pass_rate.json
219+
# python scripts/pass_rate.py --reports reports --suite tutorials --json ${{ env.SKIPLIST }} > pass_rate_tutorials.json
220+
221+
# - name: Upload pass rate report
222+
# # upload reports only for the default branch
223+
# if: github.ref_name == 'main'
224+
# uses: actions/upload-artifact@v4
225+
# with:
226+
# name: pass_rate-${{ inputs.python_version }}-${{ inputs.runner_label || inputs.driver_version }}
227+
# path: pass_rate*.json
228+
229+
# - name: Upload tutorials performance report
230+
# uses: actions/upload-artifact@v4
231+
# with:
232+
# name: tutorials-${{ inputs.python_version }}-${{ inputs.runner_label || inputs.driver_version }}
233+
# if-no-files-found: warn
234+
# include-hidden-files: true
235+
# path: |
236+
# reports/*/*.csv
237+
# .env
238+
239+
# - name: Upload test reports
240+
# if: inputs.upload_test_reports
241+
# uses: actions/upload-artifact@v4
242+
# with:
243+
# name: test-reports-${{ inputs.python_version }}-${{ inputs.runner_label || inputs.driver_version }}
244+
# path: reports

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

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,23 @@ jobs:
8282
pip install -r scripts\requirements-test.txt
8383
pip uninstall pytest_forked -y
8484
85+
<<<<<<< HEAD
86+
=======
87+
# - name: Run unit tests
88+
# run: |
89+
# .venv\Scripts\activate.ps1
90+
# Invoke-BatchFile "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
91+
# cd ${{ env.NEW_WORKSPACE }}
92+
# ${{ env.TRITON_TEST_CMD }} --unit
93+
94+
>>>>>>> e1e097d14 (Test dot)
8595
- name: Run core tests
8696
run: |
8797
.venv\Scripts\activate.ps1
8898
Invoke-BatchFile "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
8999
${{ env.TRITON_TEST_CMD }} --core
90100
101+
<<<<<<< HEAD
91102
- name: Run interpreter tests
92103
run: |
93104
.venv\Scripts\activate.ps1
@@ -114,6 +125,52 @@ jobs:
114125
with:
115126
name: pass_rate
116127
path: pass_rate*.json
128+
=======
129+
# - name: Run interpreter tests
130+
# run: |
131+
# .venv\Scripts\activate.ps1
132+
# Invoke-BatchFile "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
133+
# cd ${{ env.NEW_WORKSPACE }}
134+
# ${{ env.TRITON_TEST_CMD }} --interpreter
135+
136+
# - name: Run tutorials
137+
# run: |
138+
# .venv\Scripts\activate.ps1
139+
# Invoke-BatchFile "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
140+
# # Disable interactive plot window
141+
# $env:MPLBACKEND = "Agg"
142+
# cd ${{ env.NEW_WORKSPACE }}
143+
# ${{ env.TRITON_TEST_CMD }} --tutorial
144+
145+
# - name: Run instrumentation tests
146+
# run: |
147+
# .venv\Scripts\activate.ps1
148+
# Invoke-BatchFile "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
149+
# cd ${{ env.NEW_WORKSPACE }}
150+
# ${{ env.TRITON_TEST_CMD }} --instrumentation
151+
152+
# - name: Pass rate
153+
# run: |
154+
# .venv\Scripts\activate.ps1
155+
# # oneAPI is required for sycl-ls, which is used by scripts/capture-hw-details.sh
156+
# Invoke-BatchFile "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
157+
# cd ${{ env.NEW_WORKSPACE }}
158+
# pip install defusedxml
159+
# bash -c "\
160+
# source ./scripts/capture-hw-details.sh; \
161+
# python scripts/pass_rate.py --reports reports ${{ env.SKIPLIST }}; \
162+
# python scripts/pass_rate.py --reports reports --json ${{ env.SKIPLIST }} > pass_rate.json; \
163+
# python scripts/pass_rate.py --reports reports --suite tutorials --json ${{ env.SKIPLIST }} > pass_rate_tutorials.json; \
164+
# "
165+
166+
# - name: Upload pass rate report
167+
# # upload reports only for the default branch
168+
# if: github.ref_name == 'main'
169+
# uses: actions/upload-artifact@v4
170+
# with:
171+
# name: pass_rate
172+
# path: ${{ env.NEW_WORKSPACE }}\pass_rate*.json
173+
>>>>>>> e1e097d14 (Test dot)
117174

118175
- name: Clean up workspace
119176
if: ${{ always() }}

python/triton/compiler/compiler.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,14 @@ def compile(src, target=None, options=None):
298298
metadata_group[metadata_filename] = fn_cache_manager.put(json.dumps(metadata, default=vars), metadata_filename,
299299
binary=False)
300300
fn_cache_manager.put_group(metadata_filename, metadata_group)
301+
print("printing IR...")
302+
for name, path in metadata_group.items():
303+
print(f"==================== {name} ======================", flush=True)
304+
if name.endswith("spv"):
305+
content = open(path, "rb").read()
306+
else:
307+
content = open(path, "r").read()
308+
print(content, flush=True)
301309
# Compilation completed, disabling multithreading in context.
302310
# This is needed to safely finalize threads pool inside context: if current process forks before
303311
# python GC deletes context object, thread pool in child process will be invalid, which could

scripts/test-triton.sh

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -188,29 +188,31 @@ run_core_tests() {
188188
cd $TRITON_PROJ/python/test/unit
189189
ensure_spirv_dis
190190

191-
TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=language \
192-
pytest -vvv -n ${PYTEST_MAX_PROCESSES:-8} --device xpu language/ --ignore=language/test_line_info.py --ignore=language/test_subprocess.py
191+
LLVM_IR_ENABLE_DUMP=0 MLIR_ENABLE_DUMP=0 pytest -s language/test_core.py::test_dot[1-32-128-64-4-False-False-none-tf32-int8-int8-1-None1] --device=xpu
193192

194-
TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=subprocess \
195-
pytest -vvv -n ${PYTEST_MAX_PROCESSES:-8} --device xpu language/test_subprocess.py
193+
# TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=language \
194+
# pytest -k "not test_local_load_store_dot" -vvv -n ${PYTEST_MAX_PROCESSES:-8} --device xpu language/ --ignore=language/test_line_info.py --ignore=language/test_subprocess.py
196195

197-
# run runtime tests serially to avoid race condition with cache handling.
198-
TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=runtime \
199-
pytest -k "not test_within_2gb" --verbose --device xpu runtime/ --ignore=runtime/test_cublas.py
196+
# TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=subprocess \
197+
# pytest -vvv -n ${PYTEST_MAX_PROCESSES:-8} --device xpu language/test_subprocess.py
200198

201-
TRITON_TEST_SUITE=debug \
202-
pytest --verbose -n ${PYTEST_MAX_PROCESSES:-8} test_debug.py --forked --device xpu
199+
# # run runtime tests serially to avoid race condition with cache handling.
200+
# TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=runtime \
201+
# pytest -k "not test_within_2gb" --verbose --device xpu runtime/ --ignore=runtime/test_cublas.py
203202

204-
# run test_line_info.py separately with TRITON_DISABLE_LINE_INFO=0
205-
TRITON_DISABLE_LINE_INFO=0 TRITON_TEST_SUITE=line_info \
206-
pytest -k "not test_line_info_interpreter" --verbose --device xpu language/test_line_info.py
203+
# TRITON_TEST_SUITE=debug \
204+
# pytest --verbose -n ${PYTEST_MAX_PROCESSES:-8} test_debug.py --forked --device xpu
207205

208-
TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=tools \
209-
pytest -k "not test_disam_cubin" --verbose tools
206+
# # run test_line_info.py separately with TRITON_DISABLE_LINE_INFO=0
207+
# TRITON_DISABLE_LINE_INFO=0 TRITON_TEST_SUITE=line_info \
208+
# pytest -k "not test_line_info_interpreter" --verbose --device xpu language/test_line_info.py
210209

211-
cd $TRITON_PROJ/third_party/intel/python/test
212-
TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=third_party \
213-
pytest --device xpu .
210+
# TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=tools \
211+
# pytest -k "not test_disam_cubin" --verbose tools
212+
213+
# cd $TRITON_PROJ/third_party/intel/python/test
214+
# TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=third_party \
215+
# pytest --device xpu .
214216
}
215217

216218
run_regression_tests() {
@@ -361,7 +363,7 @@ test_triton() {
361363
fi
362364
if [ "$TEST_CORE" = true ]; then
363365
run_core_tests
364-
run_regression_tests
366+
# run_regression_tests
365367
fi
366368
if [ "$TEST_INTERPRETER" = true ]; then
367369
run_interpreter_tests

0 commit comments

Comments
 (0)