passing filename to mem_manager dump
Change-Id: I95cb99a69c4d2f8e55a063388d46a7f7b196f6bd
[ROCm/rocprofiler commit: 5511a969e7]
Этот коммит содержится в:
коммит произвёл
Evgeny Shcherbakov
родитель
71a89320ef
Коммит
4e691bd307
@@ -188,17 +188,15 @@ class MemManager:
|
||||
|
||||
m = hipMemcpy_ptrn_kind.match(args)
|
||||
if m:
|
||||
direction = switcher.get(m.group(1), "unknown")
|
||||
direction = switcher.get(m.group(1), "unknown")
|
||||
|
||||
copy_line = str(start_time) + DELIM + str(end_time) + DELIM + pid + DELIM + tid + DELIM + event + DELIM + 'Direction=' + direction + DELIM + 'SrcType=' + srcptr_type + DELIM + 'DstType=' + dstptr_type + DELIM + "Size=" + str(size) + DELIM + "BW=" + str(round(bandwidth, 2)) + DELIM + 'Async=' + str(is_async)
|
||||
|
||||
self.memcopies[recordid] = copy_line
|
||||
return copy_line;
|
||||
|
||||
def dump_data(self):
|
||||
# To create “MM” table in DB on the finish
|
||||
table_name = "MM"
|
||||
file_name = os.environ['PWD'] + '/results.memcopy_info.csv'
|
||||
def dump_data(self, table_name, file_name):
|
||||
# To create memcopy info table in DB
|
||||
print("File '" + file_name + "' is generating")
|
||||
table_handle = self.db.add_table(table_name, mm_table_descr)
|
||||
|
||||
@@ -212,5 +210,6 @@ class MemManager:
|
||||
else:
|
||||
rec_vals_array.append(rec)
|
||||
self.db.insert_entry(table_handle, rec_vals_array)
|
||||
# To dump the MM table as CSV
|
||||
|
||||
# To dump the memcopy info table as CSV
|
||||
self.db.dump_csv(table_name, file_name)
|
||||
|
||||
@@ -672,6 +672,7 @@ else:
|
||||
kfd_statfile = re.sub(r'\.stats\.csv$', r'.kfd_stats.csv', statfile)
|
||||
ops_statfile = statfile
|
||||
copy_statfile = re.sub(r'\.stats\.csv$', r'.copy_stats.csv', statfile)
|
||||
memcopy_info_file = re.sub(r'\.stats\.csv$', r'.memcopy_info.csv', statfile)
|
||||
sysinfo_file = re.sub(r'\.stats\.csv$', r'.sysinfo.txt', statfile)
|
||||
metadata_gen(sysinfo_file, 'rocminfo')
|
||||
|
||||
@@ -778,7 +779,7 @@ else:
|
||||
db.close_json(jsonfile);
|
||||
|
||||
if mcopy_data_enabled:
|
||||
memory_manager.dump_data()
|
||||
memory_manager.dump_data('MM', memcopy_info_file)
|
||||
|
||||
db.close()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user