From 836409a1d92c996b7c3127658ad146c9270b8c23 Mon Sep 17 00:00:00 2001 From: Dmitry Rogozhkin Date: Fri, 15 May 2026 12:13:18 -0700 Subject: [PATCH] ci: add test to verify CPU fallback Signed-off-by: Dmitry Rogozhkin --- .github/workflows/ci.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28b7785..832fb66 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -192,11 +192,20 @@ jobs: # Testing in minimum and maximum supported versions of python. python-version: [ '3.10', '3.14' ] runner: [ 'bmg', 'dg2' ] + # Default fallback value for standard matrix combinations + cpu_fallback: [ false ] + + include: + - ffmpeg-version: '8' + python-version: '3.14' + runner: 'bmg' + cpu_fallback: true runs-on: ${{matrix.runner}} container: image: 'ubuntu:24.04' options: --device /dev/dri:/dev/dri -v /dev/dri/by-path:/dev/dri/by-path env: + FORCE_CPU_FALLBACK: ${{ matrix.cpu_fallback == true }} WHEELS: torchlib-${{ matrix.python-version }}-wheels defaults: run: @@ -273,8 +282,8 @@ jobs: - name: 'Test' working-directory: torchcodec run: | - if [ "${{matrix.runner}}" == "dg2" ]; then - # https://github.com/intel/media-driver/issues/1954 + if [ "$FORCE_CPU_FALLBACK" == "true" ] || [ "${{matrix.runner}}" == "dg2" ]; then + # On dg2 see: https://github.com/intel/media-driver/issues/1954 known_failures="not test_get_frame_at_av1[xpu]" fi pytest -rsf -k "${known_failures}" test/