Files
compute-runtime/unit_tests/gen10/linux/device_factory_tests_gen10.cpp
Liwei Wang ca4b47f7f4 Add support of GPU preemption (v1.00).
https://github.com/intel/compute-runtime/pull/119

Change-Id: I3134d62b66751c8621b80002373a7a9b198e044e
2019-03-22 08:49:11 +01:00

38 lines
1.1 KiB
C++

/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "unit_tests/os_interface/linux/device_factory_tests.h"
typedef DeviceFactoryLinuxTest DeviceFactoryLinuxTestCnl;
GEN10TEST_F(DeviceFactoryLinuxTestCnl, queryWhitelistedPreemptionRegister) {
pDrm->StoredPreemptionSupport =
I915_SCHEDULER_CAP_ENABLED |
I915_SCHEDULER_CAP_PRIORITY |
I915_SCHEDULER_CAP_PREEMPTION;
HardwareInfo *hwInfo = nullptr;
size_t numDevices = 0;
bool success = DeviceFactory::getDevices(&hwInfo, numDevices, executionEnvironment);
EXPECT_TRUE(success);
EXPECT_TRUE(hwInfo->capabilityTable.whitelistedRegisters.csChicken1_0x2580);
DeviceFactory::releaseDevices();
}
GEN10TEST_F(DeviceFactoryLinuxTestCnl, queryNotWhitelistedPreemptionRegister) {
pDrm->StoredPreemptionSupport = 0;
HardwareInfo *hwInfo = nullptr;
size_t numDevices = 0;
bool success = DeviceFactory::getDevices(&hwInfo, numDevices, executionEnvironment);
EXPECT_TRUE(success);
EXPECT_FALSE(hwInfo->capabilityTable.whitelistedRegisters.csChicken1_0x2580);
DeviceFactory::releaseDevices();
}