Neural Network Profiling via Missing Event Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current neural network profiling methods are time-consuming and prone to inaccuracy due to large log files and difficulties in determining the specific neural network operations during inference, often resulting in incomplete event logs.

Innovation Solution

A processor-implemented method that detects missing events in neural network operations by matching event sequences with control programs, compensates for these events by inserting them at appropriate times, and generates a profile to optimize neural network operations, including convolution, padding, pooling, and reformatting processes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If profiling is performed by uploading RTL into an emulator and downloading logs for post-processing, then profiling can be performed on the NPU, but the process consumes a great amount of time due to large capacity log files

Engineering Contradiction:
Improveprofiling accuracyVSAvoidprofiling time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent extracts only the necessary event information directly from the NPU hardware during inference, rather than collecting and post-processing large capacity log files. This is achieved by connecting the hardware event signal of the NPU and ARM STM at the mobile phone kernel driver end to obtain event information in real-time, eliminating the time-consuming log download and parsing process while maintaining profiling accuracy

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent performs preliminary setup by establishing hardware event signal connections between the NPU and ARM STM before inference begins. This preliminary configuration enables direct real-time event capture during inference, avoiding the need for subsequent log file processing and significantly reducing overall profiling time

Inventive Principle:
Principle #10Preliminary action

2Reliability

If event logs are collected during inference, then profiling data can be obtained, but it is not easy to determine the portion performed in the current neural network and accuracy decreases when event logs are missing

Engineering Contradiction:
Improveprofiling data completenessVSAvoidevent tracking complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent implements feedback mechanisms by comparing collected event information against the control program's execution sequence. The system detects missing events by determining whether collected events match the expected execution sequence, and automatically compensates for missing events based on this comparison, ensuring complete and accurate profiling data

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent introduces the control program as an intermediary reference that mediates between the collected event information and the profiling results. By using the control program's execution sequence as a reference framework, the system can accurately determine which events belong to the current neural network operation and compensate for missing events, simplifying the tracking process while improving accuracy

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS20220075677A1Method and apparatus with neural network profiling
Publication Date: 2022.03.10 SAMSUNG ELECTRONICS CO LTD
  • US20220075677A1 patent drawing
  • US20220075677A1 patent drawing
  • US20220075677A1 patent drawing

AI summary

A processor-implemented neural network method includes: receiving an event corresponding to a neural network operation and a control program for performing the neural network operation; detecting a missing event based on the event and the control program; and generating a profile of the neural network operation based on a result of the detecting.