Przeglądaj źródła

make using commutativity an option in cholesky

Samuel Thibault 10 lat temu
rodzic
commit
455bfdd2ef

+ 4 - 0
examples/cholesky/cholesky.h

@@ -212,6 +212,10 @@ static void STARPU_ATTRIBUTE_UNUSED parse_args(int argc, char **argv)
 		{
 			noprio = 1;
 		}
+		else if (strcmp(argv[i], "-commute") == 0)
+		{
+			cl22.modes[2] |= STARPU_COMMUTE;
+		}
 		else if (strcmp(argv[i], "-bound") == 0)
 		{
 			bound = 1;

+ 1 - 1
examples/cholesky/cholesky_implicit.c

@@ -96,7 +96,7 @@ static int _cholesky(starpu_data_handle_t dataA, unsigned nblocks)
 								 STARPU_PRIORITY, ((i == k+1) && (j == k+1))?prio_level:STARPU_DEFAULT_PRIO,
 								 STARPU_R, sdataki,
 								 STARPU_R, sdatakj,
-								 STARPU_RW | STARPU_COMMUTE, sdataij,
+								 cl22.modes[2], sdataij,
 								 STARPU_FLOPS, (double) FLOPS_SGEMM(nn, nn, nn),
 								 STARPU_TAG_ONLY, TAG22(k,i,j),
 								 0);

+ 2 - 2
examples/cholesky/cholesky_kernels.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009-2012, 2014  Université de Bordeaux
+ * Copyright (C) 2009-2012, 2014-2015  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012  CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -304,6 +304,6 @@ struct starpu_codelet cl22 =
 #endif
 	.cuda_flags = {STARPU_CUDA_ASYNC},
 	.nbuffers = 3,
-	.modes = { STARPU_R, STARPU_R, STARPU_RW | STARPU_COMMUTE },
+	.modes = { STARPU_R, STARPU_R, STARPU_RW },
 	.model = &chol_model_22
 };