Add some CUDA-specific tests for EnzymeTestUtils#3105
Open
kshyatt wants to merge 7 commits into
Open
Conversation
Contributor
|
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/lib/EnzymeTestUtils/ext/EnzymeTestUtilsGPUArraysCoreExt.jl b/lib/EnzymeTestUtils/ext/EnzymeTestUtilsGPUArraysCoreExt.jl
index ab3231ef..e50566f1 100644
--- a/lib/EnzymeTestUtils/ext/EnzymeTestUtilsGPUArraysCoreExt.jl
+++ b/lib/EnzymeTestUtils/ext/EnzymeTestUtilsGPUArraysCoreExt.jl
@@ -57,7 +57,7 @@ function EnzymeTestUtils.to_vec(x::AbstractGPUArray{<:Complex{<:EnzymeTestUtils.
is_const && return x
x_new = Core.Typeof(x)(undef, sz)
x_vec_new_real = view(x_vec_new, 1:length(x))
- x_vec_new_imag = view(x_vec_new, (length(x) + 1):(2*length(x)))
+ x_vec_new_imag = view(x_vec_new, (length(x) + 1):(2 * length(x)))
x_vec_complex = reshape(complex.(x_vec_new_real, x_vec_new_imag), sz)
x_new .= x_vec_complex
seen_xs[x] = x_new |
Contributor
Benchmark Results
Benchmark PlotsA plot of the benchmark results has been uploaded as an artifact at https://github.com/EnzymeAD/Enzyme.jl/actions/runs/27195096884/artifacts/7503162974. |
wsmoses
reviewed
May 18, 2026
wsmoses
reviewed
May 27, 2026
wsmoses
reviewed
May 27, 2026
wsmoses
reviewed
May 27, 2026
|
|
||
| function test_to_vec(x) | ||
| x_vec, from_vec = to_vec(x) | ||
| @test x_vec isa CuVector{<:AbstractFloat} |
Member
There was a problem hiding this comment.
alternatively you could maybe use jlarrays here to test on cpu?
Collaborator
Author
|
lol ok the complex one needs help if anyone can spare a moment, it's cool this extension was just totally not working for months haha |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm really the dog-with-chemistry-set meme here but tried to actually test some of this and see if it works, it seems there is some stuff that isn't quite functioning?