SWDEV-292018 - Switch to internal signals for markers
Add ref counting to ProfilingSignal class to track the last release. If a signal was used in the marker, then don't reuse it, but create a new one for internal usage. Don't rely on HSA callback for the command status update if there are no pending dispatches. Change-Id: I19f14ed9d80acfe79993b343b2187635f8428a20
This commit is contained in:
committed by
Maneesh Gupta
parent
6408b9b906
commit
ff15c0893e
@@ -207,7 +207,7 @@ class Event : public RuntimeObject {
|
||||
|
||||
/*! \brief Notifies current command queue about execution status
|
||||
*/
|
||||
bool notifyCmdQueue();
|
||||
bool notifyCmdQueue(bool cpu_wait = false);
|
||||
|
||||
//! RTTI internal implementation
|
||||
virtual ObjectType objectType() const { return ObjectTypeEvent; }
|
||||
@@ -998,15 +998,22 @@ class ExternalSemaphoreCmd : public Command {
|
||||
|
||||
|
||||
class Marker : public Command {
|
||||
private:
|
||||
bool cpu_wait_; //!< If true, then the marker was issued for CPU/GPU sync
|
||||
|
||||
public:
|
||||
//! Create a new Marker
|
||||
Marker(HostQueue& queue, bool userVisible, const EventWaitList& eventWaitList = nullWaitList,
|
||||
const Event* waitingEvent = nullptr)
|
||||
: Command(queue, userVisible ? CL_COMMAND_MARKER : 0, eventWaitList, 0, waitingEvent) {}
|
||||
const Event* waitingEvent = nullptr, bool cpu_wait = false)
|
||||
: Command(queue, userVisible ? CL_COMMAND_MARKER : 0, eventWaitList, 0, waitingEvent)
|
||||
, cpu_wait_(cpu_wait) {}
|
||||
|
||||
//! The actual command implementation.
|
||||
virtual void submit(device::VirtualDevice& device) { device.submitMarker(*this); }
|
||||
|
||||
//! Check if this marker requires CPU wait
|
||||
bool CpuWaitRequested() const { return cpu_wait_; }
|
||||
|
||||
};
|
||||
|
||||
/*! \brief Maps CL objects created from external ones and syncs the contents (blocking).
|
||||
|
||||
Reference in New Issue
Block a user