mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
LLVM IR removed from Compiler Link
Signed-off-by: Neil R Spruit <neil.r.spruit@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7ab86d44d6
commit
fc11701422
@@ -217,7 +217,7 @@ TranslationOutput::ErrorCode CompilerInterface::link(
|
|||||||
CIF::RAII::UPtr_t<IGC::OclTranslationOutputTagOCL> currOut;
|
CIF::RAII::UPtr_t<IGC::OclTranslationOutputTagOCL> currOut;
|
||||||
inSrc->Retain(); // shared with currSrc
|
inSrc->Retain(); // shared with currSrc
|
||||||
CIF::RAII::UPtr_t<CIF::Builtins::BufferSimple> currSrc(inSrc.get());
|
CIF::RAII::UPtr_t<CIF::Builtins::BufferSimple> currSrc(inSrc.get());
|
||||||
IGC::CodeType::CodeType_t translationChain[] = {IGC::CodeType::elf, IGC::CodeType::llvmBc, IGC::CodeType::oclGenBin};
|
IGC::CodeType::CodeType_t translationChain[] = {IGC::CodeType::elf, IGC::CodeType::oclGenBin};
|
||||||
constexpr size_t numTranslations = sizeof(translationChain) / sizeof(translationChain[0]);
|
constexpr size_t numTranslations = sizeof(translationChain) / sizeof(translationChain[0]);
|
||||||
for (size_t ti = 1; ti < numTranslations; ti++) {
|
for (size_t ti = 1; ti < numTranslations; ti++) {
|
||||||
IGC::CodeType::CodeType_t inType = translationChain[ti - 1];
|
IGC::CodeType::CodeType_t inType = translationChain[ti - 1];
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -285,7 +285,7 @@ TEST_F(CompilerInterfaceTest, GivenForceBuildFailureWhenLinkingIrThenLinkFailure
|
|||||||
gEnvironment->igcPopDebugVars();
|
gEnvironment->igcPopDebugVars();
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(CompilerInterfaceTest, WhenLinkIsCalledThenLlvmBcIsUsedAsIntermediateRepresentation) {
|
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_", ".bc");
|
||||||
@@ -294,12 +294,10 @@ TEST_F(CompilerInterfaceTest, WhenLinkIsCalledThenLlvmBcIsUsedAsIntermediateRepr
|
|||||||
auto err = pCompilerInterface->link(*pDevice, inputArgs, translationOutput);
|
auto err = pCompilerInterface->link(*pDevice, inputArgs, translationOutput);
|
||||||
gEnvironment->igcPopDebugVars();
|
gEnvironment->igcPopDebugVars();
|
||||||
ASSERT_EQ(TranslationOutput::ErrorCode::Success, err);
|
ASSERT_EQ(TranslationOutput::ErrorCode::Success, err);
|
||||||
ASSERT_EQ(2U, pCompilerInterface->requestedTranslationCtxs.size());
|
ASSERT_EQ(1u, pCompilerInterface->requestedTranslationCtxs.size());
|
||||||
|
|
||||||
MockCompilerInterface::TranslationOpT firstTranslation = {IGC::CodeType::elf, IGC::CodeType::llvmBc},
|
MockCompilerInterface::TranslationOpT translation = {IGC::CodeType::elf, IGC::CodeType::oclGenBin};
|
||||||
secondTranslation = {IGC::CodeType::llvmBc, IGC::CodeType::oclGenBin};
|
EXPECT_EQ(translation, pCompilerInterface->requestedTranslationCtxs[0]);
|
||||||
EXPECT_EQ(firstTranslation, pCompilerInterface->requestedTranslationCtxs[0]);
|
|
||||||
EXPECT_EQ(secondTranslation, pCompilerInterface->requestedTranslationCtxs[1]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(CompilerInterfaceTest, whenCompilerIsNotAvailableThenLinkFailsGracefully) {
|
TEST_F(CompilerInterfaceTest, whenCompilerIsNotAvailableThenLinkFailsGracefully) {
|
||||||
|
|||||||
Reference in New Issue
Block a user