[HIPIFY] Add cudaMallocManaged -> hipMallocManaged

+ Add mapping for corresponding data types
+ Add a test
+ Update docs
Dieser Commit ist enthalten in:
Evgeny Mankov
2019-08-13 17:56:06 +03:00
Ursprung bb5fd89719
Commit d20ae3b50a
7 geänderte Dateien mit 59 neuen und 14 gelöschten Zeilen
@@ -164,8 +164,8 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_FUNCTION_MAP{
// cudaHostAlloc
{"cuMemAllocHost", {"hipMemAllocHost", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
{"cuMemAllocHost_v2", {"hipMemAllocHost", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
// no analogue
{"cuMemAllocManaged", {"hipMemAllocManaged", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
// cudaMallocManaged
{"cuMemAllocManaged", {"hipMemAllocManaged", "", CONV_MEMORY, API_DRIVER}},
// no analogue
// NOTE: Not equal to cudaMallocPitch due to different signatures
{"cuMemAllocPitch", {"hipMemAllocPitch", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
@@ -959,9 +959,9 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_TYPE_NAME_MAP{
{"CUmemAttach_flags_enum", {"hipMemAttachFlags_t", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}},
// CUmemAttach_flags enum values
// cudaMemAttachGlobal
{"CU_MEM_ATTACH_GLOBAL", {"hipMemAttachGlobal", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x1
{"CU_MEM_ATTACH_GLOBAL", {"hipMemAttachGlobal", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x1
// cudaMemAttachHost
{"CU_MEM_ATTACH_HOST", {"hipMemAttachHost", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x2
{"CU_MEM_ATTACH_HOST", {"hipMemAttachHost", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x2
// cudaMemAttachSingle
{"CU_MEM_ATTACH_SINGLE", {"hipMemAttachSingle", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x4
@@ -271,8 +271,8 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
{"cudaMallocArray", {"hipMallocArray", "", CONV_MEMORY, API_RUNTIME}},
// cuMemHostAlloc
{"cudaMallocHost", {"hipHostMalloc", "", CONV_MEMORY, API_RUNTIME}},
// no analogue
{"cudaMallocManaged", {"hipMallocManaged", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
// cuMemAllocManaged
{"cudaMallocManaged", {"hipMallocManaged", "", CONV_MEMORY, API_RUNTIME}},
// no analogue
// NOTE: Not equal to cuMipmappedArrayCreate due to different signatures
{"cudaMallocMipmappedArray", {"hipMallocMipmappedArray", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
@@ -1323,9 +1323,9 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_TYPE_NAME_MAP {
// CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS
{"cudaIpcMemLazyEnablePeerAccess", {"hipIpcMemLazyEnablePeerAccess", "", CONV_DEFINE, API_RUNTIME}}, // 0x01
// CU_MEM_ATTACH_GLOBAL
{"cudaMemAttachGlobal", {"hipMemAttachGlobal", "", CONV_DEFINE, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x01
{"cudaMemAttachGlobal", {"hipMemAttachGlobal", "", CONV_DEFINE, API_RUNTIME}}, // 0x01
// CU_MEM_ATTACH_HOST
{"cudaMemAttachHost", {"hipMemAttachHost", "", CONV_DEFINE, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x02
{"cudaMemAttachHost", {"hipMemAttachHost", "", CONV_DEFINE, API_RUNTIME}}, // 0x02
// CU_MEM_ATTACH_SINGLE
{"cudaMemAttachSingle", {"hipMemAttachSingle", "", CONV_DEFINE, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x04
// no analogue