Skip to content

Releases: ProjectTorreyPines/AdaptiveArrayPools.jl

v0.3.6

02 Apr 04:21

Choose a tag to compare

Bug Fix

Type-stable task-local pool accessors (CPU/CUDA/Metal)

get_task_local_*_pool() accessors (CPU/CUDA/Metal) now return fully concrete parametric types, fixing type instability.

What's Changed

  • (fix): Type-stable task-local pool accessors for CPU/CUDA/Metal by @mgyoo86

Full Changelog: v0.3.5...v0.3.6

v0.3.5

31 Mar 22:04

Choose a tag to compare

Bug Fix

Julia 1.11 falls back to legacy N-way cache path (#41)

Julia 1.11 has a bug where length(::Array) can disagree with prod(size(...)) after setfield!(:ref) reuse, breaking vec() and reshape(). Julia 1.11 now uses the legacy N-way cache path (zero-alloc on cache hit). The modern setfield! path and GPU extensions (CUDA, Metal) are gated at Julia 1.12+.

What's Changed

  • (fix): use legacy N-way cache path on Julia 1.11 by @mgyoo86 in #41

Full Changelog: v0.3.4...v0.3.5

v0.3.4

28 Mar 06:46

Choose a tag to compare

What's New

Zero-Alloc Others Overlap Check

RUNTIME_CHECK=1 others-type overlap check is now zero-allocation, matching the fixed-slot fast path from v0.3.3.

acquire_view! Escape Detection

Fixes a false-negative where acquire_view! for non-fixed-slot types was not recording pointer bounds, so views could bypass the overlap check. Also fixes scope boundary handling and adds missing legacy (Julia ≤1.10) definitions.

What's Changed

Full Changelog: v0.3.3...v0.3.4

v0.3.3

27 Mar 00:45

Choose a tag to compare

What's New

Zero-Allocation RUNTIME_CHECK=1 Hot Path (#37)

RUNTIME_CHECK=1 (runtime escape detection) no longer allocates in the acquire/rewind hot path. Fully zero-alloc after warmup.

Improved Compile-Time Escape Detection (#38)

Rewrites the compile-time escape detector with order-aware taint tracking. Fixes false negatives (missed escapes when variables were reassigned before acquire!) and false positives (incorrect errors from inner-scope shadowing and reassigned containers). Adds a new PoolReassignEscapeWarning for ambiguous v = f(v) patterns. CUDA/Metal block forms now have full warning parity with CPU.

What's Changed

  • (perf): zero-allocation RUNTIME_CHECK=1 hot path by @mgyoo86 in #37
  • (feat): Order-aware compile-time escape detection by @mgyoo86 in #38

Full Changelog: v0.3.2...v0.3.3

v0.3.2

25 Mar 06:42

Choose a tag to compare

Scope-Aware Runtime Escape Detection

Scope-Aware Validation (CPU, CUDA, Metal)

Runtime escape detection (RUNTIME_CHECK=1) no longer false-positives on arrays from outer @with_pool scopes used inside nested inner scopes. Leaked inner scopes (caught exceptions) are now cleaned up before validation.

Robust Poisoning for Custom Types

_poison_fill! now handles custom isbits structs (duck-type 0 * first(v) fallback) and skips non-isbits reference types gracefully.

What's Changed

  • (fix): Scope-aware runtime escape detection by @mgyoo86 in #36

Full Changelog: v0.3.1...v0.3.2

v0.3.1

14 Mar 21:21

Choose a tag to compare

What's New

Metal.jl Support (#34)

Full Apple Silicon GPU backend — same API as CUDA (@with_pool :metal), lazy/typed-lazy modes, full safety suite, and task-local multi-device pools. Requires Julia 1.11+. See 📖 Metal Backend.

Structural Mutation Detection (#35)

Catches resize!/push!/append! on pool-backed arrays:

  • Compile-time: PoolMutationError at macro expansion (zero cost)
  • Runtime: wrapper-vs-backing divergence check at rewind — advisory @warn with maxlog=1 (pool self-heals on next acquire!)

Works across CPU, CUDA, and Metal. See 📖 Pool Safety.

Other

  • CUDA extension now gated behind Julia 1.11+ to match Metal

What's Changed

  • (feat): Metal.jl (Apple Silicon GPU) backend support by @mgyoo86 in #34
  • (feat): compile-time and runtime structural mutation detection by @mgyoo86 in #35

Full Changelog: v0.3.0...v0.3.1

v0.3.0

13 Mar 21:14

Choose a tag to compare

⚠️ Breaking Changes

Default acquire! returns Array

  • acquire! now returns Array{T,N} instead of SubArray/ReshapedArray. On Julia 1.11+, Array is a mutable struct enabling zero-allocation setfield! reuse — the same guarantee views had, with better FFI/ccall and type constraint compatibility.
  • New acquire_view! provides explicit opt-in to the old view behavior.

Remove unsafe_* API

  • The entire unsafe_* API (unsafe_acquire!, unsafe_zeros!, unsafe_ones!, unsafe_similar!) is removed with no deprecation period.

Migration Guide

unsafe_acquire!  →  acquire!
unsafe_zeros!    →  zeros!
unsafe_ones!     →  ones!
unsafe_similar!  →  similar!

If you relied on acquire! returning views: acquire!acquire_view!

See the full 📖 Migration Guide for details.

What's Changed

  • Default acquire! → Array, remove unsafe_* API by @mgyoo86 in #33

Full Changelog: v0.2.6...v0.3.0

v0.2.6

13 Mar 17:37

Choose a tag to compare

Eliminate try-finally Overhead in @with_pool

@with_pool now uses direct rewind insertion instead of try-finally, enabling compiler inlining for ~15-25% speedup on hot-loop patterns.

New @safe_with_pool / @safe_maybe_with_pool macros preserve the old try-finally behavior for code that needs guaranteed exception cleanup.

What's Changed

  • Remove try-finally from @with_pool for inlining performance by @mgyoo86 in #32

Full Changelog: v0.2.5...v0.2.6

v0.2.5

12 Mar 21:21

Choose a tag to compare

Fix Compile-Time Explosion in Nested @with_pool

Nested or @inline @with_pool could cause compile-time explosion due to exponential macro expansion. Fixed by replacing union splitting with a single compile-time type assertion.

Safety system simplified from 4-tier (0–3) to binary RUNTIME_CHECK (0=off, 1=on) via LocalPreferences.toml. POOL_DEBUG, POOL_SAFETY_LV, set_safety_level! are removed.

See 📖 Safety and 📖 Configuration docs for details.

What's Changed

  • (fix): compile-time explosion in nested @with_pool + binary RUNTIME_CHECK by @mgyoo86 in #31

Full Changelog: v0.2.4...v0.2.5

v0.2.4

12 Mar 04:13

Choose a tag to compare

Hotfix: Eliminate Core.Box Allocation in @inline @with_pool

v0.2.3 introduced a Core.Box boxing regression (32–48 bytes) in @inline @with_pool functions, caused by closure-based dispatch interacting with try/finally boundaries after inlining.

Replaced with closureless union splitting on both CPU and CUDA — zero allocation on Julia 1.12+. On Julia <1.12, a minor 16-byte let-scope overhead may appear at top-level but disappears inside functions and hot loops.

What's Changed

  • (fix): Closureless union splitting — eliminate Core.Box allocation in @with_pool by @mgyoo86 in #30

Full Changelog: v0.2.3...v0.2.4