Simplify internal options initialization

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-6075
This commit is contained in:
Kamil Kopryk
2022-01-13 10:14:33 +00:00
committed by Compute-Runtime-Automation
parent 4fc365acca
commit 0a4554ab23
9 changed files with 53 additions and 62 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -1491,8 +1491,7 @@ TEST_F(BuiltInTests, givenCreateProgramFromSourceWhenDeviceSupportSharedSystemAl
EXPECT_NE(0u, bc.resource.size());
auto program = std::unique_ptr<Program>(BuiltinDispatchInfoBuilder::createProgramFromCode(bc, toClDeviceVector(*pClDevice)));
EXPECT_NE(nullptr, program.get());
std::string builtinInternalOptions;
program->initInternalOptions(builtinInternalOptions);
auto builtinInternalOptions = program->getInternalOptions();
EXPECT_THAT(builtinInternalOptions, testing::HasSubstr(std::string(CompilerOptions::greaterThan4gbBuffersRequired)));
}
@ -1537,9 +1536,7 @@ TEST_F(BuiltInTests, GivenForce32bitWhenCreatingProgramThenCorrectKernelIsCreate
ASSERT_NE(0u, bc.resource.size());
auto program = std::unique_ptr<Program>(BuiltinDispatchInfoBuilder::createProgramFromCode(bc, toClDeviceVector(*pClDevice)));
ASSERT_NE(nullptr, program.get());
std::string builtinInternalOptions;
program->initInternalOptions(builtinInternalOptions);
auto builtinInternalOptions = program->getInternalOptions();
auto it = builtinInternalOptions.find(NEO::CompilerOptions::arch32bit.data());
EXPECT_EQ(std::string::npos, it);