Add an experimental opaque closure type.#1853
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1853 +/- ##
==========================================
- Coverage 71.83% 0.69% -71.14%
==========================================
Files 155 154 -1
Lines 15013 14883 -130
==========================================
- Hits 10785 104 -10681
- Misses 4228 14779 +10551 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
How much of this is actually CUDA specific? |
|
Not much. Only the fact that we need to be able to create a compiler invocation, which depends on backend-specific state (which device is active, etc): https://github.com/JuliaGPU/CUDA.jl/pull/1853/files#diff-ecbfaf5b99ab10dcafff5717c7cc5f856768e4313446fa3fb58b839a25b17cfcR317 |
8538870 to
dab7f8a
Compare
|
Seems to cause some IR verification errors: |
ae85f2e to
9cfd249
Compare
9cfd249 to
92632e9
Compare
92632e9 to
4511f85
Compare
3f9cde3 to
7782216
Compare
| id = length(GPUCompiler.deferred_codegen_jobs) + 1 | ||
| GPUCompiler.deferred_codegen_jobs[id] = job | ||
| quote | ||
| ptr = ccall("extern deferred_codegen", llvmcall, Ptr{Cvoid}, (Int,), $id) |
There was a problem hiding this comment.
After #582 you should be able to just emit a gpuc.lookup(mi, oc, args...) or maybe gpuc.deferred(oc, args...)?
6f9bcaa to
fd4dd6d
Compare
5d585c4 to
c850163
Compare
Opaque closures don't make that much sense in the CUDA environment (where we don't have a linker and need to recompile when the OC changes, also because we require specsig), but it can be useful to inline typed IR into a kernel and call it.
Current state of this PR is 1.12+ only (because of JuliaLang/julia#53219). It could be made more general if and when we decide to merge this.
Depends on JuliaGPU/GPUCompiler.jl#572