Skip to content

Add NumJVM 0.6.0 fusion and opt-in CPU workers - #8

Draft
stamich wants to merge 27 commits into
mainfrom
milestone-0.6.0
Draft

stamich wants to merge 27 commits into
mainfrom
milestone-0.6.0

Conversation

@stamich

@stamich stamich commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

Reduce fused-vector allocation by generating whole-run float32, float64 and mixed-precision loops. Prefer eager vector ufuncs for direct single-operation expressions, reduce small-expression eager setup, and add allocation and contraction benchmarks.

Add an experimental, explicitly closed NJ.parallel(workers) context for selected contiguous float32/64 unary and binary ufuncs, expressions and deterministic full-array sum. Confined memory, unsafe overlap, unsupported layouts and small inputs use existing caller-thread paths. Fixed sum chunks and merge order are independent of worker count. The parallel execution guide documents lifecycle, scope closure, nesting and numerical limits.

Validation

  • JDK 25 local build, fused-provider tests and the fused-expression example passed before the final nested-context and interruption fixes; targeted parallel context, stress and expression tests passed afterward.
  • Staged local artifacts passed separate classpath and module-path consumer checks, both with and without the vector provider.
  • NumPy 2.5.4 verified all 4,245 generated oracle files; the generated parallel ufunc/sum fixtures and reference runner unit tests passed locally.
  • A short JMH smoke run exercised parallel ADD, CHAIN and SUM. A separate single-fork shared-machine investigation found that generated loops substantially reduce large float32 fused allocation; these runs do not establish reference-machine performance.
  • Current-head GitHub build, NumPy oracle, scalar, required-SIMD, native backend and SonarCloud checks passed at ac454b5.
  • The branch contains 27 task commits with the requested author and author/committer dates.

Open evidence and readiness

E04 prepares the reference campaign; the user's Ryzen 9 5950X run has not been performed on this revision. Worker scaling, crossover thresholds, dot/vecdot reference measurements and the earlier 0.5.0 fusion/allocating/AUTO performance gates remain open. No target has been silently waived. See docs/benchmarks/M4-reference-protocol.md, docs/benchmarks/M4-performance-status.md and docs/milestones/M4-0.6-release-checklist.md.

Keep this PR draft until the outstanding reference evidence is reviewed. No tag or publication is implied.

stamich added 27 commits May 28, 2026 21:47
@stamich stamich self-assigned this Nov 2, 2026
@stamich stamich added the enhancement New feature or request label Nov 2, 2026
@stamich stamich changed the title Draft: NumJVM 0.6.0 fusion and parallel execution Add NumJVM 0.6.0 fusion and opt-in CPU workers Nov 2, 2026
@stamich
stamich force-pushed the milestone-0.6.0 branch 2 times, most recently from 6533f65 to ac454b5 Compare November 2, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant