Member Functions - 2022.2 English

AI Engine Kernel and Graph Programming Guide (UG1079)

Document ID
UG1079
Release Date
2022-10-19
Version
2022.2 English
static handle start_profiling(IoAttr& io, io_profiling_option option, uint32 value = 0);

This function configures the performance counters in the AI Engine and starts profiling. io is the platform GMIO or PLIO object. option is one of the io_profiling_option enumerations described in the previous topic . If the io_stream_start_to_bytes_transferred_cycles option is used, the number of bytes can be specified in the value parameter. This function should be called after graph::init(). It returns a handle to be used by read_profiling and stop_profiling. If the specification is incorrect or there is insufficient hardware resources to perform the profiling, an invalid_handle is returned.

static handle start_profiling(IoAttr& io1, IoAttr& io2, io_profiling_option option, uint32 value = 0);

This function configures the performance counters in the AI Engine and starts profiling. Parameters io1 and io2 specify the two platform I/O objects. This function should be called after graph::init(). It returns a handle to be used by read_profiling and stop_profiling. If the specification is incorrect or there is insufficient hardware resources to perform the profiling, an invalid_handle is returned.

static long long read_profiling(handle h);

This function returns the current performance counter value associated with the handle.

static void stop_profiling(handle h);

This function stops the performance profiling associated with the handle and releases the corresponding hardware resources.