SWDEV-347592 - hipMemAllocationType must be hipMemAllocationTypePinned.

Change-Id: I36a5c37c6d66587c6804b60a5f0a88efb60801a4


[ROCm/clr commit: 465421e71c]
Cette révision appartient à :
Jaydeep Patel
2022-07-26 05:04:31 +00:00
révisé par Jaydeepkumar Patel
Parent d12900e000
révision 6f564f9e76
+1 -11
Voir le fichier
@@ -171,20 +171,10 @@ hipError_t hipMemPoolCreate(hipMemPool_t* mem_pool, const hipMemPoolProps* pool_
if (mem_pool == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
// validate hipMemAllocationType value
if (pool_props->allocType != hipMemAllocationTypeInvalid &&
pool_props->allocType != hipMemAllocationTypePinned &&
pool_props->allocType != hipMemAllocationTypeMax) {
if (pool_props->allocType != hipMemAllocationTypePinned) {
HIP_RETURN(hipErrorInvalidValue);
}
// validate hipMemLocationType value
if (pool_props->location.type != hipMemLocationTypeInvalid &&
pool_props->location.type != hipMemLocationTypeDevice) {
HIP_RETURN(hipErrorInvalidValue);
}
// Make sure the pool creation occurs on a valid device
if ((pool_props->location.type != hipMemLocationTypeDevice) ||
(pool_props->location.id >= g_devices.size())) {