[cfe-dev] [RFC] Unified offloading option for CUDA/HIP/OpenMP

Doerfert, Johannes via cfe-dev cfe-dev at lists.llvm.org
Mon Dec 14 13:07:45 PST 2020

On 12/14/20 3:00 PM, Ben Boeckel wrote:
> On Mon, Dec 14, 2020 at 20:20:55 +0000, Doerfert, Johannes via cfe-dev wrote:
>> Allow to pass the kind + triple + arch as first part of the new -offload
>> flag and any options as a second part, so:
>>    -offload=hip-amd-gfx906
>> works but also does
>>    -offload="amd-gfx906 -fvectorize" -x hip
>> as well as
>>    -offload="amd -march=gfx906 -fno-vectorize" -fopenmp
>> This will make it way easier to use.
> Wouldn't having flags like `-Xoffload_amd` to contextualize the next
> argument better match the behavior with multiple `-arch` flags using
> `-Xarch_aarch64`?

Hm, I find my syntax more user friendly, not to say we could not
accept both for consistency.

~ Johannes

> --Ben

More information about the cfe-dev mailing list