mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Ocloc: setup hw info values from default config
Related-To: NEO-5287 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
ba51cf5380
commit
85ce7a5866
@ -1260,6 +1260,32 @@ TEST(OfflineCompilerTest, givenNoRevisionIdWhenCompilerIsInitializedThenHwInfoHa
|
||||
EXPECT_EQ(mockOfflineCompiler->hwInfo.platform.usRevId, revId);
|
||||
}
|
||||
|
||||
TEST(OfflineCompilerTest, whenDeviceIsSpecifiedThenDefaultConfigFromTheDeviceIsUsed) {
|
||||
auto mockOfflineCompiler = std::unique_ptr<MockOfflineCompiler>(new MockOfflineCompiler());
|
||||
ASSERT_NE(nullptr, mockOfflineCompiler);
|
||||
|
||||
std::vector<std::string> argv = {
|
||||
"ocloc",
|
||||
"-q",
|
||||
"-file",
|
||||
"test_files/copybuffer.cl",
|
||||
"-device",
|
||||
gEnvironment->devicePrefix.c_str()};
|
||||
|
||||
int retVal = mockOfflineCompiler->initialize(argv.size(), argv);
|
||||
EXPECT_EQ(SUCCESS, retVal);
|
||||
|
||||
auto actualHwInfo = mockOfflineCompiler->hwInfo;
|
||||
auto expectedHwInfo = actualHwInfo;
|
||||
auto hwInfoConfig = defaultHardwareInfoConfigTable[expectedHwInfo.platform.eProductFamily];
|
||||
|
||||
setHwInfoValuesFromConfig(hwInfoConfig, expectedHwInfo);
|
||||
|
||||
EXPECT_EQ(actualHwInfo.gtSystemInfo.SliceCount, expectedHwInfo.gtSystemInfo.SliceCount);
|
||||
EXPECT_EQ(actualHwInfo.gtSystemInfo.SubSliceCount, expectedHwInfo.gtSystemInfo.SubSliceCount);
|
||||
EXPECT_EQ(actualHwInfo.gtSystemInfo.EUCount, expectedHwInfo.gtSystemInfo.EUCount);
|
||||
}
|
||||
|
||||
struct WorkaroundApplicableForDevice {
|
||||
const char *deviceName;
|
||||
bool applicable;
|
||||
|
Reference in New Issue
Block a user