IP Library Granted Patent US 12,572,339
Granted Patent B2
US 12,572,339 · App. 18/320,975 · Granted Mar 10, 2026

Accelerate inference performance on artificial intelligence accelerators

Inventors: Haruki Imai (Yokohama, JP); Yasushi Negishi (Machida, JP); Tung D. Le (Ichikawa, JP); Kiyokuni Kawachiya (Yokohama, JP)
Assignee: International Business Machines Corporation
G06F8/433G06F8/35G06F8/4441G06F8/451G06F9/5033G06F9/5066
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,572,339
App. No.
18/320,975
Granted
Mar 10, 2026
Kind
B2
Abstract

A method for inference performance in an artificial intelligence model provides reduction of pre-processing overhead. The method includes receiving a plurality of operations associated with the artificial intelligence model. A computational graph for the artificial intelligence model is generated. Each of the operations is categorized into one of three categories including: accelerator designated operations, central processing unit (CPU) designated operations, and undetermined processing designated operations. An estimated processing time is determined for the operations. The operations are inserted into the computational graph. The computational graph is divided into sub-graphs. Edges of the sub-graphs where pre-processing steps will be performed is determined. A conversion is applied to the sub-graphs converting the undetermined processing designated operations, into one of the accelerator designated operations or the CPU designated operations, based on a condition that minimizes a number of the pre-processing steps in the sub-graph.

Claims (78)

1 . A computer program product for accelerating inference performance in an artificial intelligence model, the computer program product comprising:

one or more computer readable storage media, and program instructions collectively stored on the one or more computer readable storage media, the program instructions comprising:

receiving, by a processor, a plurality of operations associated with the artificial intelligence model;

generating, by the processor, a computational graph for the artificial intelligence model;

categorizing, by the processor, each operation of the plurality of operations into one of three categories including:

accelerator designated operations;

central processing unit (CPU) designated operations; and

undetermined processing designated operations;

determining, by the processor, an estimated processing time for each operation of the plurality of operations;

inserting, by the processor, the plurality of operations into the computational graph;

dividing, by the processor, the computational graph into a plurality of sub-graphs;

determining, by the processor, edges of the plurality of sub-graphs where pre-processing steps will be performed; and

converting, by the processor, in one or more sub-graphs of the plurality of sub-graphs, the undetermined processing designated operations, into one of the accelerator designated operations or the CPU designated operations, based on a condition that reduces a number of the pre-processing steps in the one or more sub-graphs of the plurality of sub-graphs, wherein the accelerator designated operations are executed by an accelerator, and wherein the CPU designated operations are executed by a CPU.

2 . The computer program product of claim 1 , wherein the dividing of the computational graph into the plurality of sub-graphs is performed at a point in the computational graph where one of the accelerator designated operations or the CPU designated operations is adjacent to one of the undetermined processing designated operations.

3 . The computer program product of claim 1 , wherein, upon determining that one sub-graph of the plurality of sub-graphs includes vertices that are the accelerator designated operations, the conversion converts all the undetermined processing designated operations in the sub-graph of the plurality of sub-graphs into the accelerator designated operations.

4 . The computer program product of claim 1 , wherein, upon determining that one sub-graph of the plurality of sub-graphs includes vertices that are the CPU designated operations, the conversion converts all the undetermined processing designated operations in the sub-graph of the plurality of sub-graphs into the CPU designated operations.

5 . The computer program product of claim 1 , wherein, upon determining that one sub-graph of the plurality of sub-graphs includes vertices that include one accelerator designated operation and one CPU designated operation, the conversion converts the undetermined processing designated operations in the sub-graph of the plurality of sub-graphs so that only a single one of the accelerator designated operations is adjacent to a single one of the CPU designated operations.

6 . The computer program product of claim 1 , wherein the program instructions further comprise:

selecting a plurality of combinations of the accelerator designated operations and the CPU designated operations for one or more of the undetermined processing designated operations in one sub-graph of the plurality of sub-graphs;

inserting one or more temporary pre-processing steps at the edges of the plurality of sub-graphs, wherein the edges of the plurality of sub-graphs include the accelerator designated operations and the CPU designated operations;

determining an elapsed time for processing through a path of the sub-graph of the plurality of sub-graphs, wherein the path of the sub-graph of the plurality of sub-graphs includes the one or more temporary pre-processing steps and the undetermined processing designated operations using different selected combinations of the accelerator designated operations and the CPU designated operations; and

selecting a combination of the different selected combinations of the accelerator designated operations and the CPU designated operations, that demonstrates a lowest elapsed time.

7 . The computer program product of claim 1 , wherein for the division of the computational graph into the plurality of sub-graphs, the program instructions further comprise:

associating vertices that are either the accelerator designated operations or the CPU designated operations as being ends of a same sub-graph;

determining a computation time from each undetermined processing designated operation to each end in the same sub-graph, wherein the computation time equals a processing time from an individual undetermined processing designated operation to:

one of the accelerator designated operations at the ends of the same sub-graph; and

one of the CPU designated operations at the ends of the same sub-graph; and

determining the edges of the plurality of sub-graphs where the pre-processing steps will be performed based on solving a minimum cut problem using the computation time of the individual undetermined processing designated operation.

8 . A method for accelerating inference performance in an artificial intelligence model, comprising:

receiving, by a processor, a plurality of operations associated with the artificial intelligence model;

generating, by the processor, a computational graph for the artificial intelligence model;

categorizing, by the processor, each operation of the plurality of operations into one of three categories including:

accelerator designated operations;

central processing unit (CPU) designated operations; and

undetermined processing designated operations;

determining, by the processor, an estimated processing time for each operation of the plurality of operations;

inserting, by the processor, the plurality of operations into the computational graph;

dividing, by the processor, the computational graph into a plurality of sub-graphs;

determining, by the processor, edges of the plurality of sub-graphs where pre-processing steps will be performed; and

converting, by the processor, in one or more sub-graphs of the plurality of sub-graphs, the undetermined processing designated operations, into one of the accelerator designated operations or the CPU designated operations, based on a condition that minimizes a number of the pre-processing steps in the one or more sub-graphs of the plurality of sub-graphs, wherein the accelerator designated operations are executed by an accelerator, and wherein the CPU designated operations are executed by a CPU.

9 . The method of claim 8 , wherein the dividing of the computational graph into the plurality of sub-graphs is performed at a point in the computational graph where one of the accelerator designated operations or the CPU designated operations is adjacent to one of the undetermined processing designated operations.

10 . The method of claim 8 , wherein, upon determining that one sub-graph of the plurality of sub-graphs includes vertices that are the accelerator designated operations, the conversion converts all the undetermined processing designated operations in the sub-graph of the plurality of sub-graphs into the accelerator designated operations.

11 . The method of claim 8 , wherein, upon determining that one sub-graph of the plurality of sub-graphs includes vertices that are the CPU designated operations, the conversion converts all the undetermined processing designated operations in the sub-graph of the plurality of sub-graphs into the CPU designated operations.

12 . The method of claim 8 , wherein, upon determining that one sub-graph of the plurality of sub-graphs includes vertices that include one accelerator designated operation and one CPU designated operation, the conversion converts the undetermined processing designated operations in the sub-graph of the plurality of sub-graphs so that only a single one of the accelerator designated operations is adjacent to a single one of the CPU designated operations.

13 . The method of claim 8 , further comprising:

selecting a plurality of combinations of the accelerator designated operations and the CPU designated operations for one or more of the undetermined processing designated operations in one sub-graph of the plurality of sub-graphs;

inserting one or more temporary pre-processing steps at the edges of the plurality of sub-graphs, wherein the edges of the plurality of sub-graphs include the accelerator designated operations and the CPU designated operations;

determining an elapsed time for processing through a path of the sub-graph of the plurality of sub-graphs, wherein the path of the sub-graph of the plurality of sub-graphs includes the one or more temporary pre-processing steps and the undetermined processing designated operations using different selected combinations of the accelerator designated operations and the CPU designated operations; and

selecting a combination of the different selected combinations of the accelerator designated operations and the CPU designated operations, that demonstrates a lowest elapsed time.

14 . The method of claim 8 , wherein for the division of the computational graph into the plurality of sub-graphs, the method further comprises:

associating vertices that are either both the accelerator designated operations or the CPU designated operations as being ends of a same sub-graph;

determining a computation time from each undetermined processing designated operation to each end in the same sub-graph, wherein the computation time equals a processing time from an individual undetermined processing designated operation to:

one of the accelerator designated operations at the ends of the same sub-graph; and

one of the CPU designated operations at the ends of the same sub-graph; and

determining the edges of the plurality of sub-graphs where the pre-processing steps will be performed based on solving a minimum cut problem using the computation time of the individual undetermined processing designated operation.

15 . A computing device configured to accelerate inference performance in an artificial intelligence model, comprising:

a processor; and

a memory coupled to the processor, the memory storing instructions to cause the processor to perform acts comprising:

receiving a plurality of operations associated with the artificial intelligence model;

generating a computational graph for the artificial intelligence model;

categorizing each operation of the plurality of operations into one of three categories including:

accelerator designated operations;

central processing unit (CPU) designated operations; and

undetermined processing designated operations;

determining an estimated processing time for each operation of the plurality of operations;

inserting the plurality of operations into the computational graph;

dividing the computational graph into a plurality of sub-graphs;

determining edges of the plurality of sub-graphs where pre-processing steps will be performed; and

converting, in one or more sub-graphs of the plurality of sub-graphs, the undetermined processing designated operations, into one of the accelerator designated operations or the CPU designated operations, based on a condition that reduces a number of the pre-processing steps in the one or more sub-graphs of the plurality of sub-graphs, wherein the accelerator designated operations are executed by an accelerator, and wherein the CPU designated operations are executed by a CPU.

16 . The computing device of claim 15 , wherein the dividing of the computational graph into the plurality of sub-graphs is performed at a point in the computational graph where one of the accelerator designated operations or the CPU designated operations is adjacent to one of the undetermined processing designated operations.

17 . The computing device of claim 15 , wherein, upon determining that one sub-graph of the plurality of sub-graphs includes vertices that are the accelerator designated operations, the conversion converts all the undetermined processing designated operations in the sub-graph of the plurality of sub-graphs into the accelerator designated operations.

18 . The computing device of claim 15 , wherein, upon determining that one sub-graph of the plurality of sub-graphs includes vertices that are the CPU designated operations, the conversion converts all the undetermined processing designated operations in the sub-graph of the plurality of sub-graphs into the CPU designated operations.

19 . The computing device of claim 15 , wherein, upon determining that one sub-graph of the plurality of sub-graphs includes vertices that include one accelerator designated operation and one CPU designated operation, the conversion converts the undetermined processing designated operations in the sub-graph of the plurality of sub-graphs so that only a single one of the accelerator designated operations is adjacent to a single one of the CPU designated operations.

20 . The computing device of claim 15 , wherein the instructions cause the processor to perform acts further comprising:

selecting a plurality of combinations of the accelerator designated operations and the CPU designated operations for one or more of the undetermined processing designated operations in one sub-graph of the plurality of sub-graphs;

inserting one or more temporary pre-processing steps at the edges of the plurality of sub-graphs, wherein the edges of the plurality of sub-graphs include the accelerator designated operations and the CPU designated operations;

determining an elapsed time for processing through a path of the sub-graph of the plurality of sub-graphs, wherein the path of the sub-graph of the plurality of sub-graphs includes the one or more temporary pre-processing steps and the undetermined processing designated operations using different selected combinations of the accelerator designated operations and the CPU designated operations; and

selecting a combination of the different selected combinations of the accelerator designated operations and the CPU designated operations, that demonstrates a lowest elapsed time.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 20, 2023
From: IMAI, HARUKI; NEGISHI, YASUSHI; LE, TUNG D.; KAWACHIYA, KIYOKUNI
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 063710/0169 →
Continuity (1)
Related Publication 20240385882A1 · Nov 21, 2024
References Cited (18)
US 20170124451A1 · Barham · 2017 [cited by examiner]
US 20180018586A1 · Kobayashi · 2018 [cited by applicant]
US 20200342286A1 · Zhang · 2020 [cited by examiner]
US 20210142177A1 · Mallya · 2021 [cited by applicant]
US 20210248002A1 · Li · 2021 [cited by examiner]
US 20210374554A1 · Khandelwal · 2021 [cited by applicant]
AU 2022203628A1 · 2022 [cited by applicant]
DE 102022113059A1 · 2022 [cited by applicant]
WO 2024240436A1 · 2024 [cited by applicant]
Pal, S. et al., “OnSRAM: Efficient Inter-Node On-Chip Scratchpad Management in Deep Learning Accelerators”, Comput. Syst. (2022), vol. 21:6, 29 pgs. [cited by applicant]
Zhang, M. et al., “DL Inference and Training Optimization Towards Speed and Scale”, ACM (2021), Abstract, 1 pg. [cited by applicant]
Zhang, M. et al., “DUET: A Compiler-Runtime Subgraph Scheduling Approach for Tensor Programs on a Coupled CPU-GPU Architecture”, IEEE International Parallel and Distributed Processing Symposium (2021), 11 pgs. [cited by applicant]
Xu, Y. et al., “EOP: Efficient Operator Partition for Deep Learning Inference Over Edge Servers”, ACM (2022), pp. 45-57. [cited by applicant]
Chen, J., “Update Output for Quantized Models by ORT on VNNI Machine (#572)”, Onnx Models (2022), 4 pgs. [cited by applicant]
Jain, A. et al., “SUPER: SUb-Graph Parallelism for TransformERs”, IEEE International Parallel and Distributed Processing Symposium (2021), 10 pgs. [cited by applicant]
Abadi, M. et al., “TensorFlow: Large-Scale Machine Learning on Heterogeneous Distributed Systems”, ARXIV.org (2016), 19 pgs. [cited by applicant]
International Search Report and Written Opinion issued Jun. 24, 2024 in related application No. PCT/EP2024/061189, 12 pgs. [cited by applicant]
“BERT-Squad”, Retrieved from: https://github.com/onnx/models/tree/main/text/machine_comprehension/bert-squad, 2023, 4 pages. [cited by applicant]