Skip to content

Commit 5918e0c

Browse files
authored
[SYCL] [L0] Follow-up to make_queue backwards compatibility removal. (#9523)
Remove unneeded code.
1 parent 0dd4f80 commit 5918e0c

File tree

2 files changed

+6
-32
lines changed

2 files changed

+6
-32
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -961,35 +961,15 @@ static const zeCommandListBatchConfig ZeCommandListBatchCopyConfig = [] {
961961
return ZeCommandListBatchConfig(IsCopy{true});
962962
}();
963963

964-
// Temporarily check whether immediate command list env var has been set. This
965-
// affects default behavior of make_queue API.
966-
static const bool ImmediateCommandlistEnvVarIsSet = [] {
967-
const char *UrRet = std::getenv("UR_L0_USE_IMMEDIATE_COMMANDLISTS");
968-
const char *PiRet =
969-
std::getenv("SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS");
970-
return (UrRet ? std::stoi(UrRet) : (PiRet ? std::stoi(PiRet) : 0));
971-
}();
972-
973964
_pi_queue::_pi_queue(std::vector<ze_command_queue_handle_t> &ComputeQueues,
974965
std::vector<ze_command_queue_handle_t> &CopyQueues,
975966
pi_context Context, pi_device Device,
976967
bool OwnZeCommandQueue,
977968
pi_queue_properties PiQueueProperties,
978-
int ForceComputeIndex, bool OldAPI)
969+
int ForceComputeIndex)
979970
: Context{Context}, Device{Device}, OwnZeCommandQueue{OwnZeCommandQueue},
980971
Properties(PiQueueProperties) {
981-
982-
// Set the type of commandlists the queue will use.
983-
bool Default = !ImmediateCommandlistEnvVarIsSet;
984972
UsingImmCmdLists = Device->useImmediateCommandLists();
985-
urPrint("ImmCmdList env var is set (%s), OldAPI (%s)\n",
986-
(ImmediateCommandlistEnvVarIsSet ? "YES" : "NO"),
987-
(OldAPI ? "YES" : "NO"));
988-
989-
if (OldAPI && Default)
990-
// The default when called from pre-compiled binaries is to not use
991-
// immediate command lists.
992-
UsingImmCmdLists = false;
993973
urPrint("ImmCmdList setting (%s)\n", (UsingImmCmdLists ? "YES" : "NO"));
994974

995975
// Compute group initialization.
@@ -2576,9 +2556,9 @@ pi_result piQueueCreate(pi_context Context, pi_device Device,
25762556
pi_queue_properties Properties[] = {PI_QUEUE_FLAGS, Flags, 0};
25772557
return piextQueueCreate(Context, Device, Properties, Queue);
25782558
}
2579-
pi_result piextQueueCreateInternal(pi_context Context, pi_device Device,
2580-
pi_queue_properties *Properties,
2581-
pi_queue *Queue, bool OldAPI) {
2559+
2560+
pi_result piextQueueCreate(pi_context Context, pi_device Device,
2561+
pi_queue_properties *Properties, pi_queue *Queue) {
25822562
PI_ASSERT(Properties, PI_ERROR_INVALID_VALUE);
25832563
// Expect flags mask to be passed first.
25842564
PI_ASSERT(Properties[0] == PI_QUEUE_FLAGS, PI_ERROR_INVALID_VALUE);
@@ -2629,7 +2609,7 @@ pi_result piextQueueCreateInternal(pi_context Context, pi_device Device,
26292609

26302610
try {
26312611
*Queue = new _pi_queue(ZeComputeCommandQueues, ZeCopyCommandQueues, Context,
2632-
Device, true, Flags, ForceComputeIndex, OldAPI);
2612+
Device, true, Flags, ForceComputeIndex);
26332613
} catch (const std::bad_alloc &) {
26342614
return PI_ERROR_OUT_OF_HOST_MEMORY;
26352615
} catch (...) {
@@ -2678,11 +2658,6 @@ pi_result piextQueueCreateInternal(pi_context Context, pi_device Device,
26782658
return PI_SUCCESS;
26792659
}
26802660

2681-
pi_result piextQueueCreate(pi_context Context, pi_device Device,
2682-
pi_queue_properties *Properties, pi_queue *Queue) {
2683-
return piextQueueCreateInternal(Context, Device, Properties, Queue, true);
2684-
}
2685-
26862661
pi_result piQueueGetInfo(pi_queue Queue, pi_queue_info ParamName,
26872662
size_t ParamValueSize, void *ParamValue,
26882663
size_t *ParamValueSizeRet) {

sycl/plugins/level_zero/pi_level_zero.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,7 @@ struct _pi_queue : _ur_object {
387387
_pi_queue(std::vector<ze_command_queue_handle_t> &ComputeQueues,
388388
std::vector<ze_command_queue_handle_t> &CopyQueues,
389389
pi_context Context, pi_device Device, bool OwnZeCommandQueue,
390-
pi_queue_properties Properties = 0, int ForceComputeIndex = -1,
391-
bool oldAPI = false);
390+
pi_queue_properties Properties = 0, int ForceComputeIndex = -1);
392391

393392
using queue_type = _pi_device::queue_group_info_t::type;
394393

0 commit comments

Comments
 (0)