mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Add PVC OCL unit tests
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c324279bf5
commit
d8a2704b7e
@ -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()
|
||||
|
||||
21
opencl/test/unit_test/kernel/kernel_tests_pvc_and_later.cpp
Normal file
21
opencl/test/unit_test/kernel/kernel_tests_pvc_and_later.cpp
Normal 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));
|
||||
}
|
||||
Reference in New Issue
Block a user