mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Refactor: Update Device::engineGroups to store only available engine groups
Simplify logic around engine groups. Remove no longer needed code. Related-To: NEO-6219 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
133e13b319
commit
4461b8ea3f
@@ -379,18 +379,13 @@ void ClDevice::initializeCaps() {
|
||||
}
|
||||
}
|
||||
|
||||
const auto &queueFamilies = this->getDevice().getEngineGroups();
|
||||
for (size_t queueFamilyIndex = 0u; queueFamilyIndex < CommonConstants::engineGroupCount; queueFamilyIndex++) {
|
||||
const std::vector<EngineControl> &enginesInFamily = queueFamilies[queueFamilyIndex];
|
||||
if (enginesInFamily.size() > 0) {
|
||||
const auto engineGroupType = static_cast<EngineGroupType>(queueFamilyIndex);
|
||||
cl_queue_family_properties_intel properties = {};
|
||||
properties.capabilities = getQueueFamilyCapabilities(engineGroupType);
|
||||
properties.count = static_cast<cl_uint>(enginesInFamily.size());
|
||||
properties.properties = deviceInfo.queueOnHostProperties;
|
||||
getQueueFamilyName(properties.name, engineGroupType);
|
||||
deviceInfo.queueFamilyProperties.push_back(properties);
|
||||
}
|
||||
for (auto &engineGroup : this->getDevice().getEngineGroups()) {
|
||||
cl_queue_family_properties_intel properties = {};
|
||||
properties.capabilities = getQueueFamilyCapabilities(engineGroup.engineGroupType);
|
||||
properties.count = static_cast<cl_uint>(engineGroup.engines.size());
|
||||
properties.properties = deviceInfo.queueOnHostProperties;
|
||||
getQueueFamilyName(properties.name, engineGroup.engineGroupType);
|
||||
deviceInfo.queueFamilyProperties.push_back(properties);
|
||||
}
|
||||
auto &clHwHelper = NEO::ClHwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
const std::vector<uint32_t> &supportedThreadArbitrationPolicies = clHwHelper.getSupportedThreadArbitrationPolicies();
|
||||
|
||||
@@ -668,7 +668,7 @@ cl_uint CommandQueue::getQueueFamilyIndex() const {
|
||||
const auto &hwInfo = device->getHardwareInfo();
|
||||
const auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
const auto engineGroupType = hwHelper.getEngineGroupType(gpgpuEngine->getEngineType(), gpgpuEngine->getEngineUsage(), hwInfo);
|
||||
const auto familyIndex = device->getDevice().getIndexOfNonEmptyEngineGroup(engineGroupType);
|
||||
const auto familyIndex = device->getDevice().getEngineGroupIndexFromEngineGroupType(engineGroupType);
|
||||
return static_cast<cl_uint>(familyIndex);
|
||||
}
|
||||
}
|
||||
@@ -903,8 +903,7 @@ void CommandQueue::processProperties(const cl_queue_properties *properties) {
|
||||
if (specificEngineSelected) {
|
||||
this->queueFamilySelected = true;
|
||||
if (!getDevice().hasRootCsr()) {
|
||||
auto queueFamily = getDevice().getNonEmptyEngineGroup(selectedQueueFamilyIndex);
|
||||
const auto &engine = queueFamily->at(selectedQueueIndex);
|
||||
const auto &engine = getDevice().getEngineGroups()[selectedQueueFamilyIndex].engines[selectedQueueIndex];
|
||||
auto engineType = engine.getEngineType();
|
||||
auto engineUsage = engine.getEngineUsage();
|
||||
this->overrideEngine(engineType, engineUsage);
|
||||
|
||||
Reference in New Issue
Block a user