Files
rocm-systems/test/run.sh
T

79 γραμμές
2.6 KiB
Bash

#!/bin/sh
2018-06-25 19:22:36 -05:00
################################################################################
2018-08-19 04:11:04 -05:00
# Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved.
#
# 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.
2018-06-25 19:22:36 -05:00
################################################################################
2017-11-09 17:26:19 -06:00
2018-12-01 22:19:01 -06:00
# enable tools load failure reporting
export HSA_TOOLS_REPORT_LOAD_FAILURE=1
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
# ROC profiler library loaded by HSA runtime
2017-11-09 17:26:19 -06:00
export HSA_TOOLS_LIB=librocprofiler64.so
2018-09-18 16:52:05 -05:00
# enable error messages logging to '/tmp/rocprofiler_log.txt'
export ROCPROFILER_LOG=1
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
# test trace
export ROC_TEST_TRACE=1
2018-09-18 16:52:05 -05:00
# tool library loaded by ROC profiler
export ROCP_TOOL_LIB=./test/libintercept_test.so
../bin/run_tool.sh ./test/ctrl
unset ROCP_TOOL_LIB
2018-09-18 16:52:05 -05:00
eval ./test/standalone_test
# tool library loaded by ROC profiler
export ROCP_TOOL_LIB=libtool.so
2018-07-09 20:33:58 -05:00
# ROC profiler kernels timing
export ROCP_TIMESTAMP_ON=1
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
export ROCP_KITER=50
export ROCP_DITER=50
export ROCP_AGENTS=1
export ROCP_THRS=1
export ROCP_INPUT=input.xml
eval ./test/ctrl
2019-01-07 01:53:27 -06:00
# Memcopies tracking
export ROCP_MCOPY_TRACKING=1
export ROCP_KITER=1
export ROCP_DITER=4
export ROCP_INPUT=input1.xml
eval ./test/ctrl
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