| 1 |
/* |
| 2 |
* Copyright (C) 2021-2023 Intel Corporation |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: MIT |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
#include "shared/source/compiler_interface/compiler_options.h" |
| 9 |
#include "shared/source/gen12lp/hw_cmds_rkl.h" |
| 10 |
#include "shared/source/gen12lp/hw_info_rkl.h" |
| 11 |
#include "shared/test/common/test_macros/header/per_product_test_definitions.h" |
| 12 |
#include "shared/test/common/test_macros/test.h" |
| 13 |
|
| 14 |
#include "opencl/test/unit_test/offline_compiler/mock/mock_offline_compiler.h" |
| 15 |
#include "opencl/test/unit_test/offline_compiler/offline_compiler_tests.h" |
| 16 |
|
| 17 |
using namespace NEO; |
| 18 |
|
| 19 |
using MockOfflineCompilerRklTests = ::testing::Test; |
| 20 |
RKLTEST_F(MockOfflineCompilerRklTests, givenRklWhenAppendExtraInternalOptionsThenForceEmuInt32DivRemSPIsApplied) { |
| 21 |
|
| 22 |
MockOfflineCompiler mockOfflineCompiler; |
| 23 |
mockOfflineCompiler.deviceName = "rkl"; |
| 24 |
mockOfflineCompiler.initHardwareInfo(mockOfflineCompiler.deviceName); |
| 25 |
std::string internalOptions = mockOfflineCompiler.internalOptions; |
| 26 |
mockOfflineCompiler.appendExtraInternalOptions(internalOptions); |
| 27 |
size_t found = internalOptions.find(NEO::CompilerOptions::forceEmuInt32DivRemSP.data()); |
| 28 |
EXPECT_NE(std::string::npos, found); |
| 29 |
} |