Overview Before you begin Run Ubuntu Linux on the HiKey 960 Build an Ubuntu filesystem Flash the base firmware and OS Flash the base firmware and OS - recovery mode Flash the base firmware and OS - fastboot mode Boot Linux Add more diskspace MNIST Draw MNIST Draw - Setup MNIST Draw - Machine Learning model MNIST Draw - MNIST demo application Streamline Streamline - Run the MNIST inference Streamline - Use Streamline to connect and profile the application Streamline - Automate the launch and capture Next steps
Streamline
Use Streamline to connect and profile the application
Here are the steps to profile with Streamline:
- Start Streamline gatord on the HiKey 960 board
- Ensure that the application we want to profile is running correctly
- Connect Streamline to the target board
- Start a capture in Streamline -> Run the application -> Stop the capture in Streamline
- Observe the results with Streamline
After building all the software, the gator daemon is available in the home directory.
Run using sudo to receive access to all hardware counters. Use the -a option to enable running a command during a capture (useful for a future step to automate the capture).
$ sudo $HOME/gatord -a
The application binary is compiled as covered in previous steps. Run it to confirm that it is working.
You should see output that looks similar to this:
$ ./mnist_tf_convol 1 10
Optimisation mode: CpuAcc #1 | Predicted: 7 Actual: 7 … #10 | Predicted: 9 Actual: 9 Prediction accuracy: 100%
Run streamline and use the eyeball icon on the Target tab to connect to the HiKey 960 board.
$ streamline &

Use the red button to start a capture and run the application to be profiled.
$ ./mnist_tf_convol 1 10000
Use the Stop sign button to stop the capture.
Review the CPU workload, the correlation between the phases of execution and the functions called as well as the correlation between the functions and the kernels.
Make sure to click on the Heat Map along the bottom and change it to Compute Library to see the ML information.