mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 10:17:01 +08:00
Use isMidThreadPreemptionSupported helper in compiler interface
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
5330c9cfd9
commit
9293c9b676
@@ -11,12 +11,14 @@
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/test_files.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/common/mocks/mock_cif.h"
|
||||
#include "shared/test/common/mocks/mock_compiler_interface.h"
|
||||
#include "shared/test/common/mocks/mock_compilers.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
#include "opencl/test/unit_test/global_environment.h"
|
||||
#include "test.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "hw_cmds.h"
|
||||
@@ -1161,6 +1163,16 @@ TEST_F(CompilerInterfaceTest, GivenRequestForNewFclTranslationCtxWhenInterfaceVe
|
||||
setFclDebugVars(prevDebugVars);
|
||||
}
|
||||
|
||||
HWTEST_F(CompilerInterfaceTest, whenIsMidThreadPreemptionSupportedIsCalledThenCorrectResultIsReturned) {
|
||||
auto device = this->pDevice;
|
||||
auto &hwInfo = *device->getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||
UnitTestHelper<FamilyType>::setExtraMidThreadPreemptionFlag(hwInfo, false);
|
||||
EXPECT_FALSE(pCompilerInterface->isMidThreadPreemptionSupported(hwInfo));
|
||||
|
||||
UnitTestHelper<FamilyType>::setExtraMidThreadPreemptionFlag(hwInfo, true);
|
||||
EXPECT_TRUE(pCompilerInterface->isMidThreadPreemptionSupported(hwInfo));
|
||||
}
|
||||
|
||||
struct SpecConstantsTranslationCtxMock {
|
||||
bool returnFalse = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user