diff --git a/src/apex/dependency_tree.hpp b/src/apex/dependency_tree.hpp index b9edbdbc..55508eec 100644 --- a/src/apex/dependency_tree.hpp +++ b/src/apex/dependency_tree.hpp @@ -109,10 +109,10 @@ class Node { } // required for using this class as a key in a map, vector, etc. static bool compareNodeByParentName (const Node* lhs, const Node* rhs) { - if (lhs->parent < rhs->parent) { + if (lhs->parent->index < rhs->parent->index) { return true; } - if (lhs->getName().compare(lhs->getName()) < 0) { + if (lhs->getName().compare(rhs->getName()) < 0) { return true; } return false; diff --git a/src/scripts/apex_exec b/src/scripts/apex_exec index 63e5fdfb..b041b47b 100755 --- a/src/scripts/apex_exec +++ b/src/scripts/apex_exec @@ -268,6 +268,7 @@ while (( "$#" )); do shift ;; --apex:hip) + hip=yes export APEX_ENABLE_HIP=1 shift ;; @@ -277,12 +278,14 @@ while (( "$#" )); do shift ;; --apex:hip_counters) + hip=yes hip_counters=yes export APEX_ENABLE_HIP=1 export APEX_HIP_COUNTERS=1 shift ;; --apex:hip_metrics) + hip=yes hip_metrics=yes export APEX_ENABLE_HIP=1 export APEX_HIP_PROFILER=1 @@ -296,12 +299,14 @@ while (( "$#" )); do shift ;; --apex:hip_driver) + hip=yes hip_driver=yes export APEX_ENABLE_HIP=1 export APEX_HIP_KFD_API=1 shift ;; --apex:hip_details) + hip=yes hip_details=yes export APEX_ENABLE_HIP=1 export APEX_HIP_KERNEL_DETAILS=1 @@ -555,7 +560,11 @@ else echo "set env LD_LIBRARY_PATH=${APEX_LD_LIBRARY_PATH}" >> ./.gdbcmds echo "set env LD_PRELOAD=${APEX_LD_PRELOAD}" >> ./.gdbcmds #echo "set env LD_AUDIT=${APEX_LD_AUDIT}" >> ./.gdbcmds - debugger="gdb -x ./.gdbcmds --args" + if [ $hip = yes ] ; then + debugger="rocgdb -x ./.gdbcmds --args" + else + debugger="gdb -x ./.gdbcmds --args" + fi fi fi