@@ -162,10 +162,10 @@ void ZeGraphExtWrappers::setGraphArgumentValue(ze_graph_handle_t graphHandle, ui
162
162
THROW_ON_FAIL_FOR_LEVELZERO_EXT (" zeGraphSetArgumentValue" , result, _zeroInitStruct->getGraphDdiTable ());
163
163
}
164
164
165
- void ZeGraphExtWrappers::initializeGraph (ze_graph_handle_t graphHandle) const {
165
+ void ZeGraphExtWrappers::initializeGraph (ze_graph_handle_t graphHandle, uint32_t commandQueueGroupOrdinal ) const {
166
166
if (_zeroInitStruct->getGraphDdiTable ().version () < ZE_GRAPH_EXT_VERSION_1_8) {
167
167
_logger.debug (" Use initialize_graph_through_command_list for ext version smaller than 1.8" );
168
- initialize_graph_through_command_list (graphHandle);
168
+ initialize_graph_through_command_list (graphHandle, commandQueueGroupOrdinal );
169
169
} else {
170
170
_logger.debug (" Initialize graph based on graph properties for ext version larger than 1.8" );
171
171
ze_graph_properties_2_t properties = {};
@@ -179,23 +179,20 @@ void ZeGraphExtWrappers::initializeGraph(ze_graph_handle_t graphHandle) const {
179
179
}
180
180
181
181
if (properties.initStageRequired & ZE_GRAPH_STAGE_COMMAND_LIST_INITIALIZE) {
182
- initialize_graph_through_command_list (graphHandle);
182
+ initialize_graph_through_command_list (graphHandle, commandQueueGroupOrdinal );
183
183
}
184
184
}
185
185
}
186
186
187
- void ZeGraphExtWrappers::initialize_graph_through_command_list (ze_graph_handle_t graphHandle) const {
188
- ze_device_properties_t deviceProperties = {};
189
- deviceProperties.stype = ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES;
190
- THROW_ON_FAIL_FOR_LEVELZERO (" zeDeviceGetProperties" ,
191
- zeDeviceGetProperties (_zeroInitStruct->getDevice (), &deviceProperties));
192
- auto groupOrdinal = zeroUtils::findGroupOrdinal (_zeroInitStruct->getDevice (), deviceProperties);
193
-
187
+ void ZeGraphExtWrappers::initialize_graph_through_command_list (ze_graph_handle_t graphHandle,
188
+ uint32_t commandQueueGroupOrdinal) const {
194
189
_logger.debug (" initialize_graph_through_command_list init start - create graph_command_list" );
195
- CommandList graph_command_list (_zeroInitStruct, groupOrdinal );
190
+ CommandList graph_command_list (_zeroInitStruct, commandQueueGroupOrdinal );
196
191
_logger.debug (" initialize_graph_through_command_list - create graph_command_queue" );
197
- std::shared_ptr<CommandQueue> graph_command_queue =
198
- std::make_shared<CommandQueue>(_zeroInitStruct, ZE_COMMAND_QUEUE_PRIORITY_NORMAL, groupOrdinal, false );
192
+ std::shared_ptr<CommandQueue> graph_command_queue = std::make_shared<CommandQueue>(_zeroInitStruct,
193
+ ZE_COMMAND_QUEUE_PRIORITY_NORMAL,
194
+ commandQueueGroupOrdinal,
195
+ false );
199
196
_logger.debug (" initialize_graph_through_command_list - create fence" );
200
197
Fence fence (graph_command_queue);
201
198
0 commit comments