Skip to content

Commit 3e09f03

Browse files
authored
change default rocprof version to v3 when not setting env variable (#673)
1 parent fe2035d commit 3e09f03

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Full documentation for ROCm Compute Profiler is available at [https://rocm.docs.
4747

4848
### Changed
4949

50+
* Change the default rocprof version to v3 when environment variable "ROCPROF" is not set
5051
* Change the rocprof version for unit tests to rocprofv3 on all SoCs except MI100
5152
* Change normal_unit default to per_kernel
5253
* Change dependency from rocm-smi to amd-smi

src/utils/utils.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,13 @@ def get_base_spi_pipe_counter(counter):
7070

7171

7272
def using_v1():
73-
74-
return "ROCPROF" not in os.environ.keys() or (
75-
"ROCPROF" in os.environ.keys() and os.environ["ROCPROF"].endswith("rocprof")
76-
)
73+
return "ROCPROF" in os.environ.keys() and os.environ["ROCPROF"].endswith("rocprof")
7774

7875

7976
def using_v3():
80-
return "ROCPROF" in os.environ.keys() and os.environ["ROCPROF"].endswith("rocprofv3")
77+
return "ROCPROF" not in os.environ.keys() or (
78+
"ROCPROF" in os.environ.keys() and os.environ["ROCPROF"].endswith("rocprofv3")
79+
)
8180

8281

8382
def get_version(rocprof_compute_home) -> dict:
@@ -141,15 +140,15 @@ def detect_rocprof():
141140
global rocprof_cmd
142141
# detect rocprof
143142
if not "ROCPROF" in os.environ.keys():
144-
rocprof_cmd = "rocprof"
143+
rocprof_cmd = "rocprofv3"
145144
else:
146145
rocprof_cmd = os.environ["ROCPROF"]
147146

148147
# resolve rocprof path
149148
rocprof_path = shutil.which(rocprof_cmd)
150149

151150
if not rocprof_path:
152-
rocprof_cmd = "rocprof"
151+
rocprof_cmd = "rocprofv3"
153152
console_warning(
154153
"Unable to resolve path to %s binary. Reverting to default." % rocprof_cmd
155154
)

0 commit comments

Comments
 (0)