P4 to Git Change 1766264 by cpaquot@cpaquot-ocl-lc-lnx on 2019/04/05 11:38:18

SWDEV-145570 - [HIP] Use a context with all devices in system for host register
	hipHostRegister and hipMemcpy 0x10 and 0x20 fail in mGPU systems because
	we only register the memory on the current device. But in HIP, the registering
	needs to happen on all devices.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_context.cpp#17 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_internal.hpp#26 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#50 edit
Šī revīzija ir iekļauta:
foreman
2019-04-05 11:58:25 -04:00
vecāks 22c104f84f
revīzija 8753616c97
3 mainīti faili ar 16 papildinājumiem un 5 dzēšanām
+8
Parādīt failu
@@ -34,6 +34,7 @@ thread_local amd::Context* g_context = nullptr;
thread_local std::stack<amd::Context*> g_ctxtStack;
thread_local hipError_t g_lastError = hipSuccess;
std::once_flag g_ihipInitialized;
amd::Context* host_context = nullptr;
std::map<amd::Context*, amd::HostQueue*> g_nullStreams;
@@ -56,6 +57,13 @@ void init() {
g_devices.push_back(context);
}
}
host_context = new amd::Context(devices, amd::Context::Info());
if (!host_context) return;
if (host_context && CL_SUCCESS != host_context->create(nullptr)) {
host_context->release();
}
}
amd::Context* getCurrentContext() {