Files
compute-runtime/opencl/test/unit_test/command_stream/get_devices_tests.cpp
Daria Hinz 8afcc87dc5 Support for new names in Aub/Tbx mode
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
2022-07-25 14:46:52 +02:00

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