File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,16 @@ static const bool UseCopyEngineForD2DCopy = [] {
60
60
return (CopyEngineForD2DCopy && (std::stoi (CopyEngineForD2DCopy) != 0 ));
61
61
}();
62
62
63
+ // This is an experimental option that allows the use of copy engine, if
64
+ // available in the device, in Level Zero plugin for copy operations submitted
65
+ // to an in-order queue. The default is 1.
66
+ static const bool UseCopyEngineForInOrderQueue = [] {
67
+ const char *CopyEngineForInOrderQueue =
68
+ std::getenv (" SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE_FOR_IN_ORDER_QUEUE" );
69
+ return (!CopyEngineForInOrderQueue ||
70
+ (std::stoi (CopyEngineForInOrderQueue) != 0 ));
71
+ }();
72
+
63
73
// This class encapsulates actions taken along with a call to Level Zero API.
64
74
class ZeCall {
65
75
private:
@@ -869,7 +879,9 @@ pi_result _pi_context::getAvailableCommandList(
869
879
if (auto Res = Queue->executeOpenCommandList ())
870
880
return Res;
871
881
}
872
- bool UseCopyEngine = PreferCopyEngine && Queue->Device ->hasCopyEngine ();
882
+ bool UseCopyEngine =
883
+ (!(Queue->isInOrderQueue ()) || UseCopyEngineForInOrderQueue) &&
884
+ PreferCopyEngine && Queue->Device ->hasCopyEngine ();
873
885
874
886
// Create/Reuse the command list, because in Level Zero commands are added to
875
887
// the command lists, and later are then added to the command queue.
You can’t perform that action at this time.
0 commit comments