Skip to content

Build device code in advance with static library #9620

Answered by AlexeySachkov
Luigi-Crisci asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Luigi-Crisci,

Unfortunately, at the moment this functionality is not available neither for CUDA backend, nor for any other targets. The problem is in fundamental design of the toolchain: device compiler is invoked at link stage, when all device code from all translation units is visible. This was done to support SYCL_EXTERNAL.

I'm aware of other requests of the same functionality, i.e. a way to schedule device compiler pass early: either at static lib level, or even at a translation unit level. Motivation is the same as yours: have ability to specify per-translation unit backend-specific compilation flags.

AFAIK, someone is already working on that, but can't provide any timelines. Tag…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AlexeySachkov
Comment options

Answer selected by Luigi-Crisci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
cuda CUDA back-end
2 participants