Skip to content

Commit

Permalink
[NFC] Update test-triton.sh (#258)
Browse files Browse the repository at this point in the history
Address review comment:
#246 (comment)

Signed-off-by: Tsang, Whitney <[email protected]>
  • Loading branch information
whitneywhtsang authored Jan 15, 2024
1 parent acf7752 commit 0cf7205
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions scripts/test-triton.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,30 +100,31 @@ function run_core_tests {
if [ ! -d "${CORE_TEST_DIR}" ]; then
echo "Not found '${CORE_TEST_DIR}'. Build Triton please" ; exit 3
fi
cd ${CORE_TEST_DIR}

cd $CORE_TEST_DIR/language
TRITON_DISABLE_LINE_INFO=1 python3 -m pytest --verbose --device xpu --ignore=test_line_info.py --ignore=test_subprocess.py
TRITON_DISABLE_LINE_INFO=1 python3 -m pytest --verbose --device xpu language/ --ignore=language/test_line_info.py --ignore=language/test_subprocess.py
if [ $? -ne 0 ]; then
echo "FAILED: return code $?" ; exit $?
fi

# run test_line_info.py separately with TRITON_DISABLE_LINE_INFO=0
TRITON_DISABLE_LINE_INFO=0 python3 -m pytest --verbose --device xpu test_line_info.py
# run runtime tests serially to avoid race condition with cache handling.
TRITON_DISABLE_LINE_INFO=1 python3 -m pytest --verbose runtime/
if [ $? -ne 0 ]; then
echo "FAILED: return code $?" ; exit $?
fi

python3 assert_helper.py device_assert
# run test_line_info.py separately with TRITON_DISABLE_LINE_INFO=0
TRITON_DISABLE_LINE_INFO=0 python3 -m pytest --verbose language/test_line_info.py
if [ $? -ne 0 ]; then
echo "FAILED: return code $?" ; exit $?
fi
python3 print_helper.py device_print float 1> /dev/null

python3 language/assert_helper.py device_assert
if [ $? -ne 0 ]; then
echo "FAILED: return code $?" ; exit $?
fi

cd $CORE_TEST_DIR/runtime
TRITON_DISABLE_LINE_INFO=1 python3 -m pytest --verbose
python3 language/print_helper.py device_print float 1> /dev/null
if [ $? -ne 0 ]; then
echo "FAILED: return code $?" ; exit $?
fi
Expand Down

0 comments on commit 0cf7205

Please sign in to comment.