[HIPIFY] InclusionDirective refactoring
Due to support of cuRAND headers. + compound test on all headers is added; + missing entities are added with updating the doc; + a couple cuRAND tests are added (https://github.com/ROCmSoftwarePlatform/rocRAND/tree/master/benchmark): - the following CUDA entities are still unsupported by hipRAND: curandMakeMTGP32Constants curandMakeMTGP32KernelState curandGetDirectionVectors32 curandDirectionVectorSet_t CURAND_DIRECTION_VECTORS_32_JOEKUO6 curandStateSobol64_t curandStateScrambledSobol64_t curandGenerateLongLong - and the following - by HIP: cudaRuntimeGetVersion - those entities are handled by CHECK-NOT directive for now.
Этот коммит содержится в:
@@ -367,24 +367,39 @@ const std::map<llvm::StringRef, hipCounter> CUDA_TYPE_NAME_MAP{
|
||||
/// Maps cuda header names to hip header names.
|
||||
const std::map <llvm::StringRef, hipCounter> CUDA_INCLUDE_MAP{
|
||||
// CUDA includes
|
||||
{"cuda.h", {"hip/hip_runtime.h", CONV_INCLUDE_CUDA_MAIN_H, API_DRIVER}},
|
||||
{"cuda_runtime.h", {"hip/hip_runtime.h", CONV_INCLUDE_CUDA_MAIN_H, API_RUNTIME}},
|
||||
{"cuda_runtime_api.h", {"hip/hip_runtime_api.h", CONV_INCLUDE, API_RUNTIME}},
|
||||
{"channel_descriptor.h", {"hip/channel_descriptor.h", CONV_INCLUDE, API_RUNTIME}},
|
||||
{"device_functions.h", {"hip/device_functions.h", CONV_INCLUDE, API_RUNTIME}},
|
||||
{"driver_types.h", {"hip/driver_types.h", CONV_INCLUDE, API_RUNTIME}},
|
||||
{"cuComplex.h", {"hip/hip_complex.h", CONV_INCLUDE, API_RUNTIME}},
|
||||
{"cuda_fp16.h", {"hip/hip_fp16.h", CONV_INCLUDE, API_RUNTIME}},
|
||||
{"cuda_texture_types.h", {"hip/hip_texture_types.h", CONV_INCLUDE, API_RUNTIME}},
|
||||
{"vector_types.h", {"hip/hip_vector_types.h", CONV_INCLUDE, API_RUNTIME}},
|
||||
{"cuda.h", {"hip/hip_runtime.h", CONV_INCLUDE_CUDA_MAIN_H, API_DRIVER}},
|
||||
{"cuda_runtime.h", {"hip/hip_runtime.h", CONV_INCLUDE_CUDA_MAIN_H, API_RUNTIME}},
|
||||
{"cuda_runtime_api.h", {"hip/hip_runtime_api.h", CONV_INCLUDE, API_RUNTIME}},
|
||||
{"channel_descriptor.h", {"hip/channel_descriptor.h", CONV_INCLUDE, API_RUNTIME}},
|
||||
{"device_functions.h", {"hip/device_functions.h", CONV_INCLUDE, API_RUNTIME}},
|
||||
{"driver_types.h", {"hip/driver_types.h", CONV_INCLUDE, API_RUNTIME}},
|
||||
{"cuComplex.h", {"hip/hip_complex.h", CONV_INCLUDE, API_RUNTIME}},
|
||||
{"cuda_fp16.h", {"hip/hip_fp16.h", CONV_INCLUDE, API_RUNTIME}},
|
||||
{"cuda_texture_types.h", {"hip/hip_texture_types.h", CONV_INCLUDE, API_RUNTIME}},
|
||||
{"vector_types.h", {"hip/hip_vector_types.h", CONV_INCLUDE, API_RUNTIME}},
|
||||
|
||||
// CUBLAS includes
|
||||
{"cublas.h", {"hipblas.h", CONV_INCLUDE_CUDA_MAIN_H, API_BLAS}},
|
||||
{"cublas_v2.h", {"hipblas.h", CONV_INCLUDE_CUDA_MAIN_H, API_BLAS}},
|
||||
{"cublas.h", {"hipblas.h", CONV_INCLUDE_CUDA_MAIN_H, API_BLAS}},
|
||||
{"cublas_v2.h", {"hipblas.h", CONV_INCLUDE_CUDA_MAIN_H, API_BLAS}},
|
||||
|
||||
// CURAND includes
|
||||
{"curand.h", {"hiprand.h", CONV_INCLUDE, API_RAND}},
|
||||
{"curand_kernel.h", {"hiprand_kernel.h", CONV_INCLUDE, API_RAND}},
|
||||
{"curand.h", {"hiprand.h", CONV_INCLUDE_CUDA_MAIN_H, API_RAND}},
|
||||
{"curand_kernel.h", {"hiprand_kernel.h", CONV_INCLUDE, API_RAND}},
|
||||
{"curand_discrete.h", {"hiprand_kernel.h", CONV_INCLUDE, API_RAND}},
|
||||
{"curand_discrete2.h", {"hiprand_kernel.h", CONV_INCLUDE, API_RAND}},
|
||||
{"curand_globals.h", {"hiprand_kernel.h", CONV_INCLUDE, API_RAND}},
|
||||
{"curand_lognormal.h", {"hiprand_kernel.h", CONV_INCLUDE, API_RAND}},
|
||||
{"curand_mrg32k3a.h", {"hiprand_kernel.h", CONV_INCLUDE, API_RAND}},
|
||||
{"curand_mtgp32.h", {"hiprand_kernel.h", CONV_INCLUDE, API_RAND}},
|
||||
{"curand_mtgp32_host.h", {"hiprand_kernel.h", CONV_INCLUDE, API_RAND}},
|
||||
{"curand_mtgp32_kernel.h", {"hiprand_kernel.h", CONV_INCLUDE, API_RAND}},
|
||||
{"curand_mtgp32dc_p_11213.h", {"hiprand_kernel.h", CONV_INCLUDE, API_RAND}},
|
||||
{"curand_normal.h", {"hiprand_kernel.h", CONV_INCLUDE, API_RAND}},
|
||||
{"curand_normal_static.h", {"hiprand_kernel.h", CONV_INCLUDE, API_RAND}},
|
||||
{"curand_philox4x32_x.h", {"hiprand_kernel.h", CONV_INCLUDE, API_RAND}},
|
||||
{"curand_poisson.h", {"hiprand_kernel.h", CONV_INCLUDE, API_RAND}},
|
||||
{"curand_precalc.h", {"hiprand_kernel.h", CONV_INCLUDE, API_RAND}},
|
||||
{"curand_uniform.h", {"hiprand_kernel.h", CONV_INCLUDE, API_RAND}},
|
||||
|
||||
// HIP includes
|
||||
// TODO: uncomment this when hip/cudacommon.h will be renamed to hip/hipcommon.h
|
||||
@@ -2852,6 +2867,8 @@ const std::map<llvm::StringRef, hipCounter> CUDA_IDENTIFIER_MAP{
|
||||
{"curand_normal2_double", {"hiprand_normal2_double", CONV_DEVICE_FUNC, API_RAND}},
|
||||
{"curand_normal4", {"hiprand_normal4", CONV_DEVICE_FUNC, API_RAND}},
|
||||
{"curand_normal4_double", {"hiprand_normal4_double", CONV_DEVICE_FUNC, API_RAND}},
|
||||
{"curand_uniform", {"hiprand_uniform", CONV_DEVICE_FUNC, API_RAND}},
|
||||
{"curand_uniform_double", {"hiprand_uniform_double", CONV_DEVICE_FUNC, API_RAND}},
|
||||
{"curand_uniform2_double", {"hiprand_uniform2_double", CONV_DEVICE_FUNC, API_RAND}},
|
||||
{"curand_uniform4", {"hiprand_uniform4", CONV_DEVICE_FUNC, API_RAND}},
|
||||
{"curand_uniform4_double", {"hiprand_uniform4_double", CONV_DEVICE_FUNC, API_RAND}},
|
||||
|
||||
Ссылка в новой задаче
Block a user