SWDEV-347592 - hipMemAllocationType must be hipMemAllocationTypePinned.
Change-Id: I36a5c37c6d66587c6804b60a5f0a88efb60801a4
[ROCm/clr commit: 465421e71c]
Cette révision appartient à :
révisé par
Jaydeepkumar Patel
Parent
d12900e000
révision
6f564f9e76
@@ -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())) {
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur