profile: fix parsing tcc per channel on mi300 (#234)

Co-authored-by: fei.zheng <fei.zheng@amd.com>
Signed-off-by: colramos-amd <colramos@amd.com>


[ROCm/rocprofiler-compute commit: f44ce21252]
This commit is contained in:
colramos-amd
2024-01-31 09:34:50 -06:00
parent 90fc9dced5
commit c0e2d759dd
@@ -492,9 +492,13 @@ def flatten_tcc_info_across_hbm_stacks(file, stack_num, tcc_channel_per_stack):
for col in tcc_cols_orig:
for i in range(0, stack_num):
# filter the channel index only
p = re.compile(r"(\d+)")
p = re.compile(r"\[(\d+)\]")
# pick up the 1st element only
r = lambda match: str(int(float(match.group(0))) + i * tcc_channel_per_stack)
r = (
lambda match: "["
+ str(int(match.group(1)) + i * tcc_channel_per_stack)
+ "]"
)
tcc_cols_in_group[i].append(re.sub(pattern=p, repl=r, string=col))
for i in range(0, stack_num):