SWDEV-422207 - Optimize graph end detection

- Do not use extra barrier to detect graph end. If its a kernel node we
can use a completion signal for the last packet. Saves roughly 6us for
Phantom testcase per graph launch.

Change-Id: I5e0c2479d9964fbeda86ed97533f6718f49a7f91


[ROCm/clr commit: c3bd229f4f]
This commit is contained in:
Saleel Kudchadker
2023-11-09 23:52:40 +00:00
parent 85b95f0a45
commit be743bcd59
3 changed files with 42 additions and 13 deletions
+8 -3
View File
@@ -1261,14 +1261,19 @@ class Marker : public Command {
};
class AccumulateCommand : public Command {
private:
uint8_t* lastPacket_;
public:
//! Create a new Marker
AccumulateCommand(HostQueue& queue, const EventWaitList& eventWaitList = nullWaitList,
const Event* waitingEvent = nullptr)
: Command(queue, CL_COMMAND_TASK, eventWaitList, 0, waitingEvent) {
const Event* waitingEvent = nullptr, uint8_t* lastPacket = nullptr)
: Command(queue, CL_COMMAND_TASK, eventWaitList, 0, waitingEvent),
lastPacket_(lastPacket)
{
profilingInfo_.multiple_ts_ = true;
}
// Return last packet
uint8_t* getLastPacket() const { return lastPacket_; }
//! The command implementation
virtual void submit(device::VirtualDevice& device) {
device.submitAccumulate(*this);