From cf2f5a77cd2ce162a46e1de5a1183d38f9a983d5 Mon Sep 17 00:00:00 2001 From: AshburnLee Date: Mon, 23 Sep 2024 09:08:58 +0000 Subject: [PATCH] show less verbose log --- .github/workflows/auto-update-translator-cid.yml | 9 +++++++-- scripts/check-update-translator-cid.sh | 12 ++++++------ scripts/compile-triton.sh | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/auto-update-translator-cid.yml b/.github/workflows/auto-update-translator-cid.yml index 7fde3a8d3..16c8bc9db 100644 --- a/.github/workflows/auto-update-translator-cid.yml +++ b/.github/workflows/auto-update-translator-cid.yml @@ -83,13 +83,18 @@ jobs: - name: Search the latest valid Translator cid if: ${{ env.TARGET_PRID == null }} run: | - env - ./scripts/check-update-translator-cid.sh $CID_LATEST $CID_CURRENT + touch test_failed_summary.log + ./scripts/check-update-translator-cid.sh $CID_LATEST $CID_CURRENT test_failed_summary.log if git status --porcelain ./lib/Target/SPIRV/spirv-llvm-translator.conf | grep '^ M'; then echo "MODIFIED=true" >> $GITHUB_ENV echo "spirv-llvm-translator.conf has been modified" fi + - name: Show summary of failed commit id + if: ${{ env.TARGET_PRID == null }} + run: | + cat test_failed_summary.log + # raise PR by bot - name: Create PR if config is updated if: ${{ env.TARGET_PRID == null && env.MODIFIED == 'true' }} diff --git a/scripts/check-update-translator-cid.sh b/scripts/check-update-translator-cid.sh index 578ff507f..104a625af 100755 --- a/scripts/check-update-translator-cid.sh +++ b/scripts/check-update-translator-cid.sh @@ -1,12 +1,10 @@ #!/usr/bin/env bash -set -euo pipefail - # $1 is the latest commit id from SPIRV-LLVM-Translator # $2 is the commit id from Triton's spirv-llvm-translator.conf -if [ "$#" -ne 2 ]; then - echo "Please provide commit id from Translator and from spirv-llvm-translator.conf. Usage: $0 cid1 cid2" +if [ "$#" -ne 3 ]; then + echo "Please provide commit id from Translator and from spirv-llvm-translator.conf and the summary log. Usage: $0 cid1 cid2 log" exit 1 fi @@ -32,13 +30,15 @@ for cid in $COMMIT_IDS; do fi # execute default tests - if ./scripts/test-triton.sh --skip-pytorch-install; then + ./scripts/test-triton.sh --skip-pytorch-install --core 2>&1 | tee tmp.log + if [ ${PIPESTATUS[0]} -eq 0 ]; then echo "Tests passed for translator commit $cid" echo "A newer commit found: $cid" FOUND=true break else - echo "Tests failed for translator commit $cid" + echo -e "\nTests failed for translator commit $cid:" | tee -a "$3" + awk '/=+ FAILURES =+/, /=+ short test summary info =+/' tmp.log >> "$3" fi done diff --git a/scripts/compile-triton.sh b/scripts/compile-triton.sh index 3293596fa..64044c018 100755 --- a/scripts/compile-triton.sh +++ b/scripts/compile-triton.sh @@ -179,7 +179,7 @@ build_triton() { cd python # Install triton and its dependencies. - pip install -vvv -e '.[build,tests]' + pip install -v -e '.[build,tests]' # Copy compile_commands.json in the build directory (so that cland vscode plugin can find it). cp $(find $TRITON_PROJ_BUILD -name compile_commands.json) $TRITON_PROJ/