Use ROCM_PATH for sdk library path (#1097)

This commit is contained in:
vedithal-amd
2025-09-24 10:31:20 -04:00
committed by GitHub
parent a90f28cd5c
commit f5505b5989
2 changed files with 9 additions and 2 deletions
@@ -24,6 +24,7 @@
##############################################################################
import argparse
import os
import re
from pathlib import Path
from typing import Optional
@@ -351,7 +352,9 @@ Examples:
type=str,
dest="rocprofiler_sdk_library_path",
required=False,
default="/opt/rocm/lib/librocprofiler-sdk.so",
default=str(
Path(os.getenv("ROCM_PATH", "/opt/rocm")) / "lib/librocprofiler-sdk.so"
),
help="\t\t\tSet the path to rocprofiler SDK library.",
)
profile_group.add_argument(
@@ -23,8 +23,10 @@
##############################################################################
import os
import subprocess
from importlib.machinery import SourceFileLoader
from pathlib import Path
from unittest.mock import patch
import pytest
@@ -45,7 +47,9 @@ def pytest_addoption(parser):
parser.addoption(
"--rocprofiler-sdk-library-path",
type=str,
default="/opt/rocm/lib/librocprofiler-sdk.so",
default=str(
Path(os.getenv("ROCM_PATH", "/opt/rocm")) / "lib/librocprofiler-sdk.so"
),
help="Path to the rocprofiler-sdk library",
)