Skip to content

Conversation

@wsmoses
Copy link
Member

@wsmoses wsmoses commented Oct 26, 2025

No description provided.

@codecov
Copy link

codecov bot commented Oct 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.57%. Comparing base (2cd186b) to head (d863ed9).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2692   +/-   ##
=======================================
  Coverage   72.57%   72.57%           
=======================================
  Files          58       58           
  Lines       18739    18740    +1     
=======================================
+ Hits        13600    13601    +1     
  Misses       5139     5139           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 26, 2025

Benchmark Results

main d863ed9... main / d863ed9...
basics/make_zero/namedtuple 0.0538 ± 0.0026 μs 0.0523 ± 0.0026 μs 1.03 ± 0.071
basics/make_zero/struct 0.268 ± 0.0079 μs 0.267 ± 0.0048 μs 1 ± 0.035
basics/overhead 4.64 ± 0.01 ns 5.25 ± 0.011 ns 0.884 ± 0.0027
basics/remake_zero!/namedtuple 0.235 ± 0.01 μs 0.234 ± 0.0083 μs 1 ± 0.056
basics/remake_zero!/struct 0.234 ± 0.0086 μs 0.236 ± 0.0098 μs 0.992 ± 0.055
fold_broadcast/multidim_sum_bcast/1D 10.3 ± 0.25 μs 10.3 ± 0.33 μs 0.994 ± 0.04
fold_broadcast/multidim_sum_bcast/2D 12.2 ± 0.24 μs 12.3 ± 0.25 μs 0.998 ± 0.028
time_to_load 1.25 ± 0.011 s 1.25 ± 0.003 s 1 ± 0.0094

Benchmark Plots

A plot of the benchmark results has been uploaded as an artifact at https://github.com/EnzymeAD/Enzyme.jl/actions/runs/18851649289/artifacts/4385420597.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 26, 2025

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic main) to apply these changes.

Click here to view the suggested changes.
diff --git a/lib/EnzymeTestUtils/ext/EnzymeTestUtilsGPUArraysCoreExt.jl b/lib/EnzymeTestUtils/ext/EnzymeTestUtilsGPUArraysCoreExt.jl
index efd4baa8..4d64dcfd 100644
--- a/lib/EnzymeTestUtils/ext/EnzymeTestUtilsGPUArraysCoreExt.jl
+++ b/lib/EnzymeTestUtils/ext/EnzymeTestUtilsGPUArraysCoreExt.jl
@@ -7,7 +7,7 @@ using Enzyme
 function EnzymeTestUtils.acopyto!(dst, src::AbstractGPUArray)
     temp = Array{eltype(src)}(undef, size(src))
     Base.copyto!(temp, src)
-    EnzymeTestUtils.acopyto!(dst, temp)
+    return EnzymeTestUtils.acopyto!(dst, temp)
 end
 
 # basic containers: loop over defined elements, recursively converting them to vectors
@@ -55,11 +55,11 @@ function to_vec(x::AbstractGPUArray{<:Complex{<:EnzymeTestUtils.ElementType}}, s
         end
         has_seen && return reshape(seen_xs[x], size(x))
         is_const && return x
-	x_new = Array{eltype(x)}(undef, sz)
+        x_new = Array{eltype(x)}(undef, sz)
         @inbounds @simd for i in 1:length(x)
             x_new[i] = eltype(x)(x_vec_new[i], x_vec_new[i + length(x)])
         end
-	x_new = Core.Typeof(x)(x_new)
+        x_new = Core.Typeof(x)(x_new)
         seen_xs[x] = x_new
         return x_new
     end
@@ -98,7 +98,7 @@ function to_vec(x::AbstractGPUArray, seen_vecs::EnzymeTestUtils.AliasDict)
         end
         has_seen && return reshape(seen_xs[x], size(x))
         is_const && return x
-	x_new = Array{eltype(x_vew_new)}(undef, size(x))
+        x_new = Array{eltype(x_vew_new)}(undef, size(x))
         k = 1
         for i in eachindex(x)
             isassigned(x, i) || continue
@@ -106,7 +106,7 @@ function to_vec(x::AbstractGPUArray, seen_vecs::EnzymeTestUtils.AliasDict)
             x_new[i] = xi
             k += 1
         end
-	x_new = Core.Typeof(x)(x_new)
+        x_new = Core.Typeof(x)(x_new)
         seen_xs[x] = x_new
         return x_new
     end
diff --git a/lib/EnzymeTestUtils/src/to_vec.jl b/lib/EnzymeTestUtils/src/to_vec.jl
index cd6a595e..d974de91 100644
--- a/lib/EnzymeTestUtils/src/to_vec.jl
+++ b/lib/EnzymeTestUtils/src/to_vec.jl
@@ -103,7 +103,7 @@ function append_or_merge(prev::Union{Nothing, Tuple{AbstractVector, Bool}}, newv
         else
             res = Vector{ET2}(undef, length(prev[1]) + length(newv))
             acopyto!(@view(res[1:length(prev[1])]), prev[1])
-            acopyto!(@view(res[length(prev[1])+1:end]), newv)
+            acopyto!(@view(res[(length(prev[1]) + 1):end]), newv)
             return (res, true)
         end
     end

@kshyatt
Copy link
Contributor

kshyatt commented Oct 28, 2025

Shouldn't this also support AMDGPU arrays since it's all AbstractGPUArray behind the scenes? Title is too modest, I think

@giordano giordano changed the title EnzymeTestUtils: Cuarray support EnzymeTestUtils: GPUArray support Oct 28, 2025
@wsmoses wsmoses merged commit 057744f into main Oct 28, 2025
42 of 45 checks passed
@wsmoses wsmoses deleted the etuc branch October 28, 2025 16:38
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.

3 participants