Remove device enqueue part 13

-remove isOcl21Conformant

Related-To: NEO-6559
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
Katarzyna Cencelewska
2022-01-31 13:47:17 +00:00
committed by Compute-Runtime-Automation
parent c317cff408
commit 92316c48f2
8 changed files with 6 additions and 42 deletions

View File

@ -91,12 +91,6 @@ unique_ptr_if_unused<ClDevice> ClDevice::decRefInternal() {
return pParentDevice->decRefInternal();
}
bool ClDevice::isOcl21Conformant() const {
auto &hwInfo = device.getHardwareInfo();
return (hwInfo.capabilityTable.supportsOcl21Features && hwInfo.capabilityTable.supportsDeviceEnqueue &&
hwInfo.capabilityTable.supportsPipes && hwInfo.capabilityTable.supportsIndependentForwardProgress);
}
void ClDevice::retainApi() {
auto parentDeviceId = deviceInfo.parentDevice;
if (parentDeviceId) {

View File

@ -58,7 +58,6 @@ class ClDevice : public BaseObject<_cl_device_id> {
unsigned int getEnabledClVersion() const { return enabledClVersion; };
bool areOcl21FeaturesEnabled() const { return ocl21FeaturesEnabled; };
bool isOcl21Conformant() const;
void retainApi();
unique_ptr_if_unused<ClDevice> releaseApi();

View File

@ -103,7 +103,7 @@ void ClDevice::initializeCaps() {
switch (enabledClVersion) {
case 30:
deviceInfo.clVersion = "OpenCL 3.0 NEO ";
deviceInfo.clCVersion = (isOcl21Conformant() ? "OpenCL C 3.0 " : "OpenCL C 1.2 ");
deviceInfo.clCVersion = "OpenCL C 1.2 ";
deviceInfo.numericClVersion = CL_MAKE_VERSION(3, 0, 0);
break;
case 21:
@ -434,11 +434,6 @@ void ClDevice::initializeOpenclCAllVersions() {
openClCVersion.version = CL_MAKE_VERSION(1, 2, 0);
deviceInfo.openclCAllVersions.push_back(openClCVersion);
if (isOcl21Conformant()) {
openClCVersion.version = CL_MAKE_VERSION(2, 0, 0);
deviceInfo.openclCAllVersions.push_back(openClCVersion);
}
if (enabledClVersion == 30) {
openClCVersion.version = CL_MAKE_VERSION(3, 0, 0);
deviceInfo.openclCAllVersions.push_back(openClCVersion);

View File

@ -58,9 +58,6 @@ struct DeviceGetCapsTest : public ::testing::Test {
EXPECT_EQ(CL_MAKE_VERSION(1u, 1u, 0u), (++openclCWithVersionIterator)->version);
EXPECT_EQ(CL_MAKE_VERSION(1u, 2u, 0u), (++openclCWithVersionIterator)->version);
if (clDevice.isOcl21Conformant()) {
EXPECT_EQ(CL_MAKE_VERSION(2u, 0u, 0u), (++openclCWithVersionIterator)->version);
}
if (clDevice.getEnabledClVersion() == 30) {
EXPECT_EQ(CL_MAKE_VERSION(3u, 0u, 0u), (++openclCWithVersionIterator)->version);
}
@ -130,8 +127,7 @@ TEST_F(DeviceGetCapsTest, WhenCreatingDeviceThenCapsArePopulatedCorrectly) {
EXPECT_NE(nullptr, caps.driverVersion);
EXPECT_NE(nullptr, caps.profile);
EXPECT_STREQ("OpenCL 3.0 NEO ", caps.clVersion);
auto expectedClCVersion = (device->isOcl21Conformant() ? "OpenCL C 3.0 " : "OpenCL C 1.2 ");
EXPECT_STREQ(expectedClCVersion, caps.clCVersion);
EXPECT_STREQ("OpenCL C 1.2 ", caps.clCVersion);
EXPECT_NE(0u, caps.numericClVersion);
EXPECT_GT(caps.openclCAllVersions.size(), 0u);
EXPECT_GT(caps.openclCFeatures.size(), 0u);
@ -257,10 +253,6 @@ TEST_F(DeviceGetCapsTest, WhenCreatingDeviceThenCapsArePopulatedCorrectly) {
if (device->getHardwareInfo().capabilityTable.supportsOcl21Features == false && is64bit) {
EXPECT_TRUE(sharedCaps.force32BitAddressess);
}
if (caps.numericClVersion == 21) {
EXPECT_TRUE(device->isOcl21Conformant());
}
}
HWTEST_F(DeviceGetCapsTest, givenDeviceWhenAskingForSubGroupSizesThenReturnCorrectValues) {
@ -296,9 +288,8 @@ TEST_F(DeviceGetCapsTest, givenForceOclVersion30WhenCapsAreCreatedThenDeviceRepo
DebugManager.flags.ForceOCLVersion.set(30);
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
const auto &caps = device->getDeviceInfo();
auto expectedClCVersion = (device->isOcl21Conformant() ? "OpenCL C 3.0 " : "OpenCL C 1.2 ");
EXPECT_STREQ("OpenCL 3.0 NEO ", caps.clVersion);
EXPECT_STREQ(expectedClCVersion, caps.clCVersion);
EXPECT_STREQ("OpenCL C 1.2 ", caps.clCVersion);
EXPECT_EQ(CL_MAKE_VERSION(3u, 0u, 0u), caps.numericClVersion);
EXPECT_FALSE(device->ocl21FeaturesEnabled);
verifyOpenclCAllVersions(*device);

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -50,9 +50,6 @@ struct HelloWorldKernelFixture : public ProgramFixture {
if (options) {
std::string optionsToProgram(options);
if (optionsToProgram.find("-cl-std=CL2.0") != std::string::npos) {
ASSERT_TRUE(pDevice->isOcl21Conformant());
}
CreateProgramFromBinary(
pContext,

View File

@ -2172,7 +2172,6 @@ struct CreateProgramFromBinaryMock : public MockProgram {
};
TEST_F(ProgramTests, GivenFailedBinaryWhenCreatingFromIlThenInvalidBinaryErrorIsReturned) {
REQUIRE_OCL_21_OR_SKIP(pContext);
const uint32_t notSpirv[16] = {0xDEADBEEF};
cl_int retVal = CL_SUCCESS;
auto prog = Program::createFromIL<CreateProgramFromBinaryMock<CL_INVALID_BINARY>>(pContext, reinterpret_cast<const void *>(notSpirv), sizeof(notSpirv), retVal);
@ -2181,7 +2180,6 @@ TEST_F(ProgramTests, GivenFailedBinaryWhenCreatingFromIlThenInvalidBinaryErrorIs
}
TEST_F(ProgramTests, GivenSuccessfullyBuiltBinaryWhenCreatingFromIlThenValidProgramIsReturned) {
REQUIRE_OCL_21_OR_SKIP(pContext);
const uint32_t spirv[16] = {0x03022307};
cl_int retVal = CL_SUCCESS;
auto prog = Program::createFromIL<CreateProgramFromBinaryMock<CL_SUCCESS>>(pContext, reinterpret_cast<const void *>(spirv), sizeof(spirv), retVal);
@ -2191,7 +2189,6 @@ TEST_F(ProgramTests, GivenSuccessfullyBuiltBinaryWhenCreatingFromIlThenValidProg
}
TEST_F(ProgramTests, givenProgramCreatedFromILWhenCompileIsCalledThenReuseTheILInsteadOfCallingCompilerInterface) {
REQUIRE_OCL_21_OR_SKIP(pContext);
const uint32_t spirv[16] = {0x03022307};
cl_int errCode = 0;
auto pProgram = Program::createFromIL<MockProgram>(pContext, reinterpret_cast<const void *>(spirv), sizeof(spirv), errCode);
@ -2222,7 +2219,6 @@ TEST_F(ProgramTests, givenProgramCreatedFromIntermediateBinaryRepresentationWhen
}
TEST_F(ProgramTests, GivenIlIsNullptrWhenCreatingFromIlThenInvalidBinaryErrorIsReturned) {
REQUIRE_OCL_21_OR_SKIP(pContext);
cl_int retVal = CL_SUCCESS;
auto prog = Program::createFromIL<CreateProgramFromBinaryMock<CL_INVALID_BINARY>>(pContext, nullptr, 16, retVal);
EXPECT_EQ(nullptr, prog);
@ -2230,7 +2226,6 @@ TEST_F(ProgramTests, GivenIlIsNullptrWhenCreatingFromIlThenInvalidBinaryErrorIsR
}
TEST_F(ProgramTests, GivenIlSizeZeroWhenCreatingFromIlThenInvalidBinaryErrorIsReturned) {
REQUIRE_OCL_21_OR_SKIP(pContext);
const uint32_t spirv[16] = {0x03022307};
cl_int retVal = CL_SUCCESS;
auto prog = Program::createFromIL<CreateProgramFromBinaryMock<CL_INVALID_BINARY>>(pContext, reinterpret_cast<const void *>(spirv), 0, retVal);
@ -2239,7 +2234,6 @@ TEST_F(ProgramTests, GivenIlSizeZeroWhenCreatingFromIlThenInvalidBinaryErrorIsRe
}
TEST_F(ProgramTests, WhenCreatingFromIlThenIsSpirvIsSetCorrectly) {
REQUIRE_OCL_21_OR_SKIP(pContext);
const uint32_t spirv[16] = {0x03022307};
cl_int retVal = CL_SUCCESS;
auto prog = Program::createFromIL<Program>(pContext, reinterpret_cast<const void *>(spirv), sizeof(spirv), retVal);
@ -2297,7 +2291,6 @@ TEST(isValidSpirvBinary, whenBinaryDoesNotContainLllvMagicThenBinaryIsNotValidLL
}
TEST_F(ProgramTests, WhenLinkingTwoValidSpirvProgramsThenValidProgramIsReturned) {
REQUIRE_OCL_21_OR_SKIP(pContext);
const uint32_t spirv[16] = {0x03022307};
cl_int errCode = CL_SUCCESS;

View File

@ -26,13 +26,9 @@ bool TestChecks::supportsImages(const Context *pContext) {
return pContext->getDevice(0)->getSharedDeviceInfo().imageSupport;
}
bool TestChecks::supportsOcl21(const Context *pContext) {
return pContext->getDevice(0)->isOcl21Conformant();
}
bool TestChecks::supportsOcl21(const std::unique_ptr<HardwareInfo> &pHardwareInfo) {
return (pHardwareInfo->capabilityTable.supportsOcl21Features && pHardwareInfo->capabilityTable.supportsDeviceEnqueue &&
pHardwareInfo->capabilityTable.supportsPipes && pHardwareInfo->capabilityTable.supportsIndependentForwardProgress);
return (pHardwareInfo->capabilityTable.supportsOcl21Features && pHardwareInfo->capabilityTable.supportsPipes &&
pHardwareInfo->capabilityTable.supportsIndependentForwardProgress);
}
bool TestChecks::supportsAuxResolves() {

View File

@ -17,7 +17,6 @@ struct HardwareInfo;
namespace TestChecks {
bool supportsSvm(const ClDevice *pClDevice);
bool supportsImages(const Context *pContext);
bool supportsOcl21(const Context *pContext);
bool supportsOcl21(const std::unique_ptr<HardwareInfo> &pHardwareInfo);
bool supportsPipes(const ClDevice *pClDevice);
bool supportsAuxResolves();