IP Library Granted Patent US 12,190,086
Granted Patent B1
US 12,190,086 · App. 17/747,813 · Granted Jan 7, 2025

Method and apparatus for ML graphs by a compiler

Inventors: Ulf Hanebutte (Gig Harbor, WA); Chien-Chun Chou (Morgan Hill, CA); Senad Durakovic (Palo Alto, CA); Pranav Jonnalagadda (San Jose, CA)
Assignee: Marvell Asia Pte Ltd
G06F8/47G06F16/9024G06N20/00
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,190,086
App. No.
17/747,813
Filed
May 18, 2022
Granted
Jan 7, 2025
Kind
B1
Art Unit
2196
USPC
717/156
Abstract

A system and method for splitting a machine learning (ML) graph is disclosed. The system includes a compiler configured to receive an ML model. The compiler generates a graph associated with the ML model, wherein the graph is an internal representation of the ML model. The graph is partitioned into a first subgraph and a second subgraph. The first subgraph is associated with an ML hardware, an ML emulator, or a combination thereof, and the second subgraph is associated with a processor different from the ML hardware. A set of low-level instructions associated with the first subgraph is generated. One or more resources in the ML hardware is identified to execute the set of low-level instructions associated with the first subgraph.

Claims (64)

1. A system, comprising:

a processor; and

a compiler executed by the processor, wherein the compiler is configured to

receive a machine learning (ML) model;

generate a graph associated with the ML model, wherein the graph is an internal representation of the ML model;

partition the graph into a first subgraph and a second subgraph, wherein the first subgraph is associated with an ML hardware, and wherein the second subgraph is associated with a processor different from the ML hardware, wherein the partition is based on at least one of:

a) whether an operation within a node of the graph is supported by the ML hardware, or

b) latency associated with a node within the first subgraph as opposed to the second subgraph, or

c) an amount of data movement if a node is included within the first subgraph as opposed to the second subgraph;

generate a set of low-level instructions associated with the first subgraph; and

identify one or more resources in the ML hardware to execute the set of low-level instructions associated with the first subgraph.

2. The system of claim 1 , wherein the ML hardware is configured to execute the set of low-level instructions associated with the first subgraph and further configured to output a result of the execution of the set of low-level instructions associated with the first subgraph to another compiler.

3. The system of claim 1 further comprising another compiler configured to:

receive the second subgraph; and

generate a set of low-level instructions associated with the second subgraph for execution by the processor that is different from the ML hardware.

4. The system of claim 3 , wherein the another compiler is a TVM compiler.

5. The system of claim 3 , wherein the compiler is the same as the another compiler.

6. The system of claim 1 , wherein the node that comprises an operation that is unsupported by the ML hardware is included in the second subgraph.

7. The system of claim 1 , wherein the partitioning is based on at least one of (a), or (b), or (c), or (d) knowledge of architecture of the ML hardware.

8. The system of claim 1 , wherein the processor different from the ML hardware is a central processing unit, a graphics pipeline unit, or a field programmable gate array.

9. The system of claim 1 , wherein the processor different from the ML hardware is configured to execute the set of low-level instructions associated with the second subgraph.

10. A method comprising:

receiving a machine learning (ML) model;

generating a graph associated with the ML model, wherein the graph is an internal representation of the ML model;

partitioning the graph into a first subgraph and a second subgraph, wherein the first subgraph is associated with an ML hardware or an ML hardware emulator, and wherein the second subgraph is associated with a processor different from the ML hardware, wherein the partitioning based on at least one of

a) whether an operation within a node of the graph is supported by the ML hardware or the ML hardware emulator, or

b) latency associated with a node within the first subgraph as opposed to the second subgraph, or

c) an amount of data movement if a node is included within the first subgraph as opposed to the second subgraph;

generating a set of low-level instructions associated with the first subgraph;

identifying one or more resources in the ML hardware or the ML hardware emulator to execute the set of low-level instructions associated with the first subgraph; and

generating a set of low-level instructions associated with the second subgraph for execution by the processor that is different from the ML hardware.

11. The method of claim 10 further comprising executing the set of low-level instructions associated with the first subgraph.

12. The method of claim 10 , wherein the node that comprises an operation that is unsupported by the ML hardware or the ML hardware emulator is included in the second subgraph.

13. The method of claim 10 , wherein the partitioning is based on at least one of (a), or (b), or (c), or (d) knowledge of architecture of the ML hardware.

14. The method of claim 10 , wherein the processor different from the ML hardware is a central processing unit, a graphics pipeline unit, or a field programmable gate array.

15. A system comprising:

a means for receiving a machine learning (ML) model;

a means for generating a graph associated with the ML model, wherein the graph is an internal representation of the ML model;

a means for partitioning the graph into a first subgraph and a second subgraph, wherein the first subgraph is associated with an ML hardware or an ML hardware emulator, and wherein the second subgraph is associated with a processor different from the ML hardware, wherein means for partitioning is based on at least one of:

a) whether an operation within a node of the graph is supported by the ML hardware or the ML hardware emulator, or

b) latency associated with a node within the first subgraph as opposed to the second subgraph, or

c) an amount of data movement if a node is included within the first subgraph as opposed to the second subgraph;

a means for generating a set of low-level instructions associated with the first subgraph;

a means for identifying one or more resources in the ML hardware or the ML hardware emulator to execute the set of low-level instructions associated with the first subgraph; and

a means for generating a set of low-level instructions associated with the second subgraph for execution by the processor that is different from the ML hardware.

16. The system of claim 15 further comprising executing the set of low-level instructions associated with the first subgraph.

17. The system of claim 15 , wherein the node that comprises an operation that is unsupported by the ML hardware or the ML hardware emulator is included in the second subgraph.

18. The system of claim 15 , wherein the partitioning is based on knowledge of architecture of the ML hardware.

19. A system, comprising:

a processor; and

a compiler executed by the processor, wherein the compiler is configured to

receive a machine learning (ML) model;

generate a graph associated with the ML model, wherein the graph is an internal representation of the ML model;

partition the graph into a first subgraph and a second subgraph, wherein the first subgraph is associated with an ML hardware emulator, and wherein the second subgraph is associated with a processor different from the ML hardware emulator;

generate a set of low-level instructions associated with the first subgraph; and

identify one or more resources in the ML hardware emulator to execute the set of low-level instructions associated with the first subgraph.

20. A system, comprising:

a processor; and

a compiler executed by the processor, wherein the compiler is configured to

receive a machine learning (ML) model;

generate a graph associated with the ML model, wherein the graph is an internal representation of the ML model;

partition the graph into a first subgraph and a second subgraph, wherein the first subgraph is associated with an ML hardware and an ML hardware emulator, and wherein the second subgraph is associated with a processor different from the ML hardware and the ML hardware emulator;

generate a set of low-level instructions associated with the first subgraph; and

identify one or more resources in the ML hardware and the ML hardware emulator to execute the set of low-level instructions associated with the first subgraph.

Continuity (2)
Continuation In Part 17390143 · Jul 30, 2021
Provisional Application 63214651 · Jun 24, 2021
References Cited (6)
US 10977018B1 · Hwang · 2021 [cited by examiner]
US 11797876B1 · Wang · 2023 [cited by examiner]
US 20200285788A1 · Brebner · 2020 [cited by examiner]
US 20220101194A1 · Liu · 2022 [cited by examiner]
US 20220113972A1 · Nakamura · 2022 [cited by applicant]
US 20220197616A1 · Drepper · 2022 [cited by examiner]
Cited By (3)
US 12,417,084 US 12,645,556 US 12,675,715