P4 to Git Change 1759224 by cpaquot@cpaquot-ocl-lc-lnx on 2019/03/20 17:47:43
SWDEV-183452 - [HIP] PyTorch test_pin_memory fails
hipPointerGetAttributes should return hipMemoryTypeHost for hipHostMalloc memories.
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#46 edit
[ROCm/hip commit: eea83a2c5e]
Bu işleme şunda yer alıyor:
@@ -1438,11 +1438,11 @@ hipError_t hipPointerGetAttributes(hipPointerAttribute_t* attributes, const void
|
||||
int device = 0;
|
||||
|
||||
if (memObj != nullptr) {
|
||||
attributes->memoryType = hipMemoryTypeDevice;
|
||||
attributes->memoryType = (CL_MEM_SVM_FINE_GRAIN_BUFFER | memObj->getMemFlags())? hipMemoryTypeHost : hipMemoryTypeDevice;
|
||||
attributes->hostPointer = memObj->getSvmPtr();
|
||||
attributes->devicePointer = memObj->getSvmPtr();
|
||||
attributes->isManaged = 0;
|
||||
attributes->allocationFlags = memObj->getMemFlags();
|
||||
attributes->allocationFlags = memObj->getMemFlags() >> 16;
|
||||
|
||||
amd::Context &memObjCtx = memObj->getContext();
|
||||
for (auto& ctx : g_devices) {
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle