2019-03-01 21:58:11 +08:00
|
|
|
/*
|
2021-07-01 22:28:56 +08:00
|
|
|
* Copyright (C) 2019-2021 Intel Corporation
|
2019-03-01 21:58:11 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/execution_environment/execution_environment.h"
|
2021-07-01 22:28:56 +08:00
|
|
|
#include "shared/source/execution_environment/root_device_environment.h"
|
2020-02-24 17:22:30 +08:00
|
|
|
|
2020-02-23 05:50:57 +08:00
|
|
|
#include "opencl/source/command_stream/create_command_stream_impl.h"
|
2019-03-01 21:58:11 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2019-03-01 21:58:11 +08:00
|
|
|
|
2020-03-23 16:13:25 +08:00
|
|
|
bool prepareDeviceEnvironments(ExecutionEnvironment &executionEnvironment) {
|
2021-07-01 22:28:56 +08:00
|
|
|
auto returnValue = prepareDeviceEnvironmentsImpl(executionEnvironment);
|
|
|
|
|
|
|
|
if (DebugManager.flags.Force32BitDriverSupport.get() != -1) {
|
|
|
|
return returnValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (returnValue) {
|
|
|
|
auto i = 0u;
|
|
|
|
while (i < executionEnvironment.rootDeviceEnvironments.size()) {
|
|
|
|
bool unsupportedDeviceDetected = false;
|
|
|
|
|
|
|
|
auto &featureTable = executionEnvironment.rootDeviceEnvironments[i]->getHardwareInfo()->featureTable;
|
|
|
|
if (!featureTable.ftrRcsNode && !featureTable.ftrCCSNode) {
|
|
|
|
unsupportedDeviceDetected = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (unsupportedDeviceDetected) {
|
|
|
|
executionEnvironment.rootDeviceEnvironments.erase(executionEnvironment.rootDeviceEnvironments.begin() + i);
|
|
|
|
} else {
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return returnValue && executionEnvironment.rootDeviceEnvironments.size() > 0;
|
2019-03-01 21:58:11 +08:00
|
|
|
}
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|