@@ -833,17 +833,9 @@ exec_graph_impl::enqueueNodeDirect(sycl::context Ctx,
833
833
return NewSyncPoint;
834
834
}
835
835
836
- ur_exp_command_buffer_sync_point_t exec_graph_impl::enqueueNode (
837
- sycl::context Ctx, std::shared_ptr<sycl::detail::device_impl> DeviceImpl,
838
- ur_exp_command_buffer_handle_t CommandBuffer,
839
- std::shared_ptr<node_impl> Node) {
840
-
841
- // Queue which will be used for allocation operations for accessors.
842
- // Will also be used in native commands to return to the user in
843
- // `interop_handler::get_native_queue()` calls.
844
- auto AllocaQueue = std::make_shared<sycl::detail::queue_impl>(
845
- DeviceImpl, sycl::detail::getSyclObjImpl (Ctx), sycl::async_handler{},
846
- sycl::property_list{});
836
+ ur_exp_command_buffer_sync_point_t
837
+ exec_graph_impl::enqueueNode (ur_exp_command_buffer_handle_t CommandBuffer,
838
+ std::shared_ptr<node_impl> Node) {
847
839
848
840
std::vector<ur_exp_command_buffer_sync_point_t > Deps;
849
841
for (auto &N : Node->MPredecessors ) {
@@ -852,8 +844,8 @@ ur_exp_command_buffer_sync_point_t exec_graph_impl::enqueueNode(
852
844
853
845
sycl::detail::EventImplPtr Event =
854
846
sycl::detail::Scheduler::getInstance ().addCG (
855
- Node->getCGCopy (), AllocaQueue, /* EventNeeded= */ true , CommandBuffer ,
856
- Deps);
847
+ Node->getCGCopy (), MQueueImpl ,
848
+ /* EventNeeded= */ true , CommandBuffer, Deps);
857
849
858
850
if (MIsUpdatable) {
859
851
MCommandMap[Node] = Event->getCommandBufferCommand ();
@@ -898,8 +890,7 @@ void exec_graph_impl::createCommandBuffers(
898
890
MSyncPoints[Node] =
899
891
enqueueNodeDirect (MContext, DeviceImpl, OutCommandBuffer, Node);
900
892
} else {
901
- MSyncPoints[Node] =
902
- enqueueNode (MContext, DeviceImpl, OutCommandBuffer, Node);
893
+ MSyncPoints[Node] = enqueueNode (OutCommandBuffer, Node);
903
894
}
904
895
905
896
// Append Node requirements to overall graph requirements
@@ -926,6 +917,10 @@ exec_graph_impl::exec_graph_impl(sycl::context Context,
926
917
const std::shared_ptr<graph_impl> &GraphImpl,
927
918
const property_list &PropList)
928
919
: MSchedule(), MGraphImpl(GraphImpl), MSyncPoints(),
920
+ MQueueImpl (std::make_shared<sycl::detail::queue_impl>(
921
+ sycl::detail::getSyclObjImpl (GraphImpl->getDevice ()),
922
+ sycl::detail::getSyclObjImpl(Context), sycl::async_handler{},
923
+ sycl::property_list{})),
929
924
MDevice(GraphImpl->getDevice ()), MContext(Context), MRequirements(),
930
925
MExecutionEvents(),
931
926
MIsUpdatable(PropList.has_property<property::graph::updatable>()),
@@ -1369,16 +1364,11 @@ void exec_graph_impl::update(
1369
1364
++It;
1370
1365
}
1371
1366
1372
- auto AllocaQueue = std::make_shared<sycl::detail::queue_impl>(
1373
- sycl::detail::getSyclObjImpl (MGraphImpl->getDevice ()),
1374
- sycl::detail::getSyclObjImpl (MGraphImpl->getContext ()),
1375
- sycl::async_handler{}, sycl::property_list{});
1376
-
1377
1367
// Track the event for the update command since execution may be blocked by
1378
1368
// other scheduler commands
1379
1369
auto UpdateEvent =
1380
1370
sycl::detail::Scheduler::getInstance ().addCommandGraphUpdate (
1381
- this , Nodes, AllocaQueue , std::move (UpdateRequirements),
1371
+ this , Nodes, MQueueImpl , std::move (UpdateRequirements),
1382
1372
MExecutionEvents);
1383
1373
1384
1374
MExecutionEvents.push_back (UpdateEvent);
0 commit comments