Просмотр исходного кода

assume double support is available in simgrid mode

Samuel Thibault лет назад: 10
Родитель
Сommit
6f02123c98

+ 5 - 0
examples/cg/cg_kernels.c

@@ -51,6 +51,10 @@ static int can_execute(unsigned workerid, struct starpu_task *task, unsigned nim
 		return 1;
 
 #ifdef STARPU_USE_CUDA
+#ifdef STARPU_SIMGRID
+	/* We don't know, let's assume it can */
+	return 1;
+#else
 	/* Cuda device */
 	const struct cudaDeviceProp *props;
 	props = starpu_cuda_get_device_properties(workerid);
@@ -58,6 +62,7 @@ static int can_execute(unsigned workerid, struct starpu_task *task, unsigned nim
 		/* At least compute capability 1.3, supports doubles */
 		return 1;
 #endif
+#endif
 	/* Old card, does not support doubles */
 	return 0;
 }

+ 5 - 0
examples/interface/complex.c

@@ -24,6 +24,10 @@ static int can_execute(unsigned workerid, struct starpu_task *task, unsigned nim
                return 1;
 
 #ifdef STARPU_USE_CUDA
+#ifdef STARPU_SIMGRID
+	/* We don't know, let's assume it can */
+	return 1;
+#else
        /* Cuda device */
        const struct cudaDeviceProp *props;
        props = starpu_cuda_get_device_properties(workerid);
@@ -37,6 +41,7 @@ static int can_execute(unsigned workerid, struct starpu_task *task, unsigned nim
                /* Old card does not support doubles */
                return 0;
        }
+#endif
 #else
        return 1;
 #endif

+ 5 - 0
examples/lu/xlu_kernels.c

@@ -108,6 +108,10 @@ static int can_execute(unsigned workerid, struct starpu_task *task, unsigned nim
 	if (starpu_worker_get_type(workerid) == STARPU_CPU_WORKER)
 		return 1;
 
+#ifdef STARPU_SIMGRID
+	/* We don't know, let's assume it can */
+	return 1;
+#else
 	/* Cuda device */
 	const struct cudaDeviceProp *props;
 	props = starpu_cuda_get_device_properties(workerid);
@@ -121,6 +125,7 @@ static int can_execute(unsigned workerid, struct starpu_task *task, unsigned nim
 		/* Old card does not support doubles */
 		return 0;
 	}
+#endif
 }
 #endif
 

+ 5 - 0
examples/reductions/dot_product.c

@@ -49,6 +49,10 @@ static int can_execute(unsigned workerid, struct starpu_task *task, unsigned nim
 		return 1;
 
 #ifdef STARPU_USE_CUDA
+#ifdef STARPU_SIMGRID
+	/* We don't know, let's assume it can */
+	return 1;
+#else
 	/* Cuda device */
 	const struct cudaDeviceProp *props;
 	props = starpu_cuda_get_device_properties(workerid);
@@ -56,6 +60,7 @@ static int can_execute(unsigned workerid, struct starpu_task *task, unsigned nim
 		/* At least compute capability 1.3, supports doubles */
 		return 1;
 #endif
+#endif
 	/* Old card, does not support doubles */
 	return 0;
 }