Explorar o código

Enable CPU code on MIC/SCC

Samuel Thibault %!s(int64=10) %!d(string=hai) anos
pai
achega
4a7a6b7d7d

+ 1 - 1
examples/cg/cg_kernels.c

@@ -51,7 +51,7 @@ static void print_matrix_from_descr(unsigned nx, unsigned ny, unsigned ld, TYPE
 static int can_execute(unsigned workerid, struct starpu_task *task, unsigned nimpl)
 {
 	enum starpu_worker_archtype type = starpu_worker_get_type(workerid);
-	if (type == STARPU_CPU_WORKER || type == STARPU_OPENCL_WORKER)
+	if (type == STARPU_CPU_WORKER || type == STARPU_OPENCL_WORKER || type == STARPU_MIC_WORKER || type == STARPU_SCC_WORKER)
 		return 1;
 
 #ifdef STARPU_USE_CUDA

+ 2 - 1
examples/lu/xlu_kernels.c

@@ -108,7 +108,8 @@ static struct starpu_perfmodel STARPU_LU(model_22) =
 #ifdef STARPU_USE_CUDA
 static int can_execute(unsigned workerid, struct starpu_task *task, unsigned nimpl)
 {
-	if (starpu_worker_get_type(workerid) == STARPU_CPU_WORKER)
+	enum starpu_worker_archtype type = starpu_worker_get_type(workerid);
+	if (type == STARPU_CPU_WORKER || type == STARPU_MIC_WORKER || type == STARPU_SCC_WORKER)
 		return 1;
 
 #ifdef STARPU_SIMGRID

+ 2 - 0
examples/pi/pi_redux.c

@@ -74,6 +74,8 @@ static void init_rng(void *arg STARPU_ATTRIBUTE_UNUSED)
 	switch (starpu_worker_get_type(workerid))
 	{
 		case STARPU_CPU_WORKER:
+		case STARPU_MIC_WORKER:
+		case STARPU_SCC_WORKER:
 			/* create a seed */
 			starpu_srand48_r((long int)workerid, &randbuffer[PADDING*workerid]);
 

+ 1 - 1
examples/reductions/dot_product.c

@@ -58,7 +58,7 @@ static int cublas_version;
 static int can_execute(unsigned workerid, struct starpu_task *task, unsigned nimpl)
 {
 	enum starpu_worker_archtype type = starpu_worker_get_type(workerid);
-	if (type == STARPU_CPU_WORKER || type == STARPU_OPENCL_WORKER)
+	if (type == STARPU_CPU_WORKER || type == STARPU_OPENCL_WORKER || type == STARPU_MIC_WORKER || STARPU_SCC_WORKER)
 		return 1;
 
 #ifdef STARPU_USE_CUDA