SWDEV-349794 - Fix time accumulation

If the execution command had a split into multiple HW operations, then runtime has to accumulate time for all operations

Change-Id: Iaba31e96250918d8190bf63adb4c07730fdfefbf


[ROCm/clr commit: 24f5362296]
Tento commit je obsažen v:
German
2022-08-19 10:06:26 -04:00
odevzdal German Andryeyev
rodič d05b1469ae
revize 5ed568998f
2 změnil soubory, kde provedl 7 přidání a 1 odebrání
+6 -1
Zobrazit soubor
@@ -151,7 +151,12 @@ void Timestamp::checkGpuTime() {
}
signals_.clear();
if (end != 0) {
start_ = start * ticksToTime_;
// Check if it's the first execution and update start time
if (!accum_ena_) {
start_ = start * ticksToTime_;
accum_ena_ = true;
}
// Progress the end time always
end_ = end * ticksToTime_;
}
}
+1
Zobrazit soubor
@@ -105,6 +105,7 @@ class Timestamp : public amd::ReferenceCountedObject {
std::vector<ProfilingSignal*> signals_; //!< The list of all signals, associated with the TS
hsa_signal_t callback_signal_; //!< Signal associated with a callback for possible later update
amd::Monitor lock_; //!< Serialize timestamp update
bool accum_ena_ = false; //!< If TRUE then the accumulation of execution times has started
Timestamp(const Timestamp&) = delete;
Timestamp& operator=(const Timestamp&) = delete;