fix: use .spv for intermediate representation
Related-To: NEO-7785 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
parent
9630f22560
commit
6c9bca8cdc
|
@ -42,7 +42,7 @@ components:
|
||||||
dest_dir: kernels_bin
|
dest_dir: kernels_bin
|
||||||
type: git
|
type: git
|
||||||
branch: kernels_bin
|
branch: kernels_bin
|
||||||
revision: 2479-1841
|
revision: 2479-1842
|
||||||
kmdaf:
|
kmdaf:
|
||||||
branch: kmdaf
|
branch: kmdaf
|
||||||
dest_dir: kmdaf
|
dest_dir: kmdaf
|
||||||
|
|
|
@ -1479,7 +1479,7 @@ TEST_F(VmeBuiltInTests, WhenGettingBuiltinAsStringThenCorrectStringIsReturned) {
|
||||||
TEST_F(BuiltInTests, GivenEncodeTypeWhenGettingExtensionThenCorrectStringIsReturned) {
|
TEST_F(BuiltInTests, GivenEncodeTypeWhenGettingExtensionThenCorrectStringIsReturned) {
|
||||||
EXPECT_EQ(0, strcmp("", BuiltinCode::getExtension(BuiltinCode::ECodeType::any)));
|
EXPECT_EQ(0, strcmp("", BuiltinCode::getExtension(BuiltinCode::ECodeType::any)));
|
||||||
EXPECT_EQ(0, strcmp(".bin", BuiltinCode::getExtension(BuiltinCode::ECodeType::binary)));
|
EXPECT_EQ(0, strcmp(".bin", BuiltinCode::getExtension(BuiltinCode::ECodeType::binary)));
|
||||||
EXPECT_EQ(0, strcmp(".bc", BuiltinCode::getExtension(BuiltinCode::ECodeType::intermediate)));
|
EXPECT_EQ(0, strcmp(".spv", BuiltinCode::getExtension(BuiltinCode::ECodeType::intermediate)));
|
||||||
EXPECT_EQ(0, strcmp(".cl", BuiltinCode::getExtension(BuiltinCode::ECodeType::source)));
|
EXPECT_EQ(0, strcmp(".cl", BuiltinCode::getExtension(BuiltinCode::ECodeType::source)));
|
||||||
EXPECT_EQ(0, strcmp("", BuiltinCode::getExtension(BuiltinCode::ECodeType::count)));
|
EXPECT_EQ(0, strcmp("", BuiltinCode::getExtension(BuiltinCode::ECodeType::count)));
|
||||||
EXPECT_EQ(0, strcmp("", BuiltinCode::getExtension(BuiltinCode::ECodeType::invalid)));
|
EXPECT_EQ(0, strcmp("", BuiltinCode::getExtension(BuiltinCode::ECodeType::invalid)));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2021-2023 Intel Corporation
|
* Copyright (C) 2021-2024 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
|
@ -79,7 +79,7 @@ TEST_F(ClCompilerInterfaceTest, WhenCompileIsInvokedThenFclReceivesListOfExtensi
|
||||||
std::string receivedInternalOptions;
|
std::string receivedInternalOptions;
|
||||||
|
|
||||||
MockCompilerDebugVars fclDebugVars;
|
MockCompilerDebugVars fclDebugVars;
|
||||||
retrieveBinaryKernelFilename(fclDebugVars.fileName, "CopyBuffer_simd16_", ".bc");
|
retrieveBinaryKernelFilename(fclDebugVars.fileName, "CopyBuffer_simd16_", ".spv");
|
||||||
fclDebugVars.receivedInternalOptionsOutput = &receivedInternalOptions;
|
fclDebugVars.receivedInternalOptionsOutput = &receivedInternalOptions;
|
||||||
gEnvironment->fclPushDebugVars(fclDebugVars);
|
gEnvironment->fclPushDebugVars(fclDebugVars);
|
||||||
TranslationOutput translationOutput = {};
|
TranslationOutput translationOutput = {};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2023 Intel Corporation
|
* Copyright (C) 2018-2024 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
|
@ -30,7 +30,7 @@ void BuiltInFixture::setUp(Device *pDevice) {
|
||||||
} else {
|
} else {
|
||||||
builtInsFileName = KernelBinaryHelper::BUILT_INS;
|
builtInsFileName = KernelBinaryHelper::BUILT_INS;
|
||||||
}
|
}
|
||||||
retrieveBinaryKernelFilename(fclDebugVars.fileName, builtInsFileName + "_", ".bc");
|
retrieveBinaryKernelFilename(fclDebugVars.fileName, builtInsFileName + "_", ".spv");
|
||||||
retrieveBinaryKernelFilename(igcDebugVars.fileName, builtInsFileName + "_", ".bin");
|
retrieveBinaryKernelFilename(igcDebugVars.fileName, builtInsFileName + "_", ".bin");
|
||||||
|
|
||||||
gEnvironment->fclPushDebugVars(fclDebugVars);
|
gEnvironment->fclPushDebugVars(fclDebugVars);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2022 Intel Corporation
|
* Copyright (C) 2018-2024 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
|
@ -22,7 +22,7 @@ inline void overwriteBuiltInBinaryName(
|
||||||
MockCompilerDebugVars fclDebugVars;
|
MockCompilerDebugVars fclDebugVars;
|
||||||
MockCompilerDebugVars igcDebugVars;
|
MockCompilerDebugVars igcDebugVars;
|
||||||
|
|
||||||
retrieveBinaryKernelFilename(fclDebugVars.fileName, filename + "_", ".bc");
|
retrieveBinaryKernelFilename(fclDebugVars.fileName, filename + "_", ".spv");
|
||||||
fclDebugVars.appendOptionsToFileName = appendOptionsToFileName;
|
fclDebugVars.appendOptionsToFileName = appendOptionsToFileName;
|
||||||
|
|
||||||
retrieveBinaryKernelFilename(igcDebugVars.fileName, filename + "_", ".bin");
|
retrieveBinaryKernelFilename(igcDebugVars.fileName, filename + "_", ".bin");
|
||||||
|
|
|
@ -177,7 +177,7 @@ if(WIN32)
|
||||||
TARGET run_ocloc_tests
|
TARGET run_ocloc_tests
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND echo deleting offline compiler files and directories...
|
COMMAND echo deleting offline compiler files and directories...
|
||||||
COMMAND ${CMAKE_COMMAND} -E remove ${TargetDir}/${CLOC_LIB_DEFAULT_DEVICE}/copybuffer_${CLOC_LIB_DEFAULT_DEVICE}.bc
|
COMMAND ${CMAKE_COMMAND} -E remove ${TargetDir}/${CLOC_LIB_DEFAULT_DEVICE}/copybuffer_${CLOC_LIB_DEFAULT_DEVICE}.spv
|
||||||
COMMAND ${CMAKE_COMMAND} -E remove ${TargetDir}/${CLOC_LIB_DEFAULT_DEVICE}/copybuffer_${CLOC_LIB_DEFAULT_DEVICE}.gen
|
COMMAND ${CMAKE_COMMAND} -E remove ${TargetDir}/${CLOC_LIB_DEFAULT_DEVICE}/copybuffer_${CLOC_LIB_DEFAULT_DEVICE}.gen
|
||||||
COMMAND ${CMAKE_COMMAND} -E remove ${TargetDir}/${CLOC_LIB_DEFAULT_DEVICE}/copybuffer_${CLOC_LIB_DEFAULT_DEVICE}.bin
|
COMMAND ${CMAKE_COMMAND} -E remove ${TargetDir}/${CLOC_LIB_DEFAULT_DEVICE}/copybuffer_${CLOC_LIB_DEFAULT_DEVICE}.bin
|
||||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${TargetDir}/${CLOC_LIB_DEFAULT_DEVICE}/offline_compiler_test
|
COMMAND ${CMAKE_COMMAND} -E remove_directory ${TargetDir}/${CLOC_LIB_DEFAULT_DEVICE}/offline_compiler_test
|
||||||
|
@ -189,7 +189,7 @@ else()
|
||||||
TARGET run_ocloc_tests
|
TARGET run_ocloc_tests
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND echo deleting offline compiler files and directories...
|
COMMAND echo deleting offline compiler files and directories...
|
||||||
COMMAND ${CMAKE_COMMAND} -E remove ${TargetDir}/${CLOC_LIB_DEFAULT_DEVICE}/*.bc
|
COMMAND ${CMAKE_COMMAND} -E remove ${TargetDir}/${CLOC_LIB_DEFAULT_DEVICE}/*.spv
|
||||||
COMMAND ${CMAKE_COMMAND} -E remove ${TargetDir}/${CLOC_LIB_DEFAULT_DEVICE}/*.gen
|
COMMAND ${CMAKE_COMMAND} -E remove ${TargetDir}/${CLOC_LIB_DEFAULT_DEVICE}/*.gen
|
||||||
COMMAND ${CMAKE_COMMAND} -E remove ${TargetDir}/${CLOC_LIB_DEFAULT_DEVICE}/*.ll
|
COMMAND ${CMAKE_COMMAND} -E remove ${TargetDir}/${CLOC_LIB_DEFAULT_DEVICE}/*.ll
|
||||||
COMMAND ${CMAKE_COMMAND} -E remove ${TargetDir}/${CLOC_LIB_DEFAULT_DEVICE}/*.bin
|
COMMAND ${CMAKE_COMMAND} -E remove ${TargetDir}/${CLOC_LIB_DEFAULT_DEVICE}/*.bin
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2023 Intel Corporation
|
* Copyright (C) 2018-2024 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
|
@ -22,7 +22,7 @@ class Environment : public ::testing::Environment {
|
||||||
const std::string filename) {
|
const std::string filename) {
|
||||||
|
|
||||||
retrieveBinaryKernelFilename(igcDebugVars.fileName, filename + "_", ".bin");
|
retrieveBinaryKernelFilename(igcDebugVars.fileName, filename + "_", ".bin");
|
||||||
retrieveBinaryKernelFilename(fclDebugVars.fileName, filename + "_", ".bc");
|
retrieveBinaryKernelFilename(fclDebugVars.fileName, filename + "_", ".spv");
|
||||||
|
|
||||||
NEO::setIgcDebugVars(igcDebugVars);
|
NEO::setIgcDebugVars(igcDebugVars);
|
||||||
NEO::setFclDebugVars(fclDebugVars);
|
NEO::setFclDebugVars(fclDebugVars);
|
||||||
|
|
|
@ -3181,6 +3181,7 @@ TEST(OfflineCompilerTest, givenUseLlvmBcFlagWhenBuildingIrBinaryThenProperTransl
|
||||||
auto mockFclOclDeviceCtx = new NEO::MockFclOclDeviceCtx();
|
auto mockFclOclDeviceCtx = new NEO::MockFclOclDeviceCtx();
|
||||||
mockOfflineCompiler.mockFclFacade->fclDeviceCtx = CIF::RAII::Pack<IGC::FclOclDeviceCtxTagOCL>(mockFclOclDeviceCtx);
|
mockOfflineCompiler.mockFclFacade->fclDeviceCtx = CIF::RAII::Pack<IGC::FclOclDeviceCtxTagOCL>(mockFclOclDeviceCtx);
|
||||||
|
|
||||||
|
mockOfflineCompiler.inputFileLlvm = true;
|
||||||
mockOfflineCompiler.useLlvmBc = true;
|
mockOfflineCompiler.useLlvmBc = true;
|
||||||
const auto buildResult = mockOfflineCompiler.buildIrBinary();
|
const auto buildResult = mockOfflineCompiler.buildIrBinary();
|
||||||
EXPECT_EQ(CL_SUCCESS, buildResult);
|
EXPECT_EQ(CL_SUCCESS, buildResult);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2020-2023 Intel Corporation
|
* Copyright (C) 2020-2024 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
|
@ -75,7 +75,7 @@ std::string parseToCharArray(std::unique_ptr<uint8_t[]> &binary, size_t size, st
|
||||||
out << std::endl;
|
out << std::endl;
|
||||||
out << " \"";
|
out << " \"";
|
||||||
deviceIp != "" ? out << deviceIp << "_" << builtinName : out << builtinName;
|
deviceIp != "" ? out << deviceIp << "_" << builtinName : out << builtinName;
|
||||||
isSpirV ? out << ".builtin_kernel.bc\"," : out << ".builtin_kernel.bin\",";
|
isSpirV ? out << ".builtin_kernel.spv\"," : out << ".builtin_kernel.bin\",";
|
||||||
out << std::endl;
|
out << std::endl;
|
||||||
out << " (const char *)" << builtinName;
|
out << " (const char *)" << builtinName;
|
||||||
if (deviceIpPresent) {
|
if (deviceIpPresent) {
|
||||||
|
|
|
@ -454,6 +454,11 @@ struct OfflineCompiler::buildInfo {
|
||||||
|
|
||||||
int OfflineCompiler::buildIrBinary() {
|
int OfflineCompiler::buildIrBinary() {
|
||||||
int retVal = OCLOC_SUCCESS;
|
int retVal = OCLOC_SUCCESS;
|
||||||
|
pBuildInfo->intermediateRepresentation = preferredIntermediateRepresentation;
|
||||||
|
if (inputFileLlvm) {
|
||||||
|
pBuildInfo->intermediateRepresentation = useLlvmText ? IGC::CodeType::llvmLl : IGC::CodeType::llvmBc;
|
||||||
|
}
|
||||||
|
isSpirV = pBuildInfo->intermediateRepresentation == IGC::CodeType::spirV;
|
||||||
|
|
||||||
if (allowCaching) {
|
if (allowCaching) {
|
||||||
const std::string igcRevision = igcFacade->getIgcRevision();
|
const std::string igcRevision = igcFacade->getIgcRevision();
|
||||||
|
@ -470,8 +475,6 @@ int OfflineCompiler::buildIrBinary() {
|
||||||
}
|
}
|
||||||
|
|
||||||
UNRECOVERABLE_IF(!fclFacade->isInitialized());
|
UNRECOVERABLE_IF(!fclFacade->isInitialized());
|
||||||
pBuildInfo->intermediateRepresentation = useLlvmText ? IGC::CodeType::llvmLl
|
|
||||||
: (useLlvmBc ? IGC::CodeType::llvmBc : preferredIntermediateRepresentation);
|
|
||||||
|
|
||||||
// sourceCode.size() returns the number of characters without null terminated char
|
// sourceCode.size() returns the number of characters without null terminated char
|
||||||
CIF::RAII::UPtr_t<CIF::Builtins::BufferLatest> fclSrc = nullptr;
|
CIF::RAII::UPtr_t<CIF::Builtins::BufferLatest> fclSrc = nullptr;
|
||||||
|
@ -533,7 +536,6 @@ int OfflineCompiler::buildIrBinary() {
|
||||||
}
|
}
|
||||||
|
|
||||||
storeBinary(irBinary, irBinarySize, pBuildInfo->fclOutput->GetOutput()->GetMemory<char>(), pBuildInfo->fclOutput->GetOutput()->GetSizeRaw());
|
storeBinary(irBinary, irBinarySize, pBuildInfo->fclOutput->GetOutput()->GetMemory<char>(), pBuildInfo->fclOutput->GetOutput()->GetSizeRaw());
|
||||||
isSpirV = pBuildInfo->intermediateRepresentation == IGC::CodeType::spirV;
|
|
||||||
|
|
||||||
updateBuildLog(pBuildInfo->fclOutput->GetBuildLog()->GetMemory<char>(), pBuildInfo->fclOutput->GetBuildLog()->GetSizeRaw());
|
updateBuildLog(pBuildInfo->fclOutput->GetBuildLog()->GetMemory<char>(), pBuildInfo->fclOutput->GetBuildLog()->GetSizeRaw());
|
||||||
|
|
||||||
|
|
|
@ -193,7 +193,7 @@ All supported acronyms: %s.
|
||||||
bool inputFileSpirV = false;
|
bool inputFileSpirV = false;
|
||||||
bool outputNoSuffix = false;
|
bool outputNoSuffix = false;
|
||||||
bool forceStatelessToStatefulOptimization = false;
|
bool forceStatelessToStatefulOptimization = false;
|
||||||
bool isSpirV = false;
|
bool isSpirV = true;
|
||||||
bool showHelp = false;
|
bool showHelp = false;
|
||||||
bool excludeIr = false;
|
bool excludeIr = false;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2023 Intel Corporation
|
* Copyright (C) 2018-2024 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
|
@ -53,7 +53,7 @@ struct BuiltinCode {
|
||||||
case BuiltinCode::ECodeType::binary:
|
case BuiltinCode::ECodeType::binary:
|
||||||
return ".bin";
|
return ".bin";
|
||||||
case BuiltinCode::ECodeType::intermediate:
|
case BuiltinCode::ECodeType::intermediate:
|
||||||
return ".bc";
|
return ".spv";
|
||||||
case BuiltinCode::ECodeType::source:
|
case BuiltinCode::ECodeType::source:
|
||||||
return ".cl";
|
return ".cl";
|
||||||
}
|
}
|
||||||
|
|
|
@ -402,7 +402,7 @@ int main(int argc, char **argv) {
|
||||||
} else {
|
} else {
|
||||||
builtInsFileName = KernelBinaryHelper::BUILT_INS;
|
builtInsFileName = KernelBinaryHelper::BUILT_INS;
|
||||||
}
|
}
|
||||||
retrieveBinaryKernelFilename(fclDebugVars.fileName, builtInsFileName + "_", ".bc");
|
retrieveBinaryKernelFilename(fclDebugVars.fileName, builtInsFileName + "_", ".spv");
|
||||||
retrieveBinaryKernelFilename(igcDebugVars.fileName, builtInsFileName + "_", ".bin");
|
retrieveBinaryKernelFilename(igcDebugVars.fileName, builtInsFileName + "_", ".bin");
|
||||||
|
|
||||||
gEnvironment->setMockFileNames(fclDebugVars.fileName, igcDebugVars.fileName);
|
gEnvironment->setMockFileNames(fclDebugVars.fileName, igcDebugVars.fileName);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2023 Intel Corporation
|
* Copyright (C) 2018-2024 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@ KernelBinaryHelper::KernelBinaryHelper(const std::string &name, bool appendOptio
|
||||||
MockCompilerDebugVars fclDebugVars;
|
MockCompilerDebugVars fclDebugVars;
|
||||||
MockCompilerDebugVars igcDebugVars;
|
MockCompilerDebugVars igcDebugVars;
|
||||||
|
|
||||||
retrieveBinaryKernelFilename(fclDebugVars.fileName, name + "_", ".bc");
|
retrieveBinaryKernelFilename(fclDebugVars.fileName, name + "_", ".spv");
|
||||||
retrieveBinaryKernelFilename(igcDebugVars.fileName, name + "_", ".bin");
|
retrieveBinaryKernelFilename(igcDebugVars.fileName, name + "_", ".bin");
|
||||||
|
|
||||||
appendBinaryNameSuffix(fclDebugVars.fileNameSuffix);
|
appendBinaryNameSuffix(fclDebugVars.fileNameSuffix);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2022 Intel Corporation
|
* Copyright (C) 2018-2024 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
|
@ -32,10 +32,6 @@ void retrieveBinaryKernelFilename(std::string &outputFilename, const std::string
|
||||||
}
|
}
|
||||||
outputFilename.append(binaryNameSuffix);
|
outputFilename.append(binaryNameSuffix);
|
||||||
outputFilename.append(extension);
|
outputFilename.append(extension);
|
||||||
|
|
||||||
if (!fileExists(outputFilename) && (extension == ".bc")) {
|
|
||||||
retrieveBinaryKernelFilename(outputFilename, kernelName, ".spv", options);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void retrieveBinaryKernelFilenameApiSpecific(std::string &outputFilename, const std::string &kernelName, const std::string &extension, const std::string &options) {
|
void retrieveBinaryKernelFilenameApiSpecific(std::string &outputFilename, const std::string &kernelName, const std::string &extension, const std::string &options) {
|
||||||
|
@ -48,10 +44,6 @@ void retrieveBinaryKernelFilenameApiSpecific(std::string &outputFilename, const
|
||||||
outputFilename.append(binaryNameSuffix);
|
outputFilename.append(binaryNameSuffix);
|
||||||
outputFilename.append(extension);
|
outputFilename.append(extension);
|
||||||
outputFilename.append(options);
|
outputFilename.append(options);
|
||||||
|
|
||||||
if (!fileExists(outputFilename) && (extension == ".bc")) {
|
|
||||||
retrieveBinaryKernelFilename(outputFilename, kernelName, ".spv", options);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void appendBinaryNameSuffix(std::string &outputFileNameSuffix) {
|
void appendBinaryNameSuffix(std::string &outputFileNameSuffix) {
|
||||||
|
|
|
@ -115,7 +115,7 @@ HWTEST_F(BuiltInSharedTest, GivenRequestedTypeIntermediateWhenGettingResourceNam
|
||||||
|
|
||||||
auto resourceNames = getBuiltinResourceNames(EBuiltInOps::copyBufferToBuffer, BuiltinCode::ECodeType::intermediate, *pDevice);
|
auto resourceNames = getBuiltinResourceNames(EBuiltInOps::copyBufferToBuffer, BuiltinCode::ECodeType::intermediate, *pDevice);
|
||||||
|
|
||||||
std::string expectedResourceNameGeneric = "copy_buffer_to_buffer.builtin_kernel.bc";
|
std::string expectedResourceNameGeneric = "copy_buffer_to_buffer.builtin_kernel.spv";
|
||||||
std::string expectedResourceNameForRelease = deviceIpString + "_" + expectedResourceNameGeneric;
|
std::string expectedResourceNameForRelease = deviceIpString + "_" + expectedResourceNameGeneric;
|
||||||
|
|
||||||
EXPECT_EQ(2u, resourceNames.size());
|
EXPECT_EQ(2u, resourceNames.size());
|
||||||
|
|
|
@ -224,7 +224,7 @@ TEST_F(CompilerInterfaceTest, GivenOptionsWhenCompilingToIsaThenSuccessIsReturne
|
||||||
|
|
||||||
TEST_F(CompilerInterfaceTest, WhenCompilingToIrThenSuccessIsReturned) {
|
TEST_F(CompilerInterfaceTest, WhenCompilingToIrThenSuccessIsReturned) {
|
||||||
MockCompilerDebugVars fclDebugVars;
|
MockCompilerDebugVars fclDebugVars;
|
||||||
retrieveBinaryKernelFilename(fclDebugVars.fileName, "CopyBuffer_simd32_", ".bc");
|
retrieveBinaryKernelFilename(fclDebugVars.fileName, "CopyBuffer_simd32_", ".spv");
|
||||||
gEnvironment->fclPushDebugVars(fclDebugVars);
|
gEnvironment->fclPushDebugVars(fclDebugVars);
|
||||||
TranslationOutput translationOutput = {};
|
TranslationOutput translationOutput = {};
|
||||||
auto err = pCompilerInterface->compile(*pDevice, inputArgs, translationOutput);
|
auto err = pCompilerInterface->compile(*pDevice, inputArgs, translationOutput);
|
||||||
|
@ -305,7 +305,7 @@ TEST_F(CompilerInterfaceTest, GivenForceBuildFailureWhenLinkingIrThenLinkFailure
|
||||||
TEST_F(CompilerInterfaceTest, WhenLinkIsCalledThenOclGenBinIsTheTranslationTarget) {
|
TEST_F(CompilerInterfaceTest, WhenLinkIsCalledThenOclGenBinIsTheTranslationTarget) {
|
||||||
// link only from .ll to gen ISA
|
// link only from .ll to gen ISA
|
||||||
MockCompilerDebugVars igcDebugVars;
|
MockCompilerDebugVars igcDebugVars;
|
||||||
retrieveBinaryKernelFilename(igcDebugVars.fileName, "CopyBuffer_simd32_", ".bc");
|
retrieveBinaryKernelFilename(igcDebugVars.fileName, "CopyBuffer_simd32_", ".spv");
|
||||||
gEnvironment->igcPushDebugVars(igcDebugVars);
|
gEnvironment->igcPushDebugVars(igcDebugVars);
|
||||||
TranslationOutput translationOutput = {};
|
TranslationOutput translationOutput = {};
|
||||||
auto err = pCompilerInterface->link(*pDevice, inputArgs, translationOutput);
|
auto err = pCompilerInterface->link(*pDevice, inputArgs, translationOutput);
|
||||||
|
@ -372,7 +372,7 @@ TEST_F(CompilerInterfaceTest, GivenForceBuildFailureWhenCreatingLibraryThenLinkF
|
||||||
TEST_F(CompilerInterfaceTest, WhenCreateLibraryIsCalledThenLlvmBcIsUsedAsIntermediateRepresentation) {
|
TEST_F(CompilerInterfaceTest, WhenCreateLibraryIsCalledThenLlvmBcIsUsedAsIntermediateRepresentation) {
|
||||||
// create library from .ll to IR
|
// create library from .ll to IR
|
||||||
MockCompilerDebugVars igcDebugVars;
|
MockCompilerDebugVars igcDebugVars;
|
||||||
retrieveBinaryKernelFilename(igcDebugVars.fileName, "CopyBuffer_simd32_", ".bc");
|
retrieveBinaryKernelFilename(igcDebugVars.fileName, "CopyBuffer_simd32_", ".spv");
|
||||||
gEnvironment->igcPushDebugVars(igcDebugVars);
|
gEnvironment->igcPushDebugVars(igcDebugVars);
|
||||||
TranslationOutput translationOutput = {};
|
TranslationOutput translationOutput = {};
|
||||||
auto err = pCompilerInterface->createLibrary(*pDevice, inputArgs, translationOutput);
|
auto err = pCompilerInterface->createLibrary(*pDevice, inputArgs, translationOutput);
|
||||||
|
@ -418,7 +418,7 @@ TEST_F(CompilerInterfaceTest, GivenForceBuildFailureWhenFclBuildingThenBuildFail
|
||||||
fclDebugVars.forceCreateFailure = false;
|
fclDebugVars.forceCreateFailure = false;
|
||||||
fclDebugVars.forceBuildFailure = true;
|
fclDebugVars.forceBuildFailure = true;
|
||||||
fclDebugVars.forceRegisterFail = false;
|
fclDebugVars.forceRegisterFail = false;
|
||||||
fclDebugVars.fileName = "copybuffer_skl.bc";
|
fclDebugVars.fileName = "copybuffer_skl.spv";
|
||||||
|
|
||||||
gEnvironment->fclPushDebugVars(fclDebugVars);
|
gEnvironment->fclPushDebugVars(fclDebugVars);
|
||||||
|
|
||||||
|
@ -1039,7 +1039,7 @@ TEST_F(CompilerInterfaceTest, whenGetIgcDeviceCtxReturnsNullptrThenGetSipKernelB
|
||||||
|
|
||||||
TEST_F(CompilerInterfaceTest, whenEverythingIsOkThenGetSipKernelReturnsIgcsOutputAsSipBinary) {
|
TEST_F(CompilerInterfaceTest, whenEverythingIsOkThenGetSipKernelReturnsIgcsOutputAsSipBinary) {
|
||||||
MockCompilerDebugVars igcDebugVars;
|
MockCompilerDebugVars igcDebugVars;
|
||||||
retrieveBinaryKernelFilename(igcDebugVars.fileName, "CopyBuffer_simd32_", ".bc");
|
retrieveBinaryKernelFilename(igcDebugVars.fileName, "CopyBuffer_simd32_", ".spv");
|
||||||
gEnvironment->igcPushDebugVars(igcDebugVars);
|
gEnvironment->igcPushDebugVars(igcDebugVars);
|
||||||
std::vector<char> sipBinary;
|
std::vector<char> sipBinary;
|
||||||
std::vector<char> stateAreaHeader;
|
std::vector<char> stateAreaHeader;
|
||||||
|
|
|
@ -46,17 +46,17 @@ using namespace NEO;
|
||||||
void cleanTestHelpers() {}
|
void cleanTestHelpers() {}
|
||||||
|
|
||||||
void applyWorkarounds() {
|
void applyWorkarounds() {
|
||||||
const std::array<ConstStringRef, 11> builtinIntermediateNames{"copy_buffer_to_buffer.builtin_kernel.bc",
|
const std::array<ConstStringRef, 11> builtinIntermediateNames{"copy_buffer_to_buffer.builtin_kernel.spv",
|
||||||
"copy_buffer_rect.builtin_kernel.bc",
|
"copy_buffer_rect.builtin_kernel.spv",
|
||||||
"fill_buffer.builtin_kernel.bc",
|
"fill_buffer.builtin_kernel.spv",
|
||||||
"copy_buffer_to_image3d.builtin_kernel.bc",
|
"copy_buffer_to_image3d.builtin_kernel.spv",
|
||||||
"copy_image3d_to_buffer.builtin_kernel.bc",
|
"copy_image3d_to_buffer.builtin_kernel.spv",
|
||||||
"copy_image_to_image1d.builtin_kernel.bc",
|
"copy_image_to_image1d.builtin_kernel.spv",
|
||||||
"copy_image_to_image2d.builtin_kernel.bc",
|
"copy_image_to_image2d.builtin_kernel.spv",
|
||||||
"copy_image_to_image3d.builtin_kernel.bc",
|
"copy_image_to_image3d.builtin_kernel.spv",
|
||||||
"fill_image1d.builtin_kernel.bc",
|
"fill_image1d.builtin_kernel.spv",
|
||||||
"fill_image2d.builtin_kernel.bc",
|
"fill_image2d.builtin_kernel.spv",
|
||||||
"fill_image3d.builtin_kernel.bc"};
|
"fill_image3d.builtin_kernel.spv"};
|
||||||
auto &storageRegistry = EmbeddedStorageRegistry::getInstance();
|
auto &storageRegistry = EmbeddedStorageRegistry::getInstance();
|
||||||
for (auto builtinIntermediateName : builtinIntermediateNames) {
|
for (auto builtinIntermediateName : builtinIntermediateNames) {
|
||||||
std::string resource = "__mock_spirv_resource";
|
std::string resource = "__mock_spirv_resource";
|
||||||
|
|
Loading…
Reference in New Issue