Skip to content

Commit 17aab66

Browse files
committed
Test dot
Signed-off-by: dchigarev <[email protected]>
1 parent c8b1c5f commit 17aab66

File tree

4 files changed

+148
-138
lines changed

4 files changed

+148
-138
lines changed

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

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -152,57 +152,57 @@ jobs:
152152
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"
153153
} | tee -a $GITHUB_ENV
154154
155-
- name: Run unit tests
156-
run: |
157-
${{ env.TRITON_TEST_CMD }} --unit
155+
# - name: Run unit tests
156+
# run: |
157+
# ${{ env.TRITON_TEST_CMD }} --unit
158158

159159
- name: Run core tests
160160
run: |
161161
${{ env.TRITON_TEST_CMD }} --core --skip-pip-install
162162
163-
- name: Run interpreter tests
164-
run: |
165-
${{ env.TRITON_TEST_CMD }} --interpreter --skip-pip-install
166-
167-
- name: Run Tutorials
168-
run: |
169-
${{ env.TRITON_TEST_CMD }} --tutorial --skip-pip-install
170-
171-
- name: Run instrumentation tests
172-
run: |
173-
${{ env.TRITON_TEST_CMD }} --instrumentation --skip-pip-install
174-
175-
- name: Get transformers version
176-
run: |
177-
cd pytorch
178-
TRANSFORMERS_VERSION="$(<.ci/docker/ci_commit_pins/huggingface.txt)"
179-
echo "TRANSFORMERS_VERSION=$TRANSFORMERS_VERSION" | tee -a $GITHUB_ENV
180-
181-
- name: Install transformers
182-
uses: ./.github/actions/install-dependency
183-
with:
184-
package: transformers
185-
repository: huggingface/transformers
186-
ref: ${{ env.TRANSFORMERS_VERSION }}
187-
try-tag-prefix: v
188-
189-
- name: Run E2E test
190-
run: |
191-
${{ env.TRITON_TEST_CMD }} --inductor --skip-pip-install
192-
193-
- name: Save pip cache
194-
if: ${{ steps.pip-cache.outputs.status == 'miss' }}
195-
uses: ./.github/actions/save
196-
with:
197-
path: ${{ steps.pip-cache.outputs.path }}
198-
dest: ${{ steps.pip-cache.outputs.dest }}
199-
200-
- name: Pass rate
201-
run: |
202-
source ./scripts/capture-hw-details.sh
203-
python scripts/pass_rate.py --reports reports ${{ env.SKIPLIST }}
204-
python scripts/pass_rate.py --reports reports --json ${{ env.SKIPLIST }} > pass_rate.json
205-
python scripts/pass_rate.py --reports reports --suite tutorials --json ${{ env.SKIPLIST }} > pass_rate_tutorials.json
163+
# - name: Run interpreter tests
164+
# run: |
165+
# ${{ env.TRITON_TEST_CMD }} --interpreter --skip-pip-install
166+
167+
# - name: Run Tutorials
168+
# run: |
169+
# ${{ env.TRITON_TEST_CMD }} --tutorial --skip-pip-install
170+
171+
# - name: Run instrumentation tests
172+
# run: |
173+
# ${{ env.TRITON_TEST_CMD }} --instrumentation --skip-pip-install
174+
175+
# - name: Get transformers version
176+
# run: |
177+
# cd pytorch
178+
# TRANSFORMERS_VERSION="$(<.ci/docker/ci_commit_pins/huggingface.txt)"
179+
# echo "TRANSFORMERS_VERSION=$TRANSFORMERS_VERSION" | tee -a $GITHUB_ENV
180+
181+
# - name: Install transformers
182+
# uses: ./.github/actions/install-dependency
183+
# with:
184+
# package: transformers
185+
# repository: huggingface/transformers
186+
# ref: ${{ env.TRANSFORMERS_VERSION }}
187+
# try-tag-prefix: v
188+
189+
# - name: Run E2E test
190+
# run: |
191+
# ${{ env.TRITON_TEST_CMD }} --inductor --skip-pip-install
192+
193+
# - name: Save pip cache
194+
# if: ${{ steps.pip-cache.outputs.status == 'miss' }}
195+
# uses: ./.github/actions/save
196+
# with:
197+
# path: ${{ steps.pip-cache.outputs.path }}
198+
# dest: ${{ steps.pip-cache.outputs.dest }}
199+
200+
# - name: Pass rate
201+
# run: |
202+
# source ./scripts/capture-hw-details.sh
203+
# python scripts/pass_rate.py --reports reports ${{ env.SKIPLIST }}
204+
# python scripts/pass_rate.py --reports reports --json ${{ env.SKIPLIST }} > pass_rate.json
205+
# python scripts/pass_rate.py --reports reports --suite tutorials --json ${{ env.SKIPLIST }} > pass_rate_tutorials.json
206206

207207
- name: Report environment details
208208
run: |
@@ -223,27 +223,27 @@ jobs:
223223
AGAMA_VERSION=$AGAMA_VERSION
224224
EOF
225225
226-
- name: Upload pass rate report
227-
# upload reports only for the default branch
228-
if: github.ref_name == 'main'
229-
uses: actions/upload-artifact@v4
230-
with:
231-
name: pass_rate-${{ inputs.python_version }}-${{ inputs.runner_label || inputs.driver_version }}
232-
path: pass_rate*.json
233-
234-
- name: Upload tutorials performance report
235-
uses: actions/upload-artifact@v4
236-
with:
237-
name: tutorials-${{ inputs.python_version }}-${{ inputs.runner_label || inputs.driver_version }}
238-
if-no-files-found: warn
239-
include-hidden-files: true
240-
path: |
241-
reports/*/*.csv
242-
.env
243-
244-
- name: Upload test reports
245-
if: inputs.upload_test_reports
246-
uses: actions/upload-artifact@v4
247-
with:
248-
name: test-reports-${{ inputs.python_version }}-${{ inputs.runner_label || inputs.driver_version }}
249-
path: reports
226+
# - name: Upload pass rate report
227+
# # upload reports only for the default branch
228+
# if: github.ref_name == 'main'
229+
# uses: actions/upload-artifact@v4
230+
# with:
231+
# name: pass_rate-${{ inputs.python_version }}-${{ inputs.runner_label || inputs.driver_version }}
232+
# path: pass_rate*.json
233+
234+
# - name: Upload tutorials performance report
235+
# uses: actions/upload-artifact@v4
236+
# with:
237+
# name: tutorials-${{ inputs.python_version }}-${{ inputs.runner_label || inputs.driver_version }}
238+
# if-no-files-found: warn
239+
# include-hidden-files: true
240+
# path: |
241+
# reports/*/*.csv
242+
# .env
243+
244+
# - name: Upload test reports
245+
# if: inputs.upload_test_reports
246+
# uses: actions/upload-artifact@v4
247+
# with:
248+
# name: test-reports-${{ inputs.python_version }}-${{ inputs.runner_label || inputs.driver_version }}
249+
# path: reports

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

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ jobs:
8888
pip install -r scripts\requirements-test.txt
8989
pip uninstall pytest_forked -y
9090
91-
- name: Run unit tests
92-
run: |
93-
.venv\Scripts\activate.ps1
94-
Invoke-BatchFile "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
95-
cd ${{ env.NEW_WORKSPACE }}
96-
${{ env.TRITON_TEST_CMD }} --unit
91+
# - name: Run unit tests
92+
# run: |
93+
# .venv\Scripts\activate.ps1
94+
# Invoke-BatchFile "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
95+
# cd ${{ env.NEW_WORKSPACE }}
96+
# ${{ env.TRITON_TEST_CMD }} --unit
9797

9898
- name: Run core tests
9999
run: |
@@ -102,50 +102,50 @@ jobs:
102102
cd ${{ env.NEW_WORKSPACE }}
103103
${{ env.TRITON_TEST_CMD }} --core
104104
105-
- name: Run interpreter tests
106-
run: |
107-
.venv\Scripts\activate.ps1
108-
Invoke-BatchFile "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
109-
cd ${{ env.NEW_WORKSPACE }}
110-
${{ env.TRITON_TEST_CMD }} --interpreter
111-
112-
- name: Run tutorials
113-
run: |
114-
.venv\Scripts\activate.ps1
115-
Invoke-BatchFile "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
116-
# Disable interactive plot window
117-
$env:MPLBACKEND = "Agg"
118-
cd ${{ env.NEW_WORKSPACE }}
119-
${{ env.TRITON_TEST_CMD }} --tutorial
120-
121-
- name: Run instrumentation tests
122-
run: |
123-
.venv\Scripts\activate.ps1
124-
Invoke-BatchFile "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
125-
cd ${{ env.NEW_WORKSPACE }}
126-
${{ env.TRITON_TEST_CMD }} --instrumentation
127-
128-
- name: Pass rate
129-
run: |
130-
.venv\Scripts\activate.ps1
131-
# oneAPI is required for sycl-ls, which is used by scripts/capture-hw-details.sh
132-
Invoke-BatchFile "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
133-
cd ${{ env.NEW_WORKSPACE }}
134-
pip install defusedxml
135-
bash -c "\
136-
source ./scripts/capture-hw-details.sh; \
137-
python scripts/pass_rate.py --reports reports ${{ env.SKIPLIST }}; \
138-
python scripts/pass_rate.py --reports reports --json ${{ env.SKIPLIST }} > pass_rate.json; \
139-
python scripts/pass_rate.py --reports reports --suite tutorials --json ${{ env.SKIPLIST }} > pass_rate_tutorials.json; \
140-
"
141-
142-
- name: Upload pass rate report
143-
# upload reports only for the default branch
144-
if: github.ref_name == 'main'
145-
uses: actions/upload-artifact@v4
146-
with:
147-
name: pass_rate
148-
path: ${{ env.NEW_WORKSPACE }}\pass_rate*.json
105+
# - name: Run interpreter tests
106+
# run: |
107+
# .venv\Scripts\activate.ps1
108+
# Invoke-BatchFile "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
109+
# cd ${{ env.NEW_WORKSPACE }}
110+
# ${{ env.TRITON_TEST_CMD }} --interpreter
111+
112+
# - name: Run tutorials
113+
# run: |
114+
# .venv\Scripts\activate.ps1
115+
# Invoke-BatchFile "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
116+
# # Disable interactive plot window
117+
# $env:MPLBACKEND = "Agg"
118+
# cd ${{ env.NEW_WORKSPACE }}
119+
# ${{ env.TRITON_TEST_CMD }} --tutorial
120+
121+
# - name: Run instrumentation tests
122+
# run: |
123+
# .venv\Scripts\activate.ps1
124+
# Invoke-BatchFile "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
125+
# cd ${{ env.NEW_WORKSPACE }}
126+
# ${{ env.TRITON_TEST_CMD }} --instrumentation
127+
128+
# - name: Pass rate
129+
# run: |
130+
# .venv\Scripts\activate.ps1
131+
# # oneAPI is required for sycl-ls, which is used by scripts/capture-hw-details.sh
132+
# Invoke-BatchFile "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
133+
# cd ${{ env.NEW_WORKSPACE }}
134+
# pip install defusedxml
135+
# bash -c "\
136+
# source ./scripts/capture-hw-details.sh; \
137+
# python scripts/pass_rate.py --reports reports ${{ env.SKIPLIST }}; \
138+
# python scripts/pass_rate.py --reports reports --json ${{ env.SKIPLIST }} > pass_rate.json; \
139+
# python scripts/pass_rate.py --reports reports --suite tutorials --json ${{ env.SKIPLIST }} > pass_rate_tutorials.json; \
140+
# "
141+
142+
# - name: Upload pass rate report
143+
# # upload reports only for the default branch
144+
# if: github.ref_name == 'main'
145+
# uses: actions/upload-artifact@v4
146+
# with:
147+
# name: pass_rate
148+
# path: ${{ env.NEW_WORKSPACE }}\pass_rate*.json
149149

150150
- name: Clean up workspace
151151
if: ${{ always() }}

python/triton/compiler/compiler.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,14 @@ def compile(src, target=None, options=None):
300300
metadata_group[metadata_filename] = fn_cache_manager.put(json.dumps(metadata, default=vars), metadata_filename,
301301
binary=False)
302302
fn_cache_manager.put_group(metadata_filename, metadata_group)
303+
print("printing IR...")
304+
for name, path in metadata_group.items():
305+
print(f"==================== {name} ======================", flush=True)
306+
if name.endswith("spv"):
307+
content = open(path, "rb").read()
308+
else:
309+
content = open(path, "r").read()
310+
print(content, flush=True)
303311
# Compilation completed, disabling multithreading in context.
304312
# This is needed to safely finalize threads pool inside context: if current process forks before
305313
# 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 -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
191+
LLVM_IR_ENABLE_DUMP=1 MLIR_ENABLE_DUMP=1 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() {
@@ -364,7 +366,7 @@ test_triton() {
364366
fi
365367
if [ "$TEST_CORE" = true ]; then
366368
run_core_tests
367-
run_regression_tests
369+
# run_regression_tests
368370
fi
369371
if [ "$TEST_INTERPRETER" = true ]; then
370372
run_interpreter_tests

0 commit comments

Comments
 (0)