P4 to Git Change 1783301 by cpaquot@cpaquot-ocl-lc-lnx on 2019/05/15 11:57:57

SWDEV-189488 - [HIP] Caffe2 TensorTest.TensorSerializationMultiDevices fails
	1. Make sure to set attributes->device to current device for host malloc'd
	2. Return hipSuccess for hipDeviceCanAccessPeer

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#56 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_peer.cpp#4 edit
이 커밋은 다음에 포함됨:
foreman
2019-05-15 12:22:50 -04:00
부모 f8d8559328
커밋 61bacfd131
2개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
+3 -1
파일 보기
@@ -1489,8 +1489,10 @@ hipError_t hipPointerGetAttributes(hipPointerAttribute_t* attributes, const void
attributes->allocationFlags = memObj->getMemFlags() >> 16;
amd::Context &memObjCtx = memObj->getContext();
if (*hip::host_context == memObjCtx)
if (*hip::host_context == memObjCtx) {
attributes->device = ihipGetDevice();
HIP_RETURN(hipSuccess);
}
for (auto& ctx : g_devices) {
if (*ctx == memObjCtx) {
attributes->device = device;
+2 -2
파일 보기
@@ -55,7 +55,7 @@ hipError_t hipDeviceCanAccessPeer(int* canAccessPeer, int deviceId, int peerDevi
*canAccessPeer = 0;
return hipErrorInvalidDevice;
return HIP_RETURN(hipSuccess);
}
hipError_t hipDeviceDisablePeerAccess(int peerDeviceId) {
@@ -106,4 +106,4 @@ hipError_t hipCtxDisablePeerAccess(hipCtx_t peerCtx) {
assert(0 && "Unimplemented");
HIP_RETURN(hipErrorUnknown);
}
}