blt icon indicating copy to clipboard operation
blt copied to clipboard

Support HIP separable compilation

Open MrBurmark opened this issue 5 years ago • 4 comments

Support separable compilation / relocatable device code for hip as well as cuda. Without the -fgpu-rdc flag I get an unsupported indirect call to function error at link time.

MrBurmark avatar Jun 22 '20 17:06 MrBurmark

This is still an issue, how are people handling this in cmake? It would be nice to have something equivalent to CUDA_SEPARABLE_COMPILATION to help ensure the rdc flag propagates down to the link step.

MrBurmark avatar Dec 21 '21 17:12 MrBurmark

I saw a mention of the separable hip compilation model in the cmake documentation, but it doesn't indicate how to actually set the compilation model. https://cmake.org/cmake/help/latest/prop_tgt/HIP_ARCHITECTURES.html Device and host linking is mentioned here along with CUDA_SEPARABLE_COMPILATION but nothing is mentioned for hip. https://cmake.org/cmake/help/latest/command/target_link_options.html?highlight=separable#host-and-device-specific-link-options

MrBurmark avatar Dec 21 '21 18:12 MrBurmark

Still not as easy as CUDA. There should be an equivalent HIP flag (HIP_SEPARABLE_COMPILATION) but there isn't:

https://gitlab.kitware.com/cmake/cmake/-/issues/23210

It seems for now you have to manually add the flag yourself.

white238 avatar Mar 23 '22 20:03 white238

"You will never reach your destination if you stop and throw stones at every dog that barks." --Winston Churchill

rhornung67 avatar Mar 23 '22 20:03 rhornung67