Prechádzať zdrojové kódy

Use the same cuda/opencl exclusion mechanism on simgrid, instead of having a bogus assertion

Samuel Thibault 11 rokov pred
rodič
commit
e9e4a6361a
2 zmenil súbory, kde vykonal 2 pridanie a 5 odobranie
  1. 1 1
      src/core/topology.c
  2. 1 4
      src/drivers/opencl/driver_opencl.c

+ 1 - 1
src/core/topology.c

@@ -197,7 +197,7 @@ _starpu_initialize_workers_opencl_gpuid (struct _starpu_machine_config*config)
 		"STARPU_WORKERS_OPENCLID",
 		topology->nhwopenclgpus);
 
-#ifdef STARPU_USE_CUDA
+#if defined(STARPU_USE_CUDA) || defined(STARPU_SIMGRID)
         // Detect devices which are already used with CUDA
         {
                 unsigned tmp[STARPU_NMAXWORKERS];

+ 1 - 4
src/drivers/opencl/driver_opencl.c

@@ -448,10 +448,7 @@ void _starpu_opencl_init(void)
         if (!init_done)
 	{
 #ifdef STARPU_SIMGRID
-		unsigned ncuda = _starpu_simgrid_get_nbhosts("CUDA");
-		unsigned nopencl = _starpu_simgrid_get_nbhosts("OpenCL");
-		nb_devices = nopencl - ncuda;
-		STARPU_ASSERT_MSG((nopencl == ncuda) || !ncuda, "Does not yet support selectively disabling OpenCL devices of NVIDIA cards.");
+		nb_devices = _starpu_simgrid_get_nbhosts("OpenCL");
 #else /* STARPU_USE_OPENCL */
                 cl_platform_id platform_id[_STARPU_OPENCL_PLATFORM_MAX];
                 cl_uint nb_platforms;