Skip to content
Closed
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
57 changes: 57 additions & 0 deletions .github/workflows/temp-pr132-rocm-versioned-runtime-selection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: TEMP PR132 ROCm versioned runtime selection A-B

on:
pull_request:
branches:
- fix/pr132-rocm-versioned-runtime-selection

permissions:
contents: read

jobs:
discriminate:
runs-on: ubuntu-24.04
env:
BASE_SHA: 45417560beeba896a9b0866e50154d2a7a320b8b
CANDIDATE_SHA: 0c6c504b39a3cff39842209e4ef708e15f8e76e0
steps:
- name: Check out exact carrier head
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Prove base red and candidate green
shell: bash
run: |
set -euo pipefail
test "$(git rev-parse HEAD^)" = "$CANDIDATE_SHA"
git merge-base --is-ancestor "$BASE_SHA" "$CANDIDATE_SHA"

base_root="$RUNNER_TEMP/base"
candidate_root="$RUNNER_TEMP/candidate"
git worktree add --detach "$base_root" "$BASE_SHA"
git worktree add --detach "$candidate_root" "$CANDIDATE_SHA"

mkdir -p "$base_root/tests/kernels"
cp "$candidate_root/tests/kernels/test_rocm_versioned_runtime_selection.py" "$base_root/tests/kernels/test_rocm_versioned_runtime_selection.py"

set +e
python "$base_root/tests/kernels/test_rocm_versioned_runtime_selection.py" >"$RUNNER_TEMP/base.log" 2>&1
base_rc=$?
set -e
test "$base_rc" -ne 0
grep -Eq 'AttributeError|AssertionError' "$RUNNER_TEMP/base.log"
grep -Fq 'sorted(library_dir.glob("libamdhip64.so.*"))' "$base_root/setup.py"
echo "ROCM_VERSIONED_RUNTIME_SELECTION_BASE_RC=$base_rc"
echo 'ROCM_VERSIONED_RUNTIME_SELECTION_BASE=EXPECTED_FAIL'

python "$candidate_root/tests/kernels/test_rocm_versioned_runtime_selection.py"
echo 'ROCM_VERSIONED_RUNTIME_SELECTION_CANDIDATE=PASS'

test "$(git diff --name-only "$BASE_SHA" "$CANDIDATE_SHA" | sort)" = $'python/freetoken/kernel/_toolchain.py\nsetup.py\ntests/kernels/test_rocm_versioned_runtime_selection.py'
git diff --check "$BASE_SHA" "$CANDIDATE_SHA"
grep -Fq 'def select_versioned_rocm_runtime' "$candidate_root/python/freetoken/kernel/_toolchain.py"
grep -Fq 'select_versioned_rocm_runtime' "$candidate_root/setup.py"
echo 'ROCM_VERSIONED_RUNTIME_SELECTION_AB=BASE_RED_FIX_GREEN'
Loading