L0::Event to support dynamic size - part 2

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2021-05-18 16:28:14 +00:00
committed by Compute-Runtime-Automation
parent 529020c72c
commit afa461efb0
12 changed files with 226 additions and 47 deletions

View File

@@ -153,6 +153,7 @@ class HwHelper {
size_t initialTagCount, CommandStreamReceiverType csrType,
DeviceBitfield deviceBitfield) const = 0;
virtual size_t getTimestampPacketAllocatorAlignment() const = 0;
virtual size_t getSingleTimestampPacketSize() const = 0;
static uint32_t getSubDevicesCount(const HardwareInfo *pHwInfo);
static uint32_t getEnginesCount(const HardwareInfo &hwInfo);
@@ -381,6 +382,8 @@ class HwHelperHw : public HwHelper {
DeviceBitfield deviceBitfield) const override;
size_t getTimestampPacketAllocatorAlignment() const override;
size_t getSingleTimestampPacketSize() const override;
protected:
LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const override;

View File

@@ -493,6 +493,21 @@ size_t HwHelperHw<GfxFamily>::getTimestampPacketAllocatorAlignment() const {
return MemoryConstants::cacheLineSize * 4;
}
template <typename GfxFamily>
size_t HwHelperHw<GfxFamily>::getSingleTimestampPacketSize() const {
if (DebugManager.flags.OverrideTimestampPacketSize.get() != -1) {
if (DebugManager.flags.OverrideTimestampPacketSize.get() == 4) {
return TimestampPackets<uint32_t>::getSinglePacketSize();
} else if (DebugManager.flags.OverrideTimestampPacketSize.get() == 8) {
return TimestampPackets<uint64_t>::getSinglePacketSize();
} else {
UNRECOVERABLE_IF(true);
}
}
return TimestampPackets<typename GfxFamily::TimestampPacketType>::getSinglePacketSize();
}
template <typename GfxFamily>
LocalMemoryAccessMode HwHelperHw<GfxFamily>::getLocalMemoryAccessMode(const HardwareInfo &hwInfo) const {
switch (static_cast<LocalMemoryAccessMode>(DebugManager.flags.ForceLocalMemoryAccessMode.get())) {