Skip to content
Merged
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
17 changes: 17 additions & 0 deletions .github/workflows/hevc-conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,20 @@ jobs:
toolchain: stable
- run: cargo test --locked -p coreav-hevc -p coreav-kernels-hevc -p coreav-backend-hevc --no-default-features
- run: cargo test --locked -p coreav-hevc -p coreav-kernels-hevc -p coreav-backend-hevc -p coreav-thumbnail --features native-hevc --all-targets
- name: Exercise the real native reference driver on generated pixels
run: |
set -euo pipefail
cargo test --locked -p coreav-backend-hevc --features native-hevc,test-support --example reference | tee "$RUNNER_TEMP/native-reference-tests.log"
grep -F 'test tests::native_reference_checks_generated_depths_at_every_worker_boundary ... ok' "$RUNNER_TEMP/native-reference-tests.log"
- run: cargo test --locked -p coreav-hevc -p coreav-kernels-hevc --features native-hevc,scalar --all-targets
- name: Check diagnostic-only extraction and row reads
if: runner.os == 'Linux'
run: |
set -euo pipefail
RUSTFLAGS='--cfg hevc_thread_diagnostics' cargo test --locked -p coreav-hevc -p coreav-kernels-hevc --features native-hevc --lib | tee "$RUNNER_TEMP/hevc-diagnostic-tests.log"
grep -Fx 'test decoder::scheduler::tests::header_only_dependency_replay_distinguishes_chains_and_siblings ... ok' "$RUNNER_TEMP/hevc-diagnostic-tests.log"
grep -Fx 'test decoder::scheduler::tests::row_dependency_trace_observes_generated_predictions ... ok' "$RUNNER_TEMP/hevc-diagnostic-tests.log"
grep -Fx 'test inter::tests::diagnostic_read_bounds_match_interpolation_support ... ok' "$RUNNER_TEMP/hevc-diagnostic-tests.log"
- run: cargo clippy --locked -p coreav-hevc -p coreav-kernels-hevc -p coreav-backend-hevc -p coreav-thumbnail --features native-hevc --all-targets -- -D warnings
- name: Check the opt-in CLI registration with and without default features
run: |
Expand All @@ -86,6 +99,10 @@ jobs:
if grep -E 'coreav-(kernels-)?hevc' "$RUNNER_TEMP/backend-off.txt"; then exit 1; fi
cargo tree --locked -p coreav-cli -e normal,build > "$RUNNER_TEMP/default-consumer.txt"
if grep -E 'coreav-(kernels-|backend-)?hevc' "$RUNNER_TEMP/default-consumer.txt"; then exit 1; fi
for feature in release-default release-full; do
cargo tree --locked -p coreav-cli --no-default-features --features "$feature" -e normal,build,features > "$RUNNER_TEMP/$feature.txt"
if grep -E 'native-hevc-private|coreav-(kernels-|backend-)?hevc' "$RUNNER_TEMP/$feature.txt"; then exit 1; fi
done
- name: Check Linux acquisition and subprocess isolation
if: runner.os == 'Linux'
run: python3 -m unittest discover -s scripts/tests -p 'test_hevc*.py'
Expand Down
136 changes: 136 additions & 0 deletions .github/workflows/hevc-native-rows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
name: hevc-native-rows
run-name: Native HEVC rows ${{ inputs.candidate }} (${{ inputs.mode }})
# workflow-check: not required

on:
workflow_call:
inputs:
candidate:
required: true
type: string
mode:
type: string
default: all
only:
type: string
default: ''
frames:
type: number
default: 32
workflow_dispatch:
inputs:
candidate:
description: Exact decoder commit
required: true
type: string
mode:
description: Native reference calls, complete checks, or both
type: choice
options: [all, reference, checks]
default: all
only:
description: Optional comma-separated non-wavefront input IDs for reference calls
type: string
default: ''
frames:
description: Maximum pictures per reference input
type: number
default: 32

permissions:
contents: read

env:
CANDIDATE: ${{ inputs.candidate }}
ONLY: ${{ inputs.only }}
FRAMES: ${{ inputs.frames }}

jobs:
reference:
if: inputs.mode == 'all' || inputs.mode == 'reference'
name: hevc-native-rows-reference (${{ matrix.shard }})
runs-on: ubuntu-24.04
timeout-minutes: 180
strategy:
fail-fast: false
matrix:
shard: ${{ fromJSON(inputs.only != '' && '[0]' || '[0,1,2]') }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: false
ref: ${{ inputs.candidate }}
fetch-depth: 0
- name: Admit exact candidate and bounded reference selection
run: |
set -euo pipefail
[[ "$CANDIDATE" =~ ^[0-9a-f]{40}$ ]]
test "$(git rev-parse HEAD)" = "$CANDIDATE"
test -n "$(git branch -r --contains "$CANDIDATE")"
python3 -I - "$ONLY" "$FRAMES" <<'PY'
import sys
sys.path.insert(0, 'scripts')
from hevc_threading import ROW_INPUT_IDS
selected = set(sys.argv[1].split(',')) if sys.argv[1] else set(ROW_INPUT_IDS)
if not selected or not selected <= set(ROW_INPUT_IDS) or not 1 <= int(sys.argv[2]) <= 32:
raise SystemExit('invalid_native_rows_selection')
PY
- uses: dtolnay/rust-toolchain@686976e191b89faba57d3206551f0f330d8cb249
with:
toolchain: stable
- name: Check the actual native driver before release building
run: |
set -euo pipefail
cargo test --locked -p coreav-hevc --features native-hevc-rows-private,test-support --lib decoder::scheduler::tests
cargo test --locked -p coreav-backend-hevc --features native-hevc,test-support --example reference
cargo build --locked --release -p coreav-backend-hevc --features native-hevc,test-support --example reference
- name: Install the pinned binary oracle
env:
R2_ENDPOINT: ${{ secrets.COREAV_CORPUS_R2_ENDPOINT }}
R2_ACCESS_KEY_ID: ${{ secrets.COREAV_CORPUS_R2_ACCESS_KEY_ID }}
R2_SECRET_ACCESS_KEY: ${{ secrets.COREAV_CORPUS_R2_SECRET_ACCESS_KEY }}
R2_BUCKET: ${{ vars.COREAV_CORPUS_R2_BUCKET }}
run: scripts/install-oracle-ffmpeg.sh "$RUNNER_TEMP/oracle"
- name: Verify every worker count before paired native reference calls
env:
R2_ENDPOINT: ${{ secrets.COREAV_CORPUS_R2_ENDPOINT }}
R2_ACCESS_KEY_ID: ${{ secrets.COREAV_CORPUS_R2_ACCESS_KEY_ID }}
R2_SECRET_ACCESS_KEY: ${{ secrets.COREAV_CORPUS_R2_SECRET_ACCESS_KEY }}
R2_BUCKET: ${{ vars.COREAV_CORPUS_R2_BUCKET }}
run: |
set -euo pipefail
umask 077
mkdir -p "$RUNNER_TEMP/private"
python3 -I scripts/hevc_threading.py native-reference \
--native "$PWD/target/release/examples/reference" --oracle-bin "$RUNNER_TEMP/oracle" \
--out "$RUNNER_TEMP/private/native" --candidate "$CANDIDATE" \
--shard-index '${{ matrix.shard }}' --shard-count '${{ inputs.only != '' && 1 || 3 }}' \
--only "$ONLY" --frames "$FRAMES" > "$RUNNER_TEMP/private/native.log" 2>&1
- name: Retain private reference results
if: always()
run: |
set -euo pipefail
cd "$RUNNER_TEMP"
[ -d private ] || exit 0
tar -czf records.tgz private
mkdir -p sealed
openssl rand -hex -out key.txt 32
openssl enc -aes-256-cbc -pbkdf2 -salt -pass file:key.txt -in records.tgz -out sealed/records.tgz.enc
openssl pkeyutl -encrypt -pubin -inkey "$GITHUB_WORKSPACE/bench/hevc-conformance/evidence-public.pem" -pkeyopt rsa_padding_mode:oaep -pkeyopt rsa_oaep_md:sha256 -in key.txt -out sealed/key.txt.enc
shred -u key.txt records.tgz
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
if: always()
with:
name: hevc-native-rows-reference-${{ matrix.shard }}-${{ inputs.candidate }}
path: ${{ runner.temp }}/sealed
if-no-files-found: error
retention-days: 7

checks:
if: inputs.mode == 'all' || inputs.mode == 'checks'
uses: ./.github/workflows/hevc-threading.yml
with:
candidate: ${{ inputs.candidate }}
baseline: ''
frames: 32
secrets: inherit
34 changes: 31 additions & 3 deletions .github/workflows/hevc-reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
required: true
type: string
baseline:
description: Optional full baseline SHA for a comparison
description: Optional full baseline SHA, or native for same-head row evidence
required: false
default: ''
type: string
Expand All @@ -24,6 +24,21 @@ on:
required: false
default: false
type: boolean
thread_diagnostics_only:
description: Run only untimed 4T picture-job diagnostics on all 30 inputs
required: false
default: false
type: boolean
thread_dependencies_only:
description: Replay only header reference dependencies on all 30 inputs
required: false
default: false
type: boolean
thread_rows_only:
description: Decode only CTU-row reference reads on the 24 non-WPP inputs
required: false
default: false
type: boolean
only:
description: Optional comma-separated input IDs
required: false
Expand Down Expand Up @@ -54,7 +69,7 @@ jobs:
secrets: inherit

reference:
if: ${{ !inputs.inverse && inputs.baseline == '' && !inputs.sanitizer_only }}
if: ${{ !inputs.inverse && inputs.baseline == '' && !inputs.sanitizer_only && !inputs.thread_diagnostics_only && !inputs.thread_dependencies_only && !inputs.thread_rows_only }}
runs-on: ubuntu-24.04
timeout-minutes: 150
env:
Expand Down Expand Up @@ -128,12 +143,25 @@ jobs:
retention-days: 30

threading:
if: ${{ !inputs.inverse && (inputs.baseline != '' || inputs.sanitizer_only) }}
if: ${{ !inputs.inverse && inputs.baseline != 'native' && (inputs.baseline != '' || inputs.sanitizer_only || inputs.thread_diagnostics_only || inputs.thread_dependencies_only || inputs.thread_rows_only) }}
uses: ./.github/workflows/hevc-threading.yml
with:
candidate: ${{ inputs.candidate }}
baseline: ${{ inputs.baseline }}
sanitizer_only: ${{ inputs.sanitizer_only }}
thread_diagnostics_only: ${{ inputs.thread_diagnostics_only }}
thread_dependencies_only: ${{ inputs.thread_dependencies_only }}
thread_rows_only: ${{ inputs.thread_rows_only }}
only: ${{ inputs.only }}
frames: ${{ fromJSON(inputs.frames) }}
secrets: inherit

native-rows:
if: ${{ !inputs.inverse && inputs.baseline == 'native' }}
uses: ./.github/workflows/hevc-native-rows.yml
with:
candidate: ${{ inputs.candidate }}
mode: ${{ inputs.only != '' && 'reference' || inputs.diagnose_only && 'checks' || 'all' }}
only: ${{ inputs.only }}
frames: ${{ fromJSON(inputs.frames) }}
secrets: inherit
Loading
Loading