mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
fix: allocation information from standalone profiling CB event
Related-To: NEO-11925 Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
79bffdb5ba
commit
17a2b36a87
@@ -411,6 +411,9 @@ void Event::disableImplicitCounterBasedMode() {
|
||||
}
|
||||
|
||||
uint64_t Event::getGpuAddress(Device *device) const {
|
||||
if (inOrderTimestampNode) {
|
||||
return inOrderTimestampNode->getGpuAddress();
|
||||
}
|
||||
return getAllocation(device)->getGpuAddress() + this->eventPoolOffset;
|
||||
}
|
||||
|
||||
|
||||
@@ -300,6 +300,8 @@ struct Event : _ze_event_handle_t {
|
||||
|
||||
void resetInOrderTimestampNode(NEO::TagNodeBase *newNode);
|
||||
|
||||
bool hasInOrderTimestampNode() const { return inOrderTimestampNode != nullptr; }
|
||||
|
||||
protected:
|
||||
Event(int index, Device *device) : device(device), index(index) {}
|
||||
|
||||
|
||||
@@ -6628,11 +6628,18 @@ struct StandaloneInOrderTimestampAllocationTests : public InOrderCmdListTests {
|
||||
};
|
||||
|
||||
HWTEST2_F(StandaloneInOrderTimestampAllocationTests, givenTimestampEventWhenAskingForAllocationOrGpuAddressThenReturnNodeAllocation, MatchAny) {
|
||||
auto eventPool = createEvents<FamilyType>(1, true);
|
||||
auto eventPool = createEvents<FamilyType>(2, true);
|
||||
|
||||
auto cmdList = createImmCmdList<gfxCoreFamily>();
|
||||
|
||||
EXPECT_FALSE(events[0]->hasInOrderTimestampNode());
|
||||
EXPECT_FALSE(events[1]->hasInOrderTimestampNode());
|
||||
|
||||
cmdList->appendLaunchKernel(kernel->toHandle(), groupCount, events[0]->toHandle(), 0, nullptr, launchParams, false);
|
||||
cmdList->appendLaunchKernel(kernel->toHandle(), groupCount, events[1]->toHandle(), 0, nullptr, launchParams, false);
|
||||
|
||||
EXPECT_TRUE(events[0]->hasInOrderTimestampNode());
|
||||
EXPECT_TRUE(events[1]->hasInOrderTimestampNode());
|
||||
|
||||
EXPECT_NE(events[0]->inOrderTimestampNode->getBaseGraphicsAllocation(), events[0]->eventPoolAllocation);
|
||||
EXPECT_NE(nullptr, events[0]->inOrderTimestampNode->getBaseGraphicsAllocation());
|
||||
@@ -6641,6 +6648,10 @@ HWTEST2_F(StandaloneInOrderTimestampAllocationTests, givenTimestampEventWhenAski
|
||||
EXPECT_EQ(events[0]->inOrderTimestampNode->getBaseGraphicsAllocation()->getGraphicsAllocation(0), events[0]->getAllocation(device));
|
||||
EXPECT_EQ(events[0]->inOrderTimestampNode->getBaseGraphicsAllocation()->getGraphicsAllocation(0)->getGpuAddress(), events[0]->getGpuAddress(device));
|
||||
EXPECT_EQ(events[0]->getGpuAddress(device) + events[0]->getCompletionFieldOffset(), events[0]->getCompletionFieldGpuAddress(device));
|
||||
|
||||
EXPECT_EQ(events[0]->getGpuAddress(device), events[0]->inOrderTimestampNode->getGpuAddress());
|
||||
EXPECT_EQ(events[1]->getGpuAddress(device), events[1]->inOrderTimestampNode->getGpuAddress());
|
||||
EXPECT_NE(events[0]->getGpuAddress(device), events[1]->getGpuAddress(device));
|
||||
}
|
||||
|
||||
HWTEST2_F(StandaloneInOrderTimestampAllocationTests, givenNonWalkerCounterSignalingWhenPassedNonProfilingEventThenAssignAllocation, IsAtLeastXeHpCore) {
|
||||
|
||||
Reference in New Issue
Block a user