From 8c08d1b8623f1fac4fca4dbfd43abf2f60f7c69e Mon Sep 17 00:00:00 2001 From: sdashmiz Date: Mon, 30 Jan 2023 13:37:01 -0500 Subject: [PATCH] SWDEV-371332 - [ABI Break]change hipMemoryType enum - match cuda Signed-off-by: sdashmiz Change-Id: I8e57d7c1e43d8161db6b2e5a61a5fdedaa4b240e [ROCm/hip commit: 6240eb30d477156069b9be624b1e489c432f1153] --- projects/hip/include/hip/hip_runtime_api.h | 26 ++++++++++------------ 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/projects/hip/include/hip/hip_runtime_api.h b/projects/hip/include/hip/hip_runtime_api.h index 377964f3be..be785c4df9 100644 --- a/projects/hip/include/hip/hip_runtime_api.h +++ b/projects/hip/include/hip/hip_runtime_api.h @@ -237,23 +237,21 @@ typedef struct hipDeviceProp_t { /** * hipMemoryType (for pointer attributes) * - * @note hipMemoryType enum values are different from cudaMemoryType enum values. - * In this case, memory type translation for hipPointerGetAttributes needs to be handled properly - * on nvidia platform to get the correct memory type in CUDA. Developers should use #ifdef in order - * to assign the correct enum values depending on Nvidia or AMD platform. + * @note hipMemoryType enum values are combination of cudaMemoryType and cuMemoryType and AMD specific enum values. * - * @note cudaMemoryTypeUnregistered is currently not supported due to HIP functionality backward - * compatibility. */ typedef enum hipMemoryType { - hipMemoryTypeHost = 0, ///< Memory is physically located on host - hipMemoryTypeDevice = 1, ///< Memory is physically located on device. (see deviceId for - ///< specific device) - hipMemoryTypeArray = 2, ///< Array memory, physically located on device. (see deviceId for - ///< specific device) - hipMemoryTypeUnified = 3, ///< Not used currently - hipMemoryTypeManaged = 4 ///< Managed memory, automaticallly managed by the unified - ///< memory system + hipMemoryTypeUnregistered = 0, ///< Unregistered memory + hipMemoryTypeHost = 1, ///< Memory is physically located on host + hipMemoryTypeDevice = 2, ///< Memory is physically located on device. (see deviceId for + ///< specific device) + hipMemoryTypeManaged = 3, ///< Managed memory, automaticallly managed by the unified + ///< memory system + ///< place holder for new values. + hipMemoryTypeArray = 10, ///< Array memory, physically located on device. (see deviceId for + ///< specific device) + hipMemoryTypeUnified = 11 ///< unified address space + } hipMemoryType; /**