# US 2021/0294602 A1 · Microkernel-based software optimization of neural networks

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

- Number: US 2021/0294602 A1
- Document ID: US20210294602A1
- Status: Published application
- Kind: A1
- Application number: 17/204,878
- Filed: 2021-03-17
- Published: 2021-09-23
- Earliest claimed: 2020-03-17
- Assignees: OnSpecta, Inc.
- Applicants: Onspecta, Inc.
- Inventors: Victor Jakubiuk; Sebastian Kaczor
- Web page: https://patentgrep.com/patent/US20210294602A1

## CPC

- G06F 9/223: {Execution means for microinstructions irrespective of the microinstruction function, e.g. decoding of microinstructions and nanoinstructions; timing of microinstructions; programmable logic arrays; delays and fan-out problems}
- G06N 3/10: Interfaces, programming languages or software development kits, e.g. for simulating neural networks
- G06F 8/41: Compilation
- G06N 3/04: Architecture, e.g. interconnection topology
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/08: Learning methods
- G06F 9/541: {via adapters, e.g. between incompatible applications}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Disclosed are systems and methods related to providing for the optimized software implementations of artificial intelligence (“AI”) networks. The system receives operations (“ops”) consisting of a set of instructions to be performed within an AI network. The system then receives microkernels implementing one or more instructions to be performed within the AI network for a specific hardware component. Next, the system generates a kernel for each of the operations. Generating the kernel for each of the operations includes configuring input data to be received from the AI network; detecting a specific hardware component to be used; selecting one or more microkernels to be invoked by the kernel based on the detection of the specific hardware component; and configuring output data to be sent to the AI network as a result of the invocation of the microkernel(s).

## Claims

### Claim 1

A method for providing a software implementation of an Artificial Intelligence (AI) network, comprising:
receiving a plurality of operations, each operation comprising a set of instructions to be performed within the AI network;
receiving a plurality of microkernels, each microkernel implementing one or more instructions to be performed within the AI network for a specific hardware component; and
generating a kernel for each of the one or more operations, wherein each kernel is a software implementation of the operation within the AI network, and wherein the generating the kernel for each of the one or more operations comprises:
configuring input data to be received from the AI network;
selecting one or more microkernels to be invoked by the kernel, wherein each microkernel performs a subset of the set of instructions for the operation, and wherein the microkernels are selected based on the set of instructions; and
configuring output data to be sent to the AI network as a result of the invocation of the microkernels.

### Claim 2 (depends on 1)

The method of claim 1, wherein each of the plurality of microkernels receives and processes one or more input data streams to produce one or more output data streams.

### Claim 3 (depends on 1)

The method of claim 1, wherein the kernel is executable on a plurality of different hardware components.

### Claim 4 (depends on 1)

The method of claim 1, wherein the one or more microkernels are each configured to receive input data and send output data in a plurality of data formats.

### Claim 5 (depends on 1)

The method of claim 1, wherein the generating the kernel for each of the one or more operations further comprises compiling software code representing the kernel.

### Claim 6 (depends on 5)

The method of claim 5, wherein the software code is compiled using a Just-In-Time (JIT) compiler.

### Claim 7 (depends on 1)

The method of claim 1, wherein each of the one or more microkernels implementing the same one or more instructions for different specific hardware components operate identically according to the same Application Programming Interface (API) functionality.

### Claim 8 (depends on 1)

The method of claim 1, wherein the generating the kernel further comprises rearranging the input data to be read into the input data streams of at least a subset of the one or more microkernels in real time or substantially real time.

### Claim 9 (depends on 1)

The method of claim 1, wherein the generating the kernel further comprises performing one or more optimization steps on software code representing the kernel.

### Claim 10 (depends on 1)

The method of claim 1, wherein the AI network is a deep learning network or neural network.

### Claim 11

A non-transitory computer-readable medium containing instructions for providing a software implementation of an Artificial Intelligence (AI) network, the instructions for execution by a computer system, the non-transitory computer-readable medium comprising:
instructions for receiving a plurality of operations, each operation comprising a set of instructions to be performed within the AI network;
instructions for receiving a plurality of microkernels, each microkernel implementing one or more instructions to be performed within the AI network for a specific hardware component;
instructions for generating a kernel for each of the one or more operations, wherein each kernel is a software implementation of the operation within the AI network, and wherein the instructions for generating the kernel for each of the one or more operations comprise:
instructions for configuring input data to be received from the AI network;
instructions for selecting one or more microkernels to be invoked by the kernel, wherein each microkernel performs a subset of the set of instructions for the operation, and wherein the microkernels are selected based on the set of instructions; and
instructions for configuring output data to be sent to the AI network as a result of the invocation of the microkernels.

### Claim 12 (depends on 11)

The non-transitory computer-readable medium of claim 11, wherein each of the plurality of microkernels receives and processes one or more input data streams to produce one or more output data streams.

### Claim 13 (depends on 11)

The non-transitory computer-readable medium of claim 11, wherein the kernel is executable on a plurality of different hardware components.

### Claim 14 (depends on 11)

The non-transitory computer-readable medium of claim 11, wherein the one or more microkernels are each configured to receive input data and send output data in a plurality of data formats.

### Claim 15 (depends on 11)

The non-transitory computer-readable medium of claim 11, wherein the instructions for generating the kernel for each of the one or more operations further comprise instructions for compiling software code representing the kernel.

### Claim 16 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the software code is compiled using a Just-In-Time (JIT) compiler.

### Claim 17 (depends on 11)

The non-transitory computer-readable medium of claim 11, wherein each of the one or more microkernels implementing the same one or more instructions for different specific hardware components operate identically according to the same Application Programming Interface (API) functionality.

### Claim 18 (depends on 11)

The non-transitory computer-readable medium of claim 11, wherein the instructions for generating the kernel further comprise instructions for rearranging the input data to be read into the input data streams of at least a subset of the one or more microkernels in real time or substantially real time.

### Claim 19 (depends on 1)

The non-transitory computer-readable medium of claim 1, wherein the instructions for generating the kernel further comprise instructions for performing one or more optimization steps on software code representing the kernel.

### Claim 20 (depends on 1)

The non-transitory computer-readable medium of claim 1, wherein the AI network is a deep learning network or neural network.
