refactor: remove not needed code related to deprecated device ip version

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2024-07-05 08:09:09 +00:00
committed by Compute-Runtime-Automation
parent aa3e2ccfe8
commit 4f4b8fed15
19 changed files with 16 additions and 139 deletions

View File

@ -259,13 +259,8 @@ cl_int ClDevice::getDeviceInfo(cl_device_info paramName,
retSize = srcSize = deviceInfo.supportedThreadArbitrationPolicies.size() * sizeof(cl_uint);
break;
case CL_DEVICE_IP_VERSION_INTEL: {
if (debugManager.flags.UseDeprecatedClDeviceIpVersion.get()) {
auto &clGfxCoreHelper = this->getRootDeviceEnvironment().getHelper<ClGfxCoreHelper>();
param.uint = clGfxCoreHelper.getDeviceIpVersion(getHardwareInfo());
} else {
auto &compilerProductHelper = device.getCompilerProductHelper();
param.uint = static_cast<cl_version>(compilerProductHelper.getHwIpVersion(getHardwareInfo()));
}
auto &compilerProductHelper = device.getCompilerProductHelper();
param.uint = static_cast<cl_version>(compilerProductHelper.getHwIpVersion(getHardwareInfo()));
src = &param.uint;
retSize = srcSize = sizeof(cl_version);
break;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -18,11 +18,6 @@ static auto gfxCore = IGFX_GEN11_CORE;
#include "opencl/source/helpers/cl_gfx_core_helper_factory_init.inl"
template <>
cl_version ClGfxCoreHelperHw<Family>::getDeviceIpVersion(const HardwareInfo &hwInfo) const {
return makeDeviceIpVersion(11, 0, 0);
}
template class ClGfxCoreHelperHw<Family>;
} // namespace NEO

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -23,11 +23,6 @@ cl_device_feature_capabilities_intel ClGfxCoreHelperHw<Family>::getSupportedDevi
return CL_DEVICE_FEATURE_FLAG_DP4A_INTEL;
}
template <>
cl_version ClGfxCoreHelperHw<Family>::getDeviceIpVersion(const HardwareInfo &hwInfo) const {
return makeDeviceIpVersion(12, 0, makeDeviceRevision(hwInfo));
}
template class ClGfxCoreHelperHw<Family>;
} // namespace NEO

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -18,11 +18,6 @@ static auto gfxCore = IGFX_GEN8_CORE;
#include "opencl/source/helpers/cl_gfx_core_helper_factory_init.inl"
template <>
cl_version ClGfxCoreHelperHw<Family>::getDeviceIpVersion(const HardwareInfo &hwInfo) const {
return makeDeviceIpVersion(8, 0, 0);
}
template class ClGfxCoreHelperHw<Family>;
} // namespace NEO

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -18,11 +18,6 @@ static auto gfxCore = IGFX_GEN9_CORE;
#include "opencl/source/helpers/cl_gfx_core_helper_factory_init.inl"
template <>
cl_version ClGfxCoreHelperHw<Family>::getDeviceIpVersion(const HardwareInfo &hwInfo) const {
return makeDeviceIpVersion(9, 0, 0);
}
template class ClGfxCoreHelperHw<Family>;
} // namespace NEO

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -23,14 +23,6 @@ std::unique_ptr<ClGfxCoreHelper> ClGfxCoreHelper::create(GFXCORE_FAMILY gfxCore)
return clGfxCoreHelper;
}
uint8_t ClGfxCoreHelper::makeDeviceRevision(const HardwareInfo &hwInfo) {
return static_cast<uint8_t>(!hwInfo.capabilityTable.isIntegratedDevice);
}
cl_version ClGfxCoreHelper::makeDeviceIpVersion(uint16_t major, uint8_t minor, uint8_t revision) {
return (major << 16) | (minor << 8) | revision;
}
template <>
ClGfxCoreHelper &RootDeviceEnvironment::getHelper<ClGfxCoreHelper>() const {
return *static_cast<ClGfxCoreHelper *>(apiGfxCoreHelper.get());

View File

@ -43,7 +43,6 @@ class ClGfxCoreHelper : public ApiGfxCoreHelper {
virtual bool preferBlitterForLocalToLocalTransfers() const = 0;
virtual bool isSupportedKernelThreadArbitrationPolicy() const = 0;
virtual std::vector<uint32_t> getSupportedThreadArbitrationPolicies() const = 0;
virtual cl_version getDeviceIpVersion(const HardwareInfo &hwInfo) const = 0;
virtual cl_device_feature_capabilities_intel getSupportedDeviceFeatureCapabilities(const RootDeviceEnvironment &rootDeviceEnvironment) const = 0;
virtual bool allowImageCompression(cl_image_format format) const = 0;
virtual bool isFormatRedescribable(cl_image_format format) const = 0;
@ -53,7 +52,6 @@ class ClGfxCoreHelper : public ApiGfxCoreHelper {
virtual bool hasStatelessAccessToBuffer(const KernelInfo &kernelInfo) const = 0;
static uint8_t makeDeviceRevision(const HardwareInfo &hwInfo);
static cl_version makeDeviceIpVersion(uint16_t major, uint8_t minor, uint8_t revision);
ClGfxCoreHelper() = default;
};
@ -73,7 +71,6 @@ class ClGfxCoreHelperHw : public ClGfxCoreHelper {
bool preferBlitterForLocalToLocalTransfers() const override;
bool isSupportedKernelThreadArbitrationPolicy() const override;
std::vector<uint32_t> getSupportedThreadArbitrationPolicies() const override;
cl_version getDeviceIpVersion(const HardwareInfo &hwInfo) const override;
cl_device_feature_capabilities_intel getSupportedDeviceFeatureCapabilities(const RootDeviceEnvironment &rootDeviceEnvironment) const override;
bool allowImageCompression(cl_image_format format) const override;
bool isFormatRedescribable(cl_image_format format) const override;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -24,11 +24,6 @@ bool ClGfxCoreHelperHw<Family>::requiresAuxResolves(const KernelInfo &kernelInfo
return false;
}
template <>
cl_version ClGfxCoreHelperHw<Family>::getDeviceIpVersion(const HardwareInfo &hwInfo) const {
return makeDeviceIpVersion(12, 8, makeDeviceRevision(hwInfo));
}
template class ClGfxCoreHelperHw<Family>;
} // namespace NEO

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -51,11 +51,6 @@ std::vector<uint32_t> ClGfxCoreHelperHw<Family>::getSupportedThreadArbitrationPo
template <>
bool ClGfxCoreHelperHw<Family>::isSupportedKernelThreadArbitrationPolicy() const { return false; }
template <>
cl_version ClGfxCoreHelperHw<Family>::getDeviceIpVersion(const HardwareInfo &hwInfo) const {
return makeDeviceIpVersion(12, 7, makeDeviceRevision(hwInfo));
}
static const std::vector<cl_image_format> incompressibleFormats = {
{CL_LUMINANCE, CL_UNORM_INT8},
{CL_LUMINANCE, CL_UNORM_INT16},

View File

@ -1122,13 +1122,8 @@ struct DeviceAttributeQueryTest : public ::testing::TestWithParam<uint32_t /*cl_
auto pDeviceIpVersion = reinterpret_cast<cl_version *>(object.get());
auto &hwInfo = device.getHardwareInfo();
if (debugManager.flags.UseDeprecatedClDeviceIpVersion.get()) {
auto &clGfxCoreHelper = device.getRootDeviceEnvironment().getHelper<ClGfxCoreHelper>();
EXPECT_EQ(clGfxCoreHelper.getDeviceIpVersion(hwInfo), *pDeviceIpVersion);
} else {
auto &compilerProductHelper = device.getCompilerProductHelper();
EXPECT_EQ(static_cast<cl_version>(compilerProductHelper.getHwIpVersion(hwInfo)), *pDeviceIpVersion);
}
auto &compilerProductHelper = device.getCompilerProductHelper();
EXPECT_EQ(static_cast<cl_version>(compilerProductHelper.getHwIpVersion(hwInfo)), *pDeviceIpVersion);
EXPECT_EQ(sizeof(cl_version), sizeReturned);
break;
}
@ -1183,18 +1178,6 @@ struct DeviceAttributeQueryTest : public ::testing::TestWithParam<uint32_t /*cl_
DebugManagerStateRestore restorer;
};
TEST_P(DeviceAttributeQueryTest, givenDeprecatedDeviceIpVersionWhenVerifyDeviceAttributeThenCorrectResultsAreReturned) {
debugManager.flags.UseDeprecatedClDeviceIpVersion.set(true);
auto pClDevice = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
verifyDeviceAttribute(*pClDevice);
}
TEST_P(DeviceAttributeQueryTest, givenNewDeviceIpVersionWhenVerifyDeviceAttributeThenCorrectResultsAreReturned) {
debugManager.flags.UseDeprecatedClDeviceIpVersion.set(false);
auto pClDevice = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
verifyDeviceAttribute(*pClDevice);
}
TEST_P(DeviceAttributeQueryTest, givenGetDeviceInfoWhenDeviceAttributeIsQueriedOnRootDeviceAndSubDevicesThenReturnCorrectAttributeValues) {
debugManager.flags.CreateMultipleSubDevices.set(2);
VariableBackup<bool> mockDeviceFlagBackup(&MockDevice::createSingleDevice, false);

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2023 Intel Corporation
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -16,11 +16,6 @@
using ClGfxCoreHelperTestGen11 = Test<ClDeviceFixture>;
GEN11TEST_F(ClGfxCoreHelperTestGen11, WhenGettingDeviceIpVersionThenMakeCorrectDeviceIpVersion) {
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
EXPECT_EQ(ClGfxCoreHelperMock::makeDeviceIpVersion(11, 0, 0), clGfxCoreHelper.getDeviceIpVersion(*defaultHwInfo));
}
GEN11TEST_F(ClGfxCoreHelperTestGen11, WhenGettingSupportedDeviceFeatureCapabilitiesThenReturnCorrectValue) {
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
EXPECT_EQ(0u, clGfxCoreHelper.getSupportedDeviceFeatureCapabilities(getRootDeviceEnvironment()));

View File

@ -36,31 +36,6 @@ GEN12LPTEST_F(ClGfxCoreHelperTestsGen12Lp, givenTglLpThenAuxTranslationIsRequire
}
}
HWTEST2_F(ClGfxCoreHelperTestsGen12Lp, WhenGettingDeviceIpVersionThenMakeCorrectDeviceIpVersion, IsTGLLP) {
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
EXPECT_EQ(ClGfxCoreHelperMock::makeDeviceIpVersion(12, 0, 0), clGfxCoreHelper.getDeviceIpVersion(*defaultHwInfo));
}
HWTEST2_F(ClGfxCoreHelperTestsGen12Lp, WhenGettingDeviceIpVersionThenMakeCorrectDeviceIpVersion, IsRKL) {
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
EXPECT_EQ(ClGfxCoreHelperMock::makeDeviceIpVersion(12, 0, 0), clGfxCoreHelper.getDeviceIpVersion(*defaultHwInfo));
}
HWTEST2_F(ClGfxCoreHelperTestsGen12Lp, WhenGettingDeviceIpVersionThenMakeCorrectDeviceIpVersion, IsADLS) {
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
EXPECT_EQ(ClGfxCoreHelperMock::makeDeviceIpVersion(12, 0, 0), clGfxCoreHelper.getDeviceIpVersion(*defaultHwInfo));
}
HWTEST2_F(ClGfxCoreHelperTestsGen12Lp, WhenGettingDeviceIpVersionThenMakeCorrectDeviceIpVersion, IsADLP) {
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
EXPECT_EQ(ClGfxCoreHelperMock::makeDeviceIpVersion(12, 0, 0), clGfxCoreHelper.getDeviceIpVersion(*defaultHwInfo));
}
HWTEST2_F(ClGfxCoreHelperTestsGen12Lp, WhenGettingDeviceIpVersionThenMakeCorrectDeviceIpVersion, IsDG1) {
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
EXPECT_EQ(ClGfxCoreHelperMock::makeDeviceIpVersion(12, 0, 1), clGfxCoreHelper.getDeviceIpVersion(*defaultHwInfo));
}
GEN12LPTEST_F(ClGfxCoreHelperTestsGen12Lp, WhenGettingSupportedDeviceFeatureCapabilitiesThenReturnCorrectValue) {
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
cl_device_feature_capabilities_intel expectedCapabilities = CL_DEVICE_FEATURE_FLAG_DP4A_INTEL;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -18,11 +18,6 @@
using namespace NEO;
using ClGfxCoreHelperTestGen8 = Test<ClDeviceFixture>;
GEN8TEST_F(ClGfxCoreHelperTestGen8, WhenGettingDeviceIpVersionThenMakeCorrectDeviceIpVersion) {
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
EXPECT_EQ(ClGfxCoreHelperMock::makeDeviceIpVersion(8, 0, 0), clGfxCoreHelper.getDeviceIpVersion(*defaultHwInfo));
}
GEN8TEST_F(ClGfxCoreHelperTestGen8, WhenGettingSupportedDeviceFeatureCapabilitiesThenReturnCorrectValue) {
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
EXPECT_EQ(0u, clGfxCoreHelper.getSupportedDeviceFeatureCapabilities(getRootDeviceEnvironment()));

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -15,11 +15,6 @@
using ClGfxCoreHelperTestGen9 = Test<ClDeviceFixture>;
GEN9TEST_F(ClGfxCoreHelperTestGen9, WhenGettingDeviceIpVersionThenMakeCorrectDeviceIpVersion) {
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
EXPECT_EQ(ClGfxCoreHelperMock::makeDeviceIpVersion(9, 0, 0), clGfxCoreHelper.getDeviceIpVersion(*defaultHwInfo));
}
GEN9TEST_F(ClGfxCoreHelperTestGen9, WhenGettingSupportedDeviceFeatureCapabilitiesThenReturnCorrectValue) {
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
EXPECT_EQ(0u, clGfxCoreHelper.getSupportedDeviceFeatureCapabilities(getRootDeviceEnvironment()));

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -11,8 +11,6 @@
namespace NEO {
struct ClGfxCoreHelperMock : public ClGfxCoreHelper {
using ClGfxCoreHelper::makeDeviceIpVersion;
using ClGfxCoreHelper::makeDeviceRevision;
};
} // namespace NEO

View File

@ -801,9 +801,3 @@ XE_HPC_CORETEST_F(GfxCoreHelperTestsXeHpcCore, givenCommandBufferAllocationWhenS
gfxCoreHelper.setExtraAllocationData(allocData, allTilesAllocProperties, pDevice->getRootDeviceEnvironment());
EXPECT_FALSE(allocData.flags.useSystemMemory);
}
XE_HPC_CORETEST_F(GfxCoreHelperTestsXeHpcCore, WhenGettingDeviceIpVersionThenMakeCorrectDeviceIpVersion) {
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
EXPECT_EQ(ClGfxCoreHelperMock::makeDeviceIpVersion(12, 8, 1), clGfxCoreHelper.getDeviceIpVersion(*defaultHwInfo));
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Intel Corporation
* Copyright (C) 2022-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -22,16 +22,6 @@ using ClGfxCoreHelperTestsXeHpgCore = Test<ClDeviceFixture>;
using namespace NEO;
XE_HPG_CORETEST_F(ClGfxCoreHelperTestsXeHpgCore, WhenGettingDeviceIpVersionThenMakeCorrectDeviceIpVersion) {
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
if (defaultHwInfo->capabilityTable.isIntegratedDevice) {
EXPECT_EQ(ClGfxCoreHelperMock::makeDeviceIpVersion(12, 7, 0), clGfxCoreHelper.getDeviceIpVersion(*defaultHwInfo));
} else {
EXPECT_EQ(ClGfxCoreHelperMock::makeDeviceIpVersion(12, 7, 1), clGfxCoreHelper.getDeviceIpVersion(*defaultHwInfo));
}
}
XE_HPG_CORETEST_F(ClGfxCoreHelperTestsXeHpgCore, givenGenHelperWhenKernelArgumentIsNotPureStatefulThenRequireNonAuxMode) {
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();

View File

@ -448,7 +448,6 @@ DECLARE_DEBUG_VARIABLE(bool, ForceSamplerLowFilteringPrecision, false, "Force Lo
DECLARE_DEBUG_VARIABLE(bool, EngineInstancedSubDevices, false, "Create subdevices assigned to specific engine")
DECLARE_DEBUG_VARIABLE(bool, AllowSingleTileEngineInstancedSubDevices, false, "Create subdevices assigned to specific engine on single tile config")
DECLARE_DEBUG_VARIABLE(bool, EnablePrivateBO, false, "Enable PRELIM_I915_GEM_CREATE_EXT_VM_PRIVATE extension creating VM_PRIVATE BOs")
DECLARE_DEBUG_VARIABLE(bool, UseDeprecatedClDeviceIpVersion, false, "When enabled, the deprecated ip version scheme distinguishing between families and integrated devices will be queried in OCL")
DECLARE_DEBUG_VARIABLE(bool, EnableAIL, true, "Enables AIL")
DECLARE_DEBUG_VARIABLE(int64_t, VmBindWaitUserFenceTimeout, -1, "-1: default, >0: time in ns for wait function timeout")
DECLARE_DEBUG_VARIABLE(int32_t, ForceRunAloneContext, -1, "Control creation of run-alone HW context, -1:default, 0:disable, 1:enable")

View File

@ -529,7 +529,6 @@ ExperimentalForceCopyThroughLock = -1
AppendAubStreamContextFlags = -1
ContextGroupSize=-1
DirectSubmissionRelaxedOrderingMinNumberOfClients = -1
UseDeprecatedClDeviceIpVersion = 0
ExperimentalCopyThroughLockWaitlistSizeThreshold= -1
ForceDummyBlitWa = -1
DetectIndirectAccessInKernel = -1