FS#50046 - [gcc] Offloading support for GCC
Attached to Project:
Arch Linux
Opened by Matheus Caldas Santos (mtcs) - Thursday, 14 July 2016, 17:09 GMT
Last edited by Allan McRae (Allan) - Thursday, 04 August 2016, 00:44 GMT
Opened by Matheus Caldas Santos (mtcs) - Thursday, 14 July 2016, 17:09 GMT
Last edited by Allan McRae (Allan) - Thursday, 04 August 2016, 00:44 GMT
|
Details
Description:
CPU Offloading is somewhat new in GCC (since 5.1), though, I think it would be beneficial to be enabled. GCC now support accelerators(GPU, XeonPhi etc) with OpenACC and OpenMP, but it needs to be enabled in compilation time in GCC. A problem is that GCC is not able to generate binary code for those architectures by its own, it needs a intermediary compiler (called target compiler) which could be packaged separately from GCC in AUR. But it is necessary to enable offload features and inform the location of target compilers lib tools in GCC compilation. Additional info: GCC Offloading Wiki: https://gcc.gnu.org/wiki/Offloading#How_to_try_offloading_enabled_GCC Just a simple example of the compilation, but nvptx now works with openMP: http://stackoverflow.com/questions/29297814/openmp-4-0-in-gcc-offload-to-nvidia-gpu |
This task depends upon
Closed by Allan McRae (Allan)
Thursday, 04 August 2016, 00:44 GMT
Reason for closing: Won't implement
Thursday, 04 August 2016, 00:44 GMT
Reason for closing: Won't implement
I don't think the default gcc should do this.
--enable-offload-targets=x86_64-intelmicemul-linux-gnu=/install/prefix,nvptx-none=/install/prefix
I think that it could be good to do in the default GCC because it will only be used if the offloading primitives are used. I plan to create AUR packages for at least nvptx-none.
I know that alternatively I could create a AUR package for GCC with offloading enabled, but as I am not a packaging expert and I think that the community would benefit from this, heterogeneous computing is growing a lot in popularity these days.