refactor: Move disableRcs to releaseHelper
Related-To: NEO-8296 Signed-off-by: Baj, Tomasz <tomasz.baj@intel.com>
This commit is contained in:
parent
8da92f56c7
commit
cb903cbc03
|
@ -41,7 +41,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTests, whenPrepareDeviceEnvironmentsIsCalledTh
|
||||||
EXPECT_NE(nullptr, executionEnvironment.rootDeviceEnvironments[0]->getGmmHelper());
|
EXPECT_NE(nullptr, executionEnvironment.rootDeviceEnvironments[0]->getGmmHelper());
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(PrepareDeviceEnvironmentsTests, givenRcsAndCcsNotSupportedWhenInitializingThenReturnFalse) {
|
HWTEST_F(PrepareDeviceEnvironmentsTests, givenCcsNotSupportedWhenInitializingThenReturnFalse) {
|
||||||
REQUIRE_64BIT_OR_SKIP();
|
REQUIRE_64BIT_OR_SKIP();
|
||||||
|
|
||||||
NEO::ExecutionEnvironment executionEnvironment;
|
NEO::ExecutionEnvironment executionEnvironment;
|
||||||
|
@ -53,7 +53,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTests, givenRcsAndCcsNotSupportedWhenInitializ
|
||||||
productHelper.configureHardwareCustom(&hwInfo, nullptr);
|
productHelper.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
|
|
||||||
bool expectedValue = false;
|
bool expectedValue = false;
|
||||||
if (hwInfo.featureTable.flags.ftrRcsNode || hwInfo.featureTable.flags.ftrCCSNode) {
|
if (hwInfo.featureTable.flags.ftrCCSNode) {
|
||||||
expectedValue = true;
|
expectedValue = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -210,6 +210,17 @@ bool RootDeviceEnvironment::isNumberOfCcsLimited() const {
|
||||||
return limitedNumberOfCcs;
|
return limitedNumberOfCcs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RootDeviceEnvironment::setRcsExposure() {
|
||||||
|
if (releaseHelper) {
|
||||||
|
if (releaseHelper->isRcsExposureDisabled()) {
|
||||||
|
hwInfo->featureTable.flags.ftrRcsNode = false;
|
||||||
|
if ((DebugManager.flags.NodeOrdinal.get() == static_cast<int32_t>(aub_stream::EngineType::ENGINE_RCS)) || (DebugManager.flags.NodeOrdinal.get() == static_cast<int32_t>(aub_stream::EngineType::ENGINE_CCCS))) {
|
||||||
|
hwInfo->featureTable.flags.ftrRcsNode = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void RootDeviceEnvironment::initDummyAllocation() {
|
void RootDeviceEnvironment::initDummyAllocation() {
|
||||||
std::call_once(isDummyAllocationInitialized, [this]() {
|
std::call_once(isDummyAllocationInitialized, [this]() {
|
||||||
auto customDeleter = [this](GraphicsAllocation *dummyAllocation) {
|
auto customDeleter = [this](GraphicsAllocation *dummyAllocation) {
|
||||||
|
|
|
@ -78,6 +78,7 @@ struct RootDeviceEnvironment {
|
||||||
void createBindlessHeapsHelper(MemoryManager *memoryManager, bool availableDevices, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield);
|
void createBindlessHeapsHelper(MemoryManager *memoryManager, bool availableDevices, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield);
|
||||||
void limitNumberOfCcs(uint32_t numberOfCcs);
|
void limitNumberOfCcs(uint32_t numberOfCcs);
|
||||||
bool isNumberOfCcsLimited() const;
|
bool isNumberOfCcsLimited() const;
|
||||||
|
void setRcsExposure();
|
||||||
void initProductHelper();
|
void initProductHelper();
|
||||||
void initHelpers();
|
void initHelpers();
|
||||||
void initGfxCoreHelper();
|
void initGfxCoreHelper();
|
||||||
|
|
|
@ -476,6 +476,7 @@ int Drm::setupHardwareInfo(const DeviceDescriptor *device, bool setupFeatureTabl
|
||||||
status = querySystemInfo();
|
status = querySystemInfo();
|
||||||
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<CompilerProductHelper>();
|
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<CompilerProductHelper>();
|
||||||
device->setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
|
device->setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
|
||||||
|
rootDeviceEnvironment.setRcsExposure();
|
||||||
|
|
||||||
if (status) {
|
if (status) {
|
||||||
systemInfo->checkSysInfoMismatch(hwInfo);
|
systemInfo->checkSysInfoMismatch(hwInfo);
|
||||||
|
|
|
@ -69,7 +69,6 @@ class ProductHelper {
|
||||||
virtual int configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const = 0;
|
virtual int configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const = 0;
|
||||||
virtual void adjustPlatformForProductFamily(HardwareInfo *hwInfo) = 0;
|
virtual void adjustPlatformForProductFamily(HardwareInfo *hwInfo) = 0;
|
||||||
virtual void adjustSamplerState(void *sampler, const HardwareInfo &hwInfo) const = 0;
|
virtual void adjustSamplerState(void *sampler, const HardwareInfo &hwInfo) const = 0;
|
||||||
virtual void disableRcsExposure(HardwareInfo *hwInfo) const = 0;
|
|
||||||
virtual uint64_t getHostMemCapabilities(const HardwareInfo *hwInfo) const = 0;
|
virtual uint64_t getHostMemCapabilities(const HardwareInfo *hwInfo) const = 0;
|
||||||
virtual uint64_t getDeviceMemCapabilities() const = 0;
|
virtual uint64_t getDeviceMemCapabilities() const = 0;
|
||||||
virtual uint64_t getSingleDeviceSharedMemCapabilities() const = 0;
|
virtual uint64_t getSingleDeviceSharedMemCapabilities() const = 0;
|
||||||
|
|
|
@ -84,14 +84,6 @@ void ProductHelperHw<gfxProduct>::enableBlitterOperationsSupport(HardwareInfo *h
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <PRODUCT_FAMILY gfxProduct>
|
|
||||||
void ProductHelperHw<gfxProduct>::disableRcsExposure(HardwareInfo *hwInfo) const {
|
|
||||||
hwInfo->featureTable.flags.ftrRcsNode = false;
|
|
||||||
if ((DebugManager.flags.NodeOrdinal.get() == static_cast<int32_t>(aub_stream::EngineType::ENGINE_RCS)) || (DebugManager.flags.NodeOrdinal.get() == static_cast<int32_t>(aub_stream::EngineType::ENGINE_CCCS))) {
|
|
||||||
hwInfo->featureTable.flags.ftrRcsNode = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
template <PRODUCT_FAMILY gfxProduct>
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
uint64_t ProductHelperHw<gfxProduct>::getDeviceMemCapabilities() const {
|
uint64_t ProductHelperHw<gfxProduct>::getDeviceMemCapabilities() const {
|
||||||
uint64_t capabilities = UNIFIED_SHARED_MEMORY_ACCESS | UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS;
|
uint64_t capabilities = UNIFIED_SHARED_MEMORY_ACCESS | UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS;
|
||||||
|
|
|
@ -22,7 +22,6 @@ class ProductHelperHw : public ProductHelper {
|
||||||
int configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const override;
|
int configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const override;
|
||||||
void adjustPlatformForProductFamily(HardwareInfo *hwInfo) override;
|
void adjustPlatformForProductFamily(HardwareInfo *hwInfo) override;
|
||||||
void adjustSamplerState(void *sampler, const HardwareInfo &hwInfo) const override;
|
void adjustSamplerState(void *sampler, const HardwareInfo &hwInfo) const override;
|
||||||
void disableRcsExposure(HardwareInfo *hwInfo) const override;
|
|
||||||
uint64_t getHostMemCapabilities(const HardwareInfo *hwInfo) const override;
|
uint64_t getHostMemCapabilities(const HardwareInfo *hwInfo) const override;
|
||||||
uint64_t getDeviceMemCapabilities() const override;
|
uint64_t getDeviceMemCapabilities() const override;
|
||||||
uint64_t getSingleDeviceSharedMemCapabilities() const override;
|
uint64_t getSingleDeviceSharedMemCapabilities() const override;
|
||||||
|
|
|
@ -115,6 +115,7 @@ bool Wddm::init() {
|
||||||
|
|
||||||
populateIpVersion(*hardwareInfo);
|
populateIpVersion(*hardwareInfo);
|
||||||
rootDeviceEnvironment.initReleaseHelper();
|
rootDeviceEnvironment.initReleaseHelper();
|
||||||
|
rootDeviceEnvironment.setRcsExposure();
|
||||||
|
|
||||||
if (productHelper.configureHwInfoWddm(hardwareInfo, hardwareInfo, rootDeviceEnvironment)) {
|
if (productHelper.configureHwInfoWddm(hardwareInfo, hardwareInfo, rootDeviceEnvironment)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -41,6 +41,7 @@ class ReleaseHelper {
|
||||||
virtual bool isCachingOnCpuAvailable() const = 0;
|
virtual bool isCachingOnCpuAvailable() const = 0;
|
||||||
virtual bool shouldAdjustDepth() const = 0;
|
virtual bool shouldAdjustDepth() const = 0;
|
||||||
virtual bool isDirectSubmissionSupported() const = 0;
|
virtual bool isDirectSubmissionSupported() const = 0;
|
||||||
|
virtual bool isRcsExposureDisabled() const = 0;
|
||||||
virtual std::optional<GfxMemoryAllocationMethod> getPreferredAllocationMethod(AllocationType allocationType) const = 0;
|
virtual std::optional<GfxMemoryAllocationMethod> getPreferredAllocationMethod(AllocationType allocationType) const = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -69,6 +70,7 @@ class ReleaseHelperHw : public ReleaseHelper {
|
||||||
bool isCachingOnCpuAvailable() const override;
|
bool isCachingOnCpuAvailable() const override;
|
||||||
bool shouldAdjustDepth() const override;
|
bool shouldAdjustDepth() const override;
|
||||||
bool isDirectSubmissionSupported() const override;
|
bool isDirectSubmissionSupported() const override;
|
||||||
|
bool isRcsExposureDisabled() const override;
|
||||||
std::optional<GfxMemoryAllocationMethod> getPreferredAllocationMethod(AllocationType allocationType) const override;
|
std::optional<GfxMemoryAllocationMethod> getPreferredAllocationMethod(AllocationType allocationType) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -13,6 +13,10 @@
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
constexpr auto release = ReleaseType::release1260;
|
constexpr auto release = ReleaseType::release1260;
|
||||||
|
|
||||||
|
template <>
|
||||||
|
bool ReleaseHelperHw<release>::isRcsExposureDisabled() const {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|
||||||
template class NEO::ReleaseHelperHw<NEO::release>;
|
template class NEO::ReleaseHelperHw<NEO::release>;
|
||||||
|
|
|
@ -82,4 +82,9 @@ template <ReleaseType releaseType>
|
||||||
bool ReleaseHelperHw<releaseType>::isDirectSubmissionSupported() const {
|
bool ReleaseHelperHw<releaseType>::isDirectSubmissionSupported() const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <ReleaseType releaseType>
|
||||||
|
bool ReleaseHelperHw<releaseType>::isRcsExposureDisabled() const {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|
|
@ -29,4 +29,8 @@ bool ReleaseHelperHw<release>::isDirectSubmissionSupported() const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
bool ReleaseHelperHw<release>::isRcsExposureDisabled() const {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|
|
@ -18,8 +18,6 @@ int ProductHelperHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, O
|
||||||
|
|
||||||
enableBlitterOperationsSupport(hwInfo);
|
enableBlitterOperationsSupport(hwInfo);
|
||||||
|
|
||||||
disableRcsExposure(hwInfo);
|
|
||||||
|
|
||||||
auto &kmdNotifyProperties = hwInfo->capabilityTable.kmdNotifyProperties;
|
auto &kmdNotifyProperties = hwInfo->capabilityTable.kmdNotifyProperties;
|
||||||
kmdNotifyProperties.enableKmdNotify = true;
|
kmdNotifyProperties.enableKmdNotify = true;
|
||||||
kmdNotifyProperties.delayKmdNotifyMicroseconds = 150;
|
kmdNotifyProperties.delayKmdNotifyMicroseconds = 150;
|
||||||
|
|
|
@ -23,7 +23,6 @@ template <>
|
||||||
int ProductHelperHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
int ProductHelperHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
enableCompression(hwInfo);
|
enableCompression(hwInfo);
|
||||||
enableBlitterOperationsSupport(hwInfo);
|
enableBlitterOperationsSupport(hwInfo);
|
||||||
disableRcsExposure(hwInfo);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,6 @@ int ProductHelperHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, O
|
||||||
DG2::adjustHardwareInfo(hwInfo);
|
DG2::adjustHardwareInfo(hwInfo);
|
||||||
enableBlitterOperationsSupport(hwInfo);
|
enableBlitterOperationsSupport(hwInfo);
|
||||||
|
|
||||||
disableRcsExposure(hwInfo);
|
|
||||||
hwInfo->workaroundTable.flags.wa_15010089951 = true;
|
hwInfo->workaroundTable.flags.wa_15010089951 = true;
|
||||||
|
|
||||||
auto &kmdNotifyProperties = hwInfo->capabilityTable.kmdNotifyProperties;
|
auto &kmdNotifyProperties = hwInfo->capabilityTable.kmdNotifyProperties;
|
||||||
|
|
|
@ -58,7 +58,6 @@ int ProductHelperHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, O
|
||||||
DG2::adjustHardwareInfo(hwInfo);
|
DG2::adjustHardwareInfo(hwInfo);
|
||||||
enableBlitterOperationsSupport(hwInfo);
|
enableBlitterOperationsSupport(hwInfo);
|
||||||
|
|
||||||
disableRcsExposure(hwInfo);
|
|
||||||
hwInfo->workaroundTable.flags.wa_15010089951 = true;
|
hwInfo->workaroundTable.flags.wa_15010089951 = true;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -27,6 +27,7 @@ class MockReleaseHelper : public ReleaseHelper {
|
||||||
ADDMETHOD_CONST_NOBASE(isCachingOnCpuAvailable, bool, false, ());
|
ADDMETHOD_CONST_NOBASE(isCachingOnCpuAvailable, bool, false, ());
|
||||||
ADDMETHOD_CONST_NOBASE(shouldAdjustDepth, bool, false, ());
|
ADDMETHOD_CONST_NOBASE(shouldAdjustDepth, bool, false, ());
|
||||||
ADDMETHOD_CONST_NOBASE(isDirectSubmissionSupported, bool, false, ());
|
ADDMETHOD_CONST_NOBASE(isDirectSubmissionSupported, bool, false, ());
|
||||||
|
ADDMETHOD_CONST_NOBASE(isRcsExposureDisabled, bool, false, ());
|
||||||
ADDMETHOD_CONST_NOBASE(getPreferredAllocationMethod, std::optional<GfxMemoryAllocationMethod>, std::nullopt, (AllocationType allocationType));
|
ADDMETHOD_CONST_NOBASE(getPreferredAllocationMethod, std::optional<GfxMemoryAllocationMethod>, std::nullopt, (AllocationType allocationType));
|
||||||
};
|
};
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "shared/source/os_interface/driver_info.h"
|
#include "shared/source/os_interface/driver_info.h"
|
||||||
#include "shared/source/os_interface/os_interface.h"
|
#include "shared/source/os_interface/os_interface.h"
|
||||||
#include "shared/source/os_interface/os_time.h"
|
#include "shared/source/os_interface/os_time.h"
|
||||||
|
#include "shared/source/release_helper/release_helper.h"
|
||||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||||
#include "shared/test/common/mocks/mock_device.h"
|
#include "shared/test/common/mocks/mock_device.h"
|
||||||
#include "shared/test/common/mocks/mock_driver_model.h"
|
#include "shared/test/common/mocks/mock_driver_model.h"
|
||||||
|
@ -159,6 +160,47 @@ TEST(RootDeviceEnvironment, givenRootExecutionEnvironmentWhenGetAssertHandlerIsC
|
||||||
EXPECT_EQ(assertHandler, rootDeviceEnvironment->getAssertHandler(device.get()));
|
EXPECT_EQ(assertHandler, rootDeviceEnvironment->getAssertHandler(device.get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(RootDeviceEnvironment, givenDefaultHardwareInfoWhenPrepareDeviceEnvironmentsThenFtrRcsNodeIsCorrectSet) {
|
||||||
|
MockExecutionEnvironment executionEnvironment;
|
||||||
|
auto rootDeviceEnvironment = static_cast<MockRootDeviceEnvironment *>(executionEnvironment.rootDeviceEnvironments[0].get());
|
||||||
|
rootDeviceEnvironment->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||||
|
rootDeviceEnvironment->setRcsExposure();
|
||||||
|
auto hwInfo = rootDeviceEnvironment->getMutableHardwareInfo();
|
||||||
|
auto releaseHelper = rootDeviceEnvironment->getReleaseHelper();
|
||||||
|
|
||||||
|
if (releaseHelper) {
|
||||||
|
bool shouldRcsBeDisabled = releaseHelper->isRcsExposureDisabled();
|
||||||
|
bool isRcsDisabled = hwInfo->featureTable.flags.ftrRcsNode;
|
||||||
|
EXPECT_NE(shouldRcsBeDisabled, isRcsDisabled);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(RootDeviceEnvironment, givenHardwareInfoAndDebugVariableNodeOrdinalEqualsRcsWhenPrepareDeviceEnvironmentsThenFtrRcsNodeIsTrue) {
|
||||||
|
DebugManagerStateRestore restorer;
|
||||||
|
DebugManager.flags.NodeOrdinal.set(static_cast<int32_t>(aub_stream::EngineType::ENGINE_RCS));
|
||||||
|
|
||||||
|
MockExecutionEnvironment executionEnvironment;
|
||||||
|
executionEnvironment.rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||||
|
auto rootDeviceEnvironment = static_cast<MockRootDeviceEnvironment *>(executionEnvironment.rootDeviceEnvironments[0].get());
|
||||||
|
rootDeviceEnvironment->setRcsExposure();
|
||||||
|
auto hwInfo = rootDeviceEnvironment->getMutableHardwareInfo();
|
||||||
|
|
||||||
|
EXPECT_TRUE(hwInfo->featureTable.flags.ftrRcsNode);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(RootDeviceEnvironment, givenHardwareInfoAndDebugVariableNodeOrdinalEqualsCccsWhenPrepareDeviceEnvironmentsThenFtrRcsNodeIsTrue) {
|
||||||
|
DebugManagerStateRestore restorer;
|
||||||
|
DebugManager.flags.NodeOrdinal.set(static_cast<int32_t>(aub_stream::EngineType::ENGINE_CCCS));
|
||||||
|
|
||||||
|
MockExecutionEnvironment executionEnvironment;
|
||||||
|
executionEnvironment.rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||||
|
auto rootDeviceEnvironment = static_cast<MockRootDeviceEnvironment *>(executionEnvironment.rootDeviceEnvironments[0].get());
|
||||||
|
rootDeviceEnvironment->setRcsExposure();
|
||||||
|
auto hwInfo = rootDeviceEnvironment->getMutableHardwareInfo();
|
||||||
|
|
||||||
|
EXPECT_TRUE(hwInfo->featureTable.flags.ftrRcsNode);
|
||||||
|
}
|
||||||
|
|
||||||
TEST(ExecutionEnvironment, givenExecutionEnvironmentWhenInitializeMemoryManagerIsCalledThenLocalMemorySupportedInMemoryManagerHasCorrectValue) {
|
TEST(ExecutionEnvironment, givenExecutionEnvironmentWhenInitializeMemoryManagerIsCalledThenLocalMemorySupportedInMemoryManagerHasCorrectValue) {
|
||||||
const HardwareInfo *hwInfo = defaultHwInfo.get();
|
const HardwareInfo *hwInfo = defaultHwInfo.get();
|
||||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(hwInfo));
|
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(hwInfo));
|
||||||
|
|
|
@ -992,33 +992,6 @@ HWTEST2_F(ProductHelperCommonTest, givenBlitterPreferenceWhenEnablingBlitterOper
|
||||||
EXPECT_EQ(expectedBlitterSupport, hardwareInfo.capabilityTable.blitterOperationsSupported);
|
EXPECT_EQ(expectedBlitterSupport, hardwareInfo.capabilityTable.blitterOperationsSupported);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST2_F(ProductHelperCommonTest, givenHardwareInfoWhendisableRcsExposureIsCalledThenFtrRcsNodeIsFalse, IsAtLeastGen12lp) {
|
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
|
||||||
auto &productHelper = getHelper<ProductHelper>();
|
|
||||||
productHelper.disableRcsExposure(&hwInfo);
|
|
||||||
EXPECT_FALSE(hwInfo.featureTable.flags.ftrRcsNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
HWTEST2_F(ProductHelperCommonTest, givenHardwareInfoAndDebugVariableNodeOrdinalEqualsRcsWhenDisableRcsExposureIsCalledThenFtrRcsNodeIsTrue, IsAtLeastGen12lp) {
|
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
|
||||||
auto &productHelper = getHelper<ProductHelper>();
|
|
||||||
DebugManagerStateRestore restore;
|
|
||||||
DebugManager.flags.NodeOrdinal.set(static_cast<int32_t>(aub_stream::EngineType::ENGINE_RCS));
|
|
||||||
|
|
||||||
productHelper.disableRcsExposure(&hwInfo);
|
|
||||||
EXPECT_TRUE(hwInfo.featureTable.flags.ftrRcsNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
HWTEST2_F(ProductHelperCommonTest, givenHardwareInfoAndDebugVariableNodeOrdinalEqualsCccsWhenDisableRcsExposureIsCalledThenFtrRcsNodeIsTrue, IsAtLeastGen12lp) {
|
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
|
||||||
auto &productHelper = getHelper<ProductHelper>();
|
|
||||||
DebugManagerStateRestore restore;
|
|
||||||
DebugManager.flags.NodeOrdinal.set(static_cast<int32_t>(aub_stream::EngineType::ENGINE_CCCS));
|
|
||||||
|
|
||||||
productHelper.disableRcsExposure(&hwInfo);
|
|
||||||
EXPECT_TRUE(hwInfo.featureTable.flags.ftrRcsNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
HWTEST_F(GfxCoreHelperTest, givenGfxCoreHelperWhenAskingForIsaSystemMemoryPlacementThenReturnFalseIfLocalMemorySupported) {
|
HWTEST_F(GfxCoreHelperTest, givenGfxCoreHelperWhenAskingForIsaSystemMemoryPlacementThenReturnFalseIfLocalMemorySupported) {
|
||||||
DebugManagerStateRestore restorer;
|
DebugManagerStateRestore restorer;
|
||||||
auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
|
auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
|
||||||
|
|
|
@ -9,14 +9,18 @@ target_sources(neo_shared_tests PRIVATE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_tests_base.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_tests_base.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_tests_base.h
|
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_tests_base.h
|
||||||
)
|
)
|
||||||
if(TESTS_XE_HPG_CORE OR TESTS_XE_HPC_CORE)
|
if(TESTS_XE_HPG_CORE)
|
||||||
target_sources(neo_shared_tests PRIVATE
|
target_sources(neo_shared_tests PRIVATE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_12_55_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_12_55_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_12_56_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_12_56_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_12_57_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_12_57_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_12_60_tests.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_12_70_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_12_70_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_12_71_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_12_71_tests.cpp
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
if(TESTS_XE_HPC_CORE)
|
||||||
|
target_sources(neo_shared_tests PRIVATE
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_12_60_tests.cpp
|
||||||
|
)
|
||||||
|
endif()
|
||||||
add_subdirectories()
|
add_subdirectories()
|
|
@ -34,6 +34,7 @@ TEST_F(ReleaseHelper1255Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
|
||||||
EXPECT_TRUE(releaseHelper->isCachingOnCpuAvailable());
|
EXPECT_TRUE(releaseHelper->isCachingOnCpuAvailable());
|
||||||
EXPECT_TRUE(releaseHelper->isDirectSubmissionSupported());
|
EXPECT_TRUE(releaseHelper->isDirectSubmissionSupported());
|
||||||
EXPECT_FALSE(releaseHelper->isAuxSurfaceModeOverrideRequired());
|
EXPECT_FALSE(releaseHelper->isAuxSurfaceModeOverrideRequired());
|
||||||
|
EXPECT_TRUE(releaseHelper->isRcsExposureDisabled());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ TEST_F(ReleaseHelper1256Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
|
||||||
EXPECT_TRUE(releaseHelper->isCachingOnCpuAvailable());
|
EXPECT_TRUE(releaseHelper->isCachingOnCpuAvailable());
|
||||||
EXPECT_TRUE(releaseHelper->isDirectSubmissionSupported());
|
EXPECT_TRUE(releaseHelper->isDirectSubmissionSupported());
|
||||||
EXPECT_FALSE(releaseHelper->isAuxSurfaceModeOverrideRequired());
|
EXPECT_FALSE(releaseHelper->isAuxSurfaceModeOverrideRequired());
|
||||||
|
EXPECT_TRUE(releaseHelper->isRcsExposureDisabled());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ TEST_F(ReleaseHelper1257Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
|
||||||
EXPECT_TRUE(releaseHelper->isCachingOnCpuAvailable());
|
EXPECT_TRUE(releaseHelper->isCachingOnCpuAvailable());
|
||||||
EXPECT_TRUE(releaseHelper->isDirectSubmissionSupported());
|
EXPECT_TRUE(releaseHelper->isDirectSubmissionSupported());
|
||||||
EXPECT_FALSE(releaseHelper->isAuxSurfaceModeOverrideRequired());
|
EXPECT_FALSE(releaseHelper->isAuxSurfaceModeOverrideRequired());
|
||||||
|
EXPECT_TRUE(releaseHelper->isRcsExposureDisabled());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,5 +32,6 @@ TEST_F(ReleaseHelper1260Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
|
||||||
EXPECT_FALSE(releaseHelper->isBFloat16ConversionSupported());
|
EXPECT_FALSE(releaseHelper->isBFloat16ConversionSupported());
|
||||||
EXPECT_TRUE(releaseHelper->isResolvingSubDeviceIDNeeded());
|
EXPECT_TRUE(releaseHelper->isResolvingSubDeviceIDNeeded());
|
||||||
EXPECT_TRUE(releaseHelper->isCachingOnCpuAvailable());
|
EXPECT_TRUE(releaseHelper->isCachingOnCpuAvailable());
|
||||||
|
EXPECT_TRUE(releaseHelper->isRcsExposureDisabled());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ TEST_F(ReleaseHelper1270Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
|
||||||
EXPECT_FALSE(releaseHelper->isCachingOnCpuAvailable());
|
EXPECT_FALSE(releaseHelper->isCachingOnCpuAvailable());
|
||||||
EXPECT_TRUE(releaseHelper->isDirectSubmissionSupported());
|
EXPECT_TRUE(releaseHelper->isDirectSubmissionSupported());
|
||||||
EXPECT_TRUE(releaseHelper->isAuxSurfaceModeOverrideRequired());
|
EXPECT_TRUE(releaseHelper->isAuxSurfaceModeOverrideRequired());
|
||||||
|
EXPECT_FALSE(releaseHelper->isRcsExposureDisabled());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ TEST_F(ReleaseHelper1271Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
|
||||||
EXPECT_FALSE(releaseHelper->isCachingOnCpuAvailable());
|
EXPECT_FALSE(releaseHelper->isCachingOnCpuAvailable());
|
||||||
EXPECT_TRUE(releaseHelper->isDirectSubmissionSupported());
|
EXPECT_TRUE(releaseHelper->isDirectSubmissionSupported());
|
||||||
EXPECT_TRUE(releaseHelper->isAuxSurfaceModeOverrideRequired());
|
EXPECT_TRUE(releaseHelper->isAuxSurfaceModeOverrideRequired());
|
||||||
|
EXPECT_FALSE(releaseHelper->isRcsExposureDisabled());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -205,21 +205,6 @@ PVCTEST_F(PvcProductHelper, givenProductHelperAndProgramExtendedPipeControlPrior
|
||||||
EXPECT_FALSE(isBasicWARequired);
|
EXPECT_FALSE(isBasicWARequired);
|
||||||
}
|
}
|
||||||
|
|
||||||
PVCTEST_F(PvcProductHelper, givenPvcWhenConfiguringThenDisableCccs) {
|
|
||||||
productHelper->configureHardwareCustom(&pInHwInfo, nullptr);
|
|
||||||
EXPECT_FALSE(pInHwInfo.featureTable.flags.ftrRcsNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
PVCTEST_F(PvcProductHelper, givenDebugVariableSetWhenConfiguringThenEnableCccs) {
|
|
||||||
DebugManagerStateRestore restore;
|
|
||||||
DebugManager.flags.NodeOrdinal.set(static_cast<int32_t>(aub_stream::EngineType::ENGINE_CCCS));
|
|
||||||
|
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
|
||||||
|
|
||||||
productHelper->configureHardwareCustom(&hwInfo, nullptr);
|
|
||||||
EXPECT_TRUE(hwInfo.featureTable.flags.ftrRcsNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
PVCTEST_F(PvcProductHelper, givenDeviceIdThenProperMaxThreadsForWorkgroupIsReturned) {
|
PVCTEST_F(PvcProductHelper, givenDeviceIdThenProperMaxThreadsForWorkgroupIsReturned) {
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
HardwareInfo hwInfo = *defaultHwInfo;
|
||||||
|
|
||||||
|
|
|
@ -40,14 +40,12 @@ DG2TEST_F(GfxCoreHelperTestDg2, givenRcsDisabledWhenGetGpgpuEnginesCalledThenDon
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
HardwareInfo hwInfo = *defaultHwInfo;
|
||||||
MockExecutionEnvironment mockExecutionEnvironment{};
|
MockExecutionEnvironment mockExecutionEnvironment{};
|
||||||
|
|
||||||
auto &productHelper = mockExecutionEnvironment.rootDeviceEnvironments[0]->getHelper<ProductHelper>();
|
|
||||||
hwInfo.featureTable.flags.ftrCCSNode = true;
|
hwInfo.featureTable.flags.ftrCCSNode = true;
|
||||||
hwInfo.featureTable.ftrBcsInfo = 1;
|
hwInfo.featureTable.ftrBcsInfo = 1;
|
||||||
hwInfo.featureTable.flags.ftrRcsNode = true;
|
hwInfo.featureTable.flags.ftrRcsNode = false;
|
||||||
hwInfo.capabilityTable.blitterOperationsSupported = true;
|
hwInfo.capabilityTable.blitterOperationsSupported = true;
|
||||||
hwInfo.capabilityTable.defaultEngineType = aub_stream::ENGINE_CCS;
|
hwInfo.capabilityTable.defaultEngineType = aub_stream::ENGINE_CCS;
|
||||||
hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled = 4;
|
hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled = 4;
|
||||||
productHelper.configureHardwareCustom(&hwInfo, nullptr);
|
|
||||||
|
|
||||||
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo, 0));
|
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo, 0));
|
||||||
auto &gfxCoreHelper = device->getGfxCoreHelper();
|
auto &gfxCoreHelper = device->getGfxCoreHelper();
|
||||||
|
|
Loading…
Reference in New Issue