P4 to Git Change 1771336 by cpaquot@cpaquot-ocl-lc-lnx on 2019/04/17 18:19:42
SWDEV-145570 - [HIP] Use staging buffer to copy peer to peer. Affected files ... ... //depot/stg/opencl/drivers/opencl/api/hip/hip_context.cpp#18 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_internal.hpp#27 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#53 edit
This commit is contained in:
@@ -75,21 +75,25 @@ void setCurrentContext(unsigned int index) {
|
||||
g_context = g_devices[index];
|
||||
}
|
||||
|
||||
amd::HostQueue* getNullStream() {
|
||||
auto stream = g_nullStreams.find(getCurrentContext());
|
||||
amd::HostQueue* getNullStream(amd::Context& context) {
|
||||
auto stream = g_nullStreams.find(&context);
|
||||
if (stream == g_nullStreams.end()) {
|
||||
amd::Device* device = getCurrentContext()->devices()[0];
|
||||
amd::Device* device = context.devices()[0];
|
||||
cl_command_queue_properties properties = CL_QUEUE_PROFILING_ENABLE;
|
||||
amd::HostQueue* queue = new amd::HostQueue(*hip::getCurrentContext(), *device, properties,
|
||||
amd::HostQueue* queue = new amd::HostQueue(context, *device, properties,
|
||||
amd::CommandQueue::RealTimeDisabled,
|
||||
amd::CommandQueue::Priority::Normal);
|
||||
g_nullStreams[getCurrentContext()] = queue;
|
||||
g_nullStreams[&context] = queue;
|
||||
return queue;
|
||||
}
|
||||
syncStreams();
|
||||
return stream->second;
|
||||
}
|
||||
|
||||
amd::HostQueue* getNullStream() {
|
||||
return getNullStream(*getCurrentContext());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
using namespace hip;
|
||||
|
||||
Reference in New Issue
Block a user