-
Notifications
You must be signed in to change notification settings - Fork 78
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
Add extensions feature from Julia 1.9 with backward compatibility #98
Conversation
This allows the conditional loading of the CUDA, AMDGPU, and WriteVTK packages. Code directly depending on these packages is now located in ext/. This is currently a first implementation without propers checks. ToDo: - Test actual backward compatibility - Figure out why having the optional packages in the main Julia installation (ie. release) still messes up the initialization
…orced in Julia <1.9 versions.
…t.jl). All working as intended now.
This is looking better and close to finishing. Some comments:
|
…ot pass the WaterLily.jl test section.
So everything is pretty much done. I am locally running the test suite and the only current issue is that while tests are correctly passing for 1.8.5 and 1.9.4, for 1.10.0 are not. Specifically, this test is failing on 1.10.0: WaterLily.jl: Test Failed at /home/b-fg/Workspace/tudelft1/WaterLily.jl/test/runtests.jl:298
Expression: sim_time(sim) ≥ 0.1 > (sum(sim.flow.Δt[1:end - 2]) * sim.U) / sim.L
Evaluated: 0.07563669234514236 ≥ 0.1 > 0.03125 Any idea why this might be happening @weymouth? |
Huh, I just did a merge from master and now is throwing some NaNs. Adding the
All other test sections are passing in 1.10.0 though. |
Seems like |
…hat they pass in Julia 1.10.0.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #98 +/- ##
==========================================
+ Coverage 90.42% 90.55% +0.13%
==========================================
Files 9 11 +2
Lines 428 434 +6
==========================================
+ Hits 387 393 +6
Misses 41 41 ☔ View full report in Codecov by Sentry. |
That's weird. Also notice that it's failing on macOS again, even for 1.9. We must have something not quite right in that test. |
Yeap! |
I'll try it on my home laptop, which is a mac. |
Did you have a chance to look at this @weymouth? |
Nope, but I'll check this weekend. |
Apologies if I've misunderstood, but I don't think we need plotting routines in the test dependancies list, do we?
When I run |
Yes, that is expected since we have it hardcoded in tests hence it tries to load those. Otherwise it would never try to pass them for GPUs, even if CUDA or AMDGPU was functional. I think there is no better way to this at the moment. The main benefit is that for a normal usage (outside of tests) users now do not download and install CUDA/AMDGPU by default. |
|
||
L₂ norm of ROCArray `a` excluding ghosts. | ||
""" | ||
L₂(a::ROCArray,R::CartesianIndices=inside(a)) = mapreduce(abs2,+,@inbounds(a[R])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GPU tests cannot really be covered in the current Github CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's clear.
…w). GPU extensions already annotate the L2 function arguments type.
This ready? |
Yes, did a last check and all looks good. Also I just passed tests locally on 1.8.5 and 1.10.0 and worked fine. Good to go! |
This allows the conditional loading of the CUDA, AMDGPU, and WriteVTK packages. Code directly depending on these packages is now located in
ext/
. For example, now theL₂
forCuArray
is only loaded whenusing CUDA
is called in addition tousing WaterLily
.This is currently a first implementation without propers checks. To do:
@allowscalar
version so that the CUDA extension can actually extend it: now usingGPUArrays.@allowscalar
which works for both CUDA and AMD.