Преглед на файлове

Do not unload OpenCL programs when they haven't been loaded due to no worker (see r4310)

Samuel Thibault преди 13 години
родител
ревизия
0925502c69
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      src/drivers/opencl/driver_opencl_utils.c

+ 3 - 0
src/drivers/opencl/driver_opencl_utils.c

@@ -200,6 +200,9 @@ cl_int starpu_opencl_unload_opencl(struct starpu_opencl_program *opencl_programs
         unsigned int dev;
         unsigned int nb_devices;
 
+	if (!starpu_opencl_worker_get_count())
+		return CL_SUCCESS;
+
         nb_devices = _starpu_opencl_get_device_count();
         // Iterate over each device
         for(dev = 0; dev < nb_devices; dev ++) {