mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00

New acronyms that distinguish between configurations are supported. This commit adds support for these names by reusing ProductFamilyOverride flag. Signed-off-by: Daria Hinz <daria.hinz@intel.com> Related-To: NEO-7112
34 lines
1.1 KiB
C++
34 lines
1.1 KiB
C++
/*
|
|
* Copyright (C) 2018-2022 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
|
#include "shared/test/common/helpers/ult_hw_config.h"
|
|
#include "shared/test/common/helpers/variable_backup.h"
|
|
|
|
#include "opencl/source/platform/platform.h"
|
|
#include "opencl/test/unit_test/mocks/mock_platform.h"
|
|
|
|
#include "gtest/gtest.h"
|
|
|
|
namespace NEO {
|
|
TEST(MultiDeviceTests, givenCreateMultipleRootDevicesAndLimitAmountOfReturnedDevicesFlagWhenClGetDeviceIdsIsCalledThenLowerValueIsReturned) {
|
|
platformsImpl->clear();
|
|
VariableBackup<UltHwConfig> backup(&ultHwConfig);
|
|
ultHwConfig.useHwCsr = true;
|
|
ultHwConfig.forceOsAgnosticMemoryManager = false;
|
|
ultHwConfig.useMockedPrepareDeviceEnvironmentsFunc = false;
|
|
DebugManagerStateRestore stateRestore;
|
|
DebugManager.flags.CreateMultipleRootDevices.set(2);
|
|
DebugManager.flags.LimitAmountOfReturnedDevices.set(1);
|
|
cl_uint numDevices = 0;
|
|
|
|
auto retVal = clGetDeviceIDs(nullptr, CL_DEVICE_TYPE_GPU, 0, nullptr, &numDevices);
|
|
EXPECT_EQ(CL_SUCCESS, retVal);
|
|
EXPECT_EQ(1u, numDevices);
|
|
}
|
|
} // namespace NEO
|