Skip to content

[REVIEW] Fix shared cache source stamps with Numba 0.68 - #941

Closed
isVoid wants to merge 1 commit into
mainfrom
fix-numba-068-cache-stamps
Closed

isVoid wants to merge 1 commit into
mainfrom
fix-numba-068-cache-stamps

Conversation

@isVoid

@isVoid isVoid commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Note

Closed in favor of declaring the supported Numba range in #942. This compatibility-code approach is superseded and should not be merged.

Numba 0.68 changed source freshness stamps in shared .nbi cache indexes from (mtime, size) tuples to SHA-256 content digests. Numba-CUDA retained the old stamp calculation, so CPU and CUDA dispatchers rejected each other's index as stale and overwrote the same .nbc data slots.

This PR explored delegating source-file freshness stamps to the installed Numba cache locator. The implementation and regression tests passed against Numba 0.60.0, 0.67.0, and 0.68.0, but numba-cuda 0.30.x is in maintenance mode and Numba 0.66 is its latest explicitly supported release. The chosen resolution is therefore to constrain the dependency to numba>=0.60,<0.67 in #942 rather than add compatibility code for Numba 0.68.

Related issue: #940.

@copy-pr-bot

copy-pr-bot Bot commented Oct 1, 2026

Copy link
Copy Markdown

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@isVoid

isVoid commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

@isVoid

isVoid commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of declaring the supported Numba range. Since numba-cuda 0.30.x is in maintenance mode and currently supports through Numba 0.66, a dependency upper bound is a smaller and clearer resolution than carrying compatibility code for Numba 0.68. I’ll follow up with a pin-only PR.

@isVoid

isVoid commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by the dependency-pin approach in #942.

isVoid added a commit that referenced this pull request Oct 7, 2026
## Description

Keep numba-cuda 0.30.x within its supported dependency range and prevent
current CI failures caused by unsupported dependency combinations.

This PR:

- Pins Numba to `>=0.60,<0.67`.
- Pins NumPy to `<2.5`.
- Skips the Linux IPC test classes when `cuda-bindings` no longer
exposes `CUipcMemHandle.reserved`.

Numba 0.68 changed cache source stamps from `(mtime, size)` tuples to
content hashes. numba-cuda 0.30.4 still uses tuple stamps, so CPU and
CUDA dispatchers invalidate and overwrite their shared cache index
instead of reusing it. Rather than adding compatibility code for a newer
Numba release in maintenance mode, prevent incompatible combinations
from being resolved.

NumPy 2.5 removed `np.row_stack`, which numba-cuda 0.30.4 still
references. Although supported Numba releases currently constrain NumPy
transitively, declaring the NumPy cap directly records numba-cuda's own
compatibility boundary.

Recent `cuda-bindings` releases intentionally stopped exposing reserved
struct fields, including `CUipcMemHandle.reserved`. All five failing IPC
tests depend on that field directly or indirectly through
multiprocessing pickling. The tests now use a feature-gated class skip,
so they continue to run with older compatible bindings and skip only
when the required field is unavailable.

The Numba upper bound is `<0.67` because Numba 0.66 is the latest
version explicitly supported by numba-cuda 0.30.x. The NumPy upper bound
follows the maintenance recommendation in #907.

Closes #940.
Supersedes #941.

## Validation

- `pre-commit run --files pyproject.toml pixi.toml pixi.lock
numba_cuda/numba/cuda/tests/cudapy/test_ipc.py`
- Parsed and validated both dependency specifications.
- Generated wheel metadata with `setuptools.build_meta` and verified:
  - `Requires-Dist: numba<0.67,>=0.60.0`
  - `Requires-Dist: numpy<2.5`
- Verified all 15 numba-cuda conda lock variants contain both upper
bounds.
- Verified the IPC classes run when `CUipcMemHandle.reserved` exists and
are skipped when it does not.
- Focused simulator run: 6 skipped, 0 failures.
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.

1 participant