Allow disabling the linking of libdevice in CUDACompilerParams#2611
Allow disabling the linking of libdevice in CUDACompilerParams#2611gbaraldi wants to merge 3 commits into
Conversation
|
@gbaraldi one small thing : if the flag is set, can CUDA.jl/src/compiler/compilation.jl Line 25 in c10e7cf |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2611 +/- ##
===========================================
- Coverage 73.58% 59.95% -13.64%
===========================================
Files 157 157
Lines 15242 15210 -32
===========================================
- Hits 11216 9119 -2097
- Misses 4026 6091 +2065 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| Tuple{CompilerJob{PTXCompilerTarget}, typeof(fn)}, job, fn) | ||
| is_intrinsic |= fn == "__nvvm_reflect" | ||
| is_intrinsic |= startswith(fn, "cuda") | ||
| is_intrinsic |= !job.config.params.link_libdevice ? startswith(fn, "__nv_") : false # Reactant.jl wants to handle __nv_ functions |
There was a problem hiding this comment.
This is pretty unreadable.
I also don't understand why this should be handled here. Doesn't Reactant have its own compiler job type to implement isintrinsic for? Or make sure the intrinsics are lowered before calling into GPUCompiler.jl validation?
There was a problem hiding this comment.
No Reactant does not have a compiler job (it overlays a few functions of cuda.jl and imports from cuda.jl directly)
Add option to disable the linking of libdevice into the IR.
This is needed because https://github.com/EnzymeAD/Reactant.jl requires the intrinsics and not their linked code to raise LLVM IR into MLIR
I imagine this can only be properly tested downstream