From 6e1cab4e037b6a01e8de4c0be725b22f10539230 Mon Sep 17 00:00:00 2001 From: ywang103-amd Date: Mon, 31 Mar 2025 16:40:53 -0400 Subject: [PATCH] re-write fucntion that detects whether v1 is in use to avoid false negative result when ROCPROF is not set (#647) [ROCm/rocprofiler-compute commit: 7b38766caa9ec27a240f46e26315f6b444abdaba] --- projects/rocprofiler-compute/src/utils/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/rocprofiler-compute/src/utils/utils.py b/projects/rocprofiler-compute/src/utils/utils.py index 53090f0ab5..f37f8da74a 100644 --- a/projects/rocprofiler-compute/src/utils/utils.py +++ b/projects/rocprofiler-compute/src/utils/utils.py @@ -54,7 +54,10 @@ def is_tcc_channel_counter(counter): def using_v1(): - return "ROCPROF" in os.environ.keys() and os.environ["ROCPROF"].endswith("rocprof") + + return "ROCPROF" not in os.environ.keys() or ( + "ROCPROF" in os.environ.keys() and os.environ["ROCPROF"].endswith("rocprof") + ) def using_v3():