mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
fix: use bindful kernels in OCL tests
- compile stateless buitlins version with stateful bindful mode Related-To: NEO-11704 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
5fa5387781
commit
f8994aacb6
@@ -86,6 +86,16 @@ function(compile_builtin core_type platform_it builtin bits builtin_options mode
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DEPENDS ${builtin} ocloc copy_compiler_files
|
||||
)
|
||||
|
||||
set(addrmode "default")
|
||||
if(${MODE} STREQUAL "bindless")
|
||||
set(addrmode "bindless")
|
||||
elseif(${MODE} STREQUAL "bindful")
|
||||
set(addrmode "bindful")
|
||||
elseif(${MODE} STREQUAL "stateless")
|
||||
set(addrmode "bindful")
|
||||
endif()
|
||||
|
||||
foreach(RELEASE ${${platform_it}_${core_type}_RELEASES})
|
||||
string(REPLACE "." "_" RELEASE_FILENAME ${RELEASE})
|
||||
set(OUTPUT_FILE_CPP
|
||||
@@ -101,7 +111,7 @@ function(compile_builtin core_type platform_it builtin bits builtin_options mode
|
||||
get_filename_component(absolute_filepath_spv ${OUTPUT_FILE_SPV} ABSOLUTE)
|
||||
add_custom_command(
|
||||
OUTPUT ${OUTPUT_FILES_BINARIES}
|
||||
COMMAND ${ocloc_cmd_prefix} -q -file ${absolute_filepath_spv} -spirv_input -device ${RELEASE} ${builtin_options} -${bits} -output ${mode}_${BASENAME}_${RELEASE_FILENAME} -output_no_suffix -out_dir ${OUTPUTDIR} ${INTERNAL_OPTIONS} -options "$<JOIN:${__ocloc__options__}, >"
|
||||
COMMAND ${ocloc_cmd_prefix} -q -file ${absolute_filepath_spv} -spirv_input -device ${RELEASE} ${builtin_options} -${bits} -stateful_address_mode ${addrmode} -output ${mode}_${BASENAME}_${RELEASE_FILENAME} -output_no_suffix -out_dir ${OUTPUTDIR} ${INTERNAL_OPTIONS} -options "$<JOIN:${__ocloc__options__}, >"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DEPENDS ${OUTPUT_FILE_SPV} ocloc copy_compiler_files
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -54,7 +54,7 @@ class CompilerInterfaceTest : public DeviceFixture,
|
||||
std::string testFile;
|
||||
|
||||
testFile.append(clFiles);
|
||||
testFile.append("CopyBuffer_simd32.cl");
|
||||
testFile.append("CopyBufferShared_simd32.cl");
|
||||
|
||||
pSource = loadDataFromFile(
|
||||
testFile.c_str(),
|
||||
@@ -224,7 +224,7 @@ TEST_F(CompilerInterfaceTest, GivenOptionsWhenCompilingToIsaThenSuccessIsReturne
|
||||
|
||||
TEST_F(CompilerInterfaceTest, WhenCompilingToIrThenSuccessIsReturned) {
|
||||
MockCompilerDebugVars fclDebugVars;
|
||||
retrieveBinaryKernelFilename(fclDebugVars.fileName, "CopyBuffer_simd32_", ".spv");
|
||||
retrieveBinaryKernelFilename(fclDebugVars.fileName, "CopyBufferShared_simd32_", ".spv");
|
||||
gEnvironment->fclPushDebugVars(fclDebugVars);
|
||||
TranslationOutput translationOutput = {};
|
||||
auto err = pCompilerInterface->compile(*pDevice, inputArgs, translationOutput);
|
||||
@@ -305,7 +305,7 @@ TEST_F(CompilerInterfaceTest, GivenForceBuildFailureWhenLinkingIrThenLinkFailure
|
||||
TEST_F(CompilerInterfaceTest, WhenLinkIsCalledThenOclGenBinIsTheTranslationTarget) {
|
||||
// link only from .ll to gen ISA
|
||||
MockCompilerDebugVars igcDebugVars;
|
||||
retrieveBinaryKernelFilename(igcDebugVars.fileName, "CopyBuffer_simd32_", ".spv");
|
||||
retrieveBinaryKernelFilename(igcDebugVars.fileName, "CopyBufferShared_simd32_", ".spv");
|
||||
gEnvironment->igcPushDebugVars(igcDebugVars);
|
||||
TranslationOutput translationOutput = {};
|
||||
auto err = pCompilerInterface->link(*pDevice, inputArgs, translationOutput);
|
||||
@@ -372,7 +372,7 @@ TEST_F(CompilerInterfaceTest, GivenForceBuildFailureWhenCreatingLibraryThenLinkF
|
||||
TEST_F(CompilerInterfaceTest, WhenCreateLibraryIsCalledThenLlvmBcIsUsedAsIntermediateRepresentation) {
|
||||
// create library from .ll to IR
|
||||
MockCompilerDebugVars igcDebugVars;
|
||||
retrieveBinaryKernelFilename(igcDebugVars.fileName, "CopyBuffer_simd32_", ".spv");
|
||||
retrieveBinaryKernelFilename(igcDebugVars.fileName, "CopyBufferShared_simd32_", ".spv");
|
||||
gEnvironment->igcPushDebugVars(igcDebugVars);
|
||||
TranslationOutput translationOutput = {};
|
||||
auto err = pCompilerInterface->createLibrary(*pDevice, inputArgs, translationOutput);
|
||||
@@ -1039,7 +1039,7 @@ TEST_F(CompilerInterfaceTest, whenGetIgcDeviceCtxReturnsNullptrThenGetSipKernelB
|
||||
|
||||
TEST_F(CompilerInterfaceTest, whenEverythingIsOkThenGetSipKernelReturnsIgcsOutputAsSipBinary) {
|
||||
MockCompilerDebugVars igcDebugVars;
|
||||
retrieveBinaryKernelFilename(igcDebugVars.fileName, "CopyBuffer_simd32_", ".spv");
|
||||
retrieveBinaryKernelFilename(igcDebugVars.fileName, "CopyBufferShared_simd32_", ".spv");
|
||||
gEnvironment->igcPushDebugVars(igcDebugVars);
|
||||
std::vector<char> sipBinary;
|
||||
std::vector<char> stateAreaHeader;
|
||||
|
||||
Reference in New Issue
Block a user