Conform to Python formatting
Signed-off-by: coleramos425 <colramos@amd.com>
[ROCm/rocprofiler-compute commit: dc849b264c]
Este commit está contenido en:
@@ -49,6 +49,7 @@ from utils import csv_converter
|
|||||||
|
|
||||||
archConfigs = {}
|
archConfigs = {}
|
||||||
|
|
||||||
|
|
||||||
################################################
|
################################################
|
||||||
# Helper Functions
|
# Helper Functions
|
||||||
################################################
|
################################################
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ MAX_SERVER_SEL_DELAY = 5000 # 5 sec connection timeout
|
|||||||
|
|
||||||
|
|
||||||
def kernel_name_shortener(workload_dir, level):
|
def kernel_name_shortener(workload_dir, level):
|
||||||
|
|
||||||
def shorten_file(df, level):
|
def shorten_file(df, level):
|
||||||
global cache
|
global cache
|
||||||
|
|
||||||
@@ -60,7 +59,9 @@ def kernel_name_shortener(workload_dir, level):
|
|||||||
|
|
||||||
cmd = ["/opt/rocm/llvm/bin/llvm-cxxfilt", original_name]
|
cmd = ["/opt/rocm/llvm/bin/llvm-cxxfilt", original_name]
|
||||||
|
|
||||||
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
proc = subprocess.Popen(
|
||||||
|
cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||||
|
)
|
||||||
|
|
||||||
demangled_name, e = proc.communicate()
|
demangled_name, e = proc.communicate()
|
||||||
demangled_name = str(demangled_name, "UTF-8").strip()
|
demangled_name = str(demangled_name, "UTF-8").strip()
|
||||||
@@ -69,7 +70,9 @@ def kernel_name_shortener(workload_dir, level):
|
|||||||
new_name = ""
|
new_name = ""
|
||||||
matches = ""
|
matches = ""
|
||||||
|
|
||||||
names_and_args = re.compile(r"(?P<name>[( )A-Za-z0-9_]+)([ ,*<>()]+)(::)?")
|
names_and_args = re.compile(
|
||||||
|
r"(?P<name>[( )A-Za-z0-9_]+)([ ,*<>()]+)(::)?"
|
||||||
|
)
|
||||||
|
|
||||||
# works for name Kokkos::namespace::init_lock_array_kernel_threadid(int) [clone .kd]
|
# works for name Kokkos::namespace::init_lock_array_kernel_threadid(int) [clone .kd]
|
||||||
if names_and_args.search(demangled_name):
|
if names_and_args.search(demangled_name):
|
||||||
@@ -95,7 +98,9 @@ def kernel_name_shortener(workload_dir, level):
|
|||||||
# closing '>' is to be taken account by the while loop
|
# closing '>' is to be taken account by the while loop
|
||||||
if name[1].count(">") == 0:
|
if name[1].count(">") == 0:
|
||||||
if current_level < level:
|
if current_level < level:
|
||||||
if not (current_level == level - 1 and name[1].count("<") > 0):
|
if not (
|
||||||
|
current_level == level - 1 and name[1].count("<") > 0
|
||||||
|
):
|
||||||
new_name += name[1]
|
new_name += name[1]
|
||||||
current_level += name[1].count("<")
|
current_level += name[1].count("<")
|
||||||
|
|
||||||
|
|||||||
Referencia en una nueva incidencia
Block a user