Skip to content

Commit f712423

Browse files
authored
[SYCL] [UR] Fix for make_queue. (#11046)
Correction to make_queue functionality. During the transition from L0 Plugin to UR Adapter a line of code in the make queue function was inadvertenty dropped. This change restores it and also modifies the associated test to do more careful checking.
1 parent 9d4dd72 commit f712423

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

sycl/plugins/unified_runtime/ur/adapters/level_zero/queue.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urQueueCreateWithNativeHandle(
613613
return UR_RESULT_ERROR_UNKNOWN;
614614
}
615615
}
616+
(*RetQueue)->UsingImmCmdLists = (NativeHandleDesc == 1);
616617

617618
return UR_RESULT_SUCCESS;
618619
}

sycl/test-e2e/Plugin/interop-l0-direct.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ int main() {
2929
result = zeDriverGet(&driver_handle_count, nullptr);
3030
if (result != ZE_RESULT_SUCCESS) {
3131
std::cout << "zeDriverGet failed\n";
32+
return 1;
3233
}
3334
std::cout << "Found " << driver_handle_count << " driver(s)\n";
3435
if (driver_handle_count == 0)
@@ -53,10 +54,11 @@ int main() {
5354
}
5455

5556
// Create Devices
56-
uint32_t device_count;
57+
uint32_t device_count = 0;
5758
result = zeDeviceGet(ZeDriver, &device_count, nullptr);
5859
if (result != ZE_RESULT_SUCCESS) {
5960
std::cout << "zeDeviceGet failed to get count of devices\n";
61+
return 1;
6062
}
6163

6264
std::vector<ze_device_handle_t> ZeDevices(device_count);
@@ -79,6 +81,7 @@ int main() {
7981
&ZeCommand_queue);
8082
if (result != ZE_RESULT_SUCCESS) {
8183
std::cout << "zeCommandQueueCreate failed\n";
84+
return 1;
8285
}
8386
std::cout << "Commandqueue created: " << ZeCommand_queue << std::endl;
8487

@@ -88,6 +91,7 @@ int main() {
8891
&ZeCommand_list);
8992
if (result != ZE_RESULT_SUCCESS) {
9093
std::cout << "zeCommandListCreate failed\n";
94+
return 1;
9195
}
9296
std::cout << "Commandlist created: " << ZeCommand_list << std::endl;
9397

@@ -127,6 +131,7 @@ int main() {
127131
std::cout << "Test failed, queue created using command queue returns a "
128132
"command list type handle"
129133
<< std::endl;
134+
return 1;
130135
} else {
131136
auto Queue =
132137
std::get_if<ze_command_queue_handle_t>(&InteropQueueCQ_NewHandle);
@@ -159,6 +164,7 @@ int main() {
159164
std::cout << "Test failed, queue created using command list returns a "
160165
"command queue type handle"
161166
<< std::endl;
167+
return 1;
162168
}
163169

164170
int data[3] = {7, 8, 0};

0 commit comments

Comments
 (0)