# US 2021/0342673 A1 · Inter-processor data transfer in a machine learning accelerator, using statically scheduled instructions

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0342673 A1
- Document ID: US20210342673A1
- Status: Published application
- Kind: A1
- Application number: 16/865,226
- Filed: 2020-05-01
- Published: 2021-11-04
- Earliest claimed: 2020-05-01
- Assignees: SiMa Technologies, Inc.
- Applicants: SiMa Technologies, Inc.
- Inventors: Nishit Shah; Srivathsa Dhruvanarayan; Reed Kotler
- Web page: https://patentgrep.com/patent/US20210342673A1

## CPC

- G06N 3/063: using electronic means
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/0495: Quantised networks; Sparse networks; Compressed networks
- G06N 3/08: Learning methods
- G06N 3/082: modifying the architecture, e.g. adding, deleting or silencing nodes or connections
- G06N 3/04: Architecture, e.g. interconnection topology
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A compiler generates a computer program implementing a machine learning network on a machine learning accelerator (MLA) including interconnected processing elements. The computer program includes data transfer instructions for non-colliding data transfers between the processing elements. To generate the data transfer instructions, the compiler determines non-conflicting data transfer paths for data transfers based on a topology of the interconnections between processing elements, on dependencies of the instructions and on a duration for execution of the instructions. Each data transfer path specifies a routing and a time slot for the data transfer. The compiler generates data transfer instructions that specify routing of the data transfers and generates a static schedule that schedules execution of the data transfer instructions during the time slots for the data transfers. The static schedule also schedules execution of compute instructions for computations using transferred data that implement the machine learning network.

## Claims

### Claim 1

A method implemented on a computer system for implementing a machine learning network on a machine learning accelerator (MLA), the MLA comprising a plurality of interconnected processing elements implemented on a semiconductor die, the method comprising:
receiving a description of the machine learning network;
allocating computations that implement the machine learning network to processing elements for execution;
determining data transfers for transfer of data to or from processing elements in order to execute the computations;
generating a computer program comprising compute instructions that implement the computations and data transfer instructions that implement the data transfers, comprising:
determining non-conflicting data transfer paths for the data transfers based on a topology of the interconnections between processing elements, on dependencies of the instructions and on a duration for execution of the instructions; wherein each data transfer path specifies a routing and a time slot for the data transfer;
generating data transfer instructions that specify routing of the data transfers; and
generating a static schedule that schedules execution of the data transfer instructions during the time slots for the data transfers, the static schedule also scheduling execution of the compute instructions; and
outputting the computer program.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein determining non-conflicting data transfer paths comprises:
determining candidate data transfer paths for the data transfers;
determining which of the candidate data transfer paths are available;
selecting from among the available candidate data transfer paths.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein determining non-conflicting data transfer paths comprises:
generating default data transfer paths for the data transfers;
determining conflicts among the default data transfer paths; and
modifying the data transfer paths to resolve the conflicts.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein:
adjacent processing elements are connected by multiple data transfer lanes; and
the data transfer instructions also specify which data transfer lanes to use for the data transfers.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, wherein:
adjacent processing elements are connected by variable-width lanes; and
the data transfer instructions also specify widths of the lanes to use for the data transfers.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, wherein:
data transfer paths are virtualized; and
the data transfer instructions specify virtual data transfer paths for the data transfers.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, wherein:
processing elements have multiple i/o ports; and
the data transfer instructions also specify which i/o ports to use for the data transfers.

### Claim 8 (depends on 1)

The computer-implemented method of claim 1, wherein the data transfer instructions and the compute instructions are executed by the processing elements.

### Claim 9 (depends on 1)

The computer-implemented method of claim 1, wherein the data transfer instructions include a store data instruction to transfer data from one of the processing elements to a memory also on the semiconductor die but outside the interconnected processing elements.

### Claim 10 (depends on 1)

The computer-implemented method of claim 1, wherein:
the data transfer instructions include a load data instruction to transfer data from a memory also on the semiconductor die but outside the interconnected processing elements to one of the processing elements; and
the data transfer path for the load data instruction includes a request path from the processing element to the memory to provide a request for the data to the memory, and a response path from the memory to the processing element to provide the data to the processing element responsive to the request.

### Claim 11 (depends on 1)

The computer-implemented method of claim 1, wherein the data transfer instructions include a move data instruction to transfer data from one of the processing elements to another one of the processing elements, and the data transfer instruction includes a sequence of codes defining the routing of the data transfer path, each code defining a direction of data transfer between two adjacent processing elements.

### Claim 12 (depends on 11)

The computer-implemented method of claim 11, wherein the processing elements along the data transfer path:
determine a next processing element along the data transfer path using a first code of the sequence of codes;
generate an updated sequence of codes by replacing the first code with a second code, the second code defining a direction of data transfer opposite to the direction defined by the first code; and
provide the updated sequence of codes to the next processing element.

### Claim 13 (depends on 11)

The computer-implemented method of claim 11, wherein the processing elements along the data transfer path:
use the sequence of codes to route first data along the data transfer path;
generate an updated sequence of codes that specify a reverse of the data transfer path; and
use the updated sequence of codes to route second data along the reverse of the data transfer path.

### Claim 14 (depends on 1)

The computer-implemented method of claim 1, wherein the interconnected processing elements include interior processing elements that are directly connected to other processing elements and edge processing elements that are also directly connected to a memory also on the semiconductor die but outside the interconnected processing elements.

### Claim 15 (depends on 1)

The computer-implemented method of claim 1, wherein at least one interior processing element is directly connected to the memory.

### Claim 16 (depends on 14)

The computer-implemented method of claim 14, wherein the data transfer instructions include a load data instruction to transfer data from the memory to an interior processing element via one of the edge processing elements.

### Claim 17 (depends on 1)

The computer-implemented method of claim 1, wherein the machine learning network comprises a plurality of layers and allocating computations to processing elements comprises:
determining, for each layer, a partial computation metric based on the computations performed to implement that layer; and
allocating the processing elements to layers based on the partial computation metric.

### Claim 18 (depends on 1)

The computer-implemented method of claim 1, wherein the processing elements execute the data transfer instructions without using a hardware routing table.

### Claim 19 (depends on 1)

The computer-implemented method of claim 1, wherein the processing elements execute the data transfer instructions without performing congestion or collision arbitration in hardware.

### Claim 20

A non-transitory computer readable storage medium storing instructions for implementing a machine learning network on a machine learning accelerator (MLA), the MLA comprising a plurality of interconnected processing elements implemented on a semiconductor die, the instructions when executed by one or more processors causing the one or more processors to perform steps including:
receiving a description of the machine learning network;
allocating computations that implement the machine learning network to processing elements for execution;
determining data transfers for transfer of data to or from processing elements in order to execute the computations;
generating a computer program comprising compute instructions that implement the computations and data transfer instructions that implement the data transfers, comprising:
determining non-conflicting data transfer paths for the data transfers based on a topology of the interconnections between processing elements, on dependencies of the instructions and on a duration for execution of the instructions; wherein each data transfer path specifies a routing and a time slot for the data transfer;
generating data transfer instructions that specify routing of the data transfers; and
generating a static schedule that schedules execution of the data transfer instructions during the time slots for the data transfers, the static schedule also scheduling execution of the compute instructions; and
outputting the computer program.
