Explorar o código

core/perfmodel/perfmodel_bus.c: skip OpenCL CPU devices

Nathalie Furmento %!s(int64=14) %!d(string=hai) anos
pai
achega
92dddf41f5
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      src/core/perfmodel/perfmodel_bus.c

+ 6 - 0
src/core/perfmodel/perfmodel_bus.c

@@ -541,6 +541,12 @@ static void benchmark_all_gpu_devices(void)
         nopencl = _starpu_opencl_get_device_count();
 	for (i = 0; i < nopencl; i++)
 	{
+		if (_starpu_opencl_get_device_type(i) == CL_DEVICE_TYPE_CPU)
+		{
+			_STARPU_DEBUG("Skipping OpenCL #%d : it is a CPU.\n", i);
+			continue;
+		}
+
 		fprintf(stderr," OpenCL %d...", i);
 		/* measure bandwith between Host and Device i */
 		measure_bandwidth_between_host_and_dev(i, opencldev_timing_htod, opencldev_timing_dtoh, opencldev_timing_per_cpu, 'O');