File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,12 @@ static const pi_uint32 ZeSerialize = [] {
46
46
return SerializeModeValue;
47
47
}();
48
48
49
+ static const bool CopyEngineRequested = [] {
50
+ const char *CopyEngine = std::getenv (" SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE" );
51
+ bool UseCopyEngine = (!CopyEngine || (std::stoi (CopyEngine) != 0 ));
52
+ return UseCopyEngine;
53
+ }();
54
+
49
55
// This class encapsulates actions taken along with a call to Level Zero API.
50
56
class ZeCall {
51
57
private:
@@ -564,9 +570,7 @@ pi_result _pi_device::initialize(int SubSubDeviceOrdinal,
564
570
ZeComputeEngineIndex = 0 ;
565
571
566
572
int CopyGroupIndex = -1 ;
567
- const char *CopyEngine = std::getenv (" SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE" );
568
- bool UseCopyEngine = (!CopyEngine || (std::stoi (CopyEngine) != 0 ));
569
- if (UseCopyEngine) {
573
+ if (CopyEngineRequested) {
570
574
for (uint32_t i = 0 ; i < numQueueGroups; i++) {
571
575
if (((QueueProperties[i].flags &
572
576
ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE) == 0 ) &&
@@ -1583,10 +1587,6 @@ pi_result _pi_platform::populateDeviceCacheIfNeeded() {
1583
1587
}
1584
1588
}
1585
1589
1586
- if (Ordinals.empty ()) {
1587
- return PI_ERROR_UNKNOWN;
1588
- }
1589
-
1590
1590
// Create PI sub-sub-devices with the sub-device for all the ordinals.
1591
1591
// Each {ordinal, index} points to a specific CCS which constructs
1592
1592
// a sub-sub-device at this point.
You can’t perform that action at this time.
0 commit comments