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
Этот коммит содержится в:
German
2022-08-19 10:06:26 -04:00
коммит произвёл German Andryeyev
родитель 2733344689
Коммит 24f5362296
2 изменённых файлов: 7 добавлений и 1 удалений
+6 -1
Просмотреть файл
@@ -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
Просмотреть файл
@@ -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;