make single function overriding driver state using debug key

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz 2022-09-15 21:57:12 +00:00 committed by Compute-Runtime-Automation
parent 706a5a7a8c
commit 357514a4e4
4 changed files with 14 additions and 8 deletions

View File

@ -17,6 +17,7 @@
#include "level_zero/core/source/cmdqueue/cmdqueue.h"
#include "level_zero/core/source/device/device.h"
#include "level_zero/core/source/device/device_imp.h"
#include "level_zero/core/source/hw_helpers/l0_hw_helper.h"
#include "level_zero/tools/source/metrics/metric.h"
#include "igfxfmid.h"
@ -26,9 +27,7 @@
namespace L0 {
CommandList::CommandList(uint32_t numIddsPerBlock) : commandContainer(numIddsPerBlock) {
if (NEO::DebugManager.flags.MultiReturnPointCommandList.get() != -1) {
multiReturnPointCommandList = !!NEO::DebugManager.flags.MultiReturnPointCommandList.get();
}
multiReturnPointCommandList = L0HwHelper::enableMultiReturnPointCommandList();
}
CommandListAllocatorFn commandListFactory[IGFX_MAX_PRODUCT] = {};

View File

@ -19,6 +19,7 @@
#include "level_zero/core/source/device/device.h"
#include "level_zero/core/source/device/device_imp.h"
#include "level_zero/core/source/driver/driver_handle_imp.h"
#include "level_zero/core/source/hw_helpers/l0_hw_helper.h"
#include "level_zero/core/source/kernel/kernel.h"
#include "igfxfmid.h"
@ -39,10 +40,7 @@ CommandQueueImp::CommandQueueImp(Device *device, NEO::CommandStreamReceiver *csr
useKmdWaitFunction = !!(overrideUseKmdWaitFunction);
}
int overrideMultiReturnPointCommandList = NEO::DebugManager.flags.MultiReturnPointCommandList.get();
if (overrideMultiReturnPointCommandList != -1) {
multiReturnPointCommandList = !!(overrideMultiReturnPointCommandList);
}
multiReturnPointCommandList = L0HwHelper::enableMultiReturnPointCommandList();
}
ze_result_t CommandQueueImp::destroy() {

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -15,4 +15,12 @@ L0HwHelper &L0HwHelper::get(GFXCORE_FAMILY gfxCore) {
return *l0HwHelperFactory[gfxCore];
}
bool L0HwHelper::enableMultiReturnPointCommandList() {
constexpr bool defaultValue = false;
if (NEO::DebugManager.flags.MultiReturnPointCommandList.get() != -1) {
return !!NEO::DebugManager.flags.MultiReturnPointCommandList.get();
}
return defaultValue;
}
} // namespace L0

View File

@ -30,6 +30,7 @@ struct EventPool;
class L0HwHelper {
public:
static L0HwHelper &get(GFXCORE_FAMILY gfxCore);
static bool enableMultiReturnPointCommandList();
virtual void setAdditionalGroupProperty(ze_command_queue_group_properties_t &groupProperty, NEO::EngineGroupT &group) const = 0;
virtual L0::Event *createEvent(L0::EventPool *eventPool, const ze_event_desc_t *desc, L0::Device *device) const = 0;