Using Streamline with Arm® NN

Streamline supports capturing profiling information from Arm NN enabled applications. This feature enables you to collect performance counters from supported Arm® Ethos NPUs and performance data from the Arm NN library. To profile an Arm NN application, gatord must first see which events are available in the running application. Streamline can then capture a profile as normal.

Before you begin

  • Build your application against Arm NN version 20.08 or later. See https://github.com/ARM-software/armnn for more information.

  • When you create the runtime in your application code, you must set options.m_ProfilingOptions.m_EnableProfiling = true for the options passed to IRuntime::Create.

  • Enable timeline profiling by setting options.m_ProfilingOptions.m_TimelineEnabled = true.

    // Create Arm NN runtime
    
    IRuntime::CreationOptions options; // default options
    options.m_ProfilingOptions.m_EnableProfiling = true;
    options.m_ProfilingOptions.m_TimelineEnabled = true;
    IRuntimePtr run = IRuntime::Create(options);
    

Procedure

  1. Start gatord in daemon mode as described in Set up your target.

    Note

    Local capture mode is not available because gatord does not know which events are available yet.

  2. Run your application.

  3. Configure counters and Capture a Streamline profile as described in the Arm Streamline User Guide.

    Note

    To get the timeline data, you must start your application again after starting the capture.