refactor: remove unused code
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
parent
33261d36bc
commit
9524b65b51
|
@ -273,10 +273,6 @@ ze_result_t LinuxMemoryImp::getBandwidth(zes_mem_bandwidth_t *pBandwidth) {
|
|||
case IGFX_DG2:
|
||||
result = getBandwidthForDg2(pBandwidth);
|
||||
break;
|
||||
case IGFX_XE_HP_SDV:
|
||||
numHbmModules = 2u;
|
||||
result = getHbmBandwidth(numHbmModules, pBandwidth);
|
||||
break;
|
||||
case IGFX_PVC:
|
||||
numHbmModules = 4u;
|
||||
result = getHbmBandwidth(numHbmModules, pBandwidth);
|
||||
|
|
|
@ -651,32 +651,6 @@ TEST_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenBothVfid0AndVfid1Are
|
|||
}
|
||||
}
|
||||
|
||||
TEST_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenGettingBandwidthAndIfPmtReadValueFailsThenErrorIsReturned) {
|
||||
setLocalSupportedAndReinit(true);
|
||||
auto hwInfo = pLinuxSysmanImp->getSysmanDeviceImp()->getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||
hwInfo->platform.eProductFamily = IGFX_XE_HP_SDV;
|
||||
auto handles = getMemoryHandles(memoryHandleComponentCount);
|
||||
|
||||
for (auto handle : handles) {
|
||||
zes_mem_properties_t properties = {};
|
||||
zesMemoryGetProperties(handle, &properties);
|
||||
|
||||
zes_mem_bandwidth_t bandwidth;
|
||||
|
||||
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(properties.subdeviceId));
|
||||
|
||||
pPmt->mockReadArgumentValue.push_back(0);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_ERROR_UNKNOWN); // Return Failure while reading VF0_VFID
|
||||
EXPECT_EQ(zesMemoryGetBandwidth(handle, &bandwidth), ZE_RESULT_ERROR_UNKNOWN);
|
||||
|
||||
pPmt->mockReadArgumentValue.push_back(1);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_SUCCESS); // Return success after reading VF0_VFID
|
||||
pPmt->mockReadArgumentValue.push_back(0);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_ERROR_UNKNOWN); // Return Failure while reading VF1_VFID
|
||||
EXPECT_EQ(zesMemoryGetBandwidth(handle, &bandwidth), ZE_RESULT_ERROR_UNKNOWN);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(SysmanDeviceMemoryFixture, GivenCallinggetHbmFrequencyWhenProductFamilyIsPVCAndSteppingIsNotA0ThenHbmFrequencyWillBeZero) {
|
||||
PublicLinuxMemoryImp *pLinuxMemoryImp = new PublicLinuxMemoryImp;
|
||||
uint64_t hbmFrequency = 0;
|
||||
|
|
|
@ -343,10 +343,6 @@ ze_result_t LinuxMemoryImp::getBandwidth(zes_mem_bandwidth_t *pBandwidth) {
|
|||
case IGFX_DG2:
|
||||
result = getBandwidthForDg2(pBandwidth);
|
||||
break;
|
||||
case IGFX_XE_HP_SDV:
|
||||
numHbmModules = 2u;
|
||||
result = getHbmBandwidth(numHbmModules, pBandwidth);
|
||||
break;
|
||||
case IGFX_PVC:
|
||||
numHbmModules = 4u;
|
||||
result = getHbmBandwidthPVC(numHbmModules, pBandwidth);
|
||||
|
@ -432,11 +428,6 @@ ze_result_t LinuxMemoryImp::getBandwidthEx(uint64_t *pReadCounters, uint64_t *pW
|
|||
uint32_t numHbmModules = 0u;
|
||||
uint32_t counterMaxValue;
|
||||
switch (productFamily) {
|
||||
case IGFX_XE_HP_SDV:
|
||||
numHbmModules = 2u;
|
||||
counterMaxValue = UINT32_MAX;
|
||||
result = getHbmBandwidthEx(numHbmModules, counterMaxValue, pReadCounters, pWriteCounters, pMaxBw, timeout);
|
||||
break;
|
||||
case IGFX_PVC:
|
||||
numHbmModules = 4u;
|
||||
counterMaxValue = UINT32_MAX;
|
||||
|
|
|
@ -578,110 +578,6 @@ HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanM
|
|||
}
|
||||
}
|
||||
|
||||
TEST_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanMemoryGetBandwidthWhenVFID0IsActiveThenSuccessIsReturnedAndBandwidthIsValid) {
|
||||
setLocalSupportedAndReinit(true);
|
||||
auto hwInfo = *NEO::defaultHwInfo.get();
|
||||
hwInfo.platform.eProductFamily = IGFX_XE_HP_SDV;
|
||||
pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getRootDeviceEnvironmentRef().setHwInfoAndInitHelpers(&hwInfo);
|
||||
auto handles = getMemoryHandles(memoryHandleComponentCount);
|
||||
|
||||
for (auto &handle : handles) {
|
||||
zes_mem_bandwidth_t bandwidth{};
|
||||
uint64_t expectedReadCounters = 0, expectedWriteCounters = 0;
|
||||
uint64_t expectedTimestamp = 0;
|
||||
zes_mem_properties_t properties = {ZES_STRUCTURE_TYPE_MEM_PROPERTIES};
|
||||
zesMemoryGetProperties(handle, &properties);
|
||||
|
||||
auto hwInfo = pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||
auto &productHelper = pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getProductHelper();
|
||||
hwInfo->platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_B, *hwInfo);
|
||||
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(properties.subdeviceId));
|
||||
|
||||
pPmt->mockVfid0Status = true;
|
||||
pSysfsAccess->mockReadUInt64Value.push_back(hbmRP0Frequency);
|
||||
pSysfsAccess->mockReadReturnStatus.push_back(ZE_RESULT_SUCCESS);
|
||||
|
||||
EXPECT_EQ(zesMemoryGetBandwidth(handle, &bandwidth), ZE_RESULT_SUCCESS);
|
||||
expectedReadCounters = (vF0Hbm0ReadValue + vF0Hbm1ReadValue) * transactionSize;
|
||||
EXPECT_EQ(bandwidth.readCounter, expectedReadCounters);
|
||||
expectedWriteCounters = (vF0Hbm0WriteValue + vF0Hbm1WriteValue) * transactionSize;
|
||||
EXPECT_EQ(bandwidth.writeCounter, expectedWriteCounters);
|
||||
expectedTimestamp |= vF0TimestampHValue;
|
||||
expectedTimestamp = (expectedTimestamp << 32) | vF0TimestampLValue;
|
||||
EXPECT_EQ(bandwidth.timestamp, expectedTimestamp);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanMemoryGetBandwidthAndVF0_VFIDFailsThenFailureIsReturned) {
|
||||
setLocalSupportedAndReinit(true);
|
||||
auto hwInfo = *NEO::defaultHwInfo.get();
|
||||
hwInfo.platform.eProductFamily = IGFX_XE_HP_SDV;
|
||||
pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getRootDeviceEnvironmentRef().setHwInfoAndInitHelpers(&hwInfo);
|
||||
auto handles = getMemoryHandles(memoryHandleComponentCount);
|
||||
|
||||
for (auto &handle : handles) {
|
||||
zes_mem_properties_t properties = {};
|
||||
zesMemoryGetProperties(handle, &properties);
|
||||
|
||||
zes_mem_bandwidth_t bandwidth;
|
||||
|
||||
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(properties.subdeviceId));
|
||||
pPmt->mockReadArgumentValue.push_back(2);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
|
||||
EXPECT_EQ(zesMemoryGetBandwidth(handle, &bandwidth), ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanMemoryGetBandwidthAndVF0_HBM_READFailsThenFailureIsReturned) {
|
||||
setLocalSupportedAndReinit(true);
|
||||
auto hwInfo = *NEO::defaultHwInfo.get();
|
||||
hwInfo.platform.eProductFamily = IGFX_XE_HP_SDV;
|
||||
pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getRootDeviceEnvironmentRef().setHwInfoAndInitHelpers(&hwInfo);
|
||||
auto handles = getMemoryHandles(memoryHandleComponentCount);
|
||||
|
||||
for (auto &handle : handles) {
|
||||
zes_mem_properties_t properties = {};
|
||||
zesMemoryGetProperties(handle, &properties);
|
||||
|
||||
zes_mem_bandwidth_t bandwidth;
|
||||
|
||||
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(properties.subdeviceId));
|
||||
pPmt->mockReadArgumentValue.push_back(1);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_SUCCESS);
|
||||
pPmt->mockReadArgumentValue.push_back(0);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_SUCCESS);
|
||||
pPmt->mockReadArgumentValue.push_back(4);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
|
||||
EXPECT_EQ(zesMemoryGetBandwidth(handle, &bandwidth), ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanMemoryGetBandwidthAndVF0_HBM_WRITEFailsThenFailureIsReturned) {
|
||||
setLocalSupportedAndReinit(true);
|
||||
auto hwInfo = *NEO::defaultHwInfo.get();
|
||||
hwInfo.platform.eProductFamily = IGFX_XE_HP_SDV;
|
||||
pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getRootDeviceEnvironmentRef().setHwInfoAndInitHelpers(&hwInfo);
|
||||
auto handles = getMemoryHandles(memoryHandleComponentCount);
|
||||
|
||||
for (auto &handle : handles) {
|
||||
zes_mem_properties_t properties = {};
|
||||
zesMemoryGetProperties(handle, &properties);
|
||||
|
||||
zes_mem_bandwidth_t bandwidth;
|
||||
|
||||
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(properties.subdeviceId));
|
||||
pPmt->mockReadArgumentValue.push_back(1);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_SUCCESS); // Return success after reading VF0_VFID
|
||||
pPmt->mockReadArgumentValue.push_back(0);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_SUCCESS); // Return success after reading VF1_VFID
|
||||
pPmt->mockReadArgumentValue.push_back(4);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_SUCCESS);
|
||||
pPmt->mockReadArgumentValue.push_back(4);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
|
||||
EXPECT_EQ(zesMemoryGetBandwidth(handle, &bandwidth), ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanMemoryGetBandwidthWhenVFID0IsActiveThenSuccessIsReturnedAndBandwidthIsValid, IsXEHP) {
|
||||
setLocalSupportedAndReinit(true);
|
||||
auto handles = getMemoryHandles(memoryHandleComponentCount);
|
||||
|
@ -1051,33 +947,6 @@ TEST_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenBothVfid0AndVfid1Are
|
|||
}
|
||||
}
|
||||
|
||||
TEST_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenGettingBandwidthAndIfPmtReadValueFailsThenErrorIsReturned) {
|
||||
setLocalSupportedAndReinit(true);
|
||||
auto hwInfo = *NEO::defaultHwInfo.get();
|
||||
hwInfo.platform.eProductFamily = IGFX_XE_HP_SDV;
|
||||
pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getRootDeviceEnvironmentRef().setHwInfoAndInitHelpers(&hwInfo);
|
||||
auto handles = getMemoryHandles(memoryHandleComponentCount);
|
||||
|
||||
for (auto handle : handles) {
|
||||
zes_mem_properties_t properties = {};
|
||||
zesMemoryGetProperties(handle, &properties);
|
||||
|
||||
zes_mem_bandwidth_t bandwidth;
|
||||
|
||||
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(properties.subdeviceId));
|
||||
|
||||
pPmt->mockReadArgumentValue.push_back(0);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_ERROR_UNKNOWN); // Return Failure while reading VF0_VFID
|
||||
EXPECT_EQ(zesMemoryGetBandwidth(handle, &bandwidth), ZE_RESULT_ERROR_UNKNOWN);
|
||||
|
||||
pPmt->mockReadArgumentValue.push_back(1);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_SUCCESS); // Return success after reading VF0_VFID
|
||||
pPmt->mockReadArgumentValue.push_back(0);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_ERROR_UNKNOWN); // Return Failure while reading VF1_VFID
|
||||
EXPECT_EQ(zesMemoryGetBandwidth(handle, &bandwidth), ZE_RESULT_ERROR_UNKNOWN);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(SysmanDeviceMemoryFixture, GivenCallinggetHbmFrequencyWhenProductFamilyIsPVCAndSteppingIsNotA0ThenHbmFrequencyWillBeZero) {
|
||||
PublicLinuxMemoryImp *pLinuxMemoryImp = new PublicLinuxMemoryImp;
|
||||
uint64_t hbmFrequency = 0;
|
||||
|
|
|
@ -812,7 +812,6 @@ TEST(DecoderHelperTest, GivenProductFamilyWhenTranslatingToIgaGenBaseThenExpecte
|
|||
std::pair{IGFX_ALDERLAKE_P, IGA_XE},
|
||||
std::pair{IGFX_ALDERLAKE_S, IGA_XE},
|
||||
std::pair{IGFX_DG1, IGA_XE},
|
||||
std::pair{IGFX_XE_HP_SDV, IGA_XE_HP},
|
||||
std::pair{IGFX_DG2, IGA_XE_HPG},
|
||||
std::pair{IGFX_PVC, IGA_XE_HPC},
|
||||
std::pair{IGFX_UNKNOWN, IGA_GEN_INVALID}};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -37,8 +37,6 @@ inline iga_gen_t translateToIgaGenBase(PRODUCT_FAMILY productFamily) {
|
|||
case IGFX_ALDERLAKE_N:
|
||||
case IGFX_DG1:
|
||||
return IGA_XE;
|
||||
case IGFX_XE_HP_SDV:
|
||||
return IGA_XE_HP;
|
||||
case IGFX_DG2:
|
||||
return IGA_XE_HPG;
|
||||
case IGFX_PVC:
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/cache_policy_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/enable_product.inl"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/xe_hp_core/hw_cmds.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
#ifdef SUPPORT_XE_HP_SDV
|
||||
template struct L1CachePolicyHelper<IGFX_XE_HP_SDV>;
|
||||
static EnableGfxProductHw<IGFX_XE_HP_SDV> enableGfxProductHwXEHP;
|
||||
|
||||
#endif
|
||||
} // namespace NEO
|
|
@ -1,23 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "hw_info_xe_hp_core.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
struct XE_HP_SDV;
|
||||
|
||||
template <>
|
||||
struct HwMapper<IGFX_XE_HP_SDV> {
|
||||
enum { gfxFamily = IGFX_XE_HP_CORE };
|
||||
|
||||
static const char *abbreviation;
|
||||
typedef GfxFamilyMapper<static_cast<GFXCORE_FAMILY>(gfxFamily)>::GfxFamily GfxFamily;
|
||||
typedef XE_HP_SDV GfxProduct;
|
||||
};
|
||||
} // namespace NEO
|
Loading…
Reference in New Issue