Skip to content

Commit bac137e

Browse files
committed
Split core to minicore, mxfp, scaled_dot
1 parent f77a508 commit bac137e

File tree

1 file changed

+72
-10
lines changed

1 file changed

+72
-10
lines changed

scripts/test-triton.sh

Lines changed: 72 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ export PIP_DISABLE_PIP_VERSION_CHECK=1
4242
TEST_DEFAULT=true
4343
TEST_UNIT=false
4444
TEST_CORE=false
45+
TEST_MINICORE=false
46+
TEST_MXFP=false
47+
TEST_SCALED_DOT=false
4548
TEST_INTERPRETER=false
4649
TEST_TUTORIAL=false
4750
TEST_MICRO_BENCHMARKS=false
@@ -75,6 +78,21 @@ while (( $# != 0 )); do
7578
TEST_DEFAULT=false
7679
shift
7780
;;
81+
--minicore)
82+
TEST_MINICORE=true
83+
TEST_DEFAULT=false
84+
shift
85+
;;
86+
--mxfp)
87+
TEST_MXFP=true
88+
TEST_DEFAULT=false
89+
shift
90+
;;
91+
--scaled_dot)
92+
TEST_SCALED_DOT=true
93+
TEST_DEFAULT=false
94+
shift
95+
;;
7896
--interpreter)
7997
TEST_INTERPRETER=true
8098
TEST_DEFAULT=false
@@ -237,15 +255,26 @@ run_pytest_command() {
237255
fi
238256
}
239257

240-
run_core_tests() {
258+
run_regression_tests() {
241259
echo "***************************************************"
242-
echo "****** Running Triton Core tests ******"
260+
echo "****** Running Triton Regression tests ******"
261+
echo "***************************************************"
262+
cd $TRITON_PROJ/python/test/regression
263+
264+
TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=regression \
265+
run_pytest_command -vvv -n ${PYTEST_MAX_PROCESSES:-8} -s --device xpu . --ignore=test_performance.py
266+
}
267+
268+
run_minicore_tests() {
269+
echo "***************************************************"
270+
echo "****** Running Triton mini core tests ******"
243271
echo "***************************************************"
244272
cd $TRITON_PROJ/python/test/unit
245273
ensure_spirv_dis
246274

247275
TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=language \
248-
run_pytest_command -vvv -n ${PYTEST_MAX_PROCESSES:-8} --device xpu language/ --ignore=language/test_line_info.py --ignore=language/test_subprocess.py --ignore=language/test_warp_specialization.py
276+
run_pytest_command -vvv -n ${PYTEST_MAX_PROCESSES:-8} --device xpu language/ --ignore=language/test_line_info.py --ignore=language/test_subprocess.py --ignore=language/test_warp_specialization.py \
277+
-k "not test_mxfp" -k "not test_scaled_dot"
249278

250279
TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=subprocess \
251280
run_pytest_command -vvv -n ${PYTEST_MAX_PROCESSES:-8} --device xpu language/test_subprocess.py
@@ -269,17 +298,38 @@ run_core_tests() {
269298

270299
cd $TRITON_PROJ/third_party/intel/python/test
271300
TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=third_party \
272-
run_pytest_command --device xpu .
301+
run_pytest_command --device xpu .
302+
303+
run_regression_tests
273304
}
274305

275-
run_regression_tests() {
306+
run_mxfp_tests() {
276307
echo "***************************************************"
277-
echo "****** Running Triton Regression tests ******"
308+
echo "****** Running Triton matmul mxfp tests ******"
278309
echo "***************************************************"
279-
cd $TRITON_PROJ/python/test/regression
310+
cd $TRITON_PROJ/python/test/unit
280311

281-
TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=regression \
282-
run_pytest_command -vvv -n ${PYTEST_MAX_PROCESSES:-8} -s --device xpu . --ignore=test_performance.py
312+
TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=mxfp \
313+
run_pytest_command -vvv -n ${PYTEST_MAX_PROCESSES:-8} --device xpu language/test_matmul.py -k "test_mxfp"
314+
}
315+
316+
run_scaled_dot_tests() {
317+
echo "***************************************************"
318+
echo "****** Running Triton scaled_dot tests ******"
319+
echo "***************************************************"
320+
cd $TRITON_PROJ/python/test/unit
321+
322+
TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=scaled_dot \
323+
run_pytest_command -vvv -n ${PYTEST_MAX_PROCESSES:-8} --device xpu language/test_core.py -k "test_scaled_dot"
324+
}
325+
326+
run_core_tests() {
327+
echo "***************************************************"
328+
echo "****** Running Triton Core tests ******"
329+
echo "***************************************************"
330+
run_minicore_tests
331+
run_mxfp_tests
332+
run_scaled_dot_tests
283333
}
284334

285335
run_interpreter_tests() {
@@ -427,10 +477,22 @@ test_triton() {
427477
if [ "$TEST_UNIT" = true ]; then
428478
run_unit_tests
429479
fi
480+
481+
# core suite consists of minicore, mxfp, scaled_dot
430482
if [ "$TEST_CORE" = true ]; then
431483
run_core_tests
432-
run_regression_tests
484+
else
485+
if [ "$TEST_MINICORE" = true]; then
486+
run_minicore_tests
487+
fi
488+
if [ "$TEST_MXFP" = true]; then
489+
run_mxfp_tests
490+
fi
491+
if [ "$TEST_SCALED_DOT" = true]; then
492+
run_scaled_dot_tests
493+
fi
433494
fi
495+
434496
if [ "$TEST_INTERPRETER" = true ]; then
435497
run_interpreter_tests
436498
fi

0 commit comments

Comments
 (0)