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
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

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
Comment by Allan McRae (Allan) - Friday, 15 July 2016, 01:56 GMT
What value should be specified for --enable-offload-targets? Can more than one be supported?

I don't think the default gcc should do this.
Comment by Matheus Caldas Santos (mtcs) - Friday, 15 July 2016, 17:34 GMT
The flag accept a list of target compilers like 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.
Comment by Allan McRae (Allan) - Thursday, 04 August 2016, 00:44 GMT
I don't think gcc supports specifying multiple offload targets and there is not a single target that is obvious to support. Closing.

Loading...