"vscode:/vscode.git/clone" did not exist on "848e76c3d690b3806a1e44809434d34aebad734a"
Commit c7ae833e authored by Vladimir's avatar Vladimir Committed by Huan Zhang
Browse files

fix #2696 (#2700)

Use an OpenMP critical section for clEnqueueWriteBuffer
parent dd16fa99
......@@ -433,6 +433,7 @@ void GPUTreeLearner::AllocateGPUMemory() {
} else {
Log::Fatal("Bug in GPU tree builder: dword_features_ can only be 4 or 8");
}
#pragma omp critical
queue_.enqueue_write_buffer(device_features_->get_buffer(),
i * num_data_ * sizeof(Feature4), num_data_ * sizeof(Feature4), host4);
#if GPU_DEBUG >= 1
......
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