SWDEV-434226 - populate correct output in mempool supported handle type query

Change-Id: Iabbf9c0b54d9978671e3492f13660917499a03fa
Esse commit está contido em:
Jatin Chaudhary
2023-11-27 15:01:57 +00:00
commit de Jatin Jaikishan Chaudhary
commit d5e596c975
2 arquivos alterados com 13 adições e 1 exclusões
+10 -1
Ver Arquivo
@@ -402,7 +402,16 @@ hipError_t ihipGetDeviceProperties(hipDeviceProp_tR0600* props, int device) {
// Mem pool
deviceProps.memoryPoolsSupported = HIP_MEM_POOL_SUPPORT;
deviceProps.memoryPoolSupportedHandleTypes = 0;
unsigned int memPoolHandleType = 0;
if (HIP_MEM_POOL_SUPPORT) {
#if defined(__linux__)
memPoolHandleType |= hipMemHandleTypePosixFileDescriptor;
#elif defined(_WIN32)
memPoolHandleType |= hipMemHandleTypeWin32;
memPoolHandleType |= hipMemHandleTypeWin32Kmt;
#endif
}
deviceProps.memoryPoolSupportedHandleTypes = memPoolHandleType;
// Caching behavior
deviceProps.globalL1CacheSupported = 1;
+3
Ver Arquivo
@@ -440,6 +440,9 @@ hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int device)
case hipDeviceAttributeMemoryPoolsSupported:
*pi = HIP_MEM_POOL_SUPPORT;
break;
case hipDeviceAttributeMemoryPoolSupportedHandleTypes:
*pi = prop.memoryPoolSupportedHandleTypes;
break;
case hipDeviceAttributeVirtualMemoryManagementSupported:
*pi = static_cast<int>(g_devices[device]->devices()[0]->info().virtualMemoryManagement_);
break;