Commit 92ec76b1 authored by Fenglei's avatar Fenglei Committed by Robert Kimball

set context current during each call (#1707)

parent 35082ab6
......@@ -82,6 +82,8 @@ runtime::gpu::GPU_Backend::BackendContext::BackendContext()
void runtime::gpu::GPU_Backend::BackendContext::prepare_runtime_context()
{
//set context current each time in case thread changed
m_cuda_manager->SetContextCurrent();
// add pointers to gpu primitives into the gpu runtime context
m_runtime_context->gpu_primitives = m_primitive_emitter->get_primitives().data();
m_runtime_context->gpu_memory_primitives = m_primitive_emitter->get_memory_primitives().data();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment