π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
ci: cap oneDNN ISA for CPU float16 to avoid AVX512-FP16 hang (#5499)
Karnajeet Gosavi723e5e5006bb
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex 144fb82d4..24629b27b 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -203,6 +203,21 @@ jobs:echo "ATEN_CPU_CAPABILITY=avx2" >> $GITHUB_ENVecho "DNNL_MAX_CPU_ISA=AVX2" >> $GITHUB_ENV+ # On AVX512-FP16 Intel runners (Xeon 6973P-C, Xeon Platinum 8573C), oneDNN hangs while+ # creating its native float16 depthwise convolution primitive, reached from+ # ScalePyramid._blur_fast (pyramid.py line 266, F.conv2d). Cap oneDNN below AVX512-FP16+ # so float16 convolutions use ATen's own kernel, as on AMD runners. Refs #5493.+ - name: Limit oneDNN ISA for CPU float16+ if: runner.os == 'Linux' && inputs.device == 'cpu' && inputs.pytorch-dtype == 'float16'+ shell: bash+ run: echo "ONEDNN_MAX_CPU_ISA=AVX512_CORE_BF16" >> "$GITHUB_ENV"++ - name: Verify oneDNN float16 support is disabled+ if: runner.os == 'Linux' && inputs.device == 'cpu' && inputs.pytorch-dtype == 'float16'+ run: |+ pixi run -e ${{ steps.pixi-env.outputs.name }} uv run --no-sync python -c \+ "import torch; supported = torch.ops.mkldnn._is_mkldnn_fp16_supported(); print(supported); assert not supported"+# The `device` fixture skips every test when the requested device is missing, so an mps# leg on a runner without a Metal device would be green with zero tests run. Fail here# instead. Image choice is not free: macos-14 segfaults inside MPS kernels, and on