Change builtin kernels compilation process

.bin and .gen files for builtin kernels are generated per revision now

Resolves: NEO-5821

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2021-05-20 10:07:53 +00:00
committed by Compute-Runtime-Automation
parent 0f32231fc8
commit ab52c70233
3 changed files with 42 additions and 11 deletions

View File

@ -1595,4 +1595,27 @@ TEST(OclocCompile, givenPackedDeviceBinaryFormatWhenGeneratingElfBinaryThenItIsR
ASSERT_EQ(true, ocloc.generateElfBinary());
EXPECT_EQ(0, memcmp(zebin.storage.data(), ocloc.elfBinary.data(), zebin.storage.size()));
}
TEST(OclocCompile, givenSpirvInputThenDontGenerateSpirvFile) {
MockOfflineCompiler ocloc;
std::vector<std::string> argv = {
"ocloc",
"-q",
"-file",
"test_files/binary_with_zeroes",
"-out_dir",
"offline_compiler_test",
"-device",
gEnvironment->devicePrefix.c_str(),
"-spirv_input"};
int retVal = ocloc.initialize(argv.size(), argv);
ASSERT_EQ(0, retVal);
retVal = ocloc.build();
EXPECT_EQ(0, retVal);
EXPECT_TRUE(compilerOutputExists("offline_compiler_test/binary_with_zeroes", "gen"));
EXPECT_TRUE(compilerOutputExists("offline_compiler_test/binary_with_zeroes", "bin"));
EXPECT_FALSE(compilerOutputExists("offline_compiler_test/binary_with_zeroes", "spv"));
}
} // namespace NEO