P4 to Git Change 1766076 by michliao@hliao-dev-00-hip.rocm-workspace on 2019/04/04 17:35:28

SWDEV-144570 - Fix pointer attribute query.

	- Device should be numbered from zero.

	RB: http://ocltc.amd.com/reviews/r/17090/

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#49 edit


[ROCm/hip commit: 41c75b2f8d]
This commit is contained in:
foreman
2019-04-04 17:50:08 -04:00
rodzic 2c8d0de12d
commit 9eab4cd826
+2 -2
Wyświetl plik
@@ -1452,14 +1452,14 @@ hipError_t hipPointerGetAttributes(hipPointerAttribute_t* attributes, const void
attributes->devicePointer = memObj->getSvmPtr();
attributes->isManaged = 0;
attributes->allocationFlags = memObj->getMemFlags() >> 16;
amd::Context &memObjCtx = memObj->getContext();
for (auto& ctx : g_devices) {
++device;
if (*ctx == memObjCtx) {
attributes->device = device;
break;
}
++device;
}
} else {
attributes->memoryType = hipMemoryTypeHost;