mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
OpenCL Queue Families extension 12/n
Fix engine selection for copy engines Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com> Relate-To: NEO-5120
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3ab932b101
commit
160e5ec112
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
* Copyright (C) 2017-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -243,6 +243,21 @@ const std::vector<EngineControl> *Device::getNonEmptyEngineGroup(size_t index) c
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
size_t Device::getIndexOfNonEmptyEngineGroup(EngineGroupType engineGroupType) const {
|
||||
const auto groupIndex = static_cast<size_t>(engineGroupType);
|
||||
UNRECOVERABLE_IF(groupIndex >= engineGroups.size());
|
||||
UNRECOVERABLE_IF(engineGroups[groupIndex].empty());
|
||||
|
||||
size_t result = 0u;
|
||||
for (auto currentGroupIndex = 0u; currentGroupIndex < groupIndex; currentGroupIndex++) {
|
||||
if (!engineGroups[currentGroupIndex].empty()) {
|
||||
result++;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
EngineControl &Device::getEngine(aub_stream::EngineType engineType, bool lowPriority, bool internalUsage) {
|
||||
for (auto &engine : engines) {
|
||||
if (engine.osContext->getEngineType() == engineType &&
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
* Copyright (C) 2017-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
#include "opencl/source/os_interface/performance_counters.h"
|
||||
|
||||
#include "engine_group_types.h"
|
||||
|
||||
namespace NEO {
|
||||
class OSTime;
|
||||
class SourceLevelDebugger;
|
||||
@@ -50,6 +52,7 @@ class Device : public ReferenceTrackedObject<Device> {
|
||||
return this->engineGroups;
|
||||
}
|
||||
const std::vector<EngineControl> *getNonEmptyEngineGroup(size_t index) const;
|
||||
size_t getIndexOfNonEmptyEngineGroup(EngineGroupType engineGroupType) const;
|
||||
EngineControl &getEngine(uint32_t index);
|
||||
EngineControl &getDefaultEngine();
|
||||
EngineControl &getInternalEngine();
|
||||
|
||||
Reference in New Issue
Block a user