From d9541158522f7a9c479d4277e4f16800d882b971 Mon Sep 17 00:00:00 2001 From: Richie Cahill Date: Sun, 13 Sep 2026 11:16:37 -0400 Subject: [PATCH] more test issues --- overlays/default.nix | 1 + overlays/test-exclusions.nix | 48 ++++++++++++++++++++++++++++++ overlays/x86-64-v3-workarounds.nix | 20 +++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 overlays/x86-64-v3-workarounds.nix diff --git a/overlays/default.nix b/overlays/default.nix index f583de3..114df6b 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -16,6 +16,7 @@ }; test-exclusions = import ./test-exclusions.nix; + x86-64-v3-workarounds = import ./x86-64-v3-workarounds.nix; python-env = final: _prev: { my_python = final.python314.withPackages ( diff --git a/overlays/test-exclusions.nix b/overlays/test-exclusions.nix index 4f53cee..41a6d5a 100644 --- a/overlays/test-exclusions.nix +++ b/overlays/test-exclusions.nix @@ -17,6 +17,15 @@ _final: prev: { ''; }); + onnxruntime = prev.onnxruntime.overrideAttrs (old: { + # OpenVINO uses a different QuantizeLinear formulation. x86-64-v3 moves + # these INT8 results by one quantization unit; we accept that inference- + # precision risk for our workloads. + env = (old.env or { }) // { + GTEST_FILTER = "*:-QuantizeLinearOpTest.Int8:QuantizeLinearOpTest.OVEP_Int8_NegativeZeroPoint:QuantizeLinearOpTest.OVEP_Int8_PositiveZeroPoint"; + }; + }); + prometheus = prev.prometheus.overrideAttrs ( old: let @@ -71,6 +80,18 @@ _final: prev: { ]; }); + jupyter-server = pythonPrev.jupyter-server.overridePythonAttrs (old: { + # The kernel reply arrived after the one-second outer deadline when the + # builder was heavily loaded. Keep the regression test but allow it the + # same margin as the other resource-sensitive tests. + postPatch = (old.postPatch or "") + '' + substituteInPlace tests/services/kernels/test_connection.py \ + --replace-fail \ + "await asyncio.wait_for(asyncio.wrap_future(conn2.request_kernel_info()), timeout=1.0)" \ + "await asyncio.wait_for(asyncio.wrap_future(conn2.request_kernel_info()), timeout=10.0)" + ''; + }); + scipy = pythonPrev.scipy.overridePythonAttrs (old: { # x86-64-v3 FFT implementations produce rounding differences outside # these tests' strict tolerances. We accept the numerical-precision @@ -80,6 +101,33 @@ _final: prev: { "test_roundtrip_scaling" ]; }); + + sentry-sdk = pythonPrev.sentry-sdk.overridePythonAttrs (old: { + # This test globally mocks threading.current_thread while another + # thread is running. On Python 3.14, Thread.join can race with that + # mock and exhaust its single side effect before the worker removes it. + disabledTests = (old.disabledTests or [ ]) ++ [ + "test_get_current_thread_meta_main_thread" + ]; + }); + + torchcodec = pythonPrev.torchcodec.overridePythonAttrs (old: { + # For these 8 kHz MP3 cases, the x86-64-v3 API and CLI codec paths + # differ in 0.8% of decoded samples. Retain the original tolerance for + # 99% of samples and accept the localized audio-precision risk. + postPatch = (old.postPatch or "") + '' + substituteInPlace test/test_encoders.py \ + --replace-fail \ + 'if sys.platform == "darwin":' \ + 'if sys.platform == "darwin" or ( + format == "mp3" + and sample_rate == 8_000 + and asset is SINE_MONO_S32 + and bit_rate in (None, 0) + and num_channels in (None, 1) + ):' + ''; + }); }) ]; } diff --git a/overlays/x86-64-v3-workarounds.nix b/overlays/x86-64-v3-workarounds.nix new file mode 100644 index 0000000..6f8a390 --- /dev/null +++ b/overlays/x86-64-v3-workarounds.nix @@ -0,0 +1,20 @@ +# Compatibility fixes for packages rebuilt with x86-64-v3. +# +# The v3 baseline enables instructions that expose source assumptions hidden +# by the generic x86-64 build. Keep compile fixes here, separate from test +# exclusions, until upstream or nixpkgs incorporates them. +_final: prev: +prev.lib.optionalAttrs ((prev.stdenv.hostPlatform.gcc.arch or null) == "x86-64-v3") { + deno = + let + librusty_v8 = prev.deno.passthru.librusty_v8.overrideAttrs (old: { + # Clang prohibits including its internal BMI2 header directly. The + # public umbrella supplies the same intrinsics with the required setup. + postPatch = (old.postPatch or "") + '' + substituteInPlace third_party/abseil-cpp/absl/container/internal/raw_hash_set.h \ + --replace-fail "#include " "#include " + ''; + }); + in + prev.deno.override { inherit librusty_v8; }; +}