Skip to content

Commit

Permalink
show less verbose log
Browse files Browse the repository at this point in the history
  • Loading branch information
AshburnLee committed Sep 26, 2024
1 parent fca8516 commit cf2f5a7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/auto-update-translator-cid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down
12 changes: 6 additions & 6 deletions scripts/check-update-translator-cid.sh
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion scripts/compile-triton.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down

0 comments on commit cf2f5a7

Please sign in to comment.