test: remove not needed test files
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
parent
5f0b9efd2b
commit
4dd709bfac
|
@ -42,7 +42,7 @@ components:
|
|||
dest_dir: kernels_bin
|
||||
type: git
|
||||
branch: kernels_bin
|
||||
revision: 2892-1869
|
||||
revision: 2892-1871
|
||||
kmdaf:
|
||||
branch: kmdaf
|
||||
dest_dir: kmdaf
|
||||
|
|
|
@ -325,10 +325,6 @@ set(TEST_KERNEL_BINDLESS
|
|||
test_files/stateful_copy_buffer.cl
|
||||
)
|
||||
|
||||
set(TEST_KERNEL_BINDLESS_IMAGES
|
||||
test_files/copy_buffer_to_image.cl
|
||||
)
|
||||
|
||||
set(TEST_KERNEL_PRINTF
|
||||
test_files/printf.cl
|
||||
)
|
||||
|
@ -352,9 +348,6 @@ macro(macro_for_each_platform)
|
|||
set(PLATFORM_TEST_KERNELS ${TEST_KERNELS})
|
||||
set(IMAGE_SUPPORT FALSE)
|
||||
CORE_CONTAINS_PLATFORM("SUPPORTED_IMAGES" ${CORE_TYPE} ${PLATFORM_IT} IMAGE_SUPPORT)
|
||||
if(NOT ${IMAGE_SUPPORT})
|
||||
list(REMOVE_ITEM PLATFORM_TEST_KERNELS "${CMAKE_CURRENT_SOURCE_DIR}/test_files/copy_buffer_to_image.cl")
|
||||
endif()
|
||||
|
||||
foreach(KERNEL_TO_REMOVE ${${CORE_TYPE}_TEST_KERNELS_BLOCKLIST})
|
||||
set(KERNEL_TO_REMOVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/test_files/${KERNEL_TO_REMOVE}")
|
||||
|
@ -401,20 +394,6 @@ macro(macro_for_each_platform)
|
|||
endforeach()
|
||||
endif()
|
||||
|
||||
set(BINDLESS_KERNELS_IMAGES "")
|
||||
if(IMAGE_SUPPORT)
|
||||
set(BINDLESS_KERNELS_IMAGES ${TEST_KERNEL_BINDLESS_IMAGES})
|
||||
endif()
|
||||
|
||||
foreach(file ${TEST_KERNEL_BINDLESS} ${BINDLESS_KERNELS_IMAGES})
|
||||
foreach(REVISION_CONFIG ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS})
|
||||
parse_revision_config(${REVISION_CONFIG} ${PLATFORM_IT_LOWER} DEVICE_ID REVISION_ID)
|
||||
if(NOT ("${CORE_TYPE_LOWER}" STREQUAL "gen8"))
|
||||
neo_gen_kernels_with_internal_options(${PLATFORM_IT_LOWER} ${DEVICE_ID} ${REVISION_ID} ${file} "bindless" ${TEST_KERNEL_BINDLESS_internal_options})
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
if(PLATFORM_2_0_LOWER)
|
||||
foreach(REVISION_CONFIG ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS})
|
||||
parse_revision_config(${REVISION_CONFIG} ${PLATFORM_IT_LOWER} DEVICE_ID REVISION_ID)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -66,47 +66,35 @@ TEST_F(ClCompileProgramTests, GivenKernelAsSingleSourceWhenCompilingProgramThenS
|
|||
TEST_F(ClCompileProgramTests, GivenKernelAsSourceWithHeaderWhenCompilingProgramThenSuccessIsReturned) {
|
||||
cl_program pProgram = nullptr;
|
||||
cl_program pHeader = nullptr;
|
||||
size_t sourceSize = 0;
|
||||
std::string testFile;
|
||||
const char *simpleHeaderName = "simple_header.h";
|
||||
|
||||
testFile.append(clFiles);
|
||||
testFile.append("/copybuffer_with_header.cl");
|
||||
auto copyBufferWithHeader = R"===(
|
||||
#include "simple_header.h"
|
||||
__kernel void CopyBuffer(){}
|
||||
)===";
|
||||
|
||||
auto pSource = loadDataFromFile(
|
||||
testFile.c_str(),
|
||||
sourceSize);
|
||||
auto copyBufferWithHeaderSize = sizeof(copyBufferWithHeader);
|
||||
|
||||
ASSERT_NE(0u, sourceSize);
|
||||
ASSERT_NE(nullptr, pSource);
|
||||
auto header = R"===(
|
||||
extenr __kernel void AddBuffer();
|
||||
)===";
|
||||
|
||||
const char *sources[1] = {pSource.get()};
|
||||
auto headerSize = sizeof(header);
|
||||
auto headerName = "simple_header.h";
|
||||
pProgram = clCreateProgramWithSource(
|
||||
pContext,
|
||||
1,
|
||||
sources,
|
||||
&sourceSize,
|
||||
©BufferWithHeader,
|
||||
©BufferWithHeaderSize,
|
||||
&retVal);
|
||||
|
||||
EXPECT_NE(nullptr, pProgram);
|
||||
ASSERT_EQ(CL_SUCCESS, retVal);
|
||||
|
||||
testFile.clear();
|
||||
testFile.append(clFiles);
|
||||
testFile.append("simple_header.h");
|
||||
auto pHeaderSource = loadDataFromFile(
|
||||
testFile.c_str(),
|
||||
sourceSize);
|
||||
|
||||
ASSERT_NE(0u, sourceSize);
|
||||
ASSERT_NE(nullptr, pHeaderSource);
|
||||
|
||||
const char *headerSources[1] = {pHeaderSource.get()};
|
||||
pHeader = clCreateProgramWithSource(
|
||||
pContext,
|
||||
1,
|
||||
headerSources,
|
||||
&sourceSize,
|
||||
&header,
|
||||
&headerSize,
|
||||
&retVal);
|
||||
|
||||
EXPECT_NE(nullptr, pHeader);
|
||||
|
@ -119,7 +107,7 @@ TEST_F(ClCompileProgramTests, GivenKernelAsSourceWithHeaderWhenCompilingProgramT
|
|||
nullptr,
|
||||
1,
|
||||
&pHeader,
|
||||
&simpleHeaderName,
|
||||
&headerName,
|
||||
nullptr,
|
||||
nullptr);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -172,7 +172,6 @@ TEST_F(ClGetProgramInfoTests, GivenIlWhenBuildingProgramThenGetProgramInfoReturn
|
|||
}
|
||||
|
||||
TEST(clGetProgramInfoTest, GivenMultiDeviceProgramCreatedWithBinaryWhenGettingDevicesThenCorrectDevicesAreReturned) {
|
||||
REQUIRE_IMAGES_OR_SKIP(defaultHwInfo);
|
||||
MockUnrestrictiveContextMultiGPU context;
|
||||
|
||||
auto numDevicesForProgram = 2u;
|
||||
|
@ -189,7 +188,7 @@ TEST(clGetProgramInfoTest, GivenMultiDeviceProgramCreatedWithBinaryWhenGettingDe
|
|||
testFile.c_str(),
|
||||
binarySize0);
|
||||
|
||||
retrieveBinaryKernelFilename(testFile, "copy_buffer_to_image_", ".bin");
|
||||
retrieveBinaryKernelFilename(testFile, "copybuffer_", ".bin");
|
||||
|
||||
pBinary1 = loadDataFromFile(
|
||||
testFile.c_str(),
|
||||
|
@ -228,7 +227,6 @@ TEST(clGetProgramInfoTest, GivenMultiDeviceProgramCreatedWithBinaryWhenGettingDe
|
|||
}
|
||||
|
||||
TEST(clGetProgramInfoTest, GivenMultiDeviceProgramCreatedWithBinaryWhenGettingBinariesThenCorrectBinariesAreReturned) {
|
||||
REQUIRE_IMAGES_OR_SKIP(defaultHwInfo);
|
||||
MockUnrestrictiveContextMultiGPU context;
|
||||
|
||||
auto numDevicesForProgram = 2u;
|
||||
|
@ -245,7 +243,7 @@ TEST(clGetProgramInfoTest, GivenMultiDeviceProgramCreatedWithBinaryWhenGettingBi
|
|||
testFile.c_str(),
|
||||
binarySize0);
|
||||
|
||||
retrieveBinaryKernelFilename(testFile, "copy_buffer_to_image_", ".bin");
|
||||
retrieveBinaryKernelFilename(testFile, "copybuffer_", ".bin");
|
||||
|
||||
pBinary1 = loadDataFromFile(
|
||||
testFile.c_str(),
|
||||
|
|
|
@ -2859,10 +2859,14 @@ TEST(OfflineCompilerTest, GivenKernelWhenNoCharAfterKernelSourceThenBuildWithSuc
|
|||
auto retVal = mockOfflineCompiler->buildSourceCode();
|
||||
EXPECT_EQ(CL_INVALID_PROGRAM, retVal);
|
||||
|
||||
const char kernelWithNoCharAfterKernel[] = "__kernel void empty(){}";
|
||||
Source source{reinterpret_cast<const uint8_t *>(kernelWithNoCharAfterKernel), sizeof(kernelWithNoCharAfterKernel), "emptykernel.cl"};
|
||||
static_cast<MockOclocArgHelper *>(mockOfflineCompiler->argHelper)->inputs.push_back(source);
|
||||
|
||||
std::vector<std::string> argv = {
|
||||
"ocloc",
|
||||
"-file",
|
||||
clFiles + "emptykernel.cl",
|
||||
"emptykernel.cl",
|
||||
"-device",
|
||||
gEnvironment->devicePrefix.c_str()};
|
||||
|
||||
|
@ -3248,10 +3252,12 @@ TEST(OfflineCompilerTest, givenSpirvInputFileWhenCmdLineHasOptionsThenCorrectOpt
|
|||
NEO::setIgcDebugVars(igcDebugVars);
|
||||
|
||||
MockOfflineCompiler mockOfflineCompiler;
|
||||
Source source{reinterpret_cast<const uint8_t *>(spirvMagic.data()), spirvMagic.size(), "some_file.spv"};
|
||||
static_cast<MockOclocArgHelper *>(mockOfflineCompiler.argHelper)->inputs.push_back(source);
|
||||
std::vector<std::string> argv = {
|
||||
"ocloc",
|
||||
"-file",
|
||||
clFiles + "emptykernel.cl",
|
||||
"some_file.spv",
|
||||
"-spirv_input",
|
||||
"-device",
|
||||
gEnvironment->devicePrefix.c_str(),
|
||||
|
@ -4065,17 +4071,28 @@ TEST(OfflineCompilerTest, givenCompilerWhenBuildSourceCodeFailsThenGenerateElfBi
|
|||
TEST(OfflineCompilerTest, givenDeviceSpecificKernelFileWhenCompilerIsInitializedThenOptionsAreReadFromFile) {
|
||||
auto mockOfflineCompiler = std::unique_ptr<MockOfflineCompiler>(new MockOfflineCompiler());
|
||||
ASSERT_NE(nullptr, mockOfflineCompiler);
|
||||
std::string kernelFileName(clFiles + "kernel_for_specific_device.skl");
|
||||
std::string optionsFileName(clFiles + "kernel_for_specific_device_options.txt");
|
||||
auto kernelForSpecificDevice = "__kernel void empty(){}";
|
||||
Source source{reinterpret_cast<const uint8_t *>(kernelForSpecificDevice), sizeof(kernelForSpecificDevice), "emptykernel.cl"};
|
||||
static_cast<MockOclocArgHelper *>(mockOfflineCompiler->argHelper)->inputs.push_back(source);
|
||||
|
||||
ASSERT_TRUE(fileExists(kernelFileName));
|
||||
ASSERT_TRUE(fileExists(optionsFileName));
|
||||
const char options[] = R"===(
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
-cl-opt-disable
|
||||
)===";
|
||||
Source optionsSource{reinterpret_cast<const uint8_t *>(options), sizeof(options), "emptykernel_options.txt"};
|
||||
static_cast<MockOclocArgHelper *>(mockOfflineCompiler->argHelper)->inputs.push_back(optionsSource);
|
||||
|
||||
std::vector<std::string> argv = {
|
||||
"ocloc",
|
||||
"-q",
|
||||
"-file",
|
||||
kernelFileName,
|
||||
"emptykernel.cl",
|
||||
"-device",
|
||||
gEnvironment->devicePrefix.c_str()};
|
||||
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable
|
||||
|
||||
__kernel void CopyBufferToImage3d(__global uchar *src,
|
||||
__write_only image3d_t output,
|
||||
int srcOffset,
|
||||
int4 dstOffset,
|
||||
uint2 Pitch) {
|
||||
const uint x = get_global_id(0);
|
||||
const uint y = get_global_id(1);
|
||||
const uint z = get_global_id(2);
|
||||
|
||||
int4 dstCoord = (int4)(x, y, z, 0) + dstOffset;
|
||||
uint LOffset = srcOffset + (y * Pitch.x) + (z * Pitch.y);
|
||||
|
||||
write_imageui(output, dstCoord, (uint4)(*(src + LOffset + x), 0, 0, 1));
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "simple_header.h"
|
||||
__kernel void
|
||||
CopyBuffer(
|
||||
__global unsigned int *src,
|
||||
__global unsigned int *dst) {
|
||||
int id = (int)get_global_id(0);
|
||||
dst[id] = src[id];
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
/* No character after the last "}" */
|
||||
__kernel void empty()
|
||||
{
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
__kernel void simple_device_specific_kernel() {
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
-cl-opt-disable
|
|
@ -1,12 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
extern __kernel void AddBuffer(
|
||||
__global float *src,
|
||||
__global float *dst);
|
|
@ -1,22 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
__kernel void test(__global ulong *results) {
|
||||
__private char mem0[3];
|
||||
__private char2 mem2[3];
|
||||
__private char3 mem3[3];
|
||||
__private char4 mem4[3];
|
||||
__private char8 mem8[3];
|
||||
__private char16 mem16[3];
|
||||
|
||||
results[0] = (ulong)&mem0[0];
|
||||
results[1] = (ulong)&mem2[0];
|
||||
results[2] = (ulong)&mem3[0];
|
||||
results[3] = (ulong)&mem4[0];
|
||||
results[4] = (ulong)&mem8[0];
|
||||
results[5] = (ulong)&mem16[0];
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
__constant uint constant_a[2] = {0xabcd5432u, 0xaabb5533u};
|
||||
|
||||
__kernel void test(__global uint *in, __global uint *out) {
|
||||
int i = get_global_id(0);
|
||||
int j = get_global_id(0) % (sizeof(constant_a) / sizeof(constant_a[0]));
|
||||
|
||||
out[i] = constant_a[j];
|
||||
}
|
Loading…
Reference in New Issue