Skip to content

[Test] Skip (again) CUDA integration tests when they are known to fail #674

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

giordano
Copy link
Member

@giordano giordano commented Feb 1, 2025

CUDA integration tests are still failing on non-CUDA systems in Julia v1.11 due to #614, but they were brought back in #667. With this change we skip running those tests when we expect them to fail.

Note: as mentioned in #614 (comment) these tests should finally be working again in Julia v1.11.4.

@wsmoses
Copy link
Member

wsmoses commented Feb 1, 2025

I think we should go for a different fix here and instead change the precompile reactantcudaext.jl to only run on 11.4+, which I believe should fix this while still running tests

@wsmoses
Copy link
Member

wsmoses commented Feb 1, 2025

The Apple cuda tests are currently only disabled pending JuliaGPU/GPUCompiler.jl#660

@giordano
Copy link
Member Author

giordano commented Feb 1, 2025

I think we should go for a different fix here and instead change the precompile reactantcudaext.jl to only run on 11.4+, which I believe should fix this while still running tests

OK, I can confirm

diff --git a/ext/ReactantCUDAExt.jl b/ext/ReactantCUDAExt.jl
index 391be0b..d8ccbec 100644
--- a/ext/ReactantCUDAExt.jl
+++ b/ext/ReactantCUDAExt.jl
@@ -1,5 +1,7 @@
 module ReactantCUDAExt
 
+__precompile__(!(v"1.11.0" <= VERSION < v"1.11.4"))
+
 using CUDA
 using Reactant:
     Reactant, TracedRArray, AnyTracedRArray, AnyConcreteRArray, MLIR, TracedRNumber

would also make this work on Julia v1.11.3, the annoying thing is that it makes loading Reactant a lot slower for everybody because the extension needs to be precompiled all times on load, and this seems to be quite slow:

julia> using CUDA

julia> @time @eval using Reactant
AssertionError("Could not find registered platform with name: \"cuda\". Available platform names are: ")
Precompiling ReactantCUDAExt...
  ? Reactant → ReactantCUDAExt
[ Info: Precompiling ReactantCUDAExt [91356394-6239-50cb-9e6b-6f1f3f798cde] (cache misses: incompatible header (4), mismatched flags (2))
┌ Info: Skipping precompilation due to precompilable error. Importing ReactantCUDAExt [91356394-6239-50cb-9e6b-6f1f3f798cde].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
 32.698447 seconds (39.38 M allocations: 2.111 GiB, 4.15% gc time, 92.60% compilation time: 83% of which was recompilation)

I'm happy to make this change if you think it's worth it, but I outlined the drawback!

@wsmoses
Copy link
Member

wsmoses commented Feb 1, 2025

@giordano ah I didn’t mean that I meant this:

@static if !Sys.isapple() && Sys.ARCH != :aarch64

@wsmoses
Copy link
Member

wsmoses commented Feb 1, 2025

Also incidentally we can now remove the aarch64 and is functional checks now that CPU codegen works (though obviously it will still require an unreleased Julia)

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.

2 participants