IP Library Granted Patent US 12,493,785
Granted Patent B2
US 12,493,785 · App. 17/129,222 · Granted Dec 9, 2025

Method, electronic device, and computer program product for deploying machine learning model

Inventors: Jinpeng Liu (Shanghai, CN); Jin Li (Shanghai, CN)
Assignee: EMC IP Holding Company LLC
G06N3/08G06N3/04
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,493,785
App. No.
17/129,222
Granted
Dec 9, 2025
Kind
B2
Abstract

Embodiments of the present disclosure relate to a method, an electronic device, and a computer program product for deploying a machine learning model. The method includes: acquiring a machine learning model in accordance with an open neural network exchange format; converting the machine learning model to an intermediate representation using a multi-level intermediate representation method; and deploying a computation associated with the machine learning model to at least one computing device using the intermediate representation.

Claims (88)

1 . A method comprising:

acquiring, in a front end of a compiler executing on at least one processing unit coupled to at least one memory, a machine learning model in accordance with an open neural network exchange format;

converting, in a back end of the compiler, the machine learning model from the open neural network exchange format to an intermediate representation using a multi-level intermediate representation method, the intermediate representation having a plurality of distinct levels including at least a first level comprising a first representation format having associated therewith a first compiler utility of the back end of the compiler, and a second level comprising a second representation format different than the first representation format and having associated therewith a second compiler utility of the back end of the compiler, different than the first compiler utility;

generating, in the back end of the compiler, first hardware-specific code from the first level of the intermediate representation for a first device type, the first hardware-specific code being generated utilizing the first compiler utility and being configured in accordance with a first parallelism algorithm implemented by a first scheduler for parallel performance of computations of the first hardware-specific code, the first parallelism algorithm providing one of data parallelism, model parallelism and pipelined parallelism;

generating, in the back end of the compiler, second hardware-specific code from the second level of the intermediate representation for a second device type different than the first device type, the second hardware-specific code being generated utilizing the second compiler utility and being configured in accordance with a second parallelism algorithm, different than the first parallelism algorithm, implemented by a second scheduler, different than the first scheduler, for parallel performance of computations of the second hardware-specific code, the second parallelism algorithm providing a different one of the data parallelism, model parallelism and pipelined parallelism than that provided by the first parallelism algorithm;

deploying a computation associated with the machine learning model to at least one computing device using the intermediate representation;

wherein deploying the computation comprises:

linking the first hardware-specific code to a first application programming interface associated with a first neural network architecture;

linking the second hardware-specific code to a second application programming interface associated with a second neural network architecture different than the first neural network architecture;

executing the first hardware-specific code generated for the first device type on a first computing device having the first device type, via the first application programming interface; and

executing the second hardware-specific code generated for the second device type on a second computing device having the second device type, via the second application programming interface;

automatically detecting a change in a hardware configuration of at least one of the first computing device having the first device type and the second computing device having the second device type; and

regenerating, in the back end of the compiler, at least one of the first hardware-specific code and the second hardware-specific code, responsive to the automatically detected change, for execution utilizing the changed hardware configuration.

2 . The method according to claim 1 , further including:

acquiring a computation graph associated with the machine learning model, wherein the computation graph represents dependencies between multiple parts of the computation associated with the machine learning model; and

executing in parallel the multiple parts of the computation based on the computation graph and the intermediate representation.

3 . The method according to claim 2 , further including:

determining parameters associated with the multiple parts of the computation based on the computation graph and the intermediate representation; and

storing, if it is determined that at least one of the parameters is associated with at least two of the multiple parts, data associated with the at least one parameter for use by the at least two parts of the computation.

4 . The method according to claim 2 , wherein executing in parallel the multiple parts includes:

executing in parallel the multiple parts in response to receiving a user instruction for parallel execution of the multiple parts; or

executing in parallel the multiple parts based on a pre-configuration regarding parallel execution.

5 . The method according to claim 1 , further including:

executing in parallel the computation and a computation associated with another machine learning model, wherein the other machine learning model is acquired in accordance with the open neural network exchange format and has been converted to another intermediate representation using the multi-level intermediate representation method, and the computation associated with the other machine learning model has been deployed to the at least one computing device using the other intermediate representation.

6 . The method according to claim 1 , wherein the at least one computing device includes multiple computing devices, and deploying the computation associated with the machine learning model to the at least one computing device includes:

determining device types corresponding to multiple parts of the computation associated with the machine learning model; and

deploying the multiple parts of the computation to one or more of the multiple computing devices based on types of the multiple computing devices and the determined device types.

7 . The method according to claim 1 , wherein the at least one computing device includes at least one of the following:

a central processing unit; and

a dedicated processing unit.

8 . The method according to claim 1 , wherein the at least one computing device includes multiple computing devices, and the method further includes:

redeploying, if a configuration of one of the multiple computing devices is changed, the computation to the multiple computing devices based on the changed configuration.

9 . An electronic device, including:

at least one processing unit; and

at least one memory which is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, wherein the instructions, when executed by the at least one processing unit, cause the electronic device to perform actions comprising:

acquiring, in a front end of a compiler executing on the at least one processing unit coupled to the at least one memory, a machine learning model in accordance with an open neural network exchange format;

converting, in a back end of the compiler, the machine learning model from the open neural network exchange format to an intermediate representation using a multi-level intermediate representation method, the intermediate representation having a plurality of distinct levels including at least a first level comprising a first representation format having associated therewith a first compiler utility of the back end of the compiler, and a second level comprising a second representation format different than the first representation format and having associated therewith a second compiler utility of the back end of the compiler, different than the first compiler utility;

generating, in the back end of the compiler, first hardware-specific code from the first level of the intermediate representation for a first device type, the first hardware-specific code being generated utilizing the first compiler utility and being configured in accordance with a first parallelism algorithm implemented by a first scheduler for parallel performance of computations of the first hardware-specific code, the first parallelism algorithm providing one of data parallelism, model parallelism and pipelined parallelism;

generating, in the back end of the compiler, second hardware-specific code from the second level of the intermediate representation for a second device type different than the first device type, the second hardware-specific code being generated utilizing the second compiler utility and being configured in accordance with a second parallelism algorithm, different than the first parallelism algorithm, implemented by a second scheduler, different than the first scheduler, for parallel performance of computations of the second hardware-specific code, the second parallelism algorithm providing a different one of the data parallelism, model parallelism and pipelined parallelism than that provided by the first parallelism algorithm;

deploying a computation associated with the machine learning model to at least one computing device using the intermediate representation;

wherein deploying the computation comprises:

linking the first hardware-specific code to a first application programming interface associated with a first neural network architecture;

linking the second hardware-specific code to a second application programming interface associated with a second neural network architecture different than the first neural network architecture;

executing the first hardware-specific code generated for the first device type on a first computing device having the first device type, via the first application programming interface; and

executing the second hardware-specific code generated for the second device type on a second computing device having the second device type, via the second application programming interface;

automatically detecting a change in a hardware configuration of at least one of the first computing device having the first device type and the second computing device having the second device type; and

regenerating, in the back end of the compiler, at least one of the first hardware-specific code and the second hardware-specific code, responsive to the automatically detected change, for execution utilizing the changed hardware configuration.

10 . The electronic device according to claim 9 , wherein the actions further include:

acquiring a computation graph associated with the machine learning model, wherein the computation graph represents dependencies between multiple parts of the computation associated with the machine learning model; and

executing in parallel the multiple parts of the computation based on the computation graph and the intermediate representation.

11 . The electronic device according to claim 10 , wherein the actions further include:

determining parameters associated with the multiple parts of the computation based on the computation graph and the intermediate representation; and

storing, if it is determined that at least one of the parameters is associated with at least two of the multiple parts, data associated with the at least one parameter for use by the at least two parts of the computation.

12 . The electronic device according to claim 10 , wherein executing in parallel the multiple parts includes:

executing in parallel the multiple parts in response to receiving a user instruction for parallel execution of the multiple parts; or

executing in parallel the multiple parts based on a pre-configuration regarding parallel execution.

13 . The electronic device according to claim 9 , wherein the actions further include:

executing in parallel the computation and a computation associated with another machine learning model, wherein the other machine learning model is acquired in accordance with the open neural network exchange format and has been converted to another intermediate representation using the multi-level intermediate representation method, and the computation associated with the other machine learning model has been deployed to the at least one computing device using the other intermediate representation.

14 . The electronic device according to claim 9 , wherein the at least one computing device includes multiple computing devices, and deploying the computation associated with the machine learning model to the at least one computing device includes:

determining device types corresponding to multiple parts of the computation associated with the machine learning model; and

deploying the multiple parts of the computation to one or more of the multiple computing devices based on types of the multiple computing devices and the determined device types.

15 . The electronic device according to claim 9 , wherein the at least one computing device includes at least one of the following:

a central processing unit; and

a dedicated processing unit.

16 . The electronic device according to claim 9 , wherein the at least one computing device includes multiple computing devices, and the actions further include:

redeploying, if a configuration of one of the multiple computing devices is changed, the computation to the multiple computing devices based on the changed configuration.

17 . A computer program product tangibly stored on a non-transitory computer-readable medium and including machine-executable instructions, wherein the machine-executable instructions, when executed by a machine, cause the machine to perform actions comprising:

acquiring, in a front end of a compiler executing on at least one processing unit coupled to at least one memory, a machine learning model in accordance with an open neural network exchange format;

converting, in a back end of the compiler, the machine learning model from the open neural network exchange format to an intermediate representation using a multi-level intermediate representation method, the intermediate representation having a plurality of distinct levels including at least a first level comprising a first representation format having associated therewith a first compiler utility of the back end of the compiler, and a second level comprising a second representation format different than the first representation format and having associated therewith a second compiler utility of the back end of the compiler, different than the first compiler utility;

generating, in the back end of the compiler, first hardware-specific code from the first level of the intermediate representation for a first device type, the first hardware-specific code being generated utilizing the first compiler utility and being configured in accordance with a first parallelism algorithm implemented by a first scheduler for parallel performance of computations of the first hardware-specific code, the first parallelism algorithm providing one of data parallelism, model parallelism and pipelined parallelism;

generating, in the back end of the compiler, second hardware-specific code from the second level of the intermediate representation for a second device type different than the first device type, the second hardware-specific code being generated utilizing the second compiler utility and being configured in accordance with a second parallelism algorithm, different than the first parallelism algorithm, implemented by a second scheduler, different than the first scheduler, for parallel performance of computations of the second hardware-specific code, the second parallelism algorithm providing a different one of the data parallelism, model parallelism and pipelined parallelism than that provided by the first parallelism algorithm;

deploying a computation associated with the machine learning model to at least one computing device using the intermediate representation;

wherein deploying the computation comprises:

linking the first hardware-specific code to a first application programming interface associated with a first neural network architecture;

linking the second hardware-specific code to a second application programming interface associated with a second neural network architecture different than the first neural network architecture;

executing the first hardware-specific code generated for the first device type on a first computing device having the first device type, via the first application programming interface; and

executing the second hardware-specific code generated for the second device type on a second computing device having the second device type, via the second application programming interface;

automatically detecting a change in a hardware configuration of at least one of the first computing device having the first device type and the second computing device having the second device type; and

regenerating, in the back end of the compiler, at least one of the first hardware-specific code and the second hardware-specific code, responsive to the automatically detected change, for execution utilizing the changed hardware configuration.

18 . The computer program product according to claim 17 , further including:

acquiring a computation graph associated with the machine learning model, wherein the computation graph represents dependencies between multiple parts of the computation associated with the machine learning model; and

executing in parallel the multiple parts of the computation based on the computation graph and the intermediate representation.

19 . The computer program product according to claim 18 , further including:

determining parameters associated with the multiple parts of the computation based on the computation graph and the intermediate representation; and

storing, if it is determined that at least one of the parameters is associated with at least two of the multiple parts, data associated with the at least one parameter for use by the at least two parts of the computation.

20 . The computer program product according to claim 18 , wherein executing in parallel the multiple parts includes:

executing in parallel the multiple parts in response to receiving a user instruction for parallel execution of the multiple parts; or

executing in parallel the multiple parts based on a pre-configuration regarding parallel execution.

Assignments (9)
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (055479/0342) Recorded Jun 10, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: EMC IP HOLDING COMPANY LLC; DELL PRODUCTS L.P.
Reel/Frame 062021/0460 →
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (055479/0051) Recorded Jun 10, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: EMC IP HOLDING COMPANY LLC; DELL PRODUCTS L.P.
Reel/Frame 062021/0663 →
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (056136/0752) Recorded Jun 10, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: EMC IP HOLDING COMPANY LLC; DELL PRODUCTS L.P.
Reel/Frame 062021/0771 →
RELEASE OF SECURITY INTEREST AT REEL 055408 FRAME 0697 Recorded Nov 2, 2021
From: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH
To: DELL PRODUCTS L.P.; EMC IP HOLDING COMPANY LLC
Reel/Frame 058001/0553 →
SECURITY INTEREST Recorded Mar 3, 2021
From: EMC IP HOLDING COMPANY LLC; DELL PRODUCTS L.P.
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 056136/0752 →
SECURITY INTEREST Recorded Mar 3, 2021
From: EMC IP HOLDING COMPANY LLC; DELL PRODUCTS L.P.
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 055479/0051 →
SECURITY INTEREST Recorded Mar 3, 2021
From: EMC IP HOLDING COMPANY LLC; DELL PRODUCTS L.P.
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 055479/0342 →
SECURITY AGREEMENT Recorded Feb 25, 2021
From: EMC IP HOLDING COMPANY LLC; DELL PRODUCTS L.P.
To: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH
Reel/Frame 055408/0697 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 21, 2020
From: LIU, JINPENG; LI, JIN
To: EMC IP HOLDING COMPANY LLC
Reel/Frame 054713/0277 →
Priority Claims (1)
CN 202011364629.6 · Nov 27, 2020 · national
Continuity (1)
Related Publication 20220172044A1 · Jun 2, 2022
References Cited (44)
US 10698737B2 · Fachini · 2020 [cited by examiner]
US 11159628B1 · Gupta · 2021 [cited by examiner]
US 11301762B1 · Chen · 2022 [cited by examiner]
US 11416289B2 · Liu et al. · 2022 [cited by applicant]
US 11461291B2 · Liu et al. · 2022 [cited by applicant]
US 11507419B2 · Li et al. · 2022 [cited by applicant]
US 11579924B2 · Li et al. · 2023 [cited by applicant]
US 11915154B2 · Liu et al. · 2024 [cited by applicant]
US 20170124451A1 · Barham · 2017 [cited by examiner]
US 20190324810A1 · Zhao et al. · 2019 [cited by applicant]
US 20190391796A1 · Brady · 2019 [cited by examiner]
US 20200334083A1 · Liu et al. · 2020 [cited by applicant]
US 20200334544A1 · Liu et al. · 2020 [cited by applicant]
US 20200387818A1 · Chan · 2020 [cited by examiner]
US 20210034582A1 · Liu et al. · 2021 [cited by applicant]
US 20210240525A1 · Liu et al. · 2021 [cited by applicant]
US 20210248002A1 · Li et al. · 2021 [cited by applicant]
US 20210303344A1 · Li et al. · 2021 [cited by applicant]
US 20220012607A1 · Liu et al. · 2022 [cited by applicant]
US 20220092439A1 · Liu et al. · 2022 [cited by applicant]
US 20220101194A1 · Liu et al. · 2022 [cited by applicant]
US 20220343165A1 · Hu · 2022 [cited by examiner]
US 20230102562A1 · Ding · 2023 [cited by examiner]
Moskewicz et al, Boda: A Holistic Approach for Implementing Neural Network Computations, ACM International Conference on Computing Frontiers 2017, May 2017. (Year: 2017). [cited by examiner]
Tavarageri et al., Automatic Model Parallelism for Deep Neural Networks with Compiler and Hardware Support, Jun. 2019. (Year: 2019). [cited by examiner]
Jin et al., Compiling ONNX Neural Network Models Using MLIR, Oct. 2020. (Year: 2020). [cited by examiner]
Lattner et al., MLIR: A Compiler Infrastructure for the End of Moore's Law, Mar. 2020. (Year: 2020). [cited by examiner]
Wikipedia, “Intermediate Representation,” https://en.wikipedia.org/w/index.php?title=Intermediate_representation&direction=next&oldid=905361000, Jan. 24, 2020, 4 pages. [cited by applicant]
Jia et al., “Beyond Data and Model Parallelism for Deep Neural Networks,” Proceedings of the 2nd SysML Conference, Palo Alto, CA, Jul. 2018, 13 pages. [cited by applicant]
Wikipedia, “Deep Learning,” https://en.wikipedia.org/wiki/Deep_learning, Feb. 6, 2020, 33 pages. [cited by applicant]
Wikipedia, “Everything as a Service,” https://simple.wikipedia.org/wiki/Everything_as_a_service, Aug. 23, 2019, 2 pages. [cited by applicant]
L. Song et al., “HyPar: Towards Hybrid Parallelism for Deep Learning Accelerator Array,” arXiv:1901.02067v1, Jan. 7, 2019, 13 pages. [cited by applicant]
Github, “OpenNESS Architecture and Solution Overview,” https://github.com/open-ness/specs/blob/master/doc/architecture.md, accessed Jul. 7, 2020, 15 pages. [cited by applicant]
Amazon Web Services, “Machine Learning Inference with AWS IoT Greengrass Solution Accelerator” https://aws.amazon.com/iot/solutions/mli-accelerator/, Oct. 2019, 5 pages. [cited by applicant]
Y. Huang et al., “GPipe: Efficient Training of Giant Neural Networks using Pipeline Parallelism,” arXiv:1811.06965v5 [cs.CV], Jul. 25, 2019, 11 pages. [cited by applicant]
D. Narayanan et al., “PipeDream: Generalized Pipeline Parallelism for DNN Training,” The 27th ACM Symposium on Operating Systems Principles, Huntsville, Ontario, Canada, Oct. 27-30, 2019, 15 pages. [cited by applicant]
LLVM, “The LLVM Compiler Infrastructure,” https://llvm.org/, Accessed Jul. 10, 2020, 3 pages. [cited by applicant]
LLVM, “Multi-Level Intermediate Representation Overview,” https://mlir.llvm.org/, Accessed Jul. 10, 2020, 3 pages. [cited by applicant]
ONNX, “Open Neural Network Exchange,” https://onnx.ai/, 2019, 3 pages. [cited by applicant]
Github, “ONNX: Open Standard for Machine Learning Interoperability,” https://github.com/onnx/onnx, Accessed Jul. 10, 2020, 8 pages. [cited by applicant]
Github, “ONNX: Operators.md at Master,” https://github.com/onnx/onnx/blob/master/docs/Operators.md, Accessed Jul. 10, 2020, 233 pages. [cited by applicant]
Github, “ONNX Runtime: Cross-Platform, High Performance ML Inferencing and Training Accelerator,” https://github.com/microsoft/onnxruntime, Accessed Jul. 10, 2020, 10 pages. [cited by applicant]
Github, “LLVM Project: MLIR at Master,” https://github.com/llvm/llvm-project/tree/master/mlir, Accessed Jul. 10, 2020, 2 pages. [cited by applicant]
C. Li et al., “Benanza: Automatic uBenchmark Generation to Compute “Lower-bound” Latency and Inform Optimizations of Deep Learning Models on GPUs,” arXiv:1911.06922v3, Feb. 19, 2020, 11 pages. [cited by applicant]
Cited By (1)
US 12,657,014