Corrected hipPointerGetAttribute
Made hipPointerGetAttribute work same as cudaPointerGetAttribute for HCC
[ROCm/hip commit: 66aa7f2f8a]
此提交包含在:
@@ -1732,7 +1732,12 @@ hipError_t hipPointerGetAttributes(hipPointerAttribute_t *attributes, void* ptr)
|
|||||||
attributes->hostPointer = amPointerInfo._hostPointer;
|
attributes->hostPointer = amPointerInfo._hostPointer;
|
||||||
attributes->devicePointer = amPointerInfo._devicePointer;
|
attributes->devicePointer = amPointerInfo._devicePointer;
|
||||||
attributes->isManaged = 0;
|
attributes->isManaged = 0;
|
||||||
|
if(attributes->memoryType == hipMemoryTypeHost){
|
||||||
|
attributes->hostPointer = ptr;
|
||||||
|
}
|
||||||
|
if(attributes->memoryType == hipMemoryTypeDevice){
|
||||||
|
attributes->devicePointer = ptr;
|
||||||
|
}
|
||||||
attributes->allocationFlags = amPointerInfo._appAllocationFlags;
|
attributes->allocationFlags = amPointerInfo._appAllocationFlags;
|
||||||
attributes->device = amPointerInfo._appId;
|
attributes->device = amPointerInfo._appId;
|
||||||
|
|
||||||
|
|||||||
新增問題並參考
封鎖使用者