From 67b23acf25a4421113487514164b1855d52a91c8 Mon Sep 17 00:00:00 2001 From: krasow Date: Tue, 9 Jun 2026 16:15:27 -0500 Subject: [PATCH 1/5] 26.01 changes --- Project.toml | 2 +- deps/version.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index c898d6b4b..f84c8f40f 100644 --- a/Project.toml +++ b/Project.toml @@ -45,5 +45,5 @@ Preferences = "1" Random = "1" StatsBase = "0.34" cunumeric_jl_wrapper_jll = "25.10.3" -cupynumeric_jll = "25.10.3" +cupynumeric_jll = "26.1.0" julia = "1.10" diff --git a/deps/version.jl b/deps/version.jl index 68a8199b9..9371a80ca 100644 --- a/deps/version.jl +++ b/deps/version.jl @@ -17,8 +17,8 @@ * Ethan Meitz =# -const MIN_CUNUMERIC_VERSION = v"25.10.00" -const MAX_CUNUMERIC_VERSION = v"25.12.00" +const MIN_CUNUMERIC_VERSION = v"26.01.00" +const MAX_CUNUMERIC_VERSION = v"26.11.999" up_dir(dir::String) = abspath(joinpath(dir, "..")) From a5f164aef067dc90dc3accc8a2a2b368e17ba3c7 Mon Sep 17 00:00:00 2001 From: krasow Date: Mon, 3 Aug 2026 20:40:44 -0500 Subject: [PATCH 2/5] update to 26.06 --- Project.toml | 6 +++--- deps/version.jl | 2 +- lib/CNPreferences/Project.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Project.toml b/Project.toml index b065cd01e..3642fab73 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "cuNumeric" uuid = "0fd9ffd4-7e84-4cd0-b8f8-645bd8c73620" -version = "0.1.1" +version = "0.2.0" [deps] CNPreferences = "3e078157-ea10-49d5-bf32-908f777cd46f" @@ -32,7 +32,7 @@ CxxWrap = "0.17" ExpressionExplorer = "1.1.4" JuliaFormatter = "2.3.0" KernelAbstractions = "0.9.41" -Legate = "0.1.2" +Legate = "0.2.0" LegatePreferences = "0.1.6" MacroTools = "0.5.16" OpenBLAS32_jll = "0.3" @@ -40,7 +40,7 @@ Pkg = "1" Preferences = "1" Random = "1" StatsBase = "0.34" -cunumeric_jl_wrapper_jll = "25.10.3" +cunumeric_jl_wrapper_jll = "26.1.0" cupynumeric_jll = "26.1.0" julia = "1.10" diff --git a/deps/version.jl b/deps/version.jl index 9371a80ca..22c21216d 100644 --- a/deps/version.jl +++ b/deps/version.jl @@ -17,7 +17,7 @@ * Ethan Meitz =# -const MIN_CUNUMERIC_VERSION = v"26.01.00" +const MIN_CUNUMERIC_VERSION = v"26.06.00" const MAX_CUNUMERIC_VERSION = v"26.11.999" up_dir(dir::String) = abspath(joinpath(dir, "..")) diff --git a/lib/CNPreferences/Project.toml b/lib/CNPreferences/Project.toml index e612a4c5b..376ace094 100644 --- a/lib/CNPreferences/Project.toml +++ b/lib/CNPreferences/Project.toml @@ -8,6 +8,6 @@ LegatePreferences = "8028f36a-2b64-49e9-aa04-2d0933fd2ed9" Preferences = "21216c6a-2e73-6563-6e65-726566657250" [compat] -LegatePreferences = "0.1.5" +LegatePreferences = "0.1.6" Preferences = "1.4.3" julia = "1.10" From 591f1143cee4b0d90e3852a19b4ba85e99b67138 Mon Sep 17 00:00:00 2001 From: krasow Date: Mon, 3 Aug 2026 20:43:04 -0500 Subject: [PATCH 3/5] docs/Project.toml update versions --- docs/Project.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Project.toml b/docs/Project.toml index 289148278..078ced337 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,7 +1,7 @@ [compat] -CNPreferences = "0.1.2" +CNPreferences = "0.1.3" Documenter = "1.5" -cuNumeric = "0.1" +cuNumeric = "0.2.0" [deps] CNPreferences = "3e078157-ea10-49d5-bf32-908f777cd46f" From a84a20bd676d450a71dfce28b1e24cc5ebe6c955 Mon Sep 17 00:00:00 2001 From: krasow Date: Mon, 3 Aug 2026 21:59:24 -0500 Subject: [PATCH 4/5] fix unary reduction with booleans --- src/ndarray/unary.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ndarray/unary.jl b/src/ndarray/unary.jl index e9363a2b5..0c0df9cac 100644 --- a/src/ndarray/unary.jl +++ b/src/ndarray/unary.jl @@ -349,6 +349,12 @@ function Base.any(input::NDArray{Bool}; dims=Colon()) return _bool_reduction_impl(cuNumeric.ANY, input, dims) end +# Boolean multiplication is logical conjunction. cuPyNumeric's PROD reduction +# uses a numeric fill identity, which Legate rejects for a Boolean target. +function Base.prod(input::NDArray{Bool}; dims=Colon()) + return _unary_reduction_impl(Base.prod, cuNumeric.ALL, input, dims) +end + #! ONLY ADD ONCE REDUCTIONS RETURN A SCALAR # function StatsBase.mean(arr::NDArray{T}) where T # return sum(arr) ./ prod(size(arr)) From f481973ab2628d0740da32b0ad206732da0eab7b Mon Sep 17 00:00:00 2001 From: krasow Date: Tue, 4 Aug 2026 13:18:34 -0500 Subject: [PATCH 5/5] update impl to Julia conversion --- src/ndarray/ndarray.jl | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/ndarray/ndarray.jl b/src/ndarray/ndarray.jl index 09265c216..7dd0b2779 100644 --- a/src/ndarray/ndarray.jl +++ b/src/ndarray/ndarray.jl @@ -155,13 +155,21 @@ function (::Type{<:Array{A}})(arr::NDArray{B,1}) where {A,B} return make_array(A, Ptr{A}(get_ptr(arr)), size(arr)) end -# TODO: query the store's DimOrdering instead of assuming row-major (C-order). -# Julia Arrays are column-major, so for C-ordered buffers we transpose, wrap, -# then transpose back so `Array(nda)` matches `nda[i,j]`. +# Copy logically into Julia's column-major storage. +# Legate may map an NDArray in C or Fortran order. +function _copy_to_julia_array(arr::NDArray{T,N}) where {T,N} + out = Array{T}(undef, size(arr)) + store = Legate.attach_external_col_major(out) + ptr = cuNumeric.nda_store_to_ndarray(store.handle) + finalize(store.handle) + attached = NDArray(ptr, T, Val(N), out) + copyto!(attached, arr) + get_ptr(attached) # Block until the copy into `out` completes. + return out +end + function (::Type{<:Array{A}})(arr::NDArray{B}) where {A,B} - t = transpose(arr) - w = make_array(B, Ptr{B}(get_ptr(t)), size(t)) - out = collect(permutedims(w, reverse(1:ndims(w)))) + out = _copy_to_julia_array(arr) return A === B ? out : copyto!(Array{A}(undef, size(arr)), out) end