4 次代码提交 b284282a7e ... 06c7495727

作者 SHA1 备注 提交日期
  Samuel Thibault 06c7495727 Merge branch 'fpga' of gitlab.inria.fr:starpu/starpu into fpga 4 年之前
  Samuel Thibault 97dd8ee51a Merge branch 'fpga' of https://gitlab.inria.fr/starpu/starpu into fpga 4 年之前
  Samuel Thibault 36523570bc max: Fix loading engines on "*" 4 年之前
  Samuel Thibault 8c27c4de1f Do not require is_direct_access_supported to be set, assume 0 if it isn't 4 年之前
共有 2 个文件被更改,包括 8 次插入5 次删除
  1. 1 4
      src/datawizard/coherency.c
  2. 7 1
      src/drivers/max/driver_fpga.c

+ 1 - 4
src/datawizard/coherency.c

@@ -235,10 +235,7 @@ static int worker_supports_direct_access(unsigned node, unsigned handling_node)
 	if (node_ops && node_ops->is_direct_access_supported)
 		return node_ops->is_direct_access_supported(node, handling_node);
 	else
-	{
-		STARPU_ABORT_MSG("Node %s does not define the operation 'is_direct_access_supported'", _starpu_node_get_prefix(starpu_node_get_kind(node)));
-		return 1;
-	}
+		return 0;
 }
 
 static int link_supports_direct_transfers(starpu_data_handle_t handle, unsigned src_node, unsigned dst_node, unsigned *handling_node)

+ 7 - 1
src/drivers/max/driver_fpga.c

@@ -62,6 +62,8 @@ max_engine_t *starpu_fpga_get_local_engine(void)
 	int worker = starpu_worker_get_id_check();
 	int devid = starpu_worker_get_devid(worker);
 
+	STARPU_ASSERT_MSG(engines[devid], "engine for fpga %d on worker %d is NULL!?", devid, worker);
+
 	return engines[devid];
 }
 
@@ -193,10 +195,14 @@ static void init_device_context(unsigned devid)
 			snprintf(s, sizeof(s), "local:%u", (unsigned) devid);
 			/* FIXME: this assumes that the loads are in-order.
 			 * Ideally we'd detect which ones had an explicit load */
-			engines[n] = max_load(load->file, load->engine_id_pattern);
+			engines[devid] = max_load(load->file, load->engine_id_pattern);
+			STARPU_ASSERT_MSG(engines[devid], "engine %d (part of *) could not be loaded\n", n);
 		}
 		else
+		{
 			engines[n] = max_load(load->file, load->engine_id_pattern);
+			STARPU_ASSERT_MSG(engines[n], "engine %d could not be loaded\n", n);
+		}
 	}
 }