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

Change-Id: Iabbf9c0b54d9978671e3492f13660917499a03fa
This commit is contained in:
Jatin Chaudhary
2023-11-27 15:01:57 +00:00
committed by Jatin Jaikishan Chaudhary
parent b2102fe939
commit d5e596c975
2 changed files with 13 additions and 1 deletions
+10 -1
View File
@@ -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;