Skip to content

Commit 0ec6ded

Browse files
Remove device enqueue part 13
- update isOcl21Conformant, supportsOcl21, REQUIRE_OCL_21_OR_SKIP (remove deviceEnqueueSupport check) Related-To: NEO-6559 Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
1 parent c374073 commit 0ec6ded

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

opencl/source/cl_device/cl_device.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ unique_ptr_if_unused<ClDevice> ClDevice::decRefInternal() {
9393

9494
bool ClDevice::isOcl21Conformant() const {
9595
auto &hwInfo = device.getHardwareInfo();
96-
return (hwInfo.capabilityTable.supportsOcl21Features && hwInfo.capabilityTable.supportsDeviceEnqueue &&
97-
hwInfo.capabilityTable.supportsPipes && hwInfo.capabilityTable.supportsIndependentForwardProgress);
96+
return (hwInfo.capabilityTable.supportsOcl21Features && hwInfo.capabilityTable.supportsPipes &&
97+
hwInfo.capabilityTable.supportsIndependentForwardProgress);
9898
}
9999

100100
void ClDevice::retainApi() {

opencl/test/unit_test/device/device_tests.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,24 @@ TEST_F(DeviceTest, WhenDeviceIsCreatedThenEnabledClVersionMatchesHardwareInfo) {
5454
EXPECT_EQ(version, version2);
5555
}
5656

57+
TEST_F(DeviceTest, WhenDeviceIsCheckedForOcl21ConformanceThenCorrectValueIsReturned) {
58+
auto hwInfo = pClDevice->getHardwareInfo();
59+
for (auto supportsOcl21Features : ::testing::Bool()) {
60+
hwInfo.capabilityTable.supportsOcl21Features = supportsOcl21Features;
61+
for (auto supportsIfp : ::testing::Bool()) {
62+
hwInfo.capabilityTable.supportsIndependentForwardProgress = supportsIfp;
63+
for (auto supportsPipes : ::testing::Bool()) {
64+
hwInfo.capabilityTable.supportsPipes = supportsPipes;
65+
66+
auto pClDevice = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
67+
68+
auto expectedOcl21Conformance = (supportsOcl21Features && supportsIfp && supportsPipes);
69+
EXPECT_EQ(expectedOcl21Conformance, pClDevice->isOcl21Conformant());
70+
}
71+
}
72+
}
73+
}
74+
5775
TEST_F(DeviceTest, givenDeviceWhenEngineIsCreatedThenSetInitialValueForTag) {
5876
for (auto &engine : pDevice->allEngines) {
5977
auto tagAddress = engine.commandStreamReceiver->getTagAddress();

opencl/test/unit_test/test_macros/test_checks_ocl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ bool TestChecks::supportsOcl21(const Context *pContext) {
3131
}
3232

3333
bool TestChecks::supportsOcl21(const std::unique_ptr<HardwareInfo> &pHardwareInfo) {
34-
return (pHardwareInfo->capabilityTable.supportsOcl21Features && pHardwareInfo->capabilityTable.supportsDeviceEnqueue &&
35-
pHardwareInfo->capabilityTable.supportsPipes && pHardwareInfo->capabilityTable.supportsIndependentForwardProgress);
34+
return (pHardwareInfo->capabilityTable.supportsOcl21Features && pHardwareInfo->capabilityTable.supportsPipes &&
35+
pHardwareInfo->capabilityTable.supportsIndependentForwardProgress);
3636
}
3737

3838
bool TestChecks::supportsAuxResolves() {

0 commit comments

Comments
 (0)