P4 to Git Change 2031768 by cpaquot@cpaquot-ocl-lc-lnx on 2019/11/16 17:21:58

SWDEV-212440 - [HIP] Memory access fault observed on Pytorch while running performance tests with Microbenchmarking script
	We need to loop through all the default stream to sync them in case
	the app call hipFree on a different current stream and another current stream
	is using the memory.

Affected files ...

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


[ROCm/hip commit: 9529795fab]
This commit is contained in:
foreman
2019-11-16 17:25:59 -05:00
parent 4bfac94e66
commit e7931a8649
+3 -1
View File
@@ -209,7 +209,9 @@ hipError_t hipFree(void* ptr) {
}
if (amd::SvmBuffer::malloced(ptr)) {
hip::syncStreams();
hip::getNullStream()->finish();
for (size_t i=0; i<g_devices.size(); ++i) {
hip::getNullStream(*g_devices[i])->finish();
}
amd::SvmBuffer::free(*hip::getCurrentContext(), ptr);
HIP_RETURN(hipSuccess);
}