@@ -1576,7 +1576,7 @@ pi_result _pi_platform::populateDeviceCacheIfNeeded() {
1576
1576
1577
1577
for (uint32_t i = 0 ; i < numQueueGroups; i++) {
1578
1578
if (QueueProperties[i].flags &
1579
- ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE) {
1579
+ ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE && QueueProperties[i]. numQueues > 1 ) {
1580
1580
Ordinals.push_back (i);
1581
1581
}
1582
1582
}
@@ -1833,29 +1833,25 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName,
1833
1833
case PI_DEVICE_INFO_VERSION:
1834
1834
return ReturnValue (Device->Platform ->ZeDriverApiVersion .c_str ());
1835
1835
case PI_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES: {
1836
- uint32_t ZeSubDeviceCount = 0 ;
1837
- if (Device->isSubDevice ()) {
1838
- pi_result Res = Device->Platform ->populateDeviceCacheIfNeeded ();
1839
- if (Res != PI_SUCCESS) {
1840
- return Res;
1841
- }
1842
-
1843
- return ReturnValue (pi_uint32{(unsigned int )(Device->SubDevices .size ())});
1836
+ pi_result Res = Device->Platform ->populateDeviceCacheIfNeeded ();
1837
+ if (Res != PI_SUCCESS) {
1838
+ return Res;
1844
1839
}
1845
- ZE_CALL (zeDeviceGetSubDevices, (ZeDevice, &ZeSubDeviceCount, nullptr ));
1846
- return ReturnValue (pi_uint32{ZeSubDeviceCount});
1840
+ return ReturnValue (pi_uint32{(unsigned int )(Device->SubDevices .size ())});
1847
1841
}
1848
1842
case PI_DEVICE_INFO_REFERENCE_COUNT:
1849
1843
return ReturnValue (pi_uint32{Device->RefCount });
1850
1844
case PI_DEVICE_INFO_PARTITION_PROPERTIES: {
1851
1845
// SYCL spec says: if this SYCL device cannot be partitioned into at least
1852
1846
// two sub devices then the returned vector must be empty.
1853
- if (!Device->isSubDevice ()) {
1854
- uint32_t ZeSubDeviceCount = 0 ;
1855
- ZE_CALL (zeDeviceGetSubDevices, (ZeDevice, &ZeSubDeviceCount, nullptr ));
1856
- if (ZeSubDeviceCount < 2 ) {
1857
- return ReturnValue (pi_device_partition_property{0 });
1858
- }
1847
+ pi_result Res = Device->Platform ->populateDeviceCacheIfNeeded ();
1848
+ if (Res != PI_SUCCESS) {
1849
+ return Res;
1850
+ }
1851
+
1852
+ uint32_t ZeSubDeviceCount = Device->SubDevices .size ();
1853
+ if (ZeSubDeviceCount < 2 ) {
1854
+ return ReturnValue (pi_device_partition_property{0 });
1859
1855
}
1860
1856
// It is debatable if SYCL sub-device and partitioning APIs sufficient to
1861
1857
// expose Level Zero sub-devices? We start with support of
0 commit comments