From fcc553ec4d81319e4ada7137178ecc31435bbb88 Mon Sep 17 00:00:00 2001 From: Ranjith Ramakrishnan Date: Sat, 26 Feb 2022 16:31:35 -0800 Subject: [PATCH] File Reorganization with backward compatibility Package files installed in /opt/rocm Wrapper header files and library soft links installed in/opt/rocm/rocprofiler Test tools library and binaries renamed Internal binaries installed in /opt/rocm/libexec/rocprofiler run.sh updated with file reorg changes Change-Id: I927d1a0dcd814764ebf0f473d0a64883906d5457 [ROCm/rocprofiler commit: 015697db74f9a11321805583ec88d168ad711776] --- projects/rocprofiler/CMakeLists.txt | 40 +++-- projects/rocprofiler/DEBIAN/postinst.in | 2 +- projects/rocprofiler/RPM/post.in | 2 +- projects/rocprofiler/bin/rpl_run.sh | 28 ++-- .../rocprofiler-backward-compat.cmake | 140 ++++++++++++++++++ projects/rocprofiler/test/CMakeLists.txt | 4 +- projects/rocprofiler/test/run.sh | 20 +-- 7 files changed, 186 insertions(+), 50 deletions(-) create mode 100644 projects/rocprofiler/rocprofiler-backward-compat.cmake diff --git a/projects/rocprofiler/CMakeLists.txt b/projects/rocprofiler/CMakeLists.txt index 036b39fd5f..135ffb296c 100644 --- a/projects/rocprofiler/CMakeLists.txt +++ b/projects/rocprofiler/CMakeLists.txt @@ -132,51 +132,47 @@ message ( "CMake-install-prefix: ${CMAKE_INSTALL_PREFIX}" ) message ( "CPack-install-prefix: ${CPACK_PACKAGING_INSTALL_PREFIX}" ) message ( "-----------Dest-name: ${DEST_NAME}" ) -## Create symlinks for packaging and install -add_custom_target ( rocprof-link ALL WORKING_DIRECTORY ${PROJECT_BINARY_DIR} - COMMAND ${CMAKE_COMMAND} -E create_symlink ../${DEST_NAME}/bin/rpl_run.sh rocprof-link ) -#add_custom_target ( inc-link ALL WORKING_DIRECTORY ${PROJECT_BINARY_DIR} -# COMMAND ${CMAKE_COMMAND} -E create_symlink ../${DEST_NAME}/include inc-link ) -add_custom_target ( so-link ALL WORKING_DIRECTORY ${PROJECT_BINARY_DIR} - COMMAND ${CMAKE_COMMAND} -E create_symlink ../${DEST_NAME}/lib/${ROCPROFILER_LIBRARY}.so so-link ) # Install header and library -install ( TARGETS ${ROCPROFILER_TARGET} LIBRARY DESTINATION ${DEST_NAME}/lib ) -install ( FILES - ${CMAKE_CURRENT_SOURCE_DIR}/inc/rocprofiler.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/core/activity.h - DESTINATION ${DEST_NAME}/include ) +install ( TARGETS ${ROCPROFILER_TARGET} LIBRARY DESTINATION lib ) install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/inc/rocprofiler.h ${CMAKE_CURRENT_SOURCE_DIR}/src/core/activity.h DESTINATION include/${DEST_NAME} ) # rpl_run.sh tblextr.py txt2xml.sh install ( FILES - ${CMAKE_CURRENT_SOURCE_DIR}/bin/merge_traces.sh ${CMAKE_CURRENT_SOURCE_DIR}/bin/rpl_run.sh + DESTINATION bin + PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + RENAME rocprof ) + +install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/bin/txt2xml.sh + ${CMAKE_CURRENT_SOURCE_DIR}/bin/merge_traces.sh ${CMAKE_CURRENT_SOURCE_DIR}/bin/txt2params.py ${CMAKE_CURRENT_SOURCE_DIR}/bin/tblextr.py ${CMAKE_CURRENT_SOURCE_DIR}/bin/dform.py ${CMAKE_CURRENT_SOURCE_DIR}/bin/mem_manager.py ${CMAKE_CURRENT_SOURCE_DIR}/bin/sqlitedb.py - DESTINATION ${DEST_NAME}/bin + DESTINATION libexec/${DEST_NAME} PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) # gfx_metrics.xml metrics.xml install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/test/tool/metrics.xml ${CMAKE_CURRENT_SOURCE_DIR}/test/tool/gfx_metrics.xml - DESTINATION ${DEST_NAME}/lib ) -# libtool.so -install ( FILES ${PROJECT_BINARY_DIR}/test/libtool.so DESTINATION ${DEST_NAME}/tool ) -install ( FILES ${PROJECT_BINARY_DIR}/test/ctrl DESTINATION ${DEST_NAME}/tool + DESTINATION lib/${DEST_NAME} ) +# librocprof-tool.so +install ( FILES ${PROJECT_BINARY_DIR}/test/librocprof-tool.so DESTINATION lib/${DEST_NAME} ) +install ( FILES ${PROJECT_BINARY_DIR}/test/rocprof-ctrl DESTINATION lib/${DEST_NAME} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) + +# File reorg Backward compatibility +option(FILE_REORG_BACKWARD_COMPATIBILITY "Enable File Reorg with backward compatibility" ON) +if(FILE_REORG_BACKWARD_COMPATIBILITY) + include (rocprofiler-backward-compat.cmake) +endif() # links -install ( FILES ${PROJECT_BINARY_DIR}/so-link DESTINATION lib RENAME ${ROCPROFILER_LIBRARY}.so ) #install ( FILES ${PROJECT_BINARY_DIR}/inc-link DESTINATION include RENAME ${DEST_NAME} ) -install ( FILES ${PROJECT_BINARY_DIR}/rocprof-link DESTINATION bin - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - RENAME rocprof ) ## Packaging directives set ( CPACK_GENERATOR "DEB" "RPM" "TGZ" CACHE STRING "CPACK GENERATOR e.g. DEB;RPM" ) diff --git a/projects/rocprofiler/DEBIAN/postinst.in b/projects/rocprofiler/DEBIAN/postinst.in index 60124ec876..90fc57e8fd 100644 --- a/projects/rocprofiler/DEBIAN/postinst.in +++ b/projects/rocprofiler/DEBIAN/postinst.in @@ -5,7 +5,7 @@ set -e do_ldconfig() { # left-hand term originates from ENABLE_LDCONFIG = ON/OFF at package build if [ "@ENABLE_LDCONFIG@" == "ON" ]; then - echo @CPACK_PACKAGING_INSTALL_PREFIX@/rocprofiler/lib > /etc/ld.so.conf.d/librocprofiler64.conf + echo @CPACK_PACKAGING_INSTALL_PREFIX@/lib > /etc/ld.so.conf.d/librocprofiler64.conf ldconfig fi } diff --git a/projects/rocprofiler/RPM/post.in b/projects/rocprofiler/RPM/post.in index 35ce1eb23b..ee890d8981 100644 --- a/projects/rocprofiler/RPM/post.in +++ b/projects/rocprofiler/RPM/post.in @@ -1,5 +1,5 @@ # left-hand term originates from ENABLE_LDCONFIG = ON/OFF at package build if [ "@ENABLE_LDCONFIG@" == "ON" ]; then - echo @CPACK_PACKAGING_INSTALL_PREFIX@/rocprofiler/lib > /etc/ld.so.conf.d/librocprofiler64.conf + echo @CPACK_PACKAGING_INSTALL_PREFIX@/lib > /etc/ld.so.conf.d/librocprofiler64.conf ldconfig fi diff --git a/projects/rocprofiler/bin/rpl_run.sh b/projects/rocprofiler/bin/rpl_run.sh index 7945aad9f3..7009779cec 100755 --- a/projects/rocprofiler/bin/rpl_run.sh +++ b/projects/rocprofiler/bin/rpl_run.sh @@ -24,17 +24,17 @@ time_stamp=`date +%y%m%d_%H%M%S` BIN_DIR=$(dirname $(realpath ${BASH_SOURCE[0]})) -PKG_DIR=$(dirname $BIN_DIR) -ROOT_DIR=$(dirname $PKG_DIR) +ROOT_DIR=$(dirname $BIN_DIR) TT_DIR=$ROOT_DIR/roctracer RUN_DIR=`pwd` TMP_DIR="/tmp" DATA_DIR="rpl_data_${time_stamp}_$$" -RPL_PATH=$PKG_DIR/lib -TLIB_PATH=$PKG_DIR/tool +RPL_PATH=$ROOT_DIR/lib +TLIB_PATH=$RPL_PATH/rocprofiler TTLIB_PATH=$TT_DIR/tool ROCM_LIB_PATH=$ROOT_DIR/lib +PROF_BIN_DIR=$ROOT_DIR/libexec/rocprofiler if [ -z "$ROCP_PYTHON_VERSION" ] ; then ROCP_PYTHON_VERSION=python3 @@ -64,17 +64,17 @@ unset ROCPROFILER_SESS # Loading of profiler library by HSA runtime MY_HSA_TOOLS_LIB="$RPL_PATH/librocprofiler64.so" # Loading of the test tool by ROC Profiler -export ROCP_TOOL_LIB=$TLIB_PATH/libtool.so +export ROCP_TOOL_LIB=$TLIB_PATH/librocprof-tool.so # Enabling HSA dispatches intercepting by ROC PRofiler export ROCP_HSA_INTERCEPT=1 # Disabling internal ROC Profiler proxy queue (simple version supported for testing purposes) unset ROCP_PROXY_QUEUE # ROC Profiler metrics definition -export ROCP_METRICS=$PKG_DIR/lib/metrics.xml +export ROCP_METRICS=$TLIB_PATH/metrics.xml # Disable AQL-profile read API export AQLPROFILE_READ_API=0 # ROC Profiler package path -export ROCP_PACKAGE_DIR=$PKG_DIR +export ROCP_PACKAGE_DIR=$ROOT_DIR # enabled SPM KFD mode export ROCP_SPM_KFD_MODE=1 @@ -104,7 +104,7 @@ usage() { bin_name=`basename $0` echo "ROCm Profiling Library (RPL) run script, a part of ROCprofiler library package." echo "Full path: $BIN_DIR/$bin_name" - echo "Metrics definition: $PKG_DIR/lib/metrics.xml" + echo "Metrics definition: $TLIB_PATH/metrics.xml" echo "" echo "Usage:" echo " $bin_name [-h] [--list-basic] [--list-derived] [-i ] [-o ] " @@ -336,7 +336,7 @@ convert_time_val() { ################################################################################################ # main -echo "RPL: on '$time_stamp' from '$PKG_DIR' in '$RUN_DIR'" +echo "RPL: on '$time_stamp' from '$ROOT_DIR' in '$RUN_DIR'" # Parsing arguments if [ -z "$1" ] ; then usage @@ -374,11 +374,11 @@ while [ 1 ] ; do export ROCP_METRICS="$2" elif [ "$1" = "--list-basic" ] ; then export ROCP_INFO=b - HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PKG_DIR/tool/ctrl" + HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$TLIB_PATH/rocprof-ctrl" exit 1 elif [ "$1" = "--list-derived" ] ; then export ROCP_INFO=d - HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PKG_DIR/tool/ctrl" + HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$TLIB_PATH/rocprof-ctrl" exit 1 elif [ "$1" = "--basenames" ] ; then if [ "$2" = "on" ] ; then @@ -536,7 +536,7 @@ elif [ "$input_type" = "txt" -o "$input_type" = "none" ] ; then mkdir -p $RES_DIR echo "RPL: output dir '$RES_DIR'" if [ "$input_type" = "txt" ] ; then - $BIN_DIR/txt2xml.sh $INPUT_FILE $RES_DIR + $PROF_BIN_DIR/txt2xml.sh $INPUT_FILE $RES_DIR else echo "" > $RES_DIR/input.xml fi @@ -567,9 +567,9 @@ if [ -n "$csv_output" ] ; then merge_output $OUTPUT_LIST if [ "$GEN_STATS" = "1" ] ; then db_output=$(echo $csv_output | sed "s/\.csv/.db/") - $ROCP_PYTHON_VERSION $BIN_DIR/tblextr.py $db_output $OUTPUT_LIST + $ROCP_PYTHON_VERSION $PROF_BIN_DIR/tblextr.py $db_output $OUTPUT_LIST else - $ROCP_PYTHON_VERSION $BIN_DIR/tblextr.py $csv_output $OUTPUT_LIST + $ROCP_PYTHON_VERSION $PROF_BIN_DIR/tblextr.py $csv_output $OUTPUT_LIST fi if [ "$?" -ne 0 ] ; then echo "Profiling data corrupted: '$OUTPUT_LIST'" | tee "$ROCPROFILER_SESS/error" diff --git a/projects/rocprofiler/rocprofiler-backward-compat.cmake b/projects/rocprofiler/rocprofiler-backward-compat.cmake new file mode 100644 index 0000000000..8e1ddf6d2e --- /dev/null +++ b/projects/rocprofiler/rocprofiler-backward-compat.cmake @@ -0,0 +1,140 @@ +# Copyright (c) 2022 Advanced Micro Devices, Inc. All Rights Reserved. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +cmake_minimum_required(VERSION 3.16.8) + +set(ROCPROF_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}) +set(ROCPROF_WRAPPER_DIR ${ROCPROF_BUILD_DIR}/wrapper_dir) +set(ROCPROF_WRAPPER_INC_DIR ${ROCPROF_WRAPPER_DIR}/include) +set(ROCPROF_WRAPPER_BIN_DIR ${ROCPROF_WRAPPER_DIR}/bin) +set(ROCPROF_WRAPPER_LIB_DIR ${ROCPROF_WRAPPER_DIR}/lib) +set(ROCPROF_WRAPPER_TOOL_DIR ${ROCPROF_WRAPPER_DIR}/tool) + +#Function to generate header template file +function(create_header_template) + file(WRITE ${ROCPROF_WRAPPER_DIR}/header.hpp.in "/* + Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the \"Software\"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */\n\n#ifndef @include_guard@\n#define @include_guard@ \n\n#pragma message(\"This file is deprecated. Use file from include path /opt/rocm-ver/include/ and prefix with rocprofiler\")\n@include_statements@ \n\n#endif") +endfunction() + +#use header template file and generate wrapper header files +function(generate_wrapper_header) + file(MAKE_DIRECTORY ${ROCPROF_WRAPPER_INC_DIR}) + #find all header files from inc + file(GLOB include_files ${CMAKE_CURRENT_SOURCE_DIR}/inc/*.h) + #Convert the list of files into #includes + foreach(header_file ${include_files}) + #set include guard + get_filename_component(INC_GAURD_NAME ${header_file} NAME_WE) + string(TOUPPER ${INC_GAURD_NAME} INC_GAURD_NAME) + set(include_guard "${include_guard}ROCPROF_WRAPPER_INCLUDE_${INC_GAURD_NAME}_H") + #set include statement + get_filename_component(file_name ${header_file} NAME) + set(include_statements "${include_statements}#include \"../../include/${ROCPROFILER_NAME}/${file_name}\"\n") + configure_file(${ROCPROF_WRAPPER_DIR}/header.hpp.in ${ROCPROF_WRAPPER_INC_DIR}/${file_name}) + unset(include_guard) + unset(include_statements) + endforeach() + + #Only single file from ${CMAKE_CURRENT_SOURCE_DIR}/src/core/activity.h is packaged. So drectly using that file name + set(file_name "activity.h") + #set include guard + get_filename_component(INC_GAURD_NAME ${file_name} NAME_WE) + string(TOUPPER ${INC_GAURD_NAME} INC_GAURD_NAME) + set(include_guard "${include_guard}ROCPROF_WRAPPER_INCLUDE_${INC_GAURD_NAME}_H") + set(include_statements "${include_statements}#include \"../../include/${ROCPROFILER_NAME}/${file_name}\"\n") + configure_file(${ROCPROF_WRAPPER_DIR}/header.hpp.in ${ROCPROF_WRAPPER_INC_DIR}/${file_name}) +endfunction() + +#function to create symlink to binaries +function(create_binary_symlink) + file(MAKE_DIRECTORY ${ROCPROF_WRAPPER_BIN_DIR}) + #create symlink for rocprof + set(file_name "rocprof") + add_custom_target(link_${file_name} ALL + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${CMAKE_COMMAND} -E create_symlink + ../../bin/${file_name} ${ROCPROF_WRAPPER_BIN_DIR}/${file_name}) + +endfunction() + +#function to create symlink to libraries +function(create_library_symlink) + file(MAKE_DIRECTORY ${ROCPROF_WRAPPER_LIB_DIR}) + set(LIB_ROCPROF "${ROCPROFILER_LIBRARY}.so") + set(MAJ_VERSION "${LIB_VERSION_MAJOR}") + set(SO_VERSION "${LIB_VERSION_STRING}") + set(library_files "${LIB_ROCPROF}" "${LIB_ROCPROF}.${MAJ_VERSION}" "${LIB_ROCPROF}.${SO_VERSION}") + + foreach(file_name ${library_files}) + add_custom_target(link_${file_name} ALL + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${CMAKE_COMMAND} -E create_symlink + ../../lib/${file_name} ${ROCPROF_WRAPPER_LIB_DIR}/${file_name}) + endforeach() + #create symlink to rocprofiler/tool/libtool.so + # With File reorg,tool renamed to rocprof-tool + file(MAKE_DIRECTORY ${ROCPROF_WRAPPER_TOOL_DIR}) + set(LIB_TOOL "libtool.so") + set(LIB_ROCPROFTOOL "librocprof-tool.so") + add_custom_target(link_${LIB_TOOL} ALL + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${CMAKE_COMMAND} -E create_symlink + ../../lib/${ROCPROFILER_NAME}/${LIB_ROCPROFTOOL} ${ROCPROF_WRAPPER_TOOL_DIR}/${LIB_TOOL}) + #create symlink to test binary + #since its saved in lib folder , the code for the same is added here + # With File reorg ,binary name changed from ctrl to rocprof-ctrl + set(TEST_CTRL "ctrl") + set(TEST_ROCPROFCTRL "rocprof-ctrl") + add_custom_target(link_${TEST_CTRL} ALL + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${CMAKE_COMMAND} -E create_symlink + ../../lib/${ROCPROFILER_NAME}/${TEST_ROCPROFCTRL} ${ROCPROF_WRAPPER_TOOL_DIR}/${TEST_CTRL}) +endfunction() + +#Creater a template for header file +create_header_template() +#Use template header file and generater wrapper header files +generate_wrapper_header() +install(DIRECTORY ${ROCPROF_WRAPPER_INC_DIR} DESTINATION ${ROCPROFILER_NAME}) +# Create symlink to binaries +create_binary_symlink() +install(DIRECTORY ${ROCPROF_WRAPPER_BIN_DIR} DESTINATION ${ROCPROFILER_NAME}) +create_library_symlink() +install(DIRECTORY ${ROCPROF_WRAPPER_LIB_DIR} DESTINATION ${ROCPROFILER_NAME}) +#install tools directory +install(DIRECTORY ${ROCPROF_WRAPPER_TOOL_DIR} DESTINATION ${ROCPROFILER_NAME}) diff --git a/projects/rocprofiler/test/CMakeLists.txt b/projects/rocprofiler/test/CMakeLists.txt index 7a6d46f5d7..dc44e47d4c 100644 --- a/projects/rocprofiler/test/CMakeLists.txt +++ b/projects/rocprofiler/test/CMakeLists.txt @@ -23,7 +23,7 @@ cmake_minimum_required ( VERSION 2.8.12 ) set ( CMAKE_VERBOSE_MAKEFILE TRUE CACHE BOOL "Verbose Output" FORCE ) -set ( EXE_NAME "ctrl" ) +set ( EXE_NAME "rocprof-ctrl" ) if ( NOT DEFINED TEST_DIR ) set ( TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR} ) @@ -105,7 +105,7 @@ execute_process ( COMMAND sh -xc "cp ${TEST_DIR}/tool/*.xml ${PROJECT_BINARY_DIR execute_process ( COMMAND sh -xc "mkdir -p ${PROJECT_BINARY_DIR}/RESULTS" ) ## Build test library -set ( TEST_LIB "tool" ) +set ( TEST_LIB "rocprof-tool" ) set ( TEST_LIB_SRC ${TEST_DIR}/tool/tool.cpp ${UTIL_SRC} ) add_library ( ${TEST_LIB} SHARED ${TEST_LIB_SRC} ) target_include_directories ( ${TEST_LIB} PRIVATE ${TEST_DIR} ${ROOT_DIR} ) diff --git a/projects/rocprofiler/test/run.sh b/projects/rocprofiler/test/run.sh index 135d3bb336..6fe934b15e 100755 --- a/projects/rocprofiler/test/run.sh +++ b/projects/rocprofiler/test/run.sh @@ -57,7 +57,7 @@ eval_test() { } # paths to ROC profiler and oher libraries -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD:$PWD/../../lib:/opt/rocm/lib +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD:$PWD/../../lib:/opt/rocm/lib:/opt/rocm/lib/rocprofiler # enable tools load failure reporting export HSA_TOOLS_REPORT_LOAD_FAILURE=1 @@ -101,18 +101,18 @@ export ROCP_KITER=20 export ROCP_DITER=20 export ROCP_AGENTS=1 export ROCP_THRS=3 -eval_test "Intercepting usage model test" ./test/ctrl +eval_test "Intercepting usage model test" ./test/rocprof-ctrl ## Libtool test # tool library loaded by ROC profiler -export ROCP_TOOL_LIB=libtool.so +export ROCP_TOOL_LIB=librocprof-tool.so # ROC profiler kernels timing export ROCP_TIMESTAMP_ON=1 # output directory for the tool library, for metrics results file 'results.txt' export ROCP_OUTPUT_DIR=./RESULTS if [ ! -e $ROCP_TOOL_LIB ] ; then - export ROCP_TOOL_LIB=test/libtool.so + export ROCP_TOOL_LIB=test/librocprof-tool.so fi export ROCP_KITER=20 @@ -120,14 +120,14 @@ export ROCP_DITER=20 export ROCP_AGENTS=1 export ROCP_THRS=1 export ROCP_INPUT=pmc_input.xml -eval_test "'rocprof' libtool PMC test" ./test/ctrl +eval_test "'rocprof' rocprof-tool PMC test" ./test/rocprof-ctrl export ROCP_KITER=20 export ROCP_DITER=20 export ROCP_AGENTS=1 export ROCP_THRS=10 export ROCP_INPUT=pmc_input.xml -eval_test "'rocprof' libtool PMC n-thread test" ./test/ctrl +eval_test "'rocprof' rocprof-tool PMC n-thread test" ./test/rocprof-ctrl export ROCP_OPT_MODE=1 export ROCP_KITER=20 @@ -135,7 +135,7 @@ export ROCP_DITER=20 export ROCP_AGENTS=1 export ROCP_THRS=10 export ROCP_INPUT=pmc_input.xml -eval_test "'rocprof' libtool PMC n-thread opt test" ./test/ctrl +eval_test "'rocprof' rocprof-tool PMC n-thread opt test" ./test/rocprof-ctrl unset ROCP_OPT_MODE export ROCP_KITER=20 @@ -143,14 +143,14 @@ export ROCP_DITER=20 export ROCP_AGENTS=1 export ROCP_THRS=1 export ROCP_INPUT=pmc_input1.xml -eval_test "'rocprof' libtool PMC test1" ./test/ctrl +eval_test "'rocprof' rocprof-tool PMC test1" ./test/rocprof-ctrl export ROCP_KITER=20 export ROCP_DITER=20 export ROCP_AGENTS=1 export ROCP_THRS=10 export ROCP_INPUT=pmc_input1.xml -eval_test "'rocprof' libtool PMC n-thread test1" ./test/ctrl +eval_test "'rocprof' rocprof-tool PMC n-thread test1" ./test/rocprof-ctrl unset ROCP_MCOPY_TRACKING # enable HSA intercepting @@ -158,7 +158,7 @@ export ROCP_HSA_INTERC=1 export ROCP_KITER=10 export ROCP_DITER=10 -eval_test "libtool test, counter sets" ./test/ctrl +eval_test "rocprof-tool test, counter sets" ./test/rocprof-ctrl ## OpenCL test #eval_test "libtool test, OpenCL sample" ./test/ocl/SimpleConvolution