# US 2023/0350673 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 2023/0350673 A1
- Document ID: US20230350673A1
- Status: Published application
- Kind: A1
- Application number: 18/219,535
- Filed: 2023-07-07
- Published: 2023-11-02
- Earliest claimed: 2020-03-17
- Assignees: OnSpecta, Inc.
- Applicants: OnSpecta, Inc.
- Inventors: Victor Jakubiuk; Sebastian Kaczor
- Web page: https://patentgrep.com/patent/US20230350673A1

## 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 comprising instructions for an AI network;
receiving a plurality of microkernels implementing instructions for specific hardware components within the AI network; and
generating a kernel for each operation by selecting one or more microkernels to be invoked by the kernel, wherein each kernel is a software implementation of the operation within the AI network.

### Claim 2 (depends on 1)

The method of claim 1, wherein each microkernel 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 receive input data and send output data in a plurality of data formats.

### Claim 5 (depends on 1)

The method of claim 1, wherein generating the kernel for each operation 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 microkernels implementing the same instructions for different specific hardware components operates identically according to the same Application Programming Interface (API) functionality.

### Claim 8 (depends on 1)

The method of claim 1, wherein generating the kernel further comprises:
dynamically rearranging input data from the AI network for real-time processing by the one or more microkernels.

### Claim 9 (depends on 1)

The method of claim 1, wherein 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 or neural network.

### Claim 11

A system comprising one or more processors configured to perform the operations of:
receiving a plurality of operations comprising instructions for an AI network;
receiving a plurality of microkernels implementing instructions for specific hardware components within the AI network; and
generating a kernel for each operation by selecting one or more microkernels to be invoked by the kernel, wherein each kernel is a software implementation of the operation within the AI network.

### Claim 12 (depends on 11)

The system of claim 11, the one or more processors being further configured to perform the operation of:
porting the software implementation of the AI network to a new hardware platform using the generated kernels for each operation.

### Claim 13 (depends on 12)

The system of claim 12, wherein the new hardware platform is a custom graphical processing unit (GPU).

### Claim 14 (depends on 11)

The system of claim 11, wherein the generated kernel for each operation is hardware-independent.

### Claim 15 (depends on 11)

The system of claim 11, wherein the plurality of operations comprise one or more mathematical operations, and wherein the mathematical operations comprise one or more of: addition, multiplication, and fused multiply-add.

### Claim 16 (depends on 11)

The system of claim 11, wherein generating the kernel for each operation further comprises:
processing input data from the AI network to meet the requirements of the selected microkernels; and
post-processing output data received from the microkernels to be sent to the AI network.

### Claim 17 (depends on 16)

The system of claim 16, wherein the pre-processing and the post-processing are performed concurrently with compilation via a JIT compiler.

### Claim 18 (depends on 11)

The system of claim 11, wherein the kernel selects and invokes the one or more microkernels dynamically based on the type of operation and the available hardware components.

### Claim 19 (depends on 11)

The system of claim 11, wherein each microkernel includes metadata specifying the data format and the operation it performs.

### Claim 20

A non-transitory computer-readable medium containing instructions for execution by a computer system, the non-transitory computer-readable medium comprising:
instructions for receiving a plurality of operations comprising instructions for an AI network;
instructions for receiving a plurality of microkernels implementing instructions for specific hardware components within the AI network; and
instructions for generating a kernel for each operation by selecting one or more microkernels to be invoked by the kernel, wherein each kernel is a software implementation of the operation within the AI network.
