Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

ci: clamp CPU ISA to AVX2 for torch 2.5.1 Windows legs (#3907)

Dmytro Mishkine823ee339bfc
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 70aad93a0..1dc503df2 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -88,6 +88,17 @@ jobs:
- name: Install dependencies
run: pixi run -e ${{ steps.pixi-env.outputs.name }} install
+ # torch 2.5.1 Windows wheels crash with STATUS_ILLEGAL_INSTRUCTION (0xc000001d) inside
+ # affine_grid on part of the runner fleet (host-CPU-dependent, hits both windows-2022 and
+ # windows-2025 β€” the CPU-autocast bf16 path dispatches AVX512 kernels some hosts lack).
+ # Clamp both ISA dispatchers to AVX2 for these legs. Drop when 2.5.1 leaves the matrix.
+ - name: Clamp CPU ISA for torch 2.5.1 on Windows
+ if: runner.os == 'Windows' && startsWith(matrix.pytorch-version, '2.5')
+ shell: bash
+ run: |
+ echo "ATEN_CPU_CAPABILITY=avx2" >> $GITHUB_ENV
+ echo "DNNL_MAX_CPU_ISA=AVX2" >> $GITHUB_ENV
+
- name: Run tests
env:
KORNIA_TEST_DEVICE: cpu