Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions sycl/plugins/opencl/pi_opencl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,15 +413,6 @@ pi_result piQueueCreate(pi_context context, pi_device device,

CHECK_ERR_SET_NULL_RET(ret_err, queue, ret_err);

if (platVer.find("OpenCL 1.0") != std::string::npos ||
platVer.find("OpenCL 1.1") != std::string::npos ||
platVer.find("OpenCL 1.2") != std::string::npos) {
*queue = cast<pi_queue>(clCreateCommandQueue(
cast<cl_context>(context), cast<cl_device_id>(device),
cast<cl_command_queue_properties>(properties), &ret_err));
return cast<pi_result>(ret_err);
}

// Check that unexpected bits are not set.
assert(!(properties &
~(PI_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE |
Expand All @@ -433,6 +424,16 @@ pi_result piQueueCreate(pi_context context, pi_device device,
CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CL_QUEUE_PROFILING_ENABLE |
CL_QUEUE_ON_DEVICE | CL_QUEUE_ON_DEVICE_DEFAULT;

if (platVer.find("OpenCL 1.0") != std::string::npos ||
platVer.find("OpenCL 1.1") != std::string::npos ||
platVer.find("OpenCL 1.2") != std::string::npos) {
*queue = cast<pi_queue>(clCreateCommandQueue(
cast<cl_context>(context), cast<cl_device_id>(device),
cast<cl_command_queue_properties>(properties) & SupportByOpenCL,
&ret_err));
return cast<pi_result>(ret_err);
}

cl_queue_properties CreationFlagProperties[] = {
CL_QUEUE_PROPERTIES,
cast<cl_command_queue_properties>(properties) & SupportByOpenCL, 0};
Expand Down