SWDEV-443556 Fixing hip trace for hipfft applications
Change-Id: I0076911fac755d3cf485e9fb9a5a51b13d0198c3
[ROCm/rocprofiler commit: 1088305d18]
This commit is contained in:
@@ -68,6 +68,10 @@ unset ROCPROFILER_SESS
|
||||
# Profiler environment
|
||||
# Loading of profiler library by HSA runtime
|
||||
MY_HSA_TOOLS_LIB="$RPL_PATH/librocprofiler64.so.1"
|
||||
|
||||
# Tool internal Preloads
|
||||
ROCPROFV1_TOOL_PRELOAD=$MY_HSA_TOOLS_LIB
|
||||
|
||||
# Loading of the test tool by ROC Profiler
|
||||
export ROCP_TOOL_LIB=$TLIB_PATH/librocprof-tool.so
|
||||
# ROC Profiler metrics definition
|
||||
@@ -309,19 +313,19 @@ run() {
|
||||
|
||||
if [ "$HSA_TRACE" = 1 ] ; then
|
||||
export ROCTRACER_DOMAIN=$API_TRACE":hsa"
|
||||
MY_HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB $ROCM_LIB_PATH/libroctracer64.so.4"
|
||||
MY_LD_PRELOAD="$MY_LD_PRELOAD:$TTLIB_PATH/libroctracer_tool.so"
|
||||
ROCPROFV1_TOOL_PRELOAD="$MY_LD_PRELOAD $TTLIB_PATH/libroctracer_tool.so"
|
||||
ROCPROFV1_LD_PRELOAD="$MY_HSA_TOOLS_LIB:$ROCM_LIB_PATH/libroctracer64.so.4"
|
||||
elif [ -n "$API_TRACE" ] ; then
|
||||
export ROCTRACER_DOMAIN=$API_TRACE
|
||||
OUTPUT_LIST="$ROCP_OUTPUT_DIR/"
|
||||
MY_HSA_TOOLS_LIB="$ROCM_LIB_PATH/libroctracer64.so.4"
|
||||
MY_LD_PRELOAD="$MY_LD_PRELOAD:$TTLIB_PATH/libroctracer_tool.so"
|
||||
ROCPROFV1_TOOL_PRELOAD="$MY_LD_PRELOAD $TTLIB_PATH/libroctracer_tool.so"
|
||||
ROCPROFV1_LD_PRELOAD="$ROCM_LIB_PATH/libroctracer64.so.4"
|
||||
fi
|
||||
|
||||
if [ "$ROCP_STATS_OPT" = 1 ] ; then
|
||||
if [ "$ROCTRACER_DOMAIN" = ":hip" ] ; then
|
||||
MY_HSA_TOOLS_LIB="$ROCM_LIB_PATH/libroctracer64.so.4"
|
||||
MY_LD_PRELOAD="$MY_LD_PRELOAD:$TTLIB_PATH/libhip_stats.so"
|
||||
ROCPROFV1_LD_PRELOAD="$ROCM_LIB_PATH/libroctracer64.so.4"
|
||||
ROCPROFV1_TOOL_PRELOAD="$MY_LD_PRELOAD $TTLIB_PATH/libhip_stats.so"
|
||||
else
|
||||
error_message="ROCP_STATS_OPT is only available with --hip-trace option"
|
||||
echo $error_message
|
||||
@@ -334,14 +338,14 @@ run() {
|
||||
log_file="$ROCP_OUTPUT_DIR/log.txt"
|
||||
exit_file="$ROCP_OUTPUT_DIR/exit.txt"
|
||||
{
|
||||
HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" LD_PRELOAD=$LD_PRELOAD:"$MY_LD_PRELOAD" eval "$APP_CMD"
|
||||
HSA_TOOLS_LIB="$ROCPROFV1_TOOL_PRELOAD" LD_PRELOAD=$LD_PRELOAD:"$ROCPROFV1_LD_PRELOAD" eval "$APP_CMD"
|
||||
retval=$?
|
||||
echo "exit($retval)" > $exit_file
|
||||
} 2>&1 | tee "$log_file"
|
||||
exitval=`cat "$exit_file" | sed -n "s/^.*exit(\([0-9]*\)).*$/\1/p"`
|
||||
if [ -n "$exitval" ] ; then retval=$exitval; fi
|
||||
else
|
||||
HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" LD_PRELOAD=$LD_PRELOAD:"$MY_LD_PRELOAD" eval "$APP_CMD"
|
||||
HSA_TOOLS_LIB="$ROCPROFV1_TOOL_PRELOAD" LD_PRELOAD=$LD_PRELOAD:"$ROCPROFV1_LD_PRELOAD" eval "$APP_CMD"
|
||||
retval=$?
|
||||
fi
|
||||
return $retval
|
||||
|
||||
مرجع در شماره جدید
Block a user