Page MenuHomePhabricator

Rename options --cuda-gpu-arch and --no-cuda-gpu-arch
ClosedPublic

Authored by yaxunl on Mar 28 2020, 6:17 AM.

Details

Summary

Options --cuda-gpu-arch and --no-cuda-gpu-arch are shared between
CUDA and HIP. It is desirable to rename them for more generic
names to avoid confusion.

One option is --gpu-arch and --no-gpu-arch. However HIP may be
ported to other devices not limited to gpu, so it may be better
to name them as --offload-arch and --no-offload-arch.

Other choices may be:

--device-arch
--offload-device-arch
--accelerator-arch
--aux-arch
--aux-cpu

The original options will be alias to the new options.

Diff Detail

Event Timeline

yaxunl created this revision.Mar 28 2020, 6:17 AM
yaxunl edited the summary of this revision. (Show Details)Mar 28 2020, 6:20 AM

This was discussed on llvm-dev three years ago. Here is the thread.

http://lists.llvm.org/pipermail/llvm-dev/2017-February/109930.html

The last name discussed was "-- offload-arch". I don't believe we need a list option anymore. So ignore the very old request for --offload-archs.

I am ok with the patch the way it is. In the future, we should consider renaming the CudaArch class to OffloadArch class . Also the GpuArchList is currently only initialized in CudaActionBuilder. Eventually this is will have to be done for HIPActionBuilder and OpenMPActionBuilder. Could you consider creating a function to InitializeGpuArchList ?

tra accepted this revision.Mar 30 2020, 12:17 PM
tra added a reviewer: echristo.
tra added a subscriber: echristo.

+ @echristo who OK'ed the idea conditional on the actual patch. :-)

LGTM overall.

This revision is now accepted and ready to land.Mar 30 2020, 12:17 PM

This was discussed on llvm-dev three years ago. Here is the thread.

http://lists.llvm.org/pipermail/llvm-dev/2017-February/109930.html

The last name discussed was "-- offload-arch". I don't believe we need a list option anymore. So ignore the very old request for --offload-archs.

I am ok with the patch the way it is. In the future, we should consider renaming the CudaArch class to OffloadArch class . Also the GpuArchList is currently only initialized in CudaActionBuilder. Eventually this is will have to be done for HIPActionBuilder and OpenMPActionBuilder. Could you consider creating a function to InitializeGpuArchList ?

GpuArchList is initialized by member function initialize() of CudaActionBuilderBase, which is inherited by CudaActionBuilder and HIPActionBuilder, therefore GpuArchList is initialized in both CudaActionBuilder and HIPActionBuilder.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2020, 6:03 PM