Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] show less verbose log and give failed summary for each commit id #2319

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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