Use ROCM_PATH for sdk library path (#1097)
This commit is contained in:
@@ -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",
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user