From dcde9a30d845fbe3fd5d5062083ecf4818b86bb5 Mon Sep 17 00:00:00 2001 From: CompatHelper Julia Date: Wed, 1 Jul 2026 21:03:22 +0000 Subject: [PATCH 1/2] CompatHelper: bump compat for CUDA in [weakdeps] to 6, (keep existing compat) --- Project.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index bb54b52..68eaebb 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "AdaptiveArrayPools" uuid = "4f381ef7-9af0-4cbe-99d4-cf36d7b0f233" -authors = ["Min-Gu Yoo "] version = "0.3.8" +authors = ["Min-Gu Yoo "] [deps] Preferences = "21216c6a-2e73-6563-6e65-726566657250" @@ -17,7 +17,7 @@ AdaptiveArrayPoolsCUDAExt = "CUDA" AdaptiveArrayPoolsMetalExt = "Metal" [compat] -CUDA = "5" +CUDA = "5, 6" Metal = "1" Preferences = "1" Printf = "1" From 47114d3e6a2febf8e219f672a0bcbcc4c3c4d466 Mon Sep 17 00:00:00 2001 From: Min-Gu Yoo Date: Wed, 1 Jul 2026 14:41:23 -0700 Subject: [PATCH 2/2] fix(ext): import unsafe_free! from CUDA/Metal directly, not via .GPUArrays CUDA 6 removed the CUDA.GPUArrays submodule path, breaking precompilation of the CUDA extension (UndefVarError: GPUArrays not defined in CUDA). unsafe_free! is a (non-exported) binding in both CUDA and Metal namespaces, so `using CUDA: unsafe_free!` / `using Metal: unsafe_free!` works across the whole compat range (verified on CUDA 5.11.3, 6.2.0 and Metal 1.9.3). Also drop the now-unused bare `using Metal.GPUArrays` in the Metal ext, which was the same latent breakage as CUDA once Metal upgrades. --- ext/AdaptiveArrayPoolsCUDAExt/acquire.jl | 2 +- ext/AdaptiveArrayPoolsMetalExt/AdaptiveArrayPoolsMetalExt.jl | 1 - ext/AdaptiveArrayPoolsMetalExt/acquire.jl | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ext/AdaptiveArrayPoolsCUDAExt/acquire.jl b/ext/AdaptiveArrayPoolsCUDAExt/acquire.jl index 85108e2..8ca46d0 100644 --- a/ext/AdaptiveArrayPoolsCUDAExt/acquire.jl +++ b/ext/AdaptiveArrayPoolsCUDAExt/acquire.jl @@ -36,7 +36,7 @@ using AdaptiveArrayPools: get_view!, get_array!, allocate_vector, safe_prod, _acquire_impl!, _acquire_view_impl!, _maybe_record_borrow!, _MODE_BITS_MASK -using CUDA.GPUArrays: unsafe_free! +using CUDA: unsafe_free! # Guard against CUDA.jl internal API changes (tested with v5.x). @static if !( diff --git a/ext/AdaptiveArrayPoolsMetalExt/AdaptiveArrayPoolsMetalExt.jl b/ext/AdaptiveArrayPoolsMetalExt/AdaptiveArrayPoolsMetalExt.jl index 00b4325..309ebc1 100644 --- a/ext/AdaptiveArrayPoolsMetalExt/AdaptiveArrayPoolsMetalExt.jl +++ b/ext/AdaptiveArrayPoolsMetalExt/AdaptiveArrayPoolsMetalExt.jl @@ -20,7 +20,6 @@ using Metal @static if VERSION >= v"1.12-" using AdaptiveArrayPools: AbstractTypedPool, AbstractArrayPool - using Metal.GPUArrays include("types.jl") include("dispatch.jl") diff --git a/ext/AdaptiveArrayPoolsMetalExt/acquire.jl b/ext/AdaptiveArrayPoolsMetalExt/acquire.jl index b4f12d6..2aa8a34 100644 --- a/ext/AdaptiveArrayPoolsMetalExt/acquire.jl +++ b/ext/AdaptiveArrayPoolsMetalExt/acquire.jl @@ -18,7 +18,7 @@ using AdaptiveArrayPools: get_view!, get_array!, allocate_vector, safe_prod, _acquire_impl!, _acquire_view_impl!, _maybe_record_borrow!, _MODE_BITS_MASK -using Metal.GPUArrays: unsafe_free! +using Metal: unsafe_free! # Guard against Metal.jl internal API changes @static if !(