ファイル
rocm-systems/test/run.sh
T

70 行
2.3 KiB
Bash
Raw 通常表示 履歴

2018-06-25 19:22:36 -05:00
################################################################################
## MIT License
##
## Copyright (c) 2017 ROCm Core Technology
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to deal
## in the Software without restriction, including without limitation the rights
## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
## copies of the Software, and to permit persons to whom the Software is
## furnished to do so, subject to the following conditions:
##
## The above copyright notice and this permission notice shall be included in all
## copies or substantial portions of the Software.
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
## SOFTWARE.
################################################################################
2017-11-09 17:26:19 -06:00
#!/bin/sh
2017-11-29 17:42:36 -06:00
test_bin_dflt=./test/ctrl
2017-11-09 17:26:19 -06:00
2017-11-29 17:42:36 -06:00
# paths to ROC profiler and oher libraries
2017-12-22 15:36:40 -06:00
export LD_LIBRARY_PATH=$PWD
2017-11-29 17:42:36 -06:00
# enable error messages logging to '/tmp/rocprofiler_log.txt'
2017-11-09 17:26:19 -06:00
export ROCPROFILER_LOG=1
2017-11-29 17:42:36 -06:00
# ROC profiler library loaded by HSA runtime
2017-11-09 17:26:19 -06:00
export HSA_TOOLS_LIB=librocprofiler64.so
2017-11-29 17:42:36 -06:00
# tool library loaded by ROC profiler
2018-03-07 15:08:20 -06:00
export ROCP_TOOL_LIB=libtool.so
2017-11-29 17:42:36 -06:00
# ROC profiler metrics config file
2017-11-15 20:59:24 -06:00
unset ROCP_PROXY_QUEUE
2017-11-29 17:42:36 -06:00
# ROC profiler metrics config file
2017-11-09 17:26:19 -06:00
export ROCP_METRICS=metrics.xml
2017-11-29 17:42:36 -06:00
# output directory for the tool library, for metrics results file 'results.txt'
# and SQTT trace files 'thread_trace.se<n>.out'
2018-02-01 14:52:21 -06:00
export ROCP_OUTPUT_DIR=./RESULTS
2017-11-09 17:26:19 -06:00
2018-03-07 15:08:20 -06:00
if [ ! -e $ROCP_TOOL_LIB ] ; then
2018-04-05 18:45:20 -05:00
export ROCP_TOOL_LIB=test/libtool.so
2018-03-07 15:08:20 -06:00
fi
2017-11-09 17:26:19 -06:00
if [ -n "$1" ] ; then
2017-11-29 17:42:36 -06:00
tbin="$*"
2017-11-09 17:26:19 -06:00
else
2017-11-29 17:42:36 -06:00
tbin=$test_bin_dflt
2017-11-09 17:26:19 -06:00
fi
2018-03-07 15:08:20 -06:00
export ROCP_KITER=100
export ROCP_DITER=100
export ROCP_INPUT=input.xml
eval $tbin
2018-03-07 15:08:20 -06:00
2018-07-01 15:47:10 -05:00
#export ROCP_KITER=1
#export ROCP_DITER=4
#export ROCP_INPUT=input1.xml
#eval $tbin
2018-02-12 15:00:20 -06:00
#valgrind --leak-check=full $tbin
#valgrind --tool=massif $tbin
#ms_print massif.out.<N>
2017-11-09 17:26:19 -06:00
exit 0