mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Define GPGPU engines per gen
Change-Id: Ie0e565d11184c5355b5bf09f5b10a567deb5c106 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
84d35c8951
commit
06600f169b
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2017-2018 Intel Corporation
|
||||
# Copyright (C) 2017-2019 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@ -20,6 +20,7 @@ set(IGDRCL_SRCS_tests_helpers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/extendable_enum_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/file_io_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/flush_stamp_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/get_gpgpu_engines_tests.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/get_info_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gtest_helpers.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hash_tests.cpp
|
||||
|
29
unit_tests/helpers/get_gpgpu_engines_tests.inl
Normal file
29
unit_tests/helpers/get_gpgpu_engines_tests.inl
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "runtime/helpers/hw_helper.h"
|
||||
#include "test.h"
|
||||
|
||||
using namespace OCLRT;
|
||||
|
||||
template <typename FamilyType>
|
||||
void whenGetGpgpuEnginesThenReturnTwoRcsEngines() {
|
||||
auto &hwHelper = HwHelperHw<FamilyType>::get();
|
||||
auto &gpgpuEngines = hwHelper.getGpgpuEngineInstances();
|
||||
EXPECT_EQ(2u, gpgpuEngines.size());
|
||||
int numRcsEngines = 0;
|
||||
for (auto &engine : gpgpuEngines) {
|
||||
if (ENGINE_RCS == engine.type) {
|
||||
EXPECT_EQ(numRcsEngines, engine.id);
|
||||
numRcsEngines++;
|
||||
}
|
||||
EXPECT_EQ(ENGINE_RCS, engine.type);
|
||||
}
|
||||
EXPECT_EQ(2, numRcsEngines);
|
||||
EXPECT_EQ(gpgpuEngines[EngineInstanceConstants::lowPriorityGpgpuEngineIndex].type, lowPriorityGpgpuEngine.type);
|
||||
EXPECT_EQ(gpgpuEngines[EngineInstanceConstants::lowPriorityGpgpuEngineIndex].id, lowPriorityGpgpuEngine.id);
|
||||
}
|
Reference in New Issue
Block a user