mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
ocloc - preserve input spirv in output elf
Change-Id: I1205a5c655d643e0d6150f9dc7edaae30ad15225
This commit is contained in:

committed by
sys_ocldev

parent
4e3679b8ae
commit
91a36bf277
@ -28,6 +28,8 @@ class MockOfflineCompiler : public OfflineCompiler {
|
||||
using OfflineCompiler::inputFileLlvm;
|
||||
using OfflineCompiler::inputFileSpirV;
|
||||
using OfflineCompiler::internalOptions;
|
||||
using OfflineCompiler::irBinary;
|
||||
using OfflineCompiler::irBinarySize;
|
||||
using OfflineCompiler::isSpirV;
|
||||
using OfflineCompiler::options;
|
||||
using OfflineCompiler::outputDirectory;
|
||||
|
@ -903,6 +903,10 @@ TEST(OfflineCompilerTest, givenIntermediatedRepresentationInputWhenBuildSourceCo
|
||||
mockOfflineCompiler.inputFileLlvm = true;
|
||||
mockIgcOclDeviceCtx->requestedTranslationCtxs.clear();
|
||||
retVal = mockOfflineCompiler.buildSourceCode();
|
||||
|
||||
ASSERT_EQ(mockOfflineCompiler.irBinarySize, mockOfflineCompiler.sourceCode.size());
|
||||
EXPECT_EQ(0, memcmp(mockOfflineCompiler.irBinary, mockOfflineCompiler.sourceCode.data(), mockOfflineCompiler.sourceCode.size()));
|
||||
EXPECT_FALSE(mockOfflineCompiler.isSpirV);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
ASSERT_EQ(1U, mockIgcOclDeviceCtx->requestedTranslationCtxs.size());
|
||||
expectedTranslation = {IGC::CodeType::llvmBc, IGC::CodeType::oclGenBin};
|
||||
|
Reference in New Issue
Block a user