kfdtest: fix infinite loop in sdma multicopy

when variable interval become zero, the loop of while (timeConsumption >= interval)
will be a infinite loop. The fix is to avoid that case.

Change-Id: I8fd07296925300bace5ab7d3da86482b6d8b0d03
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>


[ROCm/ROCR-Runtime commit: 634b30119a]
Этот коммит содержится в:
Eric Huang
2020-01-23 14:25:14 -05:00
родитель 2e3ae4b983
Коммит 48b44a5b6f
+3
Просмотреть файл
@@ -422,6 +422,9 @@ void sdma_multicopy_report(std::vector<SDMACopyParams> &array, HSAuint64 countPe
begin = array[base].timeBegin;
end = array[base + countPerGroup - 1].timeEnd;
if (begin == 0 && end == 0)
continue;
if (timeConsumptionMax < end - begin)
timeConsumptionMax = end - begin;