diff options
Diffstat (limited to 'dev-util/rocprofiler/files/rocprofiler-5.3.3-gentoo-location.patch')
-rw-r--r-- | dev-util/rocprofiler/files/rocprofiler-5.3.3-gentoo-location.patch | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/dev-util/rocprofiler/files/rocprofiler-5.3.3-gentoo-location.patch b/dev-util/rocprofiler/files/rocprofiler-5.3.3-gentoo-location.patch new file mode 100644 index 000000000000..48e6f6973ac8 --- /dev/null +++ b/dev-util/rocprofiler/files/rocprofiler-5.3.3-gentoo-location.patch @@ -0,0 +1,102 @@ +Index: rocprofiler-rocm-5.3.3/bin/rpl_run.sh +=================================================================== +--- rocprofiler-rocm-5.3.3.orig/bin/rpl_run.sh ++++ rocprofiler-rocm-5.3.3/bin/rpl_run.sh +@@ -29,11 +29,12 @@ RUN_DIR=`pwd` + TMP_DIR="/tmp" + DATA_DIR="rpl_data_${time_stamp}_$$" + +-RPL_PATH=$ROOT_DIR/lib +-TLIB_PATH=$RPL_PATH/rocprofiler +-TTLIB_PATH=$ROOT_DIR/lib/roctracer +-ROCM_LIB_PATH=$ROOT_DIR/lib +-PROF_BIN_DIR=$ROOT_DIR/libexec/rocprofiler ++RPL_PATH=$ROOT_DIR/@LIB_DIR@ ++TLIB_PATH=$RPL_PATH ++TTLIB_PATH=$ROOT_DIR/@LIB_DIR@ ++ROCM_LIB_PATH=$ROOT_DIR/@LIB_DIR@ ++PROF_BIN_DIR=$ROOT_DIR/bin ++PROF_LIBEXEC_DIR=$ROOT_DIR/libexec/rocprofiler + + if [ -z "$ROCP_PYTHON_VERSION" ] ; then + ROCP_PYTHON_VERSION=python3 +@@ -69,7 +70,7 @@ 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=$TLIB_PATH/metrics.xml ++export ROCP_METRICS=$ROOT_DIR/share/rocprofiler/metrics.xml + # Disable AQL-profile read API + export AQLPROFILE_READ_API=0 + # ROC Profiler package path +@@ -103,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: $TLIB_PATH/metrics.xml" ++ echo "Metrics definition: $ROOT_DIR/share/rocprofiler/metrics.xml" + echo "" + echo "Usage:" + echo " $bin_name [-h] [--list-basic] [--list-derived] [-i <input .txt/.xml file>] [-o <output CSV file>] <app command line>" +@@ -211,7 +212,7 @@ fi + # setting ROCM_LIB_PATH + set_rocm_lib_path() { + +- for ROCM_LIB_PATH in "$ROOT_DIR/lib" "$ROOT_DIR/lib64" ; do ++ for ROCM_LIB_PATH in $TLIB_PATH ; do + if [ -d "$ROCM_LIB_PATH" ]; then + return 0 + fi +@@ -385,11 +386,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 "$TLIB_PATH/rocprof-ctrl" ++ HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PROF_BIN_DIR/rocprof-ctrl" + exit 1 + elif [ "$1" = "--list-derived" ] ; then + export ROCP_INFO=d +- HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$TLIB_PATH/rocprof-ctrl" ++ HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PROF_BIN_DIR/rocprof-ctrl" + exit 1 + elif [ "$1" = "--basenames" ] ; then + if [ "$2" = "on" ] ; then +@@ -550,7 +551,7 @@ elif [ "$input_type" = "txt" -o "$input_ + mkdir -p $RES_DIR + echo "RPL: output dir '$RES_DIR'" + if [ "$input_type" = "txt" ] ; then +- $PROF_BIN_DIR/txt2xml.sh $INPUT_FILE $RES_DIR ++ $PROF_LIBEXEC_DIR/txt2xml.sh $INPUT_FILE $RES_DIR + else + echo "<metric></metric>" > $RES_DIR/input.xml + fi +@@ -582,9 +583,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 $PROF_BIN_DIR/tblextr.py $db_output $OUTPUT_LIST ++ $ROCP_PYTHON_VERSION $PROF_LIBEXEC_DIR/tblextr.py $db_output $OUTPUT_LIST + else +- $ROCP_PYTHON_VERSION $PROF_BIN_DIR/tblextr.py $csv_output $OUTPUT_LIST ++ $ROCP_PYTHON_VERSION $PROF_LIBEXEC_DIR/tblextr.py $csv_output $OUTPUT_LIST + fi + if [ "$?" -ne 0 ] ; then + echo "Profiling data corrupted: '$OUTPUT_LIST'" | tee "$ROCPROFILER_SESS/error" +Index: rocprofiler-rocm-5.3.3/CMakeLists.txt +=================================================================== +--- rocprofiler-rocm-5.3.3.orig/CMakeLists.txt ++++ rocprofiler-rocm-5.3.3/CMakeLists.txt +@@ -159,10 +159,10 @@ install ( FILES + install ( FILES + ${CMAKE_CURRENT_SOURCE_DIR}/test/tool/metrics.xml + ${CMAKE_CURRENT_SOURCE_DIR}/test/tool/gfx_metrics.xml +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/${DEST_NAME} ) ++ DESTINATION ${CMAKE_INSTALL_DATADIR}/${DEST_NAME} ) + # librocprof-tool.so +-install ( FILES ${PROJECT_BINARY_DIR}/test/librocprof-tool.so DESTINATION ${CMAKE_INSTALL_LIBDIR}/${DEST_NAME} ) +-install ( FILES ${PROJECT_BINARY_DIR}/test/rocprof-ctrl DESTINATION ${CMAKE_INSTALL_LIBDIR}/${DEST_NAME} ++install ( FILES ${PROJECT_BINARY_DIR}/test/librocprof-tool.so DESTINATION ${CMAKE_INSTALL_LIBDIR} ) ++install ( FILES ${PROJECT_BINARY_DIR}/test/rocprof-ctrl DESTINATION ${CMAKE_INSTALL_BINDIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) + + # File reorg Backward compatibility |