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

Ben Boeckel via cfe-dev cfe-dev at lists.llvm.org
Tue Dec 15 10:16:51 PST 2020


On Mon, Dec 14, 2020 at 21:07:45 +0000, Doerfert, Johannes wrote:
> 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.

My primary concern is around the quoting messiness your approach is
likely to involve. POSIX shell rules make sense, but I can never
remember cmd.exe quoting rules. Add in trying to reliably getting the
quotes plumbed through CMake or other build system code…

--Ben


More information about the cfe-dev mailing list