@@ -32,6 +32,36 @@ namespace experimental {
3232namespace detail {
3333
3434namespace {
35+ // / Return a string representation of a given node_type
36+ inline const char *nodeTypeToString (node_type NodeType) {
37+ switch (NodeType) {
38+ case node_type::empty:
39+ return " empty" ;
40+ case node_type::subgraph:
41+ return " subgraph" ;
42+ case node_type::kernel:
43+ return " kernel" ;
44+ case node_type::memcpy:
45+ return " memcpy" ;
46+ case node_type::memset:
47+ return " memset" ;
48+ case node_type::memfill:
49+ return " memfill" ;
50+ case node_type::prefetch:
51+ return " prefetch" ;
52+ case node_type::memadvise:
53+ return " memadvise" ;
54+ case node_type::ext_oneapi_barrier:
55+ return " ext_oneapi_barrier" ;
56+ case node_type::host_task:
57+ return " host_task" ;
58+ case node_type::native_command:
59+ return " native_command" ;
60+ }
61+ assert (false && " Unhandled node type" );
62+ return {};
63+ }
64+
3565// / Topologically sorts the graph in order to schedule nodes for execution.
3666// / This implementation is based on Kahn's algorithm which uses a Breadth-first
3767// / search approach.
@@ -1444,10 +1474,12 @@ bool exec_graph_impl::needsScheduledUpdate(
14441474 }
14451475
14461476 if (!Node->isUpdatable ()) {
1447- throw sycl::exception (
1448- errc::invalid,
1449- " Unsupported node type for update. Only kernel, host_task, "
1450- " barrier and empty nodes are supported." );
1477+ std::string ErrorString = " node_type::" ;
1478+ ErrorString += nodeTypeToString (Node->MNodeType );
1479+ ErrorString +=
1480+ " nodes are not supported for update. Only kernel, host_task, "
1481+ " barrier and empty nodes are supported." ;
1482+ throw sycl::exception (errc::invalid, ErrorString);
14511483 }
14521484
14531485 if (const auto &CG = Node->MCommandGroup ;
0 commit comments