f95b383dfa
The profiling was only enabled in serial mode, i.e., kernels
are serialized in execution, and counters are reset at each
kernel start and read at kernel completion. This patch adds
the concurrent mode, by issuing the process-level start
packet to reset counters, and then reading twice at kernel
start and end time to obtain the counter value difference.
The new concurrent profiling usage needs the integration
with the corresponding augment at aqlprofile side.
Change-Id: I94b4442eadc8c64b8fba51b1e4916fc8b895ad21
[ROCm/rocprofiler commit: 61c9df4631]
ROC Profiler library. Profiling with metrics and traces based on perfcounters (PMC) and traces (SQTT, PMC). Implementation is based on AqlProfile HSA extension. Library supports GFX8/GFX9. The library source tree: - doc - Documentation - inc/rocprofiler.h - Library public API - src - Library sources - core - Library API sources - util - Library utils sources - xml - XML parser - test - Library test suite - ctrl - Test controll - util - Test utils - simple_convolution - Simple convolution test kernel Build environment: $ export CMAKE_PREFIX_PATH=<path to hsa-runtime includes>:<path to hsa-runtime library> $ export CMAKE_BUILD_TYPE=<debug|release> # release by default $ export CMAKE_DEBUG_TRACE=1 # 1 to enable debug tracing To build with the current installed ROCM: $ cd .../rocprofiler $ export CMAKE_PREFIX_PATH=/opt/rocm/include/hsa:/opt/rocm $ mkdir build $ cd build $ cmake .. $ make To run the test: $ cd .../rocprofiler/build $ export LD_LIBRARY_PATH=.:<other paths> # paths to ROC profiler and oher libraries $ export HSA_TOOLS_LIB=librocprofiler64.so # ROC profiler library loaded by HSA runtime $ export ROCP_TOOL_LIB=test/libtool.so # tool library loaded by ROC profiler $ export ROCP_METRICS=metrics.xml # ROC profiler metrics config file $ export ROCP_INPUT=input.xml # input file for the tool library $ export ROCP_OUTPUT_DIR=./ # output directory for the tool library, for metrics results file 'results.txt' and SQTT trace files 'thread_trace.se<n>.out' $ <your test> Internal 'simple_convolution' test run script: $ cd .../rocprofiler/build $ run.sh To enabled error messages logging to '/tmp/rocprofiler_log.txt': $ export ROCPROFILER_LOG=1 To enable verbose tracing: $ export ROCPROFILER_TRACE=1