WO2023073824A1 - 深層学習推論システムおよび推論サービング方法 - Google Patents

深層学習推論システムおよび推論サービング方法 Download PDF

Info

Publication number
WO2023073824A1
WO2023073824A1 PCT/JP2021/039619 JP2021039619W WO2023073824A1 WO 2023073824 A1 WO2023073824 A1 WO 2023073824A1 JP 2021039619 W JP2021039619 W JP 2021039619W WO 2023073824 A1 WO2023073824 A1 WO 2023073824A1
Authority
WO
WIPO (PCT)
Prior art keywords
inference
gemm
fpga accelerator
alu
loader
Prior art date
Application number
PCT/JP2021/039619
Other languages
English (en)
French (fr)
Inventor
顕至 田仲
勇輝 有川
猛 伊藤
直樹 三浦
健 坂本
Original Assignee
日本電信電話株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電信電話株式会社 filed Critical 日本電信電話株式会社
Priority to PCT/JP2021/039619 priority Critical patent/WO2023073824A1/ja
Priority to JP2023555945A priority patent/JPWO2023073824A1/ja
Publication of WO2023073824A1 publication Critical patent/WO2023073824A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means

Definitions

  • the present invention relates to a deep learning inference system and an inference serving method that perform inference serving using a multilayer neural network.
  • Inference is to obtain processed data by providing a computing unit with an operation for neural network computation, parameters of the neural network, and data to be processed. Inference requires a large number of operations and memory. Because of this, inferences may be made at the server.
  • the client sends a request and data to be processed to the server, and receives the processing result as a response.
  • the provision of such services is inference serving.
  • Various methods have been proposed for inference serving (see Non-Patent Document 1).
  • FIG. 4 is a block diagram showing the configuration of the server.
  • a CPU Central Processing Unit
  • a NIC Network Interface Card
  • the memory 102 stores operation codes (machine language instructions) for all neural network operations, neural network parameters, and data to be processed.
  • the FPGA accelerator 103 consists of a PCIe (PCI Express) circuit, a DRAM (Dynamic Random Access Memory), and an FPGA circuit area.
  • the CPU 100 , NIC 101 , memory 102 and FPGA accelerator 103 are connected by a PCIe bus 104 .
  • FIG. 5 shows a generalized configuration of a von Neumann computer constructed on the FPGA accelerator 103 .
  • the neural network operation operation code 200 , neural network parameters 201 , and data to be processed are input to the FPGA accelerator 103 via the PCIe bus and stored in the DRAM 105 .
  • the input data 202 is data to be processed and data in the middle of calculation.
  • the instruction fetch module 106 reads the operation code 200 from the DRAM 105 and transfers it to the load module 107, the compute module 108 and the store module 109.
  • the load module 107 reads the input data 202 from the DRAM 105 , batches a plurality of pieces of input data 202 , and transfers them to the compute module 108 .
  • the compute module 108 performs neural network operations using input data 202 and parameters 201 according to the operation code 200 transferred from the instruction fetch module 106 .
  • the compute module 108 is equipped with an ALU (Arithmetic Logic Unit) 1080 and a GEMM (General Matrix Multiply) circuit 1081 . After computing according to the operation code 200 , the compute module 108 transfers the computation result to the store module 109 .
  • ALU Arimetic Logic Unit
  • GEMM General Matrix Multiply
  • the store module 109 stores the calculation result by the compute module 108 in the DRAM 105. At this time, not only the processed data is stored in the DRAM 105 as the output data 203, but also the data in the middle of the calculation may be temporarily stored as the output data 203. FIG. Data in the middle of the calculation becomes input data 202 to the load module 107 .
  • the operation of inference serving by the server is shown in FIG.
  • the CPU 100 of the server operates as an application function unit 1000 and a loader 1001 according to the inference serving program.
  • the application function unit 1000 constructs the von Neumann computer described above in the FPGA accelerator 103 at startup (step S100 in FIG. 6).
  • the NIC 101 transfers the inference request received from the client via the network and the data to be processed to the application function unit 1000 (step S101 in FIG. 6).
  • An inference request specifies which model to infer.
  • the application function unit 1000 passes data to be processed to the loader 1001 and designates an operation code to be executed according to the inference request (step S102 in FIG. 6).
  • the loader 1001 reads the specified operation code and neural network parameters from the memory 102 (steps S103 and S104 in FIG. 6).
  • the loader 1001 passes the operation code, parameters, and data to be processed to the FPGA accelerator 103 (step S105 in FIG. 6).
  • the FPGA accelerator 103 performs a neural network operation on the data to be processed according to the operation code transferred from the loader 1001, and stores the processed data obtained as a result of the operation in the DRAM 105 inside the FPGA accelerator 103 ( FIG. 6 step S106).
  • the loader 1001 reads the processed data from the DRAM 105 inside the FPGA accelerator 103 (step S107 in FIG. 6).
  • the application function unit 1000 receives the processed data from the loader 1001 and returns this data to the client as a response to the inference request (step S108 in FIG. 6).
  • Neural network operation codes are capable of parallel execution and are executed by ALU 1080 and GEMM circuit 1081 .
  • ALU 1080 with a degree of parallelism suitable for the operation code
  • GEMM circuit 1081 with a size suitable for the operation code will improve the power efficiency the most.
  • the present invention has been made to solve the above problems, and aims to provide a deep learning inference system and an inference serving method that can perform inference serving with optimal power efficiency.
  • the deep learning inference system of the present invention includes an FPGA accelerator configured to perform at least a part of computation of a neural network in response to a request from a client, an ALU and a GEMM circuit, and an operation code and processing for computation of the neural network.
  • a loader configured to transfer data to be processed to the FPGA accelerator; passing the data to be processed received from the client to the loader; and transmitting the operation code to be executed according to the request to the loader.
  • an application function unit configured to specify and return to the client processed data resulting from the operation of the neural network, the application function unit being transferred by the loader to the FPGA accelerator.
  • the application function unit is adapted to the ALU corresponding to the inference requested by the request from the client based on the operation code transferred by the loader to the FPGA accelerator. determining the degree of parallelism of the ALU and the size of the GEMM circuit based on the result of estimating the degree of parallelism and the size of the GEMM circuit, and the number of computational elements that can be implemented in the FPGA accelerator. It is something to do.
  • the application function unit changes the configuration of the FPGA accelerator by a partial reconfiguration function.
  • the inference serving method of the present invention comprises a first step of receiving an inference request and data to be processed from a client, passing the data to be processed received from the client to a loader, and executing according to the request. a second step of specifying to the loader an operation code for an operation of the neural network to be a power, based on the operation code being transferred to an FPGA accelerator that performs at least a portion of the operation of the neural network in ALU and GEMM circuits; , a third step of determining the degree of parallelism of the ALU and the size of the GEMM circuit corresponding to the inference required by the request from the client; a fourth step of changing the configuration of the FPGA accelerator so that a is arranged; a fifth step of transferring the operation code and the data to be processed from the loader to the FPGA accelerator; and a sixth step of returning processed data obtained as a result of the operation to the client.
  • the third step includes parallel processing of the ALU corresponding to the inference requested by the request from the client, based on the operation code transferred to the FPGA accelerator. determining the degree of parallelism of the ALU and the size of the GEMM circuit based on the result of estimating the degree of parallelism and the size of the GEMM circuit, and the number of computational elements that can be implemented in the FPGA accelerator. and
  • the fourth step includes a step of changing the configuration of the FPGA accelerator using a partial reconfiguration function.
  • the optimal ALU and GEMM circuit can be assigned to the FPGA accelerator for requests from clients, and inference serving can be performed with optimal power efficiency.
  • FIG. 1 is a block diagram showing the configuration of a server of a deep learning inference system according to an embodiment of the present invention.
  • FIG. 2 is a block diagram showing the configuration of a von Neumann computer constructed on an FPGA accelerator according to an embodiment of the present invention.
  • FIG. 3 is a sequence diagram illustrating operations of inference serving by the server according to the embodiment of the present invention.
  • FIG. 4 is a block diagram showing the configuration of the server.
  • FIG. 5 is a block diagram showing the configuration of a von Neumann computer constructed on an FPGA accelerator.
  • FIG. 6 is a sequence diagram illustrating the operation of inference serving by the server.
  • the present invention After receiving a request from a client, the present invention adjusts the von Neumann machine to perform inference serving by the ALU and GEMM circuits that are most suitable for the request.
  • FIG. 1 is a block diagram showing the configuration of a server of a deep learning inference system according to an embodiment of the present invention.
  • the server comprises a CPU 100 a , a NIC 101 , a memory 102 and an FPGA accelerator 103 .
  • the FPGA accelerator 103 performs at least part of operations of the multi-layered neural network in ALU and GEMM circuits.
  • the memory 102 stores a program for realizing the inference serving method of this embodiment.
  • the CPU 100 a executes processing according to programs stored in the memory 102 and functions as an application function unit 1000 a and a loader 1001 .
  • FIG. 2 is a block diagram showing the configuration of the von Neumann computer constructed on the FPGA accelerator 103 of this embodiment.
  • ALU 1080 and GEMM circuit 1081 are arranged in partial reconfiguration region 1082 of FPGA accelerator 103 .
  • the application function unit 1000a builds a von Neumann computer in the FPGA accelerator 103 when activated (step S200 in FIG. 3).
  • the NIC 101 transfers the inference request received from the client via the network and the data to be processed to the application function unit 1000a (step S201 in FIG. 3).
  • An inference request specifies which model to infer.
  • the application function unit 1000a passes the data to be processed to the loader 1001, and designates to the loader 1001 an operation code to be executed according to the inference request and parameters of the neural network necessary for inference (step S202 in FIG. 3).
  • the loader 1001 reads the specified operation code and neural network parameters from the memory 102 (steps S203 and S204 in FIG. 3).
  • the application function unit 1000a determines the degree of parallelism of the ALUs 1080 (the number of ALUs 1080) and the size of the GEMM circuit 1081 corresponding to the inference requested by the inference request from the client. (Step S205 in FIG. 3).
  • ALU 1080 performs element-wise tensor operations such as addition.
  • the GEMM circuit 1081 performs, for example, matrix multiplication operations of inputs and parameters.
  • the operation code for the GEMM circuit 1081 indicates the tensor to be input to the GEMM circuit 1081.
  • the size of the tensor is known when the tensor is stored in a buffer (not shown) provided in the preceding stage of the GEMM circuit 1081 . Therefore, the application function unit 1000a can read information about what size of matrix multiplication operation is to be performed between tensors from a plurality of operation codes for the GEMM circuit 1081, and can make an inference based on this information. It is possible to estimate the optimal GEMM circuit 1081 size.
  • the optimal size of the GEMM circuit 1081 will be explained. Matrix multiplication operations can be performed in parallel.
  • the size of the GEMM circuit 1081 referred to in the present invention means the number of parallel operations. Considering the example of matrix multiplication of a 2x2 matrix, eight multiplications are performed in this example, but each product can be computed in parallel. That is, the optimum number of parallel operations is eight.
  • the number of calculation elements in the FPGA accelerator 103 is limited, it is not always possible to prepare the GEMM circuit 1081 with 8 parallel operations. If the GEMM circuit 1081 with the optimum number of parallel operations cannot be prepared, it is efficient to implement the GEMM circuit 1081 that can execute parallel operations of divisors of the optimum number of parallel operations.
  • the application function unit 1000a estimates the optimum number of parallel operations for the matrix multiplication operation to be executed from the tensor input to the GEMM circuit 1081, and the size of the GEMM circuit 1081 may be determined.
  • the application function unit 1000a should estimate the optimum degree of parallelism of the ALUs 1080 (the number of ALUs 1080). Specifically, the application function unit 1000a reads from a plurality of operation codes for the ALU 1080 information about the degree of parallelism of tensor operations to be executed, and based on this information, selects the optimum ALU 1080 parallel operation for inference. The number of ALUs 1080 can be determined based on the optimum degree of parallelism and the number of computational elements that can be implemented in the FPGA accelerator 103 .
  • the application function unit 1000a configures the FPGA accelerator 103 by the partial reconfiguration function so that the ALU 1080 with the degree of parallelism determined in step S205 and the GEMM circuit 1081 with the size determined in step S205 are arranged in the FPGA accelerator 103. is changed (step S206 in FIG. 3).
  • the application function unit 1000 a can rewrite the partially reconfigurable area 1082 of the FPGA accelerator 103 by sending bitstream data for partial reconfiguration to the FPGA accelerator 103 .
  • the partial reconfiguration function allows rewriting while operating the FPGA accelerator 103 .
  • the loader 1001 passes the operation code and parameters read from the memory 102 and the data to be processed received from the application function unit 1000a to the FPGA accelerator 103 (step S207 in FIG. 3).
  • the process of step S207 is executed in parallel with the partial reconfiguration of step S206.
  • the FPGA accelerator 103 performs a neural network operation on the data to be processed according to the operation code transferred from the loader 1001, and stores the processed data obtained as a result of the operation in the DRAM 105 inside the FPGA accelerator 103 ( FIG. 3 step S208).
  • the loader 1001 reads the processed data from the DRAM 105 inside the FPGA accelerator 103 (step S209 in FIG. 3).
  • the application function unit 1000a receives the processed data from the loader 1001 and returns this data to the client as a response to the inference request (step S210 in FIG. 3).
  • the optimum ALU and GEMM circuit can be assigned to the inference request from the client, and the inference serving can be executed with optimum power efficiency.
  • the inference serving can be executed with optimum power efficiency.
  • the present invention can be applied to technology that provides services using neural networks.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Theoretical Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Neurology (AREA)
  • Stored Programmes (AREA)

Abstract

FPGAアクセラレータ(103)は、ニューラルネットワークの少なくとも一部の演算をALUとGEMM回路で行う。アプリケーション機能部(1000a)は、ローダ(1001)がFPGAアクセラレータ(103)に転送するオペレーションコードに基づいて、クライアントからのリクエストが要求する推論に対応するALUの並列度とGEMM回路のサイズとを決定し、決定した並列度のALUと決定したサイズのGEMM回路とが配置されるようにFPGAアクセラレータ(103)の構成を変更する。

Description

深層学習推論システムおよび推論サービング方法
 本発明は、多層ニューラルネットワークを用いて推論サービングを行う深層学習推論システムおよび推論サービング方法に関するものである。
 近年では、多層ニューラルネットワークを用いて情報処理を行い、その結果を活用するサービスが数多く存在する。演算器に、ニューラルネットワーク演算のオペレーションと、ニューラルネットワークのパラメータと、処理対象データとを与えて処理済みデータを得ることを、推論と呼ぶ。推論には、多数の演算とメモリとが必要になる。このため、サーバで推論が行われることがある。
 クライアントは、サーバに対してリクエストと処理対象データを送信し、処理の結果をレスポンスとして受け取る。このようなサービスの提供が推論サービングである。推論サービングには、さまざまな方法が提案されている(非特許文献1参照)。
 ここでは、演算器としてFPGA(field-programmable gate array)アクセラレータを用いた場合を記す。図4はサーバの構成を示すブロック図である。CPU(Central Processing Unit)100は、サービングの制御を行う。NIC(Network Interface Card)101は、クライアントからのリクエストをネットワークを介して受信し、ニューラルネットワークによる推論結果をネットワークを介してクライアントに返信する。
 メモリ102には、全てのニューラルネットワーク演算のオペレーションコード(機械語命令)と、ニューラルネットワークのパラメータと、処理対象のデータとが格納されている。FPGAアクセラレータ103は、PCIe(PCI Express)回路と、DRAM(Dynamic Random Access Memory)と、FPGA回路領域とからなる。CPU100とNIC101とメモリ102とFPGAアクセラレータ103とは、PCIeバス104によって接続されている。
 推論サービングの演算器としてFPGAアクセラレータ103を用いる場合、FPGAアクセラレータ103上にノイマン型計算機を構築する方法が一般的である(非特許文献2参照)。FPGAアクセラレータ103上に構築されたノイマン型計算機の構成を一般化して図5に示す。
 ニューラルネットワークの演算のオペレーションコード200と、ニューラルネットワークのパラメータ201と、処理対象のデータとは、PCIeバス経由でFPGAアクセラレータ103に入力され、DRAM105に格納される。図5の例では、処理対象のデータと演算途中のデータとを入力データ202としている。
 インストラクションフェッチモジュール(Instruction Fetch Module)106は、DRAM105からオペレーションコード200を読み出して、ロードモジュール(Load Module)107とコンピュートモジュール(Compute Module)108とストアモジュール(Store Module)109とに転送する。
 ロードモジュール107は、DRAM105から入力データ202を読み出し、複数の入力データ202をバッチ化して、コンピュートモジュール108に転送する。
 コンピュートモジュール108は、インストラクションフェッチモジュール106から転送されたオペレーションコード200に従って、入力データ202とパラメータ201とを用いてニューラルネットワークの演算を行う。コンピュートモジュール108には、ALU(Arithmetic Logic Unit)1080と、GEMM(General matrix multiply)回路1081とが搭載されている。コンピュートモジュール108は、オペレーションコード200に従って演算を行った後に、演算結果をストアモジュール109に転送する。
 ストアモジュール109は、コンピュートモジュール108による演算結果をDRAM105に格納する。このとき、処理済みのデータだけが出力データ203としてDRAM105に格納されるだけでなく、演算途中のデータが出力データ203として一時的に格納されることもある。演算途中のデータは、ロードモジュール107への入力データ202となる。
 サーバによる推論サービングの動作を図6に示す。サーバのCPU100は、推論サービングのプログラムに従って、アプリケーション機能部1000とローダ1001として動作する。
 アプリケーション機能部1000は、起動時に、FPGAアクセラレータ103に前述のノイマン型計算機を構築する(図6ステップS100)。
 NIC101は、ネットワークを介してクライアントから受信した推論リクエストと処理対象のデータとをアプリケーション機能部1000に転送する(図6ステップS101)。推論リクエストは、どのモデルで推論するかを指定する。
 アプリケーション機能部1000は、処理対象のデータをローダ1001に渡し、推論リクエストに従って実行すべきオペレーションコードを指定する(図6ステップS102)。
 ローダ1001は、指定されたオペレーションコードとニューラルネットワークのパラメータとをメモリ102から読み出す(図6ステップS103,S104)。
 ローダ1001は、オペレーションコードとパラメータと処理対象のデータとをFPGAアクセラレータ103に渡す(図6ステップS105)。
 FPGAアクセラレータ103は、ローダ1001から転送されたオペレーションコードに従って、処理対象のデータに対してニューラルネットワークの演算を行い、演算の結果得られた処理済みのデータをFPGAアクセラレータ103内部のDRAM105に格納する(図6ステップS106)。
 ローダ1001は、FPGAアクセラレータ103内部のDRAM105から処理済みのデータを読み出す(図6ステップS107)。
 アプリケーション機能部1000は、ローダ1001から処理済みのデータを受け取り、このデータを推論リクエストに対するレスポンスとしてクライアントに返信する(図6ステップS108)。
 ニューラルネットワークのオペレーションコードは、並列実行が可能であり、ALU1080とGEMM回路1081によって実行される。
 オペレーションコードに適した並列度のALU1080とオペレーションコードに適したサイズのGEMM回路1081を用いると最も電力効率が向上する。
 しかしながら、従来のシステムでは、ニューラルネットワークに対して大き過ぎる演算器を用いたり、小さ過ぎる演算器を用いたりすることがある。ニューラルネットワークに対して大き過ぎる演算器を用いた場合には、使用されない演算器が存在するため、電力効率が落ちるという課題があった。また、ニューラルネットワークに対して小さ過ぎる演算器を用いた場合には、処理時間が延びるため、トータルの使用電力量が増大して電力効率が落ちるという課題があった。
Christopher Olston,et al.,"Tensorflow-serving:Flexible,high-performance ml serving",米国コーネル大学ライブラリー,arXiv preprint arXiv:1712.06139,2017 Thierry Moreau,Tianqi Chen,Luis Ceze,"Leveraging the vta-tvm hardware-software stack for fpga acceleration of 8-bit resnet-18 inference",Proceedings of the 1st on Reproducible Quality-Efficient Systems Tournament on Co-designing Pareto-efficient Deep Learning,2018
 本発明は、上記課題を解決するためになされたもので、最適な電力効率で推論サービングを実行することができる深層学習推論システムおよび推論サービング方法を提供することを目的とする。
 本発明の深層学習推論システムは、クライアントからのリクエストに応じてニューラルネットワークの少なくとも一部の演算をALUとGEMM回路で行うように構成されたFPGAアクセラレータと、前記ニューラルネットワークの演算のオペレーションコードと処理対象のデータとを前記FPGAアクセラレータに転送するように構成されたローダと、前記クライアントから受信した前記処理対象のデータを前記ローダに渡し、前記リクエストに従って実行すべき前記オペレーションコードを前記ローダに対して指定し、前記ニューラルネットワークの演算の結果得られた処理済みのデータを前記クライアントに返信するように構成されたアプリケーション機能部とを備え、前記アプリケーション機能部は、前記ローダが前記FPGAアクセラレータに転送するオペレーションコードに基づいて、前記クライアントからのリクエストが要求する推論に対応する前記ALUの並列度と前記GEMM回路のサイズとを決定し、前記決定した並列度のALUと前記決定したサイズのGEMM回路とが配置されるように前記FPGAアクセラレータの構成を変更することを特徴とするものである。
 また、本発明の深層学習推論システムの1構成例において、前記アプリケーション機能部は、前記ローダが前記FPGAアクセラレータに転送するオペレーションコードに基づいて、前記クライアントからのリクエストが要求する推論に対応する前記ALUの並列度と前記GEMM回路のサイズとを推定した結果と、前記FPGAアクセラレータで実装可能な計算素子数とに基づいて、前記ALUの並列度と前記GEMM回路のサイズとを決定することを特徴とするものである。
 また、本発明の深層学習推論システムの1構成例において、前記アプリケーション機能部は、パーシャルリコンフィギュレーション機能により前記FPGAアクセラレータの構成を変更することを特徴とするものである。
 また、本発明の推論サービング方法は、クライアントから推論のリクエストと処理対象のデータとを受信する第1のステップと、前記クライアントから受信した前記処理対象のデータをローダに渡し、前記リクエストに従って実行すべきニューラルネットワークの演算のオペレーションコードを前記ローダに対して指定する第2のステップと、前記ニューラルネットワークの少なくとも一部の演算をALUとGEMM回路で行うFPGAアクセラレータに転送される前記オペレーションコードに基づいて、前記クライアントからのリクエストが要求する推論に対応する前記ALUの並列度と前記GEMM回路のサイズとを決定する第3のステップと、前記決定した並列度のALUと前記決定したサイズのGEMM回路とが配置されるように前記FPGAアクセラレータの構成を変更する第4のステップと、前記オペレーションコードと前記処理対象のデータとを前記ローダから前記FPGAアクセラレータに転送する第5のステップと、前記ニューラルネットワークの演算の結果得られた処理済みのデータを前記クライアントに返信する第6のステップとを含むことを特徴とするものである。
 また、本発明の推論サービング方法の1構成例において、前記第3のステップは、前記FPGAアクセラレータに転送されるオペレーションコードに基づいて、前記クライアントからのリクエストが要求する推論に対応する前記ALUの並列度と前記GEMM回路のサイズとを推定した結果と、前記FPGAアクセラレータで実装可能な計算素子数とに基づいて、前記ALUの並列度と前記GEMM回路のサイズとを決定するステップを含むことを特徴とするものである。
 また、本発明の推論サービング方法の1構成例において、前記第4のステップは、パーシャルリコンフィギュレーション機能により前記FPGAアクセラレータの構成を変更するステップを含むことを特徴とするものである。
 本発明によれば、クライアントからのリクエストに対して最適なALUとGEMM回路をFPGAアクセラレータに割り当てることができ、最適な電力効率で推論サービングを実行することができる。
図1は、本発明の実施例に係る深層学習推論システムのサーバの構成を示すブロック図である。 図2は、本発明の実施例に係るFPGAアクセラレータ上に構築されたノイマン型計算機の構成を示すブロック図である。 図3は、本発明の実施例に係るサーバによる推論サービングの動作を説明するシーケンス図である。 図4は、サーバの構成を示すブロック図である。 図5は、FPGAアクセラレータ上に構築されたノイマン型計算機の構成を示すブロック図である。 図6は、サーバによる推論サービングの動作を説明するシーケンス図である。
[発明の原理]
 本発明は、クライアントからのリクエストを受信した後に、ノイマン型計算機を調整することで、リクエストに最適なALUとGEMM回路によって推論サービングを実行する。
[実施例]
 以下、本発明の実施例について図面を参照して説明する。図1は、本発明の実施例に係る深層学習推論システムのサーバの構成を示すブロック図である。サーバは、CPU100aと、NIC101と、メモリ102と、FPGAアクセラレータ103とを備えている。FPGAアクセラレータ103は、多層ニューラルネットワークの少なくとも一部の演算をALUとGEMM回路で行う。
 メモリ102には、本実施例の推論サービング方法を実現するためのプログラムが格納されている。CPU100aは、メモリ102に格納されたプログラムに従って処理を実行し、アプリケーション機能部1000aとローダ1001として機能する。
 図2は、本実施例のFPGAアクセラレータ103上に構築されたノイマン型計算機の構成を示すブロック図である。本実施例では、ALU1080とGEMM回路1081とをFPGAアクセラレータ103の部分再構成可能領域(Partial Reconfiguration Region)1082に配置する。
 本実施例のサーバによる推論サービングの動作を図3に示す。アプリケーション機能部1000aは、起動時に、FPGAアクセラレータ103にノイマン型計算機を構築する(図3ステップS200)。
 NIC101は、ネットワークを介してクライアントから受信した推論リクエストと処理対象のデータとをアプリケーション機能部1000aに転送する(図3ステップS201)。推論リクエストは、どのモデルで推論するかを指定する。
 アプリケーション機能部1000aは、処理対象のデータをローダ1001に渡し、推論リクエストに従って実行すべきオペレーションコードと推論に必要なニューラルネットワークのパラメータとを、ローダ1001に対して指定する(図3ステップS202)。
 ローダ1001は、指定されたオペレーションコードとニューラルネットワークのパラメータとをメモリ102から読み出す(図3ステップS203,S204)。
 次に、アプリケーション機能部1000aは、ローダ1001が読み出したオペレーションコードに基づいて、クライアントからの推論リクエストが要求する推論に対応するALU1080の並列度(ALU1080の数)とGEMM回路1081のサイズとを決定する(図3ステップS205)。
 ニューラルネットワークでは、例えば画像などの処理対象のデータとニューラルネットワークの重みなどのパラメータは、文献「Thierry Moreau1,et al.,“A Hardware-Software Blueprint for Flexible Deep Learning Specialization”,米国コーネル大学ライブラリー,arXiv:1807.04188v3,2019」に開示されているようにテンソルで表現される。
 ALU1080は、加算などの要素ごとのテンソル演算を実行する。GEMM回路1081は、例えば入力とパラメータの行列積の演算を実行する。
 GEMM回路1081用のオペレーションコードによってGEMM回路1081に入力するテンソルが指示される。テンソルのサイズは、GEMM回路1081の前段に設けられるバッファ(不図示)にテンソルが格納されている段階で既知である。したがって、アプリケーション機能部1000aは、GEMM回路1081用の複数のオペレーションコードから、どのようなサイズのテンソル同士の行列積演算が実行されるかという情報を読み取ることができ、この情報に基づいて推論に最適なGEMM回路1081のサイズを推定することが可能である。
 ここで、最適なGEMM回路1081のサイズについて説明する。行列積演算は、並列演算することが可能である。本発明で言うGEMM回路1081のサイズとは、並列演算数のことである。2×2行列の行列積の例を考えると、この例では8回の積が実行されるが、それぞれの積を並列に演算することができる。すなわち、最適な並列演算数は8である。
 ただし、FPGAアクセラレータ103内の計算素子数が限られているため、常に並列演算数8のGEMM回路1081を用意できるとは限らない。最適な並列演算数のGEMM回路1081を用意できない場合、最適な並列演算数の約数の並列演算を実行できるGEMM回路1081を実装するのが効率が良い。
 最適な並列演算数8に対して、例えば4並列演算が実行可能なGEMM回路1081を実装した場合、2×2の行列積演算は2サイクルで実行できる。一方、6並列演算が実行可能なGEMM回路1081を実装した場合、2×2の行列積演算は2サイクルで実行されるが、4並列演算が実行可能なGEMM回路1081に比べて多くの計算素子が動作するため、最適ではないと言える。つまり、アプリケーション機能部1000aは、GEMM回路1081に入力されるテンソルから、実行される行列積演算の最適な並列演算数を推定し、最適な並列演算数とFPGAアクセラレータ103で実装可能な計算素子数とに基づいて、GEMM回路1081のサイズを決定すればよい。
 同様に、アプリケーション機能部1000aは、最適なALU1080の並列度(ALU1080の数)を推定すればよい。具体的には、アプリケーション機能部1000aは、ALU1080用の複数のオペレーションコードから、どのような並列度のテンソル演算が実行されるかという情報を読み取り、この情報に基づいて推論に最適なALU1080の並列度を推定し、最適な並列度とFPGAアクセラレータ103で実装可能な計算素子数とに基づいて、ALU1080の数を決定すればよい。
 アプリケーション機能部1000aは、ステップS205で決定した並列度のALU1080とステップS205で決定したサイズのGEMM回路1081とがFPGAアクセラレータ103内に配置されるように、パーシャルリコンフィギュレーション機能によりFPGAアクセラレータ103の構成を変更する(図3ステップS206)。アプリケーション機能部1000aは、パーシャルリコンフィギュレーションのためのビットストリームデータをFPGAアクセラレータ103に送ることにより、FPGAアクセラレータ103の部分再構成可能領域1082を書き換えることができる。周知のとおり、パーシャルリコンフィギュレーション機能により、FPGAアクセラレータ103を動作させつつ書き換えることが可能である。
 ローダ1001は、メモリ102から読み出したオペレーションコードとパラメータと、アプリケーション機能部1000aから受け取った処理対象のデータとをFPGAアクセラレータ103に渡す(図3ステップS207)。なお、このステップS207の処理は、ステップS206のパーシャルリコンフィギュレーションと並行して実行される。
 FPGAアクセラレータ103は、ローダ1001から転送されたオペレーションコードに従って、処理対象のデータに対してニューラルネットワークの演算を行い、演算の結果得られた処理済みのデータをFPGAアクセラレータ103内部のDRAM105に格納する(図3ステップS208)。
 ローダ1001は、FPGAアクセラレータ103内部のDRAM105から処理済みのデータを読み出す(図3ステップS209)。
 アプリケーション機能部1000aは、ローダ1001から処理済みのデータを受け取り、このデータを推論リクエストに対するレスポンスとしてクライアントに返信する(図3ステップS210)。
 以上のように、本実施例では、クライアントからの推論リクエストに対して最適なALUとGEMM回路を割り当てることができ、最適な電力効率で推論サービングを実行することができる。本実施例では、ALUとGEMM回路のみをパーシャルリコンフィギュレーションすることで、オーバヘッドはほぼ発生しない。
 本発明は、ニューラルネットワークを利用したサービスを提供する技術に適用することができる。
 100a…CPU、101…NIC、102…メモリ、103…FPGAアクセラレータ、104…PCIeバス、105…DRAM、106…インストラクションフェッチモジュール、107…ロードモジュール、108…コンピュートモジュール、109…ストアモジュール、1000a…アプリケーション機能部、1001…ローダ、1080…ALU、1081…GEMM回路、1082…部分再構成可能領域。

Claims (6)

  1.  クライアントからのリクエストに応じてニューラルネットワークの少なくとも一部の演算をALUとGEMM回路で行うように構成されたFPGAアクセラレータと、
     前記ニューラルネットワークの演算のオペレーションコードと処理対象のデータとを前記FPGAアクセラレータに転送するように構成されたローダと、
     前記クライアントから受信した前記処理対象のデータを前記ローダに渡し、前記リクエストに従って実行すべき前記オペレーションコードを前記ローダに対して指定し、前記ニューラルネットワークの演算の結果得られた処理済みのデータを前記クライアントに返信するように構成されたアプリケーション機能部とを備え、
     前記アプリケーション機能部は、前記ローダが前記FPGAアクセラレータに転送するオペレーションコードに基づいて、前記クライアントからのリクエストが要求する推論に対応する前記ALUの並列度と前記GEMM回路のサイズとを決定し、前記決定した並列度のALUと前記決定したサイズのGEMM回路とが配置されるように前記FPGAアクセラレータの構成を変更することを特徴とする深層学習推論システム。
  2.  請求項1記載の深層学習推論システムにおいて、
     前記アプリケーション機能部は、前記ローダが前記FPGAアクセラレータに転送するオペレーションコードに基づいて、前記クライアントからのリクエストが要求する推論に対応する前記ALUの並列度と前記GEMM回路のサイズとを推定した結果と、前記FPGAアクセラレータで実装可能な計算素子数とに基づいて、前記ALUの並列度と前記GEMM回路のサイズとを決定することを特徴とする深層学習推論システム。
  3.  請求項1または2記載の深層学習推論システムにおいて、
     前記アプリケーション機能部は、パーシャルリコンフィギュレーション機能により前記FPGAアクセラレータの構成を変更することを特徴とする深層学習推論システム。
  4.  クライアントから推論のリクエストと処理対象のデータとを受信する第1のステップと、
     前記クライアントから受信した前記処理対象のデータをローダに渡し、前記リクエストに従って実行すべきニューラルネットワークの演算のオペレーションコードを前記ローダに対して指定する第2のステップと、
     前記ニューラルネットワークの少なくとも一部の演算をALUとGEMM回路で行うFPGAアクセラレータに転送される前記オペレーションコードに基づいて、前記クライアントからのリクエストが要求する推論に対応する前記ALUの並列度と前記GEMM回路のサイズとを決定する第3のステップと、
     前記決定した並列度のALUと前記決定したサイズのGEMM回路とが配置されるように前記FPGAアクセラレータの構成を変更する第4のステップと、
     前記オペレーションコードと前記処理対象のデータとを前記ローダから前記FPGAアクセラレータに転送する第5のステップと、
     前記ニューラルネットワークの演算の結果得られた処理済みのデータを前記クライアントに返信する第6のステップとを含むことを特徴とする推論サービング方法。
  5.  請求項4記載の推論サービング方法において、
     前記第3のステップは、前記FPGAアクセラレータに転送されるオペレーションコードに基づいて、前記クライアントからのリクエストが要求する推論に対応する前記ALUの並列度と前記GEMM回路のサイズとを推定した結果と、前記FPGAアクセラレータで実装可能な計算素子数とに基づいて、前記ALUの並列度と前記GEMM回路のサイズとを決定するステップを含むことを特徴とする推論サービング方法。
  6.  請求項4または5記載の推論サービング方法において、
     前記第4のステップは、パーシャルリコンフィギュレーション機能により前記FPGAアクセラレータの構成を変更するステップを含むことを特徴とする推論サービング方法。
PCT/JP2021/039619 2021-10-27 2021-10-27 深層学習推論システムおよび推論サービング方法 WO2023073824A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2021/039619 WO2023073824A1 (ja) 2021-10-27 2021-10-27 深層学習推論システムおよび推論サービング方法
JP2023555945A JPWO2023073824A1 (ja) 2021-10-27 2021-10-27

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2021/039619 WO2023073824A1 (ja) 2021-10-27 2021-10-27 深層学習推論システムおよび推論サービング方法

Publications (1)

Publication Number Publication Date
WO2023073824A1 true WO2023073824A1 (ja) 2023-05-04

Family

ID=86159213

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/039619 WO2023073824A1 (ja) 2021-10-27 2021-10-27 深層学習推論システムおよび推論サービング方法

Country Status (2)

Country Link
JP (1) JPWO2023073824A1 (ja)
WO (1) WO2023073824A1 (ja)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200302291A1 (en) * 2019-03-18 2020-09-24 Electronics And Telecommunications Research Institute Convolutional layer acceleration unit, embedded system having the same, and method for operating the embedded system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200302291A1 (en) * 2019-03-18 2020-09-24 Electronics And Telecommunications Research Institute Convolutional layer acceleration unit, embedded system having the same, and method for operating the embedded system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHAO RUIZHE; LIU SHUANGLONG; NG HO-CHEUNG; WANG ERWEI; DAVIS JAMES J.; NIU XINYU; WANG XIWEI; SHI HUIFENG; CONSTANTINIDES GEORGE A: "Hardware Compilation of Deep Neural Networks: An Overview", 2018 IEEE 29TH INTERNATIONAL CONFERENCE ON APPLICATION-SPECIFIC SYSTEMS, ARCHITECTURES AND PROCESSORS (ASAP), IEEE, 10 July 2018 (2018-07-10), pages 1 - 8, XP033393090, DOI: 10.1109/ASAP.2018.8445088 *

Also Published As

Publication number Publication date
JPWO2023073824A1 (ja) 2023-05-04

Similar Documents

Publication Publication Date Title
US20210406657A1 (en) Multi-function unit for programmable hardware nodes for neural network processing
Kiningham et al. GRIP: A graph neural network accelerator architecture
EP3779804A1 (en) Chip and chip-based data processing method
CN111027690A (zh) 执行确定性推理的组合处理装置、芯片和方法
Bir et al. Design and implementation of an elastic processor with hyperthreading technology and virtualization for elastic server models
WO2023073824A1 (ja) 深層学習推論システムおよび推論サービング方法
Gonçalves et al. Exploring data size to run convolutional neural networks in low density fpgas
Guo et al. Algorithms and architecture support of degree-based quantization for graph neural networks
EP3186731B1 (en) Array-based computations on a storage device
US20220051095A1 (en) Machine Learning Computer
Cichiwskyj et al. Time to learn: Temporal accelerators as an embedded deep neural network platform
Shenoy et al. Design and Implementation of Reconfigurable Neural Network Accelerator
WO2024015318A1 (en) Parallel processing architecture with countdown tagging
CN116402091A (zh) 面向人工智能芯片的混合引擎智能计算方法和装置
Ohba et al. Signal processing on a data-flow processor

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21962373

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2023555945

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE