Closed martenlienen closed 3 years ago
Thanks. I guess this doesn't hurt, but it reminds me that we really shouldn't be using these methods here: https://github.com/JuliaGPU/Adapt.jl/issues/30
Maybe now's a good time as ever to bite that bullet; with the 1.6 upgrade requiring breaking upgrades to most downstream packages anyway.
I think I don't understand the whole context. Does that mean that this PR is obsolete? Or are you proposing a different change? Anyway it is nice that Julia can now type infer broadcasted CUDA expressions, at least in my local dev version.
No, this is still useful. Let me first fix CI though.
Merging #33 (1b99b81) into master (1edd29c) will increase coverage by
5.71%
. The diff coverage is33.33%
.
@@ Coverage Diff @@
## master #33 +/- ##
==========================================
+ Coverage 62.85% 68.57% +5.71%
==========================================
Files 3 3
Lines 35 35
==========================================
+ Hits 22 24 +2
+ Misses 13 11 -2
Impacted Files | Coverage Δ | |
---|---|---|
src/wrappers.jl | 70.37% <33.33%> (+7.40%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 1edd29c...1b99b81. Read the comment docs.
Just went down a rabbit hole of why my view(::CuArray)
broadcasts weren't inferring, which ultimately led me to this PR, which fixes it. Much appreciated if this could be tagged in the near future so I can add it as a compat bound.
Previously, the
@isdefined
conditionals prevented julia from inferring the type of these methods at compile time. With this change broadcast operations in CUDA.jl likeC .- a'
can now be fully inferred which was previously impossible because the BroadcastStyle (which uses ndims internally) could not be decided at compile time.