mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 08:07:19 +08:00
refactor: add helper to set default split mode
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
42ab9b5829
commit
1f734d6f6a
@@ -13,6 +13,7 @@
|
||||
|
||||
#include "level_zero/core/source/device/device_imp.h"
|
||||
#include "level_zero/core/source/driver/driver_handle.h"
|
||||
#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper.h"
|
||||
#include "level_zero/driver_experimental/zex_api.h"
|
||||
|
||||
namespace L0 {
|
||||
@@ -44,6 +45,12 @@ bool BcsSplit::setupDevice(uint32_t productFamily, bool internalUsage, const ze_
|
||||
return true;
|
||||
}
|
||||
|
||||
events.aggregatedEventsMode = device.getL0GfxCoreHelper().bcsSplitAggregatedModeEnabled();
|
||||
|
||||
if (NEO::debugManager.flags.SplitBcsAggregatedEventsMode.get() != -1) {
|
||||
events.aggregatedEventsMode = !!NEO::debugManager.flags.SplitBcsAggregatedEventsMode.get();
|
||||
}
|
||||
|
||||
setupEnginesMask(bcsSplitSettings);
|
||||
|
||||
return setupQueues(bcsSplitSettings, productFamily);
|
||||
@@ -134,12 +141,6 @@ std::vector<CommandQueue *> &BcsSplit::getCmdQsForSplit(NEO::TransferDirection d
|
||||
return this->cmdQs;
|
||||
}
|
||||
|
||||
BcsSplit::Events::Events(BcsSplit &bcsSplit) : bcsSplit(bcsSplit) {
|
||||
if (NEO::debugManager.flags.SplitBcsAggregatedEventsMode.get() != -1) {
|
||||
aggregatedEventsMode = !!NEO::debugManager.flags.SplitBcsAggregatedEventsMode.get();
|
||||
}
|
||||
};
|
||||
|
||||
size_t BcsSplit::Events::obtainAggregatedEventsForSplit(Context *context) {
|
||||
for (size_t i = 0; i < this->marker.size(); i++) {
|
||||
if (this->marker[i]->queryStatus() == ZE_RESULT_SUCCESS) {
|
||||
|
||||
@@ -58,7 +58,7 @@ struct BcsSplit {
|
||||
size_t createAggregatedEvent(Context *context);
|
||||
uint64_t *getNextAllocationForAggregatedEvent();
|
||||
|
||||
Events(BcsSplit &bcsSplit);
|
||||
Events(BcsSplit &bcsSplit) : bcsSplit(bcsSplit) {}
|
||||
} events;
|
||||
|
||||
std::vector<CommandQueue *> cmdQs;
|
||||
|
||||
Reference in New Issue
Block a user