https://github.com/halide/Halide
Revision 9f9ef4c2c4b88215d4d5a41aeb8777c9a1bdb6d1 authored by Dan Palermo on 11 January 2019, 22:42:43 UTC, committed by Dan Palermo on 11 January 2019, 22:42:43 UTC
When the hvx_sysmon target is specified, sysmon markers are added
to the generated code to help correlate between a given point in
the collected sysmon profile and the corresponding section in the
Halide source.  Markers are currently inserted at the:

  - entry of the Hexagon function
  - specified producer/consumer sites

using support routines in runtime/hexagon_remote/sim_remote.cpp &
runtime/hvx_sysmon.cpp.

Since these markers introduce a small amount of runtime overhead, the
max_depth is also specified to limit the depth of producers/consumers
that are tagged.  By default, the max_depth is set to 1.  The env var
HL_SYSMON_MAXDEPTH is provided to allow the user to increase the
amount of sysmon tracing.

For example, given the producers/consumers as seen in the camera_pipe
print_loop_nest() output:

     for __outermost in [0, 0]<Hexagon>:
       parallel v1.v4:
                   produce denoised:
                   consume denoised:
                     produce deinterleaved:
                     consume deinterleaved:
                       produce g_b:
                       consume g_b:
                         produce g_r:
                         consume g_r:
                             produce output:
                             consume output:
                               produce corrected:
                               consume corrected:

If max_depth is set to 1, markers will be generated for the
producer/consumer for denoised.  If max_depth is set to 2, we also get
markers for deinterleaved.  For max_depth 3, also g_b...and so on.

    export HL_TGT=hvx_128-hvx_sysmon
    env HL_SYSMON_MAXDEPTH=3 test-camera-android-128 ...
    ...
    Adding sysmon markers: max_depth(3)
    HVX sysmon_id:1 offload_rpc.curved.s0.__outermost
    HVX sysmon_id:2 consume:denoised
    HVX sysmon_id:3 produce:denoised
    HVX sysmon_id:4 produce:deinterleaved
    HVX sysmon_id:5 consume:deinterleaved
    HVX sysmon_id:6 produce:g_b
    HVX sysmon_id:7 consume:g_b

It is good to keep the max_depth to as small as possible since
increasing values will result in increasing levels of overhead:

    camera_pipe/SDM845:
       hvx_128                                  Halide:  8690us
       hvx_128-hxv_sysmon      max sysmon_id:3  Halide:  9586us
       + HL_SYSMON_MAXDEPTH=2  max sysmon_id:5  Halide: 10488us
       + HL_SYSMON_MAXDEPTH=3  max sysmon_id:7  Halide: 11335us
       + HL_SYSMON_MAXDEPTH=4  max sysmon_id:9  Halide: 12172us
       + HL_SYSMON_MAXDEPTH=5  max sysmon_id:11 Halide: 25774us
       + HL_SYSMON_MAXDEPTH=6  max sysmon_id:13 Halide: 36159us
1 parent bf883c1
History
Tip revision: 9f9ef4c2c4b88215d4d5a41aeb8777c9a1bdb6d1 authored by Dan Palermo on 11 January 2019, 22:42:43 UTC
HVX sysmon markers
Tip revision: 9f9ef4c
File Mode Size
apps
bazel
python_bindings
src
test
tools
tutorial
util
.clang-format -rw-r--r-- 1.4 KB
.gitattributes -rw-r--r-- 342 bytes
.gitignore -rw-r--r-- 1.0 KB
.gitmodules -rw-r--r-- 0 bytes
.travis.yml -rw-r--r-- 2.3 KB
CMakeLists.txt -rw-r--r-- 17.1 KB
Doxyfile -rw-r--r-- 103.6 KB
Doxyfile.in -rw-r--r-- 64.3 KB
LICENSE.txt -rw-r--r-- 1.1 KB
Makefile -rw-r--r-- 80.5 KB
README.md -rw-r--r-- 15.9 KB
README_cmake.md -rw-r--r-- 9.9 KB
README_rungen.md -rw-r--r-- 11.5 KB
halide.cmake -rw-r--r-- 29.0 KB

README.md

back to top