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
3 changes: 1 addition & 2 deletions .github/workflows/jax-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
PYTHONPATH: ''
JAX_PLATFORMS: cpu
JAX_PLATFORM_NAME: cpu
XLA_FLAGS: --xla_cpu_multi_thread_eigen=false
steps:
- uses: actions/checkout@v4
- name: Prepare endpoint pins from preserved incident manifest
Expand Down Expand Up @@ -68,7 +67,7 @@ jobs:
run: >-
timeout --kill-after=5s 180 endpoint/bin/python .github/scripts/jax_compatibility.py
--version "$ENDPOINT" --backend cpu --output evidence/numerics.json
- name: Historical FFT witness with retained workaround
- name: FFT witness without the eigen workaround (fixed upstream in jax 0.12)
run: >-
timeout --kill-after=5s 120 endpoint/bin/python workspace/.github/scripts/xla_fft_pool_reentrancy_repro.py
> evidence/fft.log 2>&1
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/workspace-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,8 @@ jobs:
# so autonerves resolves the workspace's own config/ + dataset/, not
# the wheel's packaged defaults (closes Gap 4).
set -e
# Avoid FFT/ducc0 re-entering the occupied Eigen pool on CPU runners.
# Exact-wheel witness and comparison: docs/release_validation.md.
export XLA_FLAGS="${XLA_FLAGS:+$XLA_FLAGS }--xla_cpu_multi_thread_eigen=false"
# No XLA:CPU eigen workaround: removed for the jax>=0.12 floor
# (PyAutoNerves#215, PyAutoHeart#335); history in docs/release_validation.md.
pushd workspace
# Use the canonical profile_release.yaml (PyAutoHands#161/#181 step
# 6 rename).
Expand Down
18 changes: 14 additions & 4 deletions tests/test_workflow_wiring.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,25 +368,35 @@ def test_the_guard_is_a_quiet_no_op_on_a_clean_checkout(tmp_path):
assert res.returncode == 0 and not (other / "a__script.json").exists()


def test_release_fft_workaround_preserves_flags_and_is_scoped_to_release(tmp_path):
def test_no_eigen_workaround_and_release_leg_leaves_xla_flags_untouched(tmp_path):
"""jax>=0.12 floor (PyAutoNerves#215, PyAutoHeart#335): the
--xla_cpu_multi_thread_eigen=false workaround is gone from both legs, and the
release leg passes any inherited XLA_FLAGS through unchanged."""
import os
import subprocess

steps = _load("workspace-validation.yml")["jobs"]["run_scripts"]["steps"]
release = next(s for s in steps if s.get("name", "").startswith("Run Python scripts [mode=release"))
smoke = next(s for s in steps if s.get("name", "").startswith("Run Python scripts [mode=smoke"))
assert release["if"] == "needs.find_scripts.outputs.mode == 'release'"
assert "xla_cpu_multi_thread_eigen" not in smoke["run"]
for step in (release, smoke):
assert "xla_cpu_multi_thread_eigen" not in step["run"]
prefix = release["run"].split("pushd workspace", 1)[0]
for existing in (None, "", "--existing-flag"):
env = {k: v for k, v in os.environ.items() if k != "XLA_FLAGS"}
if existing is not None:
env["XLA_FLAGS"] = existing
result = subprocess.run(
["bash", "-e", "-c", prefix + '\nprintf "%s" "$XLA_FLAGS"'],
["bash", "-e", "-c", prefix + '\nprintf "%s" "${XLA_FLAGS-UNSET}"'],
cwd=tmp_path, env=env, capture_output=True, text=True, check=True,
)
assert result.stdout == ((existing + " ") if existing else "") + "--xla_cpu_multi_thread_eigen=false"
assert result.stdout == ("UNSET" if existing is None else existing)


def test_jax_compatibility_runs_without_the_eigen_workaround():
job = _load("jax-compatibility.yml")["jobs"]["compatibility"]
assert "XLA_FLAGS" not in job.get("env", {})
assert not any("multi_thread_eigen" in str(step.get("run", "")) for step in job["steps"])


def test_pipeline_is_selected_for_smoke_and_routes_to_its_checkout(tmp_path):
Expand Down
Loading