Adding list-metrics (#585)
* Adding list-metrics * cmake formatting (cmake-format) (#587) Co-authored-by: SrirakshaNag <104580803+SrirakshaNag@users.noreply.github.com> * source formatting (clang-format v11) (#586) Co-authored-by: SrirakshaNag <104580803+SrirakshaNag@users.noreply.github.com> * Fixing issues with validation tests * python formatting (black) (#588) Co-authored-by: SrirakshaNag <104580803+SrirakshaNag@users.noreply.github.com> * source formatting (clang-format v11) (#589) Co-authored-by: SrirakshaNag <104580803+SrirakshaNag@users.noreply.github.com> * cmake formatting (cmake-format) (#590) Co-authored-by: SrirakshaNag <104580803+SrirakshaNag@users.noreply.github.com> * Update conftest.py * Update validate.py * python formatting (black) (#591) Co-authored-by: SrirakshaNag <104580803+SrirakshaNag@users.noreply.github.com> * python formatting (black) (#592) Co-authored-by: SrirakshaNag <104580803+SrirakshaNag@users.noreply.github.com> * Checking if agent-id in validate.py * Fixing list metrics execute test * cmake formatting (cmake-format) (#593) Co-authored-by: SrirakshaNag <104580803+SrirakshaNag@users.noreply.github.com> * Fixing CI failure * cmake formatting (cmake-format) (#594) Co-authored-by: SrirakshaNag <104580803+SrirakshaNag@users.noreply.github.com> * Review Comments * Update source/bin/rocprofv3 Support -L shorthand for --list-metrics --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan R. Madsen <jrmadsen@users.noreply.github.com>
This commit is contained in:
@@ -39,6 +39,7 @@ usage() {
|
||||
echo -e "\t#${GREY} usage e.g:(with custom dir): rocprofv3 --hsa-trace -d <out_dir> <executable>${RESET}"
|
||||
echo -e "${GREEN}-M | --mangled-kernels ${RESET} Do not demangle the kernel names"
|
||||
echo -e "${GREEN}-T | --truncate-kernels ${RESET} Truncate the demangled kernel names"
|
||||
echo -e "${GREEN}-L | --list-metrics ${RESET} List metrics"
|
||||
echo -e ""
|
||||
exit ${EC}
|
||||
}
|
||||
@@ -75,6 +76,7 @@ while true; do
|
||||
elif [[ "$1" == "-o" || "$1" == "--output-file-name" ]]; then
|
||||
if [ "$2" ]; then
|
||||
export ROCPROF_OUTPUT_FILE_NAME=$2
|
||||
export ROCPROF_OUTPUT_LIST_METRICS_FILE=1
|
||||
else
|
||||
usage 1
|
||||
fi
|
||||
@@ -84,6 +86,7 @@ while true; do
|
||||
if [ "$2" ]; then
|
||||
ROCPROF_OUTPUT_PATH_INTERNAL=$2
|
||||
export ROCPROF_OUTPUT_PATH=$ROCPROF_OUTPUT_PATH_INTERNAL
|
||||
export ROCPROF_OUTPUT_LIST_METRICS_FILE=1
|
||||
else
|
||||
usage 1
|
||||
fi
|
||||
@@ -92,6 +95,12 @@ while true; do
|
||||
elif [ "$1" == "--hsa-trace" ]; then
|
||||
export ROCPROF_HSA_API_TRACE=1
|
||||
shift
|
||||
elif [[ "$1" == "-L" || "$1" == "--list-metrics" ]]; then
|
||||
export ROCPROF_LIST_METRICS=1
|
||||
ROCP_TOOL_LIBRARIES="${ROCM_DIR}/lib/rocprofiler-sdk/librocprofiler-sdk-tool.so" \
|
||||
LD_LIBRARY_PATH=${ROCM_DIR}/lib:${LD_LIBRARY_PATH} \
|
||||
LD_PRELOAD="${ROCPROF_PRELOAD}:${ROCM_DIR}/lib/librocprofiler-sdk.so" \
|
||||
exec ${ROCM_DIR}/lib/rocprofiler-sdk/rocprofv3-trigger-list-metrics
|
||||
elif [ "$1" == "--kernel-trace" ]; then
|
||||
export ROCPROF_KERNEL_TRACE=1
|
||||
shift
|
||||
|
||||
Reference in New Issue
Block a user