Files
compute-runtime/unit_tests/gen9/windows/os_interface_tests_gen9.cpp
Stefanowski, Adam 341fcfc091 [1/n] Move Hardware Info to Execution Environment
- remove gmm_environment_fixture
- remove hwInfo parameter from ExecutionEnvironment methods

Change-Id: Ieb0f9b5b89191fbbaf7676685c77644d42d69c26
Signed-off-by: Adam Stefanowski <adam.stefanowski@intel.com>
2019-03-12 08:39:26 +01:00

33 lines
1.0 KiB
C++

/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/execution_environment/execution_environment.h"
#include "runtime/platform/platform.h"
#include "test.h"
#include "unit_tests/os_interface/windows/os_interface_win_tests.h"
typedef OsInterfaceTest OsInterfaceTestSkl;
GEN9TEST_F(OsInterfaceTestSkl, askKmdIfPreemptionRegisterWhitelisted) {
HardwareInfo *hwInfo = nullptr;
size_t numDevices = 0;
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
bool success = DeviceFactory::getDevices(&hwInfo, numDevices, *executionEnvironment);
EXPECT_TRUE(success);
for (size_t i = 0u; i < numDevices; i++) {
if (hwInfo[i].pWaTable->waEnablePreemptionGranularityControlByUMD) {
EXPECT_TRUE(hwInfo[i].capabilityTable.whitelistedRegisters.csChicken1_0x2580);
} else {
EXPECT_FALSE(hwInfo[i].capabilityTable.whitelistedRegisters.csChicken1_0x2580);
}
}
DeviceFactory::releaseDevices();
}