Sfoglia il codice sorgente

Fix spurious data pointer registration when using scratch or redux buffers

Samuel Thibault 11 anni fa
parent
commit
c90cdf163a
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      src/datawizard/memalloc.c

+ 3 - 1
src/datawizard/memalloc.c

@@ -983,8 +983,10 @@ int _starpu_allocate_memory_on_node(starpu_data_handle_t handle, struct _starpu_
 	replicate->allocated = 1;
 	replicate->automatically_allocated = 1;
 
-	if (dst_node == STARPU_MAIN_RAM)
+	if (replicate->relaxed_coherency == 0 && dst_node == STARPU_MAIN_RAM)
 	{
+		/* We are allocating the buffer in main memory, also register it
+		 * for the gcc plugin.  */
 		void *ptr = starpu_data_handle_to_pointer(handle, STARPU_MAIN_RAM);
 		if (ptr != NULL)
 		{