ソースを参照

Enable direct_access_supported in simgrid mode too

Samuel Thibault 6 年 前
コミット
11eb85da17
共有3 個のファイルを変更した6 個の追加5 個の削除を含む
  1. 2 2
      src/datawizard/node_ops.c
  2. 2 2
      src/drivers/cuda/driver_cuda.c
  3. 2 1
      src/drivers/opencl/driver_opencl.c

+ 2 - 2
src/datawizard/node_ops.c

@@ -50,9 +50,9 @@ void _starpu_node_ops_init()
 	_node_ops[STARPU_CUDA_RAM].copy_interface_to[STARPU_CUDA_RAM] = _starpu_cuda_copy_interface_from_cuda_to_cuda;
 	_node_ops[STARPU_CUDA_RAM].copy_interface_to[STARPU_CPU_RAM] = _starpu_cuda_copy_interface_from_cuda_to_cpu;
 	_node_ops[STARPU_CPU_RAM].copy_interface_to[STARPU_CUDA_RAM] = _starpu_cuda_copy_interface_from_cpu_to_cuda;
-	_node_ops[STARPU_CUDA_RAM].direct_access_supported = _starpu_cuda_direct_access_supported;
 #endif
 #if defined(STARPU_USE_CUDA) || defined(STARPU_SIMGRID)
+	_node_ops[STARPU_CUDA_RAM].direct_access_supported = _starpu_cuda_direct_access_supported;
 	_node_ops[STARPU_CUDA_RAM].malloc_on_node = _starpu_cuda_malloc_on_node;
 	_node_ops[STARPU_CUDA_RAM].free_on_node = _starpu_cuda_free_on_node;
 #endif
@@ -66,9 +66,9 @@ void _starpu_node_ops_init()
 	_node_ops[STARPU_OPENCL_RAM].copy_interface_to[STARPU_OPENCL_RAM] = _starpu_opencl_copy_interface_from_opencl_to_opencl;
 	_node_ops[STARPU_OPENCL_RAM].copy_interface_to[STARPU_CPU_RAM] = _starpu_opencl_copy_interface_from_opencl_to_cpu;
 	_node_ops[STARPU_CPU_RAM].copy_interface_to[STARPU_OPENCL_RAM] = _starpu_opencl_copy_interface_from_cpu_to_opencl;
-	_node_ops[STARPU_OPENCL_RAM].direct_access_supported = _starpu_opencl_direct_access_supported;
 #endif
 #if defined(STARPU_USE_OPENCL) || defined(STARPU_SIMGRID)
+	_node_ops[STARPU_OPENCL_RAM].direct_access_supported = _starpu_opencl_direct_access_supported;
 	_node_ops[STARPU_OPENCL_RAM].malloc_on_node = _starpu_opencl_malloc_on_node;
 	_node_ops[STARPU_OPENCL_RAM].free_on_node = _starpu_opencl_free_on_node;
 #endif

+ 2 - 2
src/drivers/cuda/driver_cuda.c

@@ -1427,6 +1427,8 @@ int _starpu_cuda_copy_interface_from_cpu_to_cuda(uintptr_t src, size_t src_offse
 					   cudaMemcpyHostToDevice);
 }
 
+#endif /* STARPU_USE_CUDA */
+
 int _starpu_cuda_direct_access_supported(unsigned node, unsigned handling_node)
 {
 	/* GPUs not always allow direct remote access: if CUDA4
@@ -1453,8 +1455,6 @@ int _starpu_cuda_direct_access_supported(unsigned node, unsigned handling_node)
 #endif /* STARPU_HAVE_CUDA_MEMCPY_PEER */
 }
 
-#endif /* STARPU_USE_CUDA */
-
 uintptr_t _starpu_cuda_malloc_on_node(unsigned dst_node, size_t size, int flags)
 {
 	uintptr_t addr = 0;

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

@@ -1281,13 +1281,14 @@ int _starpu_opencl_copy_interface_from_cpu_to_opencl(uintptr_t src, size_t src_o
 					     &async_channel->event.opencl_event);
 }
 
+#endif /* STARPU_USE_OPENCL */
+
 int _starpu_opencl_direct_access_supported(unsigned node, unsigned handling_node)
 {
 	(void)node;
 	(void)handling_node;
 	return 0;
 }
-#endif /* STARPU_USE_OPENCL */
 
 uintptr_t _starpu_opencl_malloc_on_node(unsigned dst_node, size_t size, int flags)
 {