mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
L0::Event to support dynamic size - part 3
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
1c9bd5f114
commit
1bca3b2ab5
@@ -18,10 +18,16 @@ enum class ImageType;
|
||||
}
|
||||
|
||||
namespace L0 {
|
||||
#pragma pack(1)
|
||||
struct EventData {
|
||||
uint64_t address;
|
||||
uint64_t packetsInUse;
|
||||
uint64_t timestampSizeInDw;
|
||||
};
|
||||
#pragma pack()
|
||||
|
||||
static_assert(sizeof(EventData) == (3 * sizeof(uint64_t)),
|
||||
"This structure is consumed by GPU and has to follow specific restrictions for padding and size");
|
||||
|
||||
struct AlignedAllocationData {
|
||||
uintptr_t alignedAllocationPtr = 0u;
|
||||
|
||||
@@ -1728,6 +1728,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendQueryKernelTimestamps(
|
||||
commandContainer.addToResidencyContainer(&event->getAllocation(this->device));
|
||||
timestampsData[i].address = event->getGpuAddress(this->device);
|
||||
timestampsData[i].packetsInUse = event->getPacketsInUse();
|
||||
timestampsData[i].timestampSizeInDw = event->getTimestampSizeInDw();
|
||||
}
|
||||
|
||||
size_t alignedSize = alignUp<size_t>(sizeof(EventData) * numEvents, MemoryConstants::pageSize64k);
|
||||
|
||||
@@ -58,6 +58,7 @@ struct Event : _ze_event_handle_t {
|
||||
void *getHostAddress() { return hostAddress; }
|
||||
virtual void setPacketsInUse(uint32_t value) = 0;
|
||||
uint32_t getCurrKernelDataIndex() const { return kernelCount - 1; }
|
||||
virtual size_t getTimestampSizeInDw() const = 0;
|
||||
void *hostAddress = nullptr;
|
||||
uint32_t kernelCount = 1u;
|
||||
ze_event_scope_flags_t signalScope = 0u;
|
||||
@@ -104,6 +105,7 @@ struct EventImp : public Event {
|
||||
uint64_t getPacketAddress(Device *device) override;
|
||||
uint32_t getPacketsInUse() override;
|
||||
void setPacketsInUse(uint32_t value) override;
|
||||
size_t getTimestampSizeInDw() const override { return (sizeof(TagSizeT) / 4); };
|
||||
|
||||
std::unique_ptr<NEO::TimestampPackets<TagSizeT>[]> kernelTimestampsData;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user