Add PVC OCL unit tests

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2021-12-08 12:06:24 +00:00
committed by Compute-Runtime-Automation
parent c324279bf5
commit d8a2704b7e
40 changed files with 4782 additions and 2 deletions

View File

@ -38,5 +38,11 @@ if(TESTS_XEHP_AND_LATER)
)
endif()
if(TESTS_PVC_AND_LATER)
list(APPEND IGDRCL_SRCS_tests_kernel
${CMAKE_CURRENT_SOURCE_DIR}/kernel_tests_pvc_and_later.cpp
)
endif()
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_kernel})
add_subdirectories()

View File

@ -0,0 +1,21 @@
/*
* Copyright (C) 2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "opencl/test/unit_test/mocks/mock_cl_device.h"
#include "opencl/test/unit_test/mocks/mock_kernel.h"
#include "test.h"
using namespace NEO;
using KernelTestPvcAndLater = ::testing::Test;
using isAtLeastPvc = IsAtLeastGfxCore<IGFX_XE_HPC_CORE>;
HWTEST2_F(KernelTestPvcAndLater, givenPolicyWhenSetKernelThreadArbitrationPolicyThenExpectedClValueIsReturned, isAtLeastPvc) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
MockKernelWithInternals kernel(*device);
EXPECT_EQ(CL_SUCCESS, kernel.mockKernel->setKernelThreadArbitrationPolicy(CL_KERNEL_EXEC_INFO_THREAD_ARBITRATION_POLICY_STALL_BASED_ROUND_ROBIN_INTEL));
}