SWDEV-356554 - updated hipDeviceGetDefaultMemPool
updated the error check/messages
Change-Id: I518d497a82a14862d5168cc423aeaa20075336b8
[ROCm/clr commit: 42b5a6d5af]
Этот коммит содержится в:
коммит произвёл
Payam Ghafari
родитель
2363e4dd78
Коммит
c328f3b15f
@@ -28,9 +28,12 @@ extern hipError_t ihipFree(void* ptr);
|
||||
// ================================================================================================
|
||||
hipError_t hipDeviceGetDefaultMemPool(hipMemPool_t* mem_pool, int device) {
|
||||
HIP_INIT_API(hipDeviceGetDefaultMemPool, mem_pool, device);
|
||||
if ((mem_pool == nullptr) || (device >= g_devices.size())) {
|
||||
if (mem_pool == nullptr) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
if (device < 0 || device >= g_devices.size()) {
|
||||
HIP_RETURN(hipErrorInvalidDevice);
|
||||
}
|
||||
*mem_pool = reinterpret_cast<hipMemPool_t>(g_devices[device]->GetDefaultMemoryPool());
|
||||
HIP_RETURN(hipSuccess);
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user