Initialize HwInfo in tests

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2021-06-30 08:56:08 +00:00
committed by Compute-Runtime-Automation
parent 363a92f456
commit a49b45a679
33 changed files with 80 additions and 67 deletions

View File

@@ -140,7 +140,7 @@ class HwHelper {
virtual bool isDirectSubmissionSupported() const = 0;
virtual aub_stream::MMIOList getExtraMmioList(const HardwareInfo &hwInfo, const GmmHelper &gmmHelper) const = 0;
virtual uint32_t getDefaultRevisionId(const HardwareInfo &hwInfo) const = 0;
virtual uint32_t getNumCacheRegions(const HardwareInfo &hwInfo) const = 0;
virtual uint32_t getNumCacheRegions() const = 0;
virtual bool isSubDeviceEngineSupported(const HardwareInfo &hwInfo, const DeviceBitfield &deviceBitfield, aub_stream::EngineType engineType) const = 0;
virtual uint32_t getPlanarYuvMaxHeight() const = 0;
virtual bool isBlitterForImagesSupported(const HardwareInfo &hwInfo) const = 0;
@@ -363,7 +363,7 @@ class HwHelperHw : public HwHelper {
uint32_t getDefaultRevisionId(const HardwareInfo &hwInfo) const override;
uint32_t getNumCacheRegions(const HardwareInfo &hwInfo) const override;
uint32_t getNumCacheRegions() const override;
bool isSubDeviceEngineSupported(const HardwareInfo &hwInfo, const DeviceBitfield &deviceBitfield, aub_stream::EngineType engineType) const override;

View File

@@ -633,7 +633,7 @@ uint32_t HwHelperHw<GfxFamily>::getDefaultRevisionId(const HardwareInfo &hwInfo)
}
template <typename GfxFamily>
uint32_t HwHelperHw<GfxFamily>::getNumCacheRegions(const HardwareInfo &hwInfo) const {
uint32_t HwHelperHw<GfxFamily>::getNumCacheRegions() const {
return 0;
}

View File

@@ -6,10 +6,10 @@
*/
#include "shared/source/helpers/hw_helper.h"
#include "shared/test/common/helpers/default_hw_info.h"
#include "opencl/source/helpers/hardware_commands_helper.h"
#include "test.h"
using namespace NEO;
using AdlsHwInfo = ::testing::Test;
@@ -17,7 +17,7 @@ using AdlsHwInfo = ::testing::Test;
ADLSTEST_F(AdlsHwInfo, givenBoolWhenCallAdlsHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) {
static bool boolValue[]{
true, false};
HardwareInfo hwInfo;
HardwareInfo hwInfo = *defaultHwInfo;
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
FeatureTable &featureTable = hwInfo.featureTable;
WorkaroundTable &workaroundTable = hwInfo.workaroundTable;

View File

@@ -6,6 +6,7 @@
*/
#include "shared/source/helpers/hw_helper.h"
#include "shared/test/common/helpers/default_hw_info.h"
#include "opencl/source/helpers/hardware_commands_helper.h"
#include "test.h"
@@ -19,7 +20,7 @@ RKLTEST_F(RklHwInfo, givenBoolWhenCallRklHardwareInfoSetupThenFeatureTableAndWor
0x100020010};
bool boolValue[]{
true, false};
HardwareInfo hwInfo;
HardwareInfo hwInfo = *defaultHwInfo;
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
FeatureTable &featureTable = hwInfo.featureTable;
WorkaroundTable &workaroundTable = hwInfo.workaroundTable;

View File

@@ -142,7 +142,7 @@ TEST(CompilerCacheHashTests, WhenHashingThenResultIsDeterministic) {
TEST(CompilerCacheHashTests, GivenCompilingOptionsWhenGettingCacheThenCorrectCacheIsReturned) {
static const size_t bufSize = 64;
HardwareInfo hwInfo;
HardwareInfo hwInfo = *defaultHwInfo;
std::set<std::string> hashes;