SWDEV-296922 : Incorrect rounding due to integer division in rocprofiler metrics

Changed var_pattern in tblextr.py to include pattern like "name[0]"

Change-Id: Ibe1c512595cfbdcaca8fa5bddceb3f6a570caf43


[ROCm/rocprofiler commit: ff43ca1542]
This commit is contained in:
Chun Yang
2021-08-11 19:55:31 -07:00
committed by Laurent Morichetti
parent 62a76c8ebb
commit b4231ee97d
+2 -2
View File
@@ -117,8 +117,8 @@ def parse_res(infile):
ts_pattern = re.compile(", time\((\d*),(\d*),(\d*),(\d*)\)")
# var pattern below matches a variable name and a variable value from a one
# line text in the format of for example "WRITE_SIZE (0.2500000000)" or
# "GRBM_GUI_ACTIVE (27867)"
var_pattern = re.compile("^\s*([a-zA-Z0-9_]+)\s+\((\d+(?:\.\d+)?)\)")
# "GRBM_GUI_ACTIVE (27867)" or "TA_TA_BUSY[0]"
var_pattern = re.compile("^\s*([a-zA-Z0-9_]+(?:\[\d+\])?)\s+\((\d+(?:\.\d+)?)\)")
dispatch_number = 0
for line in inp.readlines():