SWDEV-241265 : fixing scripts
Change-Id: Id7fcc309d0003bc72e972976e1944afd6488001d
[ROCm/rocprofiler commit: 249b0c2b26]
Этот коммит содержится в:
коммит произвёл
Evgeny Shcherbakov
родитель
2adb15caff
Коммит
e65aba50ad
@@ -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'],
|
||||
|
||||
@@ -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"
|
||||
|
||||
Ссылка в новой задаче
Block a user