Change-Id: Id7fcc309d0003bc72e972976e1944afd6488001d


[ROCm/rocprofiler commit: 249b0c2b26]
Этот коммит содержится в:
Evgeny
2020-12-03 05:30:27 -05:00
коммит произвёл Evgeny Shcherbakov
родитель 2adb15caff
Коммит e65aba50ad
2 изменённых файлов: 16 добавлений и 11 удалений
+12 -11
Просмотреть файл
@@ -55,17 +55,18 @@ class MemManager:
# Parsing the mapping of HSA agent and memory pool handles
def parse_hsa_handles(self, infile):
inp = open(infile, 'r')
cpu_agent_ptrn = re.compile(r'(0x[0-9a-fA-F]+) agent cpu')
gpu_agent_ptrn = re.compile(r'(0x[0-9a-fA-F]+) agent gpu')
for line in inp.readlines():
m_cpu = cpu_agent_ptrn.match(line)
if m_cpu:
self.hsa_agent_types[str(int(m_cpu.group(1),16))] = 0# "cpu"
m_gpu = gpu_agent_ptrn.match(line)
if m_gpu:
self.hsa_agent_types[str(int(m_gpu.group(1),16))] = 1 #"gpu"
inp.close()
if os.path.exists(infile):
inp = open(infile, 'r')
cpu_agent_ptrn = re.compile(r'(0x[0-9a-fA-F]+) agent cpu')
gpu_agent_ptrn = re.compile(r'(0x[0-9a-fA-F]+) agent gpu')
for line in inp.readlines():
m_cpu = cpu_agent_ptrn.match(line)
if m_cpu:
self.hsa_agent_types[str(int(m_cpu.group(1),16))] = 0 # "cpu"
m_gpu = gpu_agent_ptrn.match(line)
if m_gpu:
self.hsa_agent_types[str(int(m_gpu.group(1),16))] = 1 # "gpu"
inp.close()
# register alloc and memcpy API calls
# ['BeginNs', 'EndNs', 'pid', 'tid', 'Name', 'args', 'Index', 'Data'],
+4
Просмотреть файл
@@ -468,6 +468,10 @@ if [ "$ARG_CK" = "-" ] ; then
fatal "Wrong option '$ARG_IN'"
fi
if [ "$GEN_STATS" = "1" -a "$ROCP_TIMESTAMP_ON" = "0" ] ; then
fatal "Wrong options, stats enabled with disabled timestamps"
fi
if [ -z "$INPUT_FILE" ] ; then
input_base="results"
input_type="none"