mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
Add interface to enable state compute mode tracking per platform
Related-To: NEO-5019 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
55be825dda
commit
0270e0f8a5
@@ -42,6 +42,7 @@
|
||||
#include "level_zero/core/source/device/device_imp.h"
|
||||
#include "level_zero/core/source/driver/driver_handle_imp.h"
|
||||
#include "level_zero/core/source/event/event.h"
|
||||
#include "level_zero/core/source/hw_helpers/l0_hw_helper.h"
|
||||
#include "level_zero/core/source/image/image.h"
|
||||
#include "level_zero/core/source/kernel/kernel.h"
|
||||
#include "level_zero/core/source/module/module.h"
|
||||
@@ -131,6 +132,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::initialize(Device *device, NEO
|
||||
|
||||
auto &hwInfo = device->getHwInfo();
|
||||
this->systolicModeSupport = NEO::PreambleHelper<GfxFamily>::isSystolicModeConfigurable(hwInfo);
|
||||
this->stateComputeModeTracking = L0HwHelper::enableStateComputeModeTracking(hwInfo);
|
||||
|
||||
if (device->isImplicitScalingCapable() && !this->internalUsage && !isCopyOnly()) {
|
||||
this->partitionCount = static_cast<uint32_t>(this->device->getNEODevice()->getDeviceBitfield().count());
|
||||
|
||||
@@ -29,7 +29,6 @@ namespace L0 {
|
||||
CommandList::CommandList(uint32_t numIddsPerBlock) : commandContainer(numIddsPerBlock) {
|
||||
frontEndStateTracking = L0HwHelper::enableFrontEndStateTracking();
|
||||
pipelineSelectStateTracking = L0HwHelper::enablePipelineSelectStateTracking();
|
||||
stateComputeModeTracking = L0HwHelper::enableStateComputeModeTracking();
|
||||
}
|
||||
|
||||
CommandListAllocatorFn commandListFactory[IGFX_MAX_PRODUCT] = {};
|
||||
|
||||
@@ -46,7 +46,6 @@ CommandQueueImp::CommandQueueImp(Device *device, NEO::CommandStreamReceiver *csr
|
||||
|
||||
frontEndStateTracking = L0HwHelper::enableFrontEndStateTracking();
|
||||
pipelineSelectStateTracking = L0HwHelper::enablePipelineSelectStateTracking();
|
||||
stateComputeModeTracking = L0HwHelper::enableStateComputeModeTracking();
|
||||
}
|
||||
|
||||
ze_result_t CommandQueueImp::destroy() {
|
||||
@@ -73,6 +72,7 @@ ze_result_t CommandQueueImp::initialize(bool copyOnly, bool isInternal) {
|
||||
if (NEO::Debugger::isDebugEnabled(internalUsage) && device->getL0Debugger()) {
|
||||
device->getL0Debugger()->notifyCommandQueueCreated(device->getNEODevice());
|
||||
}
|
||||
this->stateComputeModeTracking = L0HwHelper::enableStateComputeModeTracking(device->getHwInfo());
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
@@ -33,12 +33,11 @@ bool L0HwHelper::enablePipelineSelectStateTracking() {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
bool L0HwHelper::enableStateComputeModeTracking() {
|
||||
constexpr bool defaultValue = false;
|
||||
bool L0HwHelper::enableStateComputeModeTracking(const NEO::HardwareInfo &hwInfo) {
|
||||
if (NEO::DebugManager.flags.EnableStateComputeModeTracking.get() != -1) {
|
||||
return !!NEO::DebugManager.flags.EnableStateComputeModeTracking.get();
|
||||
}
|
||||
return defaultValue;
|
||||
return get(hwInfo.platform.eRenderCoreFamily).platformSupportsStateComputeModeTracking(hwInfo);
|
||||
}
|
||||
|
||||
bool L0HwHelper::enableImmediateCmdListHeapSharing(const NEO::HardwareInfo &hwInfo, bool cmdlistSupport) {
|
||||
|
||||
@@ -32,7 +32,7 @@ class L0HwHelper {
|
||||
static L0HwHelper &get(GFXCORE_FAMILY gfxCore);
|
||||
static bool enableFrontEndStateTracking();
|
||||
static bool enablePipelineSelectStateTracking();
|
||||
static bool enableStateComputeModeTracking();
|
||||
static bool enableStateComputeModeTracking(const NEO::HardwareInfo &hwInfo);
|
||||
static bool enableImmediateCmdListHeapSharing(const NEO::HardwareInfo &hwInfo, bool cmdlistSupport);
|
||||
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;
|
||||
@@ -47,6 +47,7 @@ class L0HwHelper {
|
||||
virtual bool multiTileCapablePlatform() const = 0;
|
||||
virtual bool alwaysAllocateEventInLocalMem() const = 0;
|
||||
virtual bool platformSupportsCmdListHeapSharing(const NEO::HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool platformSupportsStateComputeModeTracking(const NEO::HardwareInfo &hwInfo) const = 0;
|
||||
|
||||
protected:
|
||||
L0HwHelper() = default;
|
||||
@@ -72,6 +73,7 @@ class L0HwHelperHw : public L0HwHelper {
|
||||
bool multiTileCapablePlatform() const override;
|
||||
bool alwaysAllocateEventInLocalMem() const override;
|
||||
bool platformSupportsCmdListHeapSharing(const NEO::HardwareInfo &hwInfo) const override;
|
||||
bool platformSupportsStateComputeModeTracking(const NEO::HardwareInfo &hwInfo) const override;
|
||||
};
|
||||
|
||||
} // namespace L0
|
||||
|
||||
@@ -43,4 +43,9 @@ bool L0HwHelperHw<Family>::platformSupportsCmdListHeapSharing(const NEO::Hardwar
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
bool L0HwHelperHw<Family>::platformSupportsStateComputeModeTracking(const NEO::HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace L0
|
||||
|
||||
@@ -23,4 +23,9 @@ bool L0HwHelperHw<Family>::platformSupportsCmdListHeapSharing(const NEO::Hardwar
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
bool L0HwHelperHw<Family>::platformSupportsStateComputeModeTracking(const NEO::HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace L0
|
||||
|
||||
Reference in New Issue
Block a user