Skip to content

Tests compile numba kernels for a generic CPU - #137

Merged
isaac0804 merged 2 commits into
mainfrom
ci-generic-numba
Oct 3, 2026
Merged

isaac0804 merged 2 commits into
mainfrom
ci-generic-numba

Conversation

@isaac0804

Copy link
Copy Markdown
Contributor

The planner's numba kernels are compiled with fastmath for the host CPU, so an rsim game played on CI's CPU drifts from the same game played locally, and a test asserting how a game unfolds can pass locally and fail on CI (as test_restart_fuzzer's rsim test did). The root conftest.py now sets NUMBA_CPU_NAME=generic (if unset) before numba is imported, so tests on every x86 machine run the same kernel code; rsim worker processes inherit it. Tests only: tournaments and the bench still compile for the host.

Cost: none measurable. Full suite locally 101 s (was ~97 s); on CI 110 s (recent runs 114-115 s). It removes the main CPU difference, not all of them (numpy and libm also pick CPU-specific code paths), so whether CI-only rsim failures stop shows over the coming weeks, not in one run.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SACGSprm9GiBueqKdxsy2j

Copilot AI balanced review requested due to automatic review settings October 3, 2026 08:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The environment is configured early enough for test collection and is scoped to pytest execution.

Review effort: Balanced
Findings: None

What changed in this PR

Configures test-time Numba kernels to target a generic CPU, reducing machine-dependent rsim test drift.

Changes:

  • Sets NUMBA_CPU_NAME=generic before Numba imports.
  • Preserves explicit environment overrides and propagates the setting to workers.
File Description
conftest.py Establishes the generic Numba CPU target for tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI balanced review requested due to automatic review settings October 3, 2026 09:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The narrowly scoped configuration is applied early and preserves user overrides.

Review effort: Balanced
Findings: None

@isaac0804
isaac0804 merged commit 156d60e into main Oct 3, 2026
5 of 6 checks passed
@isaac0804
isaac0804 deleted the ci-generic-numba branch October 3, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants