-
Notifications
You must be signed in to change notification settings - Fork 234
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
Allow disabling the linking of libdevice in CUDACompilerParams #2611
base: master
Are you sure you want to change the base?
Conversation
@gbaraldi one small thing : if the flag is set, can CUDA.jl/src/compiler/compilation.jl Line 25 in c10e7cf
|
Codecov ReportAll 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. |
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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