From 20b3905f3cb6a70235c5328e060074cb5ca414d1 Mon Sep 17 00:00:00 2001 From: David Galiffi Date: Fri, 13 Sep 2024 23:35:26 -0400 Subject: [PATCH] Rename the omntrace-causal binary --- cmake/ConfigInstall.cmake | 4 ++-- source/bin/omnitrace-causal/CMakeLists.txt | 3 ++- source/bin/omnitrace-causal/impl.cpp | 24 +++++++++---------- .../bin/omnitrace-causal/omnitrace-causal.hpp | 2 +- source/lib/omnitrace/library/causal/data.cpp | 4 ++-- source/python/gui/README.md | 4 ++-- source/python/gui/setup.cfg | 4 ++-- source/python/gui/setup.py | 10 ++++---- source/python/gui/source/__main__.py | 8 +++---- tests/omnitrace-causal-tests.cmake | 2 +- 10 files changed, 33 insertions(+), 32 deletions(-) diff --git a/cmake/ConfigInstall.cmake b/cmake/ConfigInstall.cmake index 691a41014..c3d5d26db 100644 --- a/cmake/ConfigInstall.cmake +++ b/cmake/ConfigInstall.cmake @@ -45,9 +45,9 @@ export(PACKAGE ${PROJECT_NAME}) # configure_file( ${PROJECT_SOURCE_DIR}/tests/validate-causal-json.py - ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/omnitrace-causal-print COPYONLY) + ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/rocprof-sys-causal-print COPYONLY) -install(PROGRAMS ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/omnitrace-causal-print +install(PROGRAMS ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/rocprof-sys-causal-print DESTINATION ${CMAKE_INSTALL_BINDIR}) # ------------------------------------------------------------------------------# diff --git a/source/bin/omnitrace-causal/CMakeLists.txt b/source/bin/omnitrace-causal/CMakeLists.txt index 0d0ed3763..6714158f7 100644 --- a/source/bin/omnitrace-causal/CMakeLists.txt +++ b/source/bin/omnitrace-causal/CMakeLists.txt @@ -17,7 +17,8 @@ target_link_libraries( omnitrace::omnitrace-common-library omnitrace::omnitrace-core) set_target_properties( omnitrace-causal PROPERTIES BUILD_RPATH "\$ORIGIN:\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}" - INSTALL_RPATH "${OMNITRACE_EXE_INSTALL_RPATH}") + INSTALL_RPATH "${OMNITRACE_EXE_INSTALL_RPATH}" + OUTPUT_NAME "rocprof-sys-causal") omnitrace_strip_target(omnitrace-causal) diff --git a/source/bin/omnitrace-causal/impl.cpp b/source/bin/omnitrace-causal/impl.cpp index 8ed3648d8..93f2f1b9c 100644 --- a/source/bin/omnitrace-causal/impl.cpp +++ b/source/bin/omnitrace-causal/impl.cpp @@ -202,7 +202,7 @@ get_initial_environment() update_env(_env, "OMNITRACE_USE_PROCESS_SAMPLING", false); update_env(_env, "OMNITRACE_THREAD_POOL_SIZE", get_env("OMNITRACE_THREAD_POOL_SIZE", 0)); - update_env(_env, "OMNITRACE_LAUNCHER", "omnitrace-causal"); + update_env(_env, "OMNITRACE_LAUNCHER", "rocprof-sys-causal"); return _env; } @@ -228,7 +228,7 @@ prepare_command_for_run(char* _exe, std::vector& _argv) if(!_injected) { throw std::runtime_error( - join("", "omnitrace-causal was unable to match \"", launcher, + join("", "rocprof-sys-causal was unable to match \"", launcher, "\" to any arguments on the command line: \"", join(array_config{ " ", "", "" }, _argv), "\"")); } @@ -419,13 +419,13 @@ parse_args(int argc, char** argv, std::vector& _env, This executable is designed to streamline that process. For example (assume all commands end with '-- '): - omnitrace-causal -n 5 -- # runs 5x with causal profiling enabled + rocprof-sys-causal -n 5 -- # runs 5x with causal profiling enabled - omnitrace-causal -s 0 5,10,15,20 # runs 2x with virtual speedups: + rocprof-sys-causal -s 0 5,10,15,20 # runs 2x with virtual speedups: # - 0 # - randomly selected from 5, 10, 15, and 20 - omnitrace-causal -F func_A func_B func_(A|B) # runs 3x with the function scope limited to: + rocprof-sys-causal -F func_A func_B func_(A|B) # runs 3x with the function scope limited to: # 1. func_A # 2. func_B # 3. func_A or func_B @@ -435,8 +435,8 @@ parse_args(int argc, char** argv, std::vector& _env, - Collect a flat profile via sampling - E.g., rocprof-sys-sample -F -- - Inspect sampling_wall_clock.txt and sampling_cpu_clock.txt for functions to target - - Run omnitrace-causal in "function" mode first (does not require debug info) - - Run omnitrace-causal in "line" mode when you are targeting one function (requires debug info) + - Run rocprof-sys-causal in "function" mode first (does not require debug info) + - Run rocprof-sys-causal in "line" mode when you are targeting one function (requires debug info) - Preferably, use predictions from the "function" mode to determine which function to target - Limit the virtual speedups to a smaller pool, e.g., 0,5,10,25,50, to get reliable predictions quicker - Make use of the binary, source, and function scope to limit the functions/lines selected for experiments @@ -451,7 +451,7 @@ parse_args(int argc, char** argv, std::vector& _env, }); parser.enable_help(); - parser.enable_version("omnitrace-causal", OMNITRACE_ARGPARSE_VERSION_INFO); + parser.enable_version("rocprof-sys-causal", OMNITRACE_ARGPARSE_VERSION_INFO); auto _cols = std::get<0>(console::get_columns()); if(_cols > parser.get_help_width() + 8) @@ -483,7 +483,7 @@ parse_args(int argc, char** argv, std::vector& _env, }); std::string _config_file = {}; - std::string _config_folder = "omnitrace-causal-config"; + std::string _config_folder = "rocprof-sys-causal-config"; bool _generate_configs = false; bool _add_defaults = true; @@ -498,10 +498,10 @@ parse_args(int argc, char** argv, std::vector& _env, parser .add_argument( { "-l", "--launcher" }, - "When running MPI jobs, omnitrace-causal needs to be *before* the executable " + "When running MPI jobs, rocprof-sys-causal needs to be *before* the executable " "which launches the MPI processes (i.e. before `mpirun`, `srun`, etc.). Pass " "the name of the target executable (or a regex for matching to the name of " - "the target) for causal profiling, e.g., `omnitrace-causal -l foo -- mpirun " + "the target) for causal profiling, e.g., `rocprof-sys-causal -l foo -- mpirun " "-n 4 foo`. This ensures that the omnitrace library is LD_PRELOADed on the " "proper target") .count(1) @@ -511,7 +511,7 @@ parse_args(int argc, char** argv, std::vector& _env, .add_argument({ "-g", "--generate-configs" }, "Generate config files instead of passing environment variables " "directly. If no arguments are provided, the config files will be " - "placed in ${PWD}/omnitrace-causal-config folder") + "placed in ${PWD}/rocprof-sys-causal-config folder") .min_count(0) .max_count(1) .dtype("folder") diff --git a/source/bin/omnitrace-causal/omnitrace-causal.hpp b/source/bin/omnitrace-causal/omnitrace-causal.hpp index 9e0dc529f..3e54e67de 100644 --- a/source/bin/omnitrace-causal/omnitrace-causal.hpp +++ b/source/bin/omnitrace-causal/omnitrace-causal.hpp @@ -22,7 +22,7 @@ #pragma once -#define TIMEMORY_PROJECT_NAME "omnitrace-causal" +#define TIMEMORY_PROJECT_NAME "rocprof-sys-causal" #include #include diff --git a/source/lib/omnitrace/library/causal/data.cpp b/source/lib/omnitrace/library/causal/data.cpp index 53c40b9c1..25dbeebb5 100644 --- a/source/lib/omnitrace/library/causal/data.cpp +++ b/source/lib/omnitrace/library/causal/data.cpp @@ -634,11 +634,11 @@ perform_experiment_impl(std::shared_ptr> _started) // NOLINT } std::cerr << std::flush; - // if launched via omnitrace-causal, allow end-to-end runs that do not + // if launched via rocprof-sys-causal, allow end-to-end runs that do not // start experiments auto _omni_causal_launcher = get_env("OMNITRACE_LAUNCHER", "", false) == - "omnitrace-causal"; + "rocprof-sys-causal"; if(!(get_causal_end_to_end() && _omni_causal_launcher)) { diff --git a/source/python/gui/README.md b/source/python/gui/README.md index 0851fb127..369f3bdc0 100644 --- a/source/python/gui/README.md +++ b/source/python/gui/README.md @@ -13,13 +13,13 @@ python -m pip install . #### Console Script ```console -omnitrace-causal-plot +rocprof-sys-causal-plot ``` #### Module ```console -python -m omnitrace_causal_viewer +python -m rocprof-sys_causal_viewer ``` ### From source tree diff --git a/source/python/gui/setup.cfg b/source/python/gui/setup.cfg index b4d1b3f00..eb115be50 100644 --- a/source/python/gui/setup.cfg +++ b/source/python/gui/setup.cfg @@ -1,5 +1,5 @@ [metadata] -name = omnitrace-causal-viewer +name = rocprof-sys-causal-viewer url = https://github.com/ROCm/omnitrace download_url = https://github.com/ROCm/omnitrace.git maintainer = AMD Research @@ -22,7 +22,7 @@ classifiers = Programming Language :: Python :: 3 [options] -packages = omnitrace_causal_viewer +packages = rocprof_sys_causal_viewer zip_safe = true include_package_data = true diff --git a/source/python/gui/setup.py b/source/python/gui/setup.py index e35d58260..6cf40b6ac 100644 --- a/source/python/gui/setup.py +++ b/source/python/gui/setup.py @@ -47,16 +47,16 @@ def parse_requirements(fname="requirements.txt"): setup( - name="omnitrace-causal-viewer", + name="rocprof-sys-causal-viewer", version=get_project_version(), description="GUI for viewing causal profilers", long_description=get_long_description(), long_description_content_type="text/markdown", author="AMD Research", - packages=["omnitrace_causal_viewer"], - package_dir={"omnitrace_causal_viewer": "source"}, + packages=["rocprof_sys_causal_viewer"], + package_dir={"rocprof_sys_causal_viewer": "source"}, package_data={ - "omnitrace_causal_viewer": [ + "rocprof_sys_causal_viewer": [ "source/assets/*", "source/workloads/*", "source/VERSION", @@ -65,6 +65,6 @@ def parse_requirements(fname="requirements.txt"): install_requires=parse_requirements(), python_requires=">=3.6", entry_points={ - "console_scripts": ["omnitrace-causal-plot=omnitrace_causal_viewer.__main__:main"] + "console_scripts": ["rocprof-sys-causal-plot=rocprof_sys_causal_viewer.__main__:main"] }, ) diff --git a/source/python/gui/source/__main__.py b/source/python/gui/source/__main__.py index fa17d6e51..22426e5e4 100644 --- a/source/python/gui/source/__main__.py +++ b/source/python/gui/source/__main__.py @@ -118,7 +118,7 @@ def main(): for itr in [ settings_path, - os.path.join(os.environ.get("HOME"), ".omnitrace-causal-plot.json"), + os.path.join(os.environ.get("HOME"), ".rocprof-sys-causal-plot.json"), ]: if os.path.exists(itr): with open(itr, "r") as f: @@ -150,11 +150,11 @@ def main(): prog, max_help_position=40 ), usage=""" - omnitrace-causal-plot [ARGS...] + rocprof-sys-causal-plot [ARGS...] ------------------------------------------------------------------------------- Examples: - \tomnitrace-causal-plot --path workloads/toy -n 0 + \trocprof-sys-causal-plot --path workloads/toy -n 0 ------------------------------------------------------------------------------- """, ) @@ -162,7 +162,7 @@ def main(): my_parser.add_argument( "--version", action="version", - version="OmniTrace Causal Viewer v{}\n".format(f"{__version__}".strip("\n")), + version="ROCm Systems Profiler Causal Viewer v{}\n".format(f"{__version__}".strip("\n")), ) my_parser.add_argument( diff --git a/tests/omnitrace-causal-tests.cmake b/tests/omnitrace-causal-tests.cmake index d223da828..ef63cf887 100644 --- a/tests/omnitrace-causal-tests.cmake +++ b/tests/omnitrace-causal-tests.cmake @@ -108,7 +108,7 @@ macro( _V30 _TOL # tolerance for virtual speedup ) - # arguments to omnitrace-causal + # arguments to rocprof-sys-causal set(${_NAME}_args "${_causal_common_args} ${_MODE} ${_EXPER}") # arguments to validate-causal-json.py