This is an archive of the discontinued LLVM Phabricator instance.

[CUDA] Add option to generate relocatable device code
ClosedPublic

Authored by Hahnfeld on Feb 5 2018, 11:21 AM.

Details

Summary

As a first step, pass '-c/--compile-only' to ptxas so that it
doesn't complain about references to external function. This
will successfully generate object files, but they won't work
at runtime because the registration routines need to adapted.

Diff Detail

Event Timeline

Hahnfeld created this revision.Feb 5 2018, 11:21 AM
tra accepted this revision.Feb 9 2018, 5:35 PM
tra added inline comments.
include/clang/Driver/Options.td
571

Does the options show up in clang --help?
If it does, and if you plan to commit patches one at a time, we may want to make it hidden until everything is in place.

This revision is now accepted and ready to land.Feb 9 2018, 5:35 PM
Hahnfeld updated this revision to Diff 133817.Feb 12 2018, 2:44 AM
Hahnfeld marked an inline comment as done.

Hide help for -fcuda-rdc until support is ready.

include/clang/Driver/Options.td
571

Good idea, I'll submit a patch enabling the help text and adding release notes after full support has landed.

This revision was automatically updated to reflect the committed changes.