+4
-5
@@ -44,10 +44,9 @@ def resolve_rocprof(returnPath=False):
|
||||
else:
|
||||
rocprof_cmd = os.environ["ROCPROF"]
|
||||
|
||||
rocprof_path = subprocess.run(
|
||||
["which", rocprof_cmd], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL
|
||||
)
|
||||
if rocprof_path.returncode != 0:
|
||||
rocprof_path = shutil.which(rocprof_cmd)
|
||||
|
||||
if not rocprof_path:
|
||||
print("\nError: Unable to resolve path to %s binary" % rocprof_cmd)
|
||||
print(
|
||||
"Please verify installation or set ROCPROF environment variable with full path."
|
||||
@@ -55,7 +54,7 @@ def resolve_rocprof(returnPath=False):
|
||||
sys.exit(1)
|
||||
else:
|
||||
# Resolve any sym links in file path
|
||||
rocprof_path = os.path.realpath(rocprof_path.stdout.decode("utf-8").rstrip("\n"))
|
||||
rocprof_path = os.path.realpath(rocprof_path.rstrip("\n"))
|
||||
print("ROC Profiler: ", rocprof_path)
|
||||
if returnPath:
|
||||
return rocprof_path
|
||||
|
||||
+7
-12
@@ -35,6 +35,7 @@ import pandas as pd
|
||||
from datetime import datetime
|
||||
from pathlib import Path as path
|
||||
import warnings
|
||||
import shutil
|
||||
|
||||
from parser import parse
|
||||
from utils import specs
|
||||
@@ -438,10 +439,8 @@ def characterize_app(args, VER):
|
||||
def run_rocscope(args, fname):
|
||||
# profile the app
|
||||
if args.use_rocscope == True:
|
||||
result = subprocess.run(
|
||||
["which", "rocscope"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL
|
||||
)
|
||||
if result.returncode == 0:
|
||||
result = shutil.which("rocscope")
|
||||
if result:
|
||||
rs_cmd = [
|
||||
result.stdout.decode("ascii").strip(),
|
||||
"metrics",
|
||||
@@ -553,10 +552,8 @@ def omniperf_profile(args, VER):
|
||||
print(e)
|
||||
sys.exit(1)
|
||||
|
||||
result = subprocess.run(
|
||||
["which", "rocscope"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL
|
||||
)
|
||||
if result.returncode == 0:
|
||||
result = shutil.which("rocscope")
|
||||
if result:
|
||||
rs_cmd = [
|
||||
result.stdout.decode("ascii").strip(),
|
||||
"top10",
|
||||
@@ -587,10 +584,8 @@ def omniperf_profile(args, VER):
|
||||
print(e)
|
||||
sys.exit(1)
|
||||
|
||||
result = subprocess.run(
|
||||
["which", "rocscope"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL
|
||||
)
|
||||
if result.returncode == 0:
|
||||
result = shutil.which("rocscope")
|
||||
if result:
|
||||
rs_cmd = [
|
||||
result.stdout.decode("ascii").strip(),
|
||||
"summary",
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
# SOFTWARE.
|
||||
##############################################################################el
|
||||
|
||||
import sys, os, pathlib, shutil, subprocess, argparse, glob, re
|
||||
import sys, os, shutil, glob, re
|
||||
import numpy as np
|
||||
import math
|
||||
import warnings
|
||||
|
||||
在新工单中引用
屏蔽一个用户