Patch llvm-cxxfilt detection in atypical rocm installs
Signed-off-by: coleramos425 <colramos@amd.com>
[ROCm/rocprofiler-compute commit: 7187218ed9]
This commit is contained in:
@@ -43,6 +43,7 @@ from utils import remove_workload
|
||||
from utils import csv_processor # Import workload
|
||||
from omniperf_analyze.omniperf_analyze import roofline_only # Standalone roofline
|
||||
from omniperf_analyze.omniperf_analyze import analyze # CLI analysis
|
||||
from common import resolve_rocprof
|
||||
|
||||
from common import (
|
||||
OMNIPERF_HOME,
|
||||
@@ -102,26 +103,6 @@ def capture_subprocess_output(subprocess_args):
|
||||
|
||||
return (success, output)
|
||||
|
||||
def resolve_rocprof():
|
||||
# ROCPROF INFO
|
||||
global rocprof_cmd
|
||||
if not "ROCPROF" in os.environ.keys():
|
||||
rocprof_cmd = "rocprof"
|
||||
else:
|
||||
rocprof_cmd = os.environ["ROCPROF"]
|
||||
|
||||
rocprof_path = subprocess.run(
|
||||
["which", rocprof_cmd], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL
|
||||
)
|
||||
if rocprof_path.returncode != 0:
|
||||
print("\nError: Unable to resolve path to %s binary" % rocprof_cmd)
|
||||
print(
|
||||
"Please verify installation or set ROCPROF environment variable with full path."
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
print("ROC Profiler: ", rocprof_path.stdout.decode("utf-8"))
|
||||
|
||||
|
||||
def get_soc():
|
||||
mspec = specs.get_machine_specs(0)
|
||||
@@ -747,7 +728,8 @@ def main():
|
||||
if args.mode == "profile":
|
||||
Extractionlvl = args.kernelVerbose
|
||||
print("Resolving rocprof")
|
||||
resolve_rocprof()
|
||||
global rocprof_cmd
|
||||
rocprof_cmd = resolve_rocprof()
|
||||
# Cannot access parent directories
|
||||
if ".." in str(args.path):
|
||||
throw_parse_error(
|
||||
|
||||
Reference in New Issue
Block a user