Commit 909ca040 authored by Davis King's avatar Davis King

Made launch_kernel() not generate CUDA errors if you ask it to launch a kernel of size 0.

parent f5abfca1
......@@ -167,6 +167,8 @@ namespace dlib
launch_kernel().
!*/
{
if (m.num == 0)
return;
int num_blocks, num_threads;
CHECK_CUDA(cudaOccupancyMaxPotentialBlockSize(&num_blocks,&num_threads,K));
// Check if the job is really small and we don't really need to launch a kernel
......
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