[rocprofiler-sdk] rename librocprofv3-attach.so (#1342)
* attach: rename librocprofv3-attach - Renames library to librocprofiler-sdk-rocattach - ROCAttach library will be formalized and documented in future commit * Address review comments - Rename rocprofv3-attach.py to rocprof-attach.py - Use common filesystem.hpp in rocattach * Fix component name typo * Doc fixup --------- Co-authored-by: JeniferC99 <150404595+JeniferC99@users.noreply.github.com>
This commit is contained in:
@@ -24,11 +24,11 @@ install(
|
||||
WORLD_EXECUTE
|
||||
COMPONENT tools)
|
||||
|
||||
configure_file(rocprofv3-attach.py
|
||||
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/rocprofv3-attach COPYONLY)
|
||||
configure_file(rocprof-attach.py
|
||||
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/rocprof-attach COPYONLY)
|
||||
|
||||
install(
|
||||
FILES ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/rocprofv3-attach
|
||||
FILES ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/rocprof-attach
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ
|
||||
WORLD_EXECUTE
|
||||
|
||||
+4
-4
@@ -28,9 +28,9 @@ import signal
|
||||
import sys
|
||||
import time
|
||||
|
||||
ROCPROFV3_ATTACH_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||
ROCM_DIR = os.path.dirname(ROCPROFV3_ATTACH_DIR)
|
||||
ROCPROF_ATTACH_TOOL_LIBRARY = f"{ROCM_DIR}/lib/rocprofiler-sdk/librocprofv3-attach.so"
|
||||
ROCPROF_ATTACH_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||
ROCM_DIR = os.path.dirname(ROCPROF_ATTACH_DIR)
|
||||
ROCPROF_ATTACH_TOOL_LIBRARY = f"{ROCM_DIR}/lib/rocprofiler-sdk-rocattach.so"
|
||||
|
||||
|
||||
def main(
|
||||
@@ -41,7 +41,7 @@ def main(
|
||||
duration=os.environ.get("ROCPROF_ATTACH_DURATION", None),
|
||||
):
|
||||
if pid is None:
|
||||
raise RuntimeError("rocprofv3_attach called with no PID specified")
|
||||
raise RuntimeError("rocprof_attach called with no PID specified")
|
||||
|
||||
print(f"Attaching to PID {pid} using library {attach_library}")
|
||||
|
||||
@@ -1148,7 +1148,7 @@ def run(app_args, args, **kwargs):
|
||||
ROCPROF_LIST_AVAIL_TOOL_LIBRARY = (
|
||||
f"{ROCM_DIR}/lib/rocprofiler-sdk/librocprofv3-list-avail.so"
|
||||
)
|
||||
ROCPROF_ATTACH_TOOL_LIBRARY = f"{ROCM_DIR}/lib/rocprofiler-sdk/librocprofv3-attach.so"
|
||||
ROCPROF_ATTACH_TOOL_LIBRARY = f"{ROCM_DIR}/lib/librocprofiler-sdk-rocattach.so"
|
||||
|
||||
ROCPROF_TOOL_LIBRARY = resolve_library_path(ROCPROF_TOOL_LIBRARY, args)
|
||||
ROCPROF_SDK_LIBRARY = resolve_library_path(ROCPROF_SDK_LIBRARY, args)
|
||||
@@ -1517,7 +1517,7 @@ def run(app_args, args, **kwargs):
|
||||
update_env("ROCPROF_ATTACH_PID", args.pid)
|
||||
if args.attach_duration_msec is not None:
|
||||
update_env("ROCPROF_ATTACH_DURATION", f"{args.attach_duration_msec}")
|
||||
path = os.path.join(f"{ROCM_DIR}", "bin/rocprofv3-attach")
|
||||
path = os.path.join(f"{ROCM_DIR}", "bin/rocprof-attach")
|
||||
if app_args:
|
||||
exit_code = subprocess.check_call([sys.executable, path], env=app_env)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user