Fixing Build Library Paths

Change-Id: If71f548dda3dd7cab3dc251b4a3e6389cfc9e4f9
This commit is contained in:
Ammar ELWazir
2023-06-09 04:34:01 +00:00
committed by Ammar Elwazir
parent 8350f42329
commit 7ea04a63c5
3 changed files with 31 additions and 5 deletions
+8 -5
View File
@@ -68,6 +68,7 @@ while [ 1 ] ; do
elif [[ "$1" = "-t" || "$1" = "--test" ]] ; then
if [ $RUN_FROM_BUILD == 1 ]; then
export ROCPROFILER_METRICS_PATH=$ROCM_DIR/build/counters/derived_counters.xml
export LD_LIBRARY_PATH=$ROCPROFV2_DIR/build:$LD_LIBRARY_PATH
RUN_TEST=yes TO_CLEAN=no $ROCM_DIR/build.sh
if [ "$CURRENT_DIR/build" -ef "./build" ] ; then
./run_tests.sh
@@ -79,6 +80,7 @@ while [ 1 ] ; do
fi
elif [[ "$1" = "-mt" || "$1" = "--mem-test" ]] ; then
if [ $RUN_FROM_BUILD == 1 ]; then
export LD_LIBRARY_PATH=$ROCPROFV2_DIR/build:$LD_LIBRARY_PATH
ASAN=yes TO_CLEAN=yes ./build.sh
./tests-v2/memorytests/run_asan_tests.sh $ROCM_DIR/build/tests-v2/featuretests/profiler/apps/hip_vectoradd $ROCM_DIR/build/memleaks.log
exit 1
@@ -111,6 +113,7 @@ while [ 1 ] ; do
elif [[ "$1" = "--list-counters" ]] ; then
if [ $RUN_FROM_BUILD == 1 ]; then
export ROCPROFILER_METRICS_PATH=$ROCM_DIR/build/counters/derived_counters.xml
export LD_LIBRARY_PATH=$ROCPROFV2_DIR/build:$LD_LIBRARY_PATH
eval $ROCM_DIR/build/src/tools/ctrl
else
export ROCPROFILER_METRICS_PATH=$ROCPROFV2_DIR/../libexec/rocprofiler/counters/derived_counters.xml
@@ -123,6 +126,7 @@ while [ 1 ] ; do
if [ $2 ] && [ -n $2 ] && [ -r $2 ] ; then
if [ $RUN_FROM_BUILD == 1 ]; then
export ROCPROFILER_METRICS_PATH=$ROCM_DIR/build/counters/derived_counters.xml
export LD_LIBRARY_PATH=$ROCPROFV2_DIR/build:$LD_LIBRARY_PATH
else
export ROCPROFILER_METRICS_PATH=$ROCPROFV2_DIR/../libexec/rocprofiler/counters/derived_counters.xml
fi
@@ -204,11 +208,7 @@ while [ 1 ] ; do
usage
exit 1
fi
if [ $RUN_FROM_BUILD == 1 ]; then
export ROCPROFILER_PLUGIN_LIB=lib${PLUGIN}_plugin.so
else
export ROCPROFILER_PLUGIN_LIB=lib${PLUGIN}_plugin.so
fi
export ROCPROFILER_PLUGIN_LIB=lib${PLUGIN}_plugin.so
else
echo -e "Wrong input \"$2\" for plugin!"
usage
@@ -218,6 +218,7 @@ while [ 1 ] ; do
if [ $RUN_FROM_BUILD == 1 ]; then
ATT_PATH=$ROCPROFV2_DIR/build/plugin/att/att/att.py
export ROCPROFV2_ATT_LIB_PATH=$ROCM_PATH/lib/hsa-amd-aqlprofile/librocprofv2_att.so
export LD_LIBRARY_PATH=$ROCPROFV2_DIR/build:$LD_LIBRARY_PATH
else
ATT_PATH=$ROCPROFV2_DIR/../libexec/rocprofiler/att/att.py
export ROCPROFV2_ATT_LIB_PATH=$ROCPROFV2_DIR/../lib/hsa-amd-aqlprofile/librocprofv2_att.so
@@ -281,6 +282,7 @@ if [ -n "$PMC_LINES" ]; then
let COUNTER=COUNTER+1
fi
if [ $RUN_FROM_BUILD == 1 ]; then
export LD_LIBRARY_PATH=$ROCPROFV2_DIR/build:$LD_LIBRARY_PATH
LD_PRELOAD=$LD_PRELOAD:$ROCM_DIR/build/librocprofiler_tool.so $*
else
LD_PRELOAD=$LD_PRELOAD:$ROCM_DIR/lib/rocprofiler/librocprofiler_tool.so $*
@@ -288,6 +290,7 @@ if [ -n "$PMC_LINES" ]; then
done
elif [ ! -n "$ATT_ARGV" ]; then
if [ $RUN_FROM_BUILD == 1 ]; then
export LD_LIBRARY_PATH=$ROCPROFV2_DIR/build:$LD_LIBRARY_PATH
LD_PRELOAD=$LD_PRELOAD:$ROCM_DIR/build/librocprofiler_tool.so $*
else
LD_PRELOAD=$LD_PRELOAD:$ROCM_DIR/lib/rocprofiler/librocprofiler_tool.so $*