SWDEV-348820 - Fix hipPointerAttribute_t incompatibility (#2856)

- Mark hipPointerAttribute_t.memoryType deprecated
- Instead add hipPointerAttribute_t.type
- Update testcases & documentation to use hipPointerAttribute_t.type

Change-Id: I3ba58cd2defe82102f9415bbb90cf151e08499dd

[ROCm/hip commit: 96b3b9eaf5]
This commit is contained in:
ROCm CI Service Account
2022-10-12 08:31:25 +05:30
committed by GitHub
parent e5de7bbf55
commit 996399531c
4 changed files with 48 additions and 38 deletions
+17 -10
View File
@@ -153,24 +153,31 @@ typedef struct hipDeviceProp_t {
} hipDeviceProp_t;
/**
* Memory type (for pointer attributes)
/*
* @brief HIP Memory type (for pointer attributes)
* @enum
* @ingroup Enumerations
*/
typedef enum hipMemoryType {
hipMemoryTypeHost, ///< Memory is physically located on host
hipMemoryTypeDevice, ///< Memory is physically located on device. (see deviceId for specific
///< device)
hipMemoryTypeArray, ///< Array memory, physically located on device. (see deviceId for specific
///< device)
hipMemoryTypeUnified, ///< Not used currently
hipMemoryTypeManaged ///< Managed memory, automaticallly managed by the unified memory system
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
} hipMemoryType;
/**
* Pointer attributes
*/
typedef struct hipPointerAttribute_t {
enum hipMemoryType memoryType;
union {
// Deprecated, use instead type
enum hipMemoryType memoryType;
enum hipMemoryType type;
};
int device;
void* devicePointer;
void* hostPointer;