diff options
author | Jakub Chlanda <jakub@codeplay.com> | 2024-06-30 07:56:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-30 07:56:07 +0200 |
commit | ab200864220b72b3bdf1fe9d001ad3d1e4d9d4b3 (patch) | |
tree | 0d11cfc89b959adcb9105e6400d16ddf59d1681b /clang/include | |
parent | 6b737c444617fe8c11eb48f978c579cc160bfff0 (diff) | |
download | llvm-ab200864220b72b3bdf1fe9d001ad3d1e4d9d4b3.zip llvm-ab200864220b72b3bdf1fe9d001ad3d1e4d9d4b3.tar.gz llvm-ab200864220b72b3bdf1fe9d001ad3d1e4d9d4b3.tar.bz2 |
[CUDA][NFC] CudaArch to OffloadArch rename (#97028)
Rename `CudaArch` to `OffloadArch` to better reflect its content and the
use.
Apply a similar rename to helpers handling the enum.
Diffstat (limited to 'clang/include')
-rw-r--r-- | clang/include/clang/Basic/Cuda.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/clang/include/clang/Basic/Cuda.h b/clang/include/clang/Basic/Cuda.h index 01cfe28..83699f8 100644 --- a/clang/include/clang/Basic/Cuda.h +++ b/clang/include/clang/Basic/Cuda.h @@ -52,7 +52,7 @@ const char *CudaVersionToString(CudaVersion V); // Input is "Major.Minor" CudaVersion CudaStringToVersion(const llvm::Twine &S); -enum class CudaArch { +enum class OffloadArch { UNUSED, UNKNOWN, // TODO: Deprecate and remove GPU architectures older than sm_52. @@ -133,8 +133,8 @@ enum class CudaArch { // public one. LAST, - CudaDefault = CudaArch::SM_52, - HIPDefault = CudaArch::GFX906, + CudaDefault = OffloadArch::SM_52, + HIPDefault = OffloadArch::GFX906, }; enum class CUDAFunctionTarget { @@ -145,26 +145,26 @@ enum class CUDAFunctionTarget { InvalidTarget }; -static inline bool IsNVIDIAGpuArch(CudaArch A) { - return A >= CudaArch::SM_20 && A < CudaArch::GFX600; +static inline bool IsNVIDIAOffloadArch(OffloadArch A) { + return A >= OffloadArch::SM_20 && A < OffloadArch::GFX600; } -static inline bool IsAMDGpuArch(CudaArch A) { +static inline bool IsAMDOffloadArch(OffloadArch A) { // Generic processor model is for testing only. - return A >= CudaArch::GFX600 && A < CudaArch::Generic; + return A >= OffloadArch::GFX600 && A < OffloadArch::Generic; } -const char *CudaArchToString(CudaArch A); -const char *CudaArchToVirtualArchString(CudaArch A); +const char *OffloadArchToString(OffloadArch A); +const char *OffloadArchToVirtualArchString(OffloadArch A); // The input should have the form "sm_20". -CudaArch StringToCudaArch(llvm::StringRef S); +OffloadArch StringToOffloadArch(llvm::StringRef S); -/// Get the earliest CudaVersion that supports the given CudaArch. -CudaVersion MinVersionForCudaArch(CudaArch A); +/// Get the earliest CudaVersion that supports the given OffloadArch. +CudaVersion MinVersionForOffloadArch(OffloadArch A); -/// Get the latest CudaVersion that supports the given CudaArch. -CudaVersion MaxVersionForCudaArch(CudaArch A); +/// Get the latest CudaVersion that supports the given OffloadArch. +CudaVersion MaxVersionForOffloadArch(OffloadArch A); // Various SDK-dependent features that affect CUDA compilation enum class CudaFeature { |