Neural Network Processor Debugging Circuit for Bottleneck Identification

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Complex artificial neural networks face challenges in identifying bottlenecks due to their massive computation requirements and intricate software and hardware configurations, making it difficult to optimize performance effectively.

Innovation Solution

Implementing debugging circuits that generate notification packets for each instruction's execution time across various processing engines, allowing for the identification and optimization of bottlenecks by modifying hardware resources and reordering operations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Difficulty of detecting and measuring

If debugging circuits are added to generate notification packets for each instruction, then bottleneck identification capability is improved, but device complexity increases

Engineering Contradiction:
Improvebottleneck identification capabilityVSAvoiddevice complexity
Core Design Contradiction:
Difficulty of detecting and measuringVSDevice complexity

Solution Approach 1:

The patent introduces notification packets as intermediary data structures that carry timing information between processing engines and the bottleneck identification module. These packets serve as a mediator that enables detailed performance monitoring without requiring complex direct instrumentation of each processing element, thus improving detectability while controlling complexity growth.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent creates simplified copies of execution timing information through notification packets that replicate essential performance data without duplicating the entire processing engine complexity. By copying only the necessary timing and identification fields into notification packets, the system achieves comprehensive bottleneck analysis while maintaining manageable device complexity.

Inventive Principle:
Principle #26Copying

2Measurement precision

If notification packets are generated for each instruction execution, then measurement precision is improved, but loss of time increases

Engineering Contradiction:
Improveexecution time measurement precisionVSAvoidoverhead time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent implements partial action by generating notification packets selectively for instructions that are likely to contain bottlenecks, rather than for every single instruction in the neural network. This approach maintains high measurement precision for critical operations while reducing the overall time overhead by avoiding unnecessary packet generation for routine instructions.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The patent performs preliminary action by pre-configuring which instructions and processing engines should generate notification packets based on static analysis of the neural network architecture and execution patterns. This pre-filtering approach ensures that measurement precision is maintained for critical path operations while minimizing time overhead by excluding non-critical instructions from detailed timing analysis.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10846201B1Performance debug for networks
Publication Date: 2020.11.24 AMAZON TECH INC
  • US10846201B1 patent drawing
  • US10846201B1 patent drawing
  • US10846201B1 patent drawing

AI summary

Disclosed herein are techniques for debugging the performance of a neural network. In one embodiment, a neural network processor includes a processing engine, a debugging circuit coupled to the processing engine, and an interface to a memory device. The processing engine is configured to execute instructions for implementing a neural network. The debugging circuit is configurable to determine, for each instruction in a set of instructions, a first timestamp indicating a start time of executing the instruction and a second timestamp indicating an end time of executing the instruction by the processing engine. The interface is configured to save the first timestamp and the second timestamp for each instruction in the set of instructions into the memory device. The debugging circuit can be configured to different debug levels. The neural network processor can include multiple debugging circuits for multiple processing engines that operate in parallel.