|
1 | 1 | /* |
2 | | - * Copyright (C) 2018-2021 Intel Corporation |
| 2 | + * Copyright (C) 2018-2022 Intel Corporation |
3 | 3 | * |
4 | 4 | * SPDX-License-Identifier: MIT |
5 | 5 | * |
@@ -273,51 +273,6 @@ TEST_F(clCreateCommandQueueWithPropertiesApi, GivenDefaultDeviceQueueWithoutQueu |
273 | 273 | EXPECT_EQ(retVal, CL_INVALID_VALUE); |
274 | 274 | } |
275 | 275 |
|
276 | | -HWCMDTEST_F(IGFX_GEN8_CORE, clCreateCommandQueueWithPropertiesApi, GivenNumberOfDevicesGreaterThanMaxWhenCreatingCommandQueueWithPropertiesThenOutOfResourcesErrorIsReturned) { |
277 | | - REQUIRE_DEVICE_ENQUEUE_OR_SKIP(pContext); |
278 | | - cl_int retVal = CL_SUCCESS; |
279 | | - auto pDevice = castToObject<ClDevice>(testedClDevice); |
280 | | - cl_queue_properties odq[] = {CL_QUEUE_PROPERTIES, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CL_QUEUE_ON_DEVICE, 0}; |
281 | | - |
282 | | - auto cmdq1 = clCreateCommandQueueWithProperties(pContext, testedClDevice, odq, &retVal); |
283 | | - EXPECT_NE(nullptr, cmdq1); |
284 | | - EXPECT_EQ(retVal, CL_SUCCESS); |
285 | | - |
286 | | - auto cmdq2 = clCreateCommandQueueWithProperties(pContext, testedClDevice, odq, &retVal); |
287 | | - if (pDevice->getDeviceInfo().maxOnDeviceQueues > 1) { |
288 | | - EXPECT_NE(nullptr, cmdq2); |
289 | | - EXPECT_EQ(retVal, CL_SUCCESS); |
290 | | - } else { |
291 | | - EXPECT_EQ(nullptr, cmdq2); |
292 | | - EXPECT_EQ(retVal, CL_OUT_OF_RESOURCES); |
293 | | - } |
294 | | - |
295 | | - clReleaseCommandQueue(cmdq1); |
296 | | - if (cmdq2) { |
297 | | - clReleaseCommandQueue(cmdq2); |
298 | | - } |
299 | | -} |
300 | | - |
301 | | -HWCMDTEST_F(IGFX_GEN8_CORE, clCreateCommandQueueWithPropertiesApi, GivenFailedAllocationWhenCreatingCommandQueueWithPropertiesThenOutOfHostMemoryErrorIsReturned) { |
302 | | - REQUIRE_DEVICE_ENQUEUE_OR_SKIP(pContext); |
303 | | - InjectedFunction method = [this](size_t failureIndex) { |
304 | | - cl_queue_properties ooq[] = {CL_QUEUE_PROPERTIES, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CL_QUEUE_ON_DEVICE | CL_QUEUE_ON_DEVICE_DEFAULT, 0}; |
305 | | - auto retVal = CL_INVALID_VALUE; |
306 | | - |
307 | | - auto cmdq = clCreateCommandQueueWithProperties(pContext, testedClDevice, ooq, &retVal); |
308 | | - |
309 | | - if (MemoryManagement::nonfailingAllocation == failureIndex) { |
310 | | - EXPECT_EQ(CL_SUCCESS, retVal); |
311 | | - EXPECT_NE(nullptr, cmdq); |
312 | | - clReleaseCommandQueue(cmdq); |
313 | | - } else { |
314 | | - EXPECT_EQ(CL_OUT_OF_HOST_MEMORY, retVal) << "for allocation " << failureIndex; |
315 | | - EXPECT_EQ(nullptr, cmdq); |
316 | | - } |
317 | | - }; |
318 | | - injectFailureOnIndex(method, 0); |
319 | | -} |
320 | | - |
321 | 276 | TEST_F(clCreateCommandQueueWithPropertiesApi, GivenHighPriorityWhenCreatingOoqCommandQueueWithPropertiesThenInvalidQueuePropertiesErrorIsReturned) { |
322 | 277 | cl_int retVal = CL_SUCCESS; |
323 | 278 | cl_queue_properties ondevice[] = {CL_QUEUE_PROPERTIES, CL_QUEUE_ON_DEVICE | CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, CL_QUEUE_PRIORITY_KHR, CL_QUEUE_PRIORITY_HIGH_KHR, 0}; |
@@ -455,33 +410,6 @@ TEST_F(clCreateCommandQueueWithPropertiesApi, GivenCommandQueueCreatedWithVariou |
455 | 410 | } |
456 | 411 | } |
457 | 412 |
|
458 | | -TEST_F(clCreateCommandQueueWithPropertiesApi, GivenDeviceQueueCreatedWithVariousPropertiesWhenQueryingPropertiesArrayThenCorrectValuesAreReturned) { |
459 | | - REQUIRE_DEVICE_ENQUEUE_OR_SKIP(pContext); |
460 | | - |
461 | | - cl_int retVal = CL_SUCCESS; |
462 | | - cl_queue_properties propertiesArray[5]; |
463 | | - size_t propertiesArraySize; |
464 | | - |
465 | | - std::vector<std::vector<uint64_t>> propertiesToTest{ |
466 | | - {CL_QUEUE_PROPERTIES, CL_QUEUE_ON_DEVICE | CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, 0}, |
467 | | - {CL_QUEUE_PROPERTIES, CL_QUEUE_ON_DEVICE | CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, CL_QUEUE_SIZE, 16, 0}}; |
468 | | - |
469 | | - for (auto properties : propertiesToTest) { |
470 | | - auto commandQueue = clCreateCommandQueueWithProperties(pContext, testedClDevice, properties.data(), &retVal); |
471 | | - EXPECT_EQ(CL_SUCCESS, retVal); |
472 | | - |
473 | | - retVal = clGetCommandQueueInfo(commandQueue, CL_QUEUE_PROPERTIES_ARRAY, |
474 | | - sizeof(propertiesArray), propertiesArray, &propertiesArraySize); |
475 | | - EXPECT_EQ(CL_SUCCESS, retVal); |
476 | | - EXPECT_EQ(properties.size() * sizeof(cl_queue_properties), propertiesArraySize); |
477 | | - for (size_t i = 0; i < properties.size(); i++) { |
478 | | - EXPECT_EQ(properties[i], propertiesArray[i]); |
479 | | - } |
480 | | - |
481 | | - clReleaseCommandQueue(commandQueue); |
482 | | - } |
483 | | -} |
484 | | - |
485 | 413 | TEST_F(clCreateCommandQueueWithPropertiesApi, givenQueueFamilySelectedAndNotIndexWhenCreatingQueueThenFail) { |
486 | 414 | cl_queue_properties queueProperties[] = { |
487 | 415 | CL_QUEUE_FAMILY_INTEL, |
|
0 commit comments