Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7544142B2 - OFFLOAD SERVER, OFFLOAD CONTROL METHOD, AND OFFLOAD PROGRAM - Google Patents
[go: Go Back, main page]

JP7544142B2 - OFFLOAD SERVER, OFFLOAD CONTROL METHOD, AND OFFLOAD PROGRAM - Google Patents

OFFLOAD SERVER, OFFLOAD CONTROL METHOD, AND OFFLOAD PROGRAM Download PDF

Info

Publication number
JP7544142B2
JP7544142B2 JP2022561797A JP2022561797A JP7544142B2 JP 7544142 B2 JP7544142 B2 JP 7544142B2 JP 2022561797 A JP2022561797 A JP 2022561797A JP 2022561797 A JP2022561797 A JP 2022561797A JP 7544142 B2 JP7544142 B2 JP 7544142B2
Authority
JP
Japan
Prior art keywords
offload
processing
unit
resource
cpu
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
JP2022561797A
Other languages
Japanese (ja)
Other versions
JPWO2022102071A1 (en
Inventor
庸次 山登
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NTT Inc
NTT Inc USA
Original Assignee
Nippon Telegraph and Telephone Corp
NTT Inc USA
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 Nippon Telegraph and Telephone Corp, NTT Inc USA filed Critical Nippon Telegraph and Telephone Corp
Publication of JPWO2022102071A1 publication Critical patent/JPWO2022102071A1/ja
Application granted granted Critical
Publication of JP7544142B2 publication Critical patent/JP7544142B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)
  • Devices For Executing Special Programs (AREA)

Description

本発明は、機能処理をFPGA(Field Programmable Gate Array)等のアクセラレータに自動オフロードするオフロードサーバ、オフロード制御方法およびオフロードプログラムに関する。The present invention relates to an offload server, an offload control method, and an offload program that automatically offloads functional processing to an accelerator such as an FPGA (Field Programmable Gate Array).

近年、CPUの半導体集積度が1.5年で2倍になるというムーアの法則が減速するのではないかと言われている。そのような状況から、少コアのCPUだけでなく、FPGA(Field Programmable Gate Array)やGPU(Graphics Processing Unit)等のデバイスの活用が増えている。例えば、Microsoft(登録商標)社はFPGAを使ってBingの検索効率を高めるといった取り組みをしており、Amazon(登録商標)社は、FPGA, GPU等をクラウドのインスタンスとして提供している。In recent years, it has been said that Moore's Law, which states that the semiconductor integration density of CPUs will double every 1.5 years, may be slowing down. In light of this situation, there has been an increase in the use of devices such as FPGAs (Field Programmable Gate Arrays) and GPUs (Graphics Processing Units) in addition to CPUs with fewer cores. For example, Microsoft (registered trademark) is working to improve the search efficiency of Bing using FPGAs, and Amazon (registered trademark) is providing FPGAs, GPUs, etc. as cloud instances.

少コアのCPU以外のデバイスをシステムで適切に活用するためには、デバイス特性を意識した設定やプログラム作成が必要であり、OpenMP(Open Multi-Processing)、OpenCL(Open Computing Language)、CUDA(Compute Unified Device Architecture)といった知識が必要になるため、大半のプログラマにとっては、スキルの壁が高い。 In order to properly utilize devices other than low-core CPUs in a system, it is necessary to configure and write programs that take into account the characteristics of the device, and knowledge of OpenMP (Open Multi-Processing), OpenCL (Open Computing Language), and CUDA (Compute Unified Device Architecture) is required, which creates a high skill barrier for most programmers.

少コアのCPU以外のGPUやFPGA、メニーコアCPU等のデバイスを活用するシステムは今後ますます増えていくと予想されるが、それらを最大限活用するには、技術的壁が高い。そこで、そのような壁を取り払い、少コアのCPU以外のデバイスを十分利用できるようにするため、プログラマが処理ロジックを記述したソフトウェアを、配置先の環境(FPGA、GPU、メニーコアCPU等)にあわせて、適応的に変換、設定し、環境に適合した動作をさせるような、プラットフォームが求められている。 It is expected that the number of systems that utilize devices other than few-core CPUs, such as GPUs, FPGAs, and many-core CPUs, will continue to increase in the future, but there are high technical barriers to making the most of them. Therefore, in order to remove such barriers and make full use of devices other than few-core CPUs, there is a demand for a platform that can adaptively convert and configure software in which a programmer writes processing logic to suit the environment in which it is deployed (FPGA, GPU, many-core CPU, etc.), allowing it to operate in accordance with the environment.

非特許文献1には、一度記述したコードを、配置先の環境に存在するGPUやFPGA、メニーコアCPU等を利用できるように、変換、リソース設定等を自動で行い、アプリケーションを高性能に動作させることを目的とした、環境適応ソフトウェアが記載されている。Non-patent document 1 describes environment-adaptive software that automatically converts and configures resources so that code written once can utilize GPUs, FPGAs, many-core CPUs, etc. present in the deployment environment, with the aim of making applications run with high performance.

非特許文献2、3、4には、環境適応ソフトウェアの要素として、アプリケーションコードのループ文および機能ブロックを、FPGA、GPUに自動オフロードする方式が記載されている。また、非特許文献5には、性能自動試験の技術が記載されている。Non-patent documents 2, 3, and 4 describe a method for automatically offloading loop statements and function blocks of application code to FPGAs and GPUs as elements of environment-adaptive software. Non-patent document 5 describes a technology for automatic performance testing.

GPUの並列計算パワーを画像処理でないものにも使うGPGPU(General Purpose GPU)を行うための環境としてCUDAが普及している。CUDAは、GPGPU向けのNVIDIA(登録商標)社の環境である。また、FPGA、メニーコアCPU、GPU等のヘテロなデバイスを同じように扱うための仕様としてOpenCLがあり、その開発環境も整いつつある。CUDA、OpenCLは、C言語の拡張を行いプログラムを行う形であり、プログラムの難度は高い(FPGA等のカーネルとCPUのホストとの間のメモリデータのコピーや解放の記述を明示的に行う等)。 CUDA has become popular as an environment for running GPGPUs (General Purpose GPUs), which use the parallel computing power of GPUs for purposes other than image processing. CUDA is an environment for GPGPUs developed by NVIDIA (registered trademark). In addition, there is OpenCL, a specification for treating heterogeneous devices such as FPGAs, many-core CPUs, and GPUs in the same way, and its development environment is also in the process of being established. CUDA and OpenCL are programmed by extending the C language, and are difficult to program (such as explicitly writing the copying and release of memory data between the kernel of an FPGA or the like and the host CPU).

また、CUDAやOpenCLに比べて、より簡易にヘテロなデバイスを利用するための技術として、OpenACCやOpenMP(登録商標)等、コンパイラとしてPGIコンパイラやgcc(登録商標)等がある。このコンパイラは、指示行ベースで、並列処理等を行う箇所を指定して、指示行に従って、GPU、メニーコアCPU等に向けて実行ファイルを作成する。 In addition, compared to CUDA and OpenCL, there are technologies such as OpenACC and OpenMP (registered trademark) that allow easier use of heterogeneous devices, and compilers such as the PGI compiler and gcc (registered trademark). These compilers specify the locations where parallel processing will be performed on a directive line basis, and create executable files for GPUs, many-core CPUs, etc. according to the directive lines.

上記、CUDA、OpenCL、OpenACC、OpenMP等の技術仕様を用いることで、FPGAやGPU、メニーコアCPUへオフロードすることは可能になっている。しかしながら、デバイス処理自体は行えるようになっても、高速化することには課題がある。例えば、マルチコアCPU向けに自動並列化機能を持つコンパイラとして、Intelコンパイラ(登録商標)等がある。これらは、自動並列化時に、コードの中のループ文中で並列処理可能な部分を抽出して、並列化している。しかし、メモリ処理等の影響で単に並列化可能ループ文を並列化しても性能がでないことも多い。FPGAやGPU等で高速化する際には、OpenCLやCUDAの技術者がチューニングを繰り返したり、OpenACCコンパイラ等を用いて適切な並列処理範囲を探索し試行することがされている。 By using the above technical specifications such as CUDA, OpenCL, OpenACC, and OpenMP, it is possible to offload to FPGAs, GPUs, and many-core CPUs. However, even if device processing itself can be performed, there are challenges in accelerating it. For example, Intel Compiler (registered trademark) is a compiler with an automatic parallelization function for multi-core CPUs. During automatic parallelization, these extract parts of the loop statements in the code that can be parallelized and parallelize them. However, due to the influence of memory processing, etc., simply parallelizing parallelizable loop statements often does not achieve sufficient performance. When accelerating FPGAs, GPUs, etc., OpenCL and CUDA engineers repeatedly tune the system, or use OpenACC compilers, etc. to search for and try out the appropriate range of parallel processing.

このため、技術スキルが乏しいプログラマが、FPGAやGPU、メニーコアCPUを活用してアプリケーションを高速化することは難しいし、自動並列化技術等を使う場合も並列処理箇所探索の試行錯誤等の稼働が必要だった。現状、ヘテロなデバイスに対するオフロードは手動での取組みが主流である。 For this reason, it is difficult for programmers with little technical skill to use FPGAs, GPUs, or many-core CPUs to speed up applications, and even when using automatic parallelization technology, it is necessary to go through a process of trial and error to find parallel processing locations. Currently, offloading to heterogeneous devices is mainly done manually.

Y. Yamato, H. Noguchi, M. Kataoka and T. Isoda, “Proposal of Environment Adaptive Software,” The 2nd International Conference on Control and Computer Vision (ICCCV 2019), pp.102-108, Jeju, June 2019.Y. Yamato, H. Noguchi, M. Kataoka and T. Isoda, “Proposal of Environment Adaptive Software,” The 2nd International Conference on Control and Computer Vision (ICCCV 2019), pp.102-108, Jeju, June 2019. Y. Yamato, “Study of parallel processing area extraction and data transfer number reduction for automatic GPU offloading of IoT applications,” Journal of Intelligent Information Systems, Springer, DOI: 10.1007/s10844-019-00575-8, Aug. 2019.Y. Yamato, “Study of parallel processing area extraction and data transfer number reduction for automatic GPU offloading of IoT applications,” Journal of Intelligent Information Systems, Springer, DOI: 10.1007/s10844-019-00575-8, Aug. 2019. Y. Yamato, “Proposal of Automatic FPGA Offloading for Applications Loop Statements,” The 7th Annual Conference on Engineering and Information Technology (ACEAIT 2020), pp.111-123, 2020.Y. Yamato, “Proposal of Automatic FPGA Offloading for Applications Loop Statements,” The 7th Annual Conference on Engineering and Information Technology (ACEAIT 2020), pp.111-123, 2020. Y. Yamato, “Proposal of Automatic Offloading for Function Blocks of Applications,” The 8th IIAE International Conference on Industrial Application Engineering 2020 (ICIAE 2020), pp.4-11, Mar. 2020.Y. Yamato, “Proposal of Automatic Offloading for Function Blocks of Applications,” The 8th IIAE International Conference on Industrial Application Engineering 2020 (ICIAE 2020), pp.4-11, Mar. 2020. Y. Yamato, "Automatic verification technology of software patches for user virtual environments on IaaS cloud," Journal of Cloud Computing, Springer, 2015, 4:4, DOI: 10.1206/s13677-015-0028-6, Feb. 2015.Y. Yamato, "Automatic verification technology of software patches for user virtual environments on IaaS cloud," Journal of Cloud Computing, Springer, 2015, 4:4, DOI: 10.1206/s13677-015-0028-6, Feb. 2015.

CPU向けプログラムを、GPU等のデバイスにオフロードした際に、アプリケーションをコストパフォーマンス高く動作させるためには、CPUとオフロードデバイスのリソース量を適切化することが要請される。
非特許文献1~5では、自動オフロードした後の、オフロードデバイスのリソース量については検討がされていない。
When a program for a CPU is offloaded to a device such as a GPU, in order to operate the application with high cost performance, it is required to optimize the resource amounts of the CPU and the offload device.
Non-Patent Documents 1 to 5 do not consider the amount of resources of the offload device after automatic offloading.

このような点に鑑みて本発明がなされたのであり、自動オフロードにおいて、CPUとオフロードデバイスの適切なリソース量を設定することができることを課題とする。 The present invention was made in consideration of these points, and its objective is to enable appropriate resource amounts to be set for the CPU and offload device in automatic offloading.

前記した課題を解決するため、アプリケーションプログラムの特定処理をCPUからオフロードデバイスにオフロードするオフロードサーバであって、前記アプリケーションプログラムのソースコードを分析するアプリケーションコード分析部と、前記アプリケーションプログラムのループ文の中で用いられる変数の参照関係を分析し、ループ外でデータ転送してよいデータについては、ループ外でのデータ転送を明示的に指定する明示的指定行を用いたデータ転送指定を行うデータ転送指定部と、前記アプリケーションプログラムのループ文を特定し、特定した各前記ループ文に対して、前記オフロードデバイスにおける並列処理指定文を指定してコンパイルする並列処理指定部と、コンパイルエラーが出るループ文に対して、オフロード対象外とするとともに、コンパイルエラーが出ないループ文に対して、並列処理するかしないかの指定を行う並列処理パターンを作成する並列処理パターン作成部と、前記並列処理パターンの前記アプリケーションプログラムをコンパイルして、アクセラレータ検証用装置に配置し、前記オフロードデバイスにオフロードした際の性能測定用処理を実行する性能測定部と、性能測定結果をもとに、前記CPUと前記オフロードデバイスの処理時間の比を、リソース比として決定するリソース比決定部と、決定した前記リソース比をもとに、所定のコスト条件を満たすように、前記CPUおよび前記オフロードデバイスのリソース量を設定するリソース量設定部と、を備え、前記リソース量設定部は、決定した前記リソース比を維持した最小リソース量の設定で前記所定のコスト条件を満たさない場合は、前記CPUと前記オフロードデバイスのリソース量を最小から始めてコスト条件を満たす中で設定したリソース比に近づけるようにリソース量を設定することを特徴とするオフロードサーバとした。 In order to solve the above-mentioned problems, an offload server that offloads specific processing of an application program from a CPU to an offload device includes an application code analysis unit that analyzes source code of the application program, a data transfer specification unit that analyzes reference relationships of variables used in loop statements of the application program, and for data that may be transferred outside the loop, specifies a data transfer using an explicit specification line that explicitly specifies data transfer outside the loop, a parallel processing specification unit that identifies loop statements of the application program and compiles each identified loop statement by specifying a parallel processing specification statement in the offload device, and a parallel processing pattern that excludes loop statements that generate a compilation error from being offloaded and specifies whether or not to process loop statements that do not generate a compilation error in parallel. the offload server includes a parallel processing pattern creation unit that creates a parallel processing pattern based on the parallel processing pattern; a performance measurement unit that compiles the application program of the parallel processing pattern, places it on an accelerator verification device, and executes processing for measuring performance when offloaded to the offload device; a resource ratio determination unit that determines a ratio of processing times of the CPU and the offload device as a resource ratio based on the performance measurement results; and a resource amount setting unit that sets the resource amounts of the CPU and the offload device so as to satisfy a specified cost condition based on the determined resource ratio, wherein if the specified cost condition is not satisfied by setting a minimum resource amount that maintains the determined resource ratio, the resource amount setting unit sets the resource amounts of the CPU and the offload device so as to approach the set resource ratio starting from a minimum while satisfying the cost condition .

本発明によれば、自動オフロードにおいて、CPUとオフロードデバイスの適切なリソース量を設定することができる。 According to the present invention, appropriate resource amounts for the CPU and offload device can be set during automatic offloading.

本発明の第1の実施形態に係るオフロードサーバの構成例を示す機能ブロック図である。FIG. 2 is a functional block diagram illustrating a configuration example of an offload server according to the first embodiment of the present invention. 本発明の第1の実施形態に係るオフロードサーバを用いた自動オフロード処理を示す図である。FIG. 2 is a diagram illustrating an automatic offload process using an offload server according to the first embodiment of the present invention. 本発明の第1の実施形態に係るオフロードサーバのSimple GAによる制御部(自動オフロード機能部)の処理の探索イメージとfor文の遺伝子配列マッピングを示す図である。1 is a diagram showing a search image of processing by a control unit (automatic offload function unit) by Simple GA of an offload server according to a first embodiment of the present invention, and gene sequence mapping of a for statement; FIG. 本発明の第1の実施形態に係るオフロードサーバの《ループ文オフロード》のフローチャートである。1 is a flowchart of a loop statement offload of an offload server according to the first embodiment of the present invention. 本発明の第1の実施形態に係るオフロードサーバの《ループ文オフロード》のフローチャートである。1 is a flowchart of a loop statement offload of an offload server according to the first embodiment of the present invention. 本発明の第1の実施形態に係るオフロードサーバのGPUやFPGAオフロード試行の後に追加されるリソース比とリソース量の設定フローチャートである。11 is a flowchart for setting a resource ratio and a resource amount added after a GPU or FPGA offload attempt of an offload server according to the first embodiment of the present invention. 本発明の第2の実施形態に係るオフロードサーバの構成例を示す機能ブロック図である。FIG. 11 is a functional block diagram illustrating a configuration example of an offload server according to a second embodiment of the present invention. 本発明の第2の実施形態に係るオフロードサーバの制御部(自動オフロード機能部)が、《機能ブロックオフロード:共通》のオフロード処理において<処理A-1>と<処理B-1>と<処理C-1>とを実行する場合のフローチャートである。This is a flowchart when the control unit (automatic offload function unit) of the offload server related to the second embodiment of the present invention executes <Process A-1>, <Process B-1>, and <Process C-1> in the offload processing of <Function block offload: common>. 本発明の第2の実施形態に係るオフロードサーバの制御部(自動オフロード機能部)が、機能ブロックのオフロード処理において<処理A-2>と<処理B-2>と<処理C-2>とを実行する場合のフローチャートである。This is a flowchart when a control unit (automatic offload function unit) of an offload server relating to the second embodiment of the present invention executes <Process A-2>, <Process B-2>, and <Process C-2> in the offload processing of a functional block. 本発明の実施形態に係るオフロードサーバの機能を実現するコンピュータの一例を示すハードウェア構成図である。FIG. 2 is a hardware configuration diagram illustrating an example of a computer that realizes the functions of an offload server according to an embodiment of the present invention.

次に、本発明を実施するための形態(以下、「本実施形態」と称する。)における、オフロードサーバ等について説明する。
(本発明の基本的な考え方)
本発明者は、環境適応ソフトウェアのコンセプトを具体化するために、これまでに、プログラムのループ文のGPU自動オフロード、FPGA自動オフロード、プログラムの機能ブロックの自動オフロードの方式を提案してきた(非特許文献2、3、4参照)。これら非特許文献2、3、4の要素技術検討も踏まえて、本発明の基本的な考え方を述べる。
Next, an offload server and the like in an embodiment of the present invention (hereinafter, referred to as "the present embodiment") will be described.
(Basic concept of the present invention)
In order to materialize the concept of environment adaptive software, the present inventor has proposed automatic offloading of program loop statements to GPUs, automatic offloading of FPGAs, and automatic offloading of program function blocks (see Non-Patent Documents 2, 3, and 4). Taking into account the elemental technology studies in these Non-Patent Documents 2, 3, and 4, the basic concept of the present invention will be described.

<CPUとオフロードデバイスのリソース比の適切化>
まず、デバイスにオフロードするプログラム変換ができた後の、CPUとオフロードデバイスのリソース比の適切化について説明する。
非特許文献2等の手法により、GPUやFPGA等のオフロードデバイスに通常のプログラムを自動オフロードすることができる。
現在、マルチコアCPU、メニーコアCPUは、仮想マシンやコンテナによる仮想化により、全コアの何割を割り当てる等が柔軟にできるようになっている。GPUについても、近年CPU同様の仮想化が行われ、GPUの全コアの何割を割り当てる等の運用が可能になりつつある。FPGAに関しては、リソース使用量は、Look Up TableやFlip Flopの設定数で表されることが多く、利用されていないゲートについては別用途に使うことができる。
<Optimizing the resource ratio between CPU and offload device>
First, an explanation will be given of optimizing the resource ratio between the CPU and the offload device after a program has been converted for offloading to a device.
According to the technique disclosed in Non-Patent Document 2, it is possible to automatically offload normal programs to an offload device such as a GPU or an FPGA.
Currently, multi-core and many-core CPUs are virtualized using virtual machines and containers, allowing for flexibility in allocating a certain percentage of all cores. GPUs have also been virtualized in recent years in a similar manner to CPUs, making it possible to allocate a certain percentage of all GPU cores. With regard to FPGAs, resource usage is often expressed as the number of look-up tables or flip-flops set, and unused gates can be used for other purposes.

このように、CPU、GPU、FPGAとも全リソースの一部を使う運用が可能であり、CPUとオフロードデバイスのリソースを用途に応じて適切化することはコストパフォーマンスを高める上で重要である。 In this way, it is possible to operate the CPU, GPU, and FPGA using only a portion of their total resources, and optimizing the resources of the CPU and offload devices according to the application is important in improving cost performance.

また、非特許文献2等の手法を用いて、アプリケーションをCPUとGPU処理のコードに変換することはできる。しかし、コード自体は、適切であっても、CPUとGPUとのリソース量が適切なバランスでない場合には、性能が出ない。例えば、ある処理を行う際に、CPUの処理時間が1000秒、GPUの処理時間が1秒では、オフロードできる処理をGPUである程度高速化しても、全体的にはCPUがボトルネックとなっている。 It is also possible to convert an application into code for CPU and GPU processing using techniques such as those described in Non-Patent Document 2. However, even if the code itself is appropriate, performance will not be achieved if the resource amounts of the CPU and GPU are not properly balanced. For example, when performing a certain process, if the CPU processing time is 1000 seconds and the GPU processing time is 1 second, even if the GPU speeds up the process that can be offloaded to some extent, the CPU will still be the bottleneck overall.

さらに、非特許文献の「K. Shirahata, H. Sato and S. Matsuoka, "Hybrid Map Task Scheduling for GPU-Based Heterogeneous Clusters,"IEEE Second International Conference on Cloud Computing Technology and Science (CloudCom), pp.733-740, Dec. 2010.」では、CPUとGPUを使ってMapReduce(登録商標)フレームワークでタスク処理している際に、CPUとGPUの実行時間が同じになるようMapタスクを配分することで、全体の高性能化を図っている。Furthermore, in the non-patent document "K. Shirahata, H. Sato and S. Matsuoka, "Hybrid Map Task Scheduling for GPU-Based Heterogeneous Clusters," IEEE Second International Conference on Cloud Computing Technology and Science (CloudCom), pp.733-740, Dec. 2010," it is described how, when processing tasks using a CPU and GPU in the MapReduce (registered trademark) framework, map tasks are allocated so that the execution times of the CPU and GPU are the same, thereby improving overall performance.

本発明者は、CPUとオフロードデバイスのリソース比を下記のように決めることを想到した。すなわち、何れかのデバイスでの処理がボトルネックとなることを避けるため、上記非特許文献等も参考に、テストケースの処理時間から、CPUとオフロードデバイスの処理時間が同等オーダになるように、CPUとオフロードデバイスのリソース比(以下、「リソース比」という)を決定する。The inventors came up with the idea of determining the resource ratio between the CPU and the offload device as follows: In other words, to avoid processing in any of the devices becoming a bottleneck, and with reference to the above non-patent literature, the resource ratio between the CPU and the offload device (hereinafter referred to as "resource ratio") is determined based on the processing time of the test case so that the processing time of the CPU and the offload device are of the same order of magnitude.

また、本発明者は、非特許文献2の手法のように、自動オフロードの際、検証環境での性能測定結果に基づいて徐々に高速化していく手法を採る。理由としては、性能に関しては、コード構造だけでなく、実際に処理するハードウェアのスペック、データサイズ、ループ回数等の実際に処理する内容によって大きく変わるためである。また、性能は、静的に予測することが困難であり、動的な測定が必要だからである。そのため、コード変換の際に、既に検証環境での性能測定結果があるので、その結果を用いてリソース比を定める。 The inventor also employs a method of gradually increasing the speed of automatic offloading based on the results of performance measurements in a verification environment, as in the method in Non-Patent Document 2. The reason for this is that performance varies greatly not only depending on the code structure, but also on the specifications of the hardware used for the actual processing, data size, loop count, and other content actually processed. Also, performance is difficult to predict statically, and dynamic measurement is necessary. Therefore, since performance measurement results are already available in the verification environment when converting code, the resource ratio is determined using those results.

性能測定の際には、テストケースを指定して測定を行う。例えば、検証環境でのテストケースの処理時間が、CPU処理:10秒、GPU処理:5秒の場合では、CPU側のリソースは2倍で同等の処理時間程度と考えられる。このため、リソース比は2:1となる。なお、特にある処理をオフロードで高速化したいといったユーザ要望については、その処理を含むテストケースを準備して、そのテストケースに対して非特許文献2等の手法で高速化することで反映される。 When measuring performance, a test case is specified and the measurement is performed. For example, if the processing time of a test case in the verification environment is 10 seconds for CPU processing and 5 seconds for GPU processing, then the CPU resources would be doubled to achieve approximately the same processing time. Therefore, the resource ratio is 2:1. Note that if a user wishes to speed up a particular process by offloading, this can be reflected by preparing a test case that includes that process and speeding up the test case using a method such as that described in Non-Patent Document 2.

<CPUとオフロードデバイスのリソース量の決定と自動検証>
次に、CPUとオフロードデバイスのリソース量(以下、「リソース量」という)の決定と自動検証について説明する。
上記<CPUとオフロードデバイスのリソース比の適切化>により、リソース比が定まった場合、次に商用環境へのアプリケーションの配置を行う。
商用環境への配置の際は、ユーザが指定したコスト要求を満たすように、リソース比は可能な限りキープ(維持)したまま、リソース量を決定する。例えば、CPUに関して、1VMは1000円/月、GPUは4000円/月、リソース比は2:1が適切であるとする。そして、ユーザの予算は、月10000円以内であると想定する。この場合には、リソース比を2:1としても、ユーザの予算内である月10000円以内に収まるので、適切なリソース比2:1をキープしたリソース量、すなわちCPUは「2」、GPUは「1」を確保して商用環境に配置することになる。また、ユーザの予算が、月5000円以内であった場合には、適切なリソース比2:1はキープできない。この場合、リソース量として、CPUは「1」、GPUは「1」を確保して配置する。
<Determining and automatically validating the amount of CPU and offload device resources>
Next, determination and automatic verification of the resource amounts of the CPU and offload devices (hereinafter referred to as "resource amounts") will be described.
When the resource ratio has been determined by the above <Optimizing the resource ratio between the CPU and the offload device>, the next step is to deploy the application in the commercial environment.
When placing in a commercial environment, the resource amount is determined while keeping (maintaining) the resource ratio as much as possible so as to satisfy the cost requirement specified by the user. For example, for the CPU, it is assumed that 1 VM costs 1000 yen/month, GPU costs 4000 yen/month, and the resource ratio is 2:1. It is also assumed that the user's budget is within 10,000 yen/month. In this case, even if the resource ratio is 2:1, it is within the user's budget of 10,000 yen/month, so the resource amount that keeps the appropriate resource ratio of 2:1, that is, "2" for the CPU and "1" for the GPU, is secured and placed in the commercial environment. Also, if the user's budget is within 5,000 yen/month, the appropriate resource ratio of 2:1 cannot be kept. In this case, the resource amount is secured and placed for the CPU and GPU, with "1" secured.

商用環境にリソースを確保してプログラムを配置した後は、ユーザが利用する前に動作することを確認するため、自動検証が行われる。自動検証では、性能検証テストケースやリグレッションテストケースが実行される。性能検証テストケースは、ユーザが指定した想定テストケースをJenkins(登録商標)等の試験自動実行ツールを用いて行い、処理時間やスループット等を測定する。リグレッションテストケースは、システムにインストールされるミドルウェアやOS等のソフトウェアの情報を取得して、それらに対応するリグレッションテストをJenkins等を用いて実行する。これらの自動検証を、少ないテストケースの準備で行うための検討は非特許文献5等でなされており、非特許文献5の技術を用いる。 After reserving resources in the commercial environment and placing the program, automatic verification is performed to ensure that it works before users use it. In automatic verification, performance verification test cases and regression test cases are executed. For performance verification test cases, assumed test cases specified by the user are executed using an automatic test execution tool such as Jenkins (registered trademark), and processing time, throughput, etc. are measured. For regression test cases, information on software such as middleware and the OS installed in the system is obtained, and the corresponding regression tests are executed using Jenkins or the like. Studies on how to perform these automatic verifications with the preparation of fewer test cases have been conducted in non-patent document 5 and other documents, and the technology in non-patent document 5 is used.

性能検証テストケースでは、オフロードした場合でも計算結果が不正でないかをチェックする。また、性能検証テストケースでは、オフロードしない場合との計算結果差分もチェックする。例えば、GPUを処理するPGIコンパイラは、PCAST(登録商標)という機能のPGI_compare(登録商標)やacc_compare(登録商標)というAPI(Application Programming Interface)で、GPUを使う場合使わない場合の計算結果差分を確認できる。
なお、GPUとCPUでは丸め誤差が異なる等、並列処理等を正しくオフロードしても完全に計算結果が一致しない場合もある。そのため、例えばIEEE 754仕様による確認等を行い、許容できる差分かをユーザに提示し、ユーザに確認をしてもらう。
The performance verification test cases check whether the calculation results are invalid even when offloading is performed. The performance verification test cases also check the difference in the calculation results from when offloading is not performed. For example, the PGI compiler that processes the GPU can check the difference in the calculation results when the GPU is used and when it is not, using APIs (Application Programming Interfaces) called PGI_compare (registered trademark) and acc_compare (registered trademark) of the PCAST (registered trademark) function.
Note that there are cases where the calculation results do not match completely even if parallel processing is offloaded correctly due to differences in rounding errors between the GPU and the CPU. For this reason, for example, confirmation based on the IEEE 754 specifications is performed, and the user is informed of the allowable difference and asked to confirm it.

自動検証の結果として、性能検証テストケースの処理時間やそのスループット、計算結果差分およびリグレッションテストの実行結果の情報が、ユーザに提示される。ユーザには、さらに確保したリソース(VMの数やスペック等)とその価格が提示されており、ユーザはそれら情報を参照して運用開始を判断する。 As a result of the automated verification, the user is presented with information such as the processing time and throughput of the performance verification test cases, the difference in the calculation results, and the results of the regression tests. The user is also presented with the secured resources (number of VMs, their specifications, etc.) and their prices, and can refer to this information to decide whether to start operation.

<リソース、リソース比、テストケース処理時間>
本実施形態におけるリソース、リソース比、テストケース処理時間について述べる。
・リソースについて
CPU、GPU、FPGA等は仮想資源のインスタンスとして提供されるようになってきている。
リソースとして、CPUのコア数、クロック、メモリ量、ディスクサイズ、GPUのコア数、クロック、メモリ量、FPGAのゲート規模(Intel(登録商標)の場合はLE(登録商標)、Xilinx(登録商標)の場合LC(登録商標)が単位となる)がある。クラウド等の事業者は、それらをパッケージ化して、small sizeの仮想マシンやGPUインスタンスといった形で提供している。仮想化する場合は、利用するインスタンスの数が利用するリソース量といえる。
<Resources, resource ratios, test case processing time>
The resources, resource ratios, and test case processing times in this embodiment will be described.
Regarding resources, CPUs, GPUs, FPGAs, etc. are now provided as instances of virtual resources.
Resources include the number of CPU cores, clock, memory amount, disk size, the number of GPU cores, clock, memory amount, and FPGA gate size (LE (registered trademark) for Intel (registered trademark), LC (registered trademark) for Xilinx (registered trademark)). Cloud service providers package these resources and provide them in the form of small-sized virtual machines and GPU instances. When virtualizing, the number of instances used can be said to be the amount of resources used.

・リソース比について
CPU、GPU、FPGAのインスタンス数の比がリソース比となる。インスタンス数が1つ、2つ、3つであれば、リソース比は1:2:3である。
Regarding resource ratio, the ratio of the number of instances of the CPU, GPU, and FPGA is the resource ratio. If the number of instances is 1, 2, or 3, the resource ratio is 1:2:3.

・テストケース処理時間について
本実施形態は、ユーザが指定するテストケースを高速化するオフロードパターンを探索して発見する。テストケースは、DB(データベース)であればTPC-C(登録商標)のようなトランザクション処理数であり、FFTであればサンプルデータでのフーリエ変換処理の実行である。処理時間は、そのサンプル処理を実行した際の実行時間である。例えば、処理Aの処理時間は、オフロード前は10秒であったものが、オフロード後は2秒になるといった形で、CPU実行した場合と、オフロードデバイスで実行した場合との実行時間がそれぞれ取得される。
- Test case processing time In this embodiment, an offload pattern that speeds up a test case specified by a user is searched for and found. A test case is a transaction processing number such as TPC-C (registered trademark) for DB (database), and a Fourier transform processing execution on sample data for FFT. The processing time is the execution time when the sample processing is executed. For example, the processing time of processing A was 10 seconds before offloading, but became 2 seconds after offloading, and the execution times when it was executed by the CPU and when it was executed by the offload device are respectively obtained.

(第1の実施形態)
本発明は、自動オフロードにおけるリソース比とリソース量の設定に特徴がある。
第1の実施形態は、ループ文オフロードにおけるリソース比とリソース量の設定について記載する。まず、ループ文オフロードについて述べる。
図1は、本発明の第1の実施形態に係るオフロードサーバ1の構成例を示す機能ブロック図である。
オフロードサーバ1は、アプリケーションの特定処理をアクセラレータに自動的にオフロードする装置である。
図1に示すように、オフロードサーバ1は、制御部11と、入出力部12と、記憶部13と、検証用マシン14(Verification machine)(アクセラレータ検証用装置)と、を含んで構成される。
First Embodiment
The present invention is characterized by the setting of resource ratios and resource amounts in automatic offloading.
In the first embodiment, the setting of resource ratios and resource amounts in offloading a loop statement will be described. First, the offloading of a loop statement will be described.
FIG. 1 is a functional block diagram showing an example of the configuration of an offload server 1 according to the first embodiment of the present invention.
The offload server 1 is a device that automatically offloads specific processing of an application to an accelerator.
As shown in FIG. 1, the offload server 1 includes a control unit 11, an input/output unit 12, a storage unit 13, and a verification machine 14 (accelerator verification device).

入出力部12は、各デバイス等との間で情報の送受信を行うための通信インタフェースと、タッチパネルやキーボード等の入力装置や、モニタ等の出力装置との間で情報の送受信を行うための入出力インタフェースとから構成される。The input/output unit 12 is composed of a communication interface for transmitting and receiving information between each device, etc., and an input/output interface for transmitting and receiving information between input devices such as a touch panel or keyboard, and output devices such as a monitor.

記憶部13は、ハードディスクやフラッシュメモリ、RAM(Random Access Memory)等により構成され、制御部11の各機能を実行させるためのプログラム(オフロードプログラム)や、制御部11の処理に必要な情報(例えば、中間言語ファイル(Intermediate file)133)が一時的に記憶される。The memory unit 13 is composed of a hard disk, flash memory, RAM (Random Access Memory), etc., and temporarily stores programs (offload programs) for executing each function of the control unit 11, and information necessary for processing by the control unit 11 (e.g., intermediate language file 133).

記憶部13は、テストケースDB(Test case database)131、設備リソースDB132、中間言語ファイル(Intermediate file)133を備える。 The memory unit 13 includes a test case database 131, an equipment resource DB 132, and an intermediate language file 133.

テストケースDB131は、検証対象ソフトに対応した試験項目のデータを格納する。試験項目のデータは、例えばMySQL等のデータベースシステムの場合、TPC-C等のトランザクション試験のデータである。 Test case DB131 stores data on test items corresponding to the software to be verified. For example, in the case of a database system such as MySQL, the test item data is transaction test data such as TPC-C.

設備リソースDB132は、事業者が保持するサーバ等のリソースと価格等の事前に準備された情報と、それらがどの程度使われているかの情報を保持する。例えばGPUインスタンスを3収容できるサーバが10台あり、1GPUインスタンスは月5000円であり、10台のうち、A,B,Cの3台のサーバは使われている等の情報である。この情報は、ユーザが運用条件(コスト、性能等の条件)を指定した際に、確保するリソース量を決定するために利用される。ユーザ運用条件は、ユーザがオフロード依頼時に指定したコスト条件(例えば、月10000円以内の予算等)と性能条件(例えば、TPC-C等のトランザクションスループットが何以上やサンプルフーリエ変換処理が1スレッドで何秒以内等)である。 The equipment resource DB132 holds information prepared in advance about resources such as servers held by the business operator, such as their prices, and information about how much they are being used. For example, there are 10 servers that can accommodate three GPU instances, one GPU instance costs 5,000 yen per month, and of the 10, three servers A, B, and C are being used. This information is used to determine the amount of resources to be secured when the user specifies operational conditions (cost, performance, etc.). The user operational conditions are the cost conditions (e.g., a monthly budget of 10,000 yen or less) and performance conditions (e.g., a transaction throughput of TPC-C or the like, or a sample Fourier transform processing time of one thread or less, etc.) specified by the user when requesting offloading.

中間言語ファイル133は、高水準言語と機械語の中間に介在するプログラミング言語の形で制御部11の処理に必要な情報を一時的に記憶する。The intermediate language file 133 temporarily stores information necessary for processing by the control unit 11 in the form of a programming language that is intermediate between a high-level language and a machine language.

検証用マシン14は、環境適応ソフトウェアの検証用環境として、CPU、GPU、FPGAを備える。The verification machine 14 is equipped with a CPU, GPU, and FPGA as a verification environment for the environmentally adaptive software.

制御部11は、オフロードサーバ1全体の制御を司る自動オフロード機能部(Automatic Offloading function)である。制御部11は、例えば、記憶部13に格納されたアプリケーションプログラム(オフロードプログラム)を不図示のCPU(Central Processing Unit)が、RAMに展開し実行することにより実現される。The control unit 11 is an automatic offloading function that controls the entire offload server 1. The control unit 11 is realized, for example, by a central processing unit (CPU) (not shown) that deploys an application program (offload program) stored in the memory unit 13 into RAM and executes it.

制御部11は、アプリケーションコード指定部(Specify application code)111と、アプリケーションコード分析部(Analyze application code)112と、データ転送指定部113と、並列処理指定部114と、リソース比決定部115と、リソース量設定部116と、並列処理パターン作成部117と、性能測定部118と、実行ファイル作成部119と、本番環境配置部(Deploy final binary files to production environment)120と、性能測定テスト抽出実行部(Extract performance test cases and run automatically)121と、ユーザ提供部(Provide price and performance to a user to judge)122と、を備える。The control unit 11 includes an application code specification unit 111, an application code analysis unit 112, a data transfer specification unit 113, a parallel processing specification unit 114, a resource ratio determination unit 115, a resource amount setting unit 116, a parallel processing pattern creation unit 117, a performance measurement unit 118, an executable file creation unit 119, a production environment deployment unit 120, a performance measurement test extraction and execution unit 121, and a user provision unit 122.

<アプリケーションコード指定部111>
アプリケーションコード指定部111は、入力されたアプリケーションコードの指定を行う。具体的には、アプリケーションコード指定部111は、受信したファイルに記載されたアプリケーションコードを、アプリケーションコード分析部112に渡す。
<Application code specification unit 111>
The application code designation unit 111 designates the input application code. Specifically, the application code designation unit 111 passes the application code described in the received file to the application code analysis unit 112.

<アプリケーションコード分析部112>
アプリケーションコード分析部112は、処理機能のソースコードを分析し、ループ文やFFTライブラリ呼び出し等の構造を把握する。
<Application Code Analysis Unit 112>
The application code analysis unit 112 analyzes the source code of the processing function and understands the structure of loop statements, FFT library calls, and the like.

<データ転送指定部113>
データ転送指定部113は、アプリケーションプログラムのループ文の中で用いられる変数の参照関係を分析し、ループ外でデータ転送してよいデータについては、ループ外でのデータ転送を明示的に指定する明示的指定行を用いたデータ転送指定を行う。
<Data transfer designation unit 113>
The data transfer specification unit 113 analyzes the reference relationships of variables used in loop statements of an application program, and for data that may be transferred outside the loop, specifies the data transfer using an explicit specification line that explicitly specifies the data transfer outside the loop.

<並列処理指定部114>
並列処理指定部114は、アプリケーションプログラムのループ文(繰り返し文)を特定し、各ループ文に対して、アクセラレータにおける並列処理指定文を指定してコンパイルする。
並列処理指定部114は、オフロード範囲抽出部(Extract offloadable area)114aと、中間言語ファイル出力部(Output intermediate file)114bと、を備える。
<Parallel processing designation unit 114>
The parallel processing specification unit 114 identifies loop statements (repetitive statements) in the application program, and for each loop statement, specifies a parallel processing specification statement for the accelerator and compiles it.
The parallel processing specification unit 114 includes an offloadable area extraction unit (Extract offloadable area) 114a and an intermediate language file output unit (Output intermediate file) 114b.

オフロード範囲抽出部114aは、ループ文やFFT等、GPU・FPGAにオフロード可能な処理を特定し、オフロード処理に応じた中間言語を抽出する。
中間言語ファイル出力部114bは、抽出した中間言語ファイル133を出力する。中間言語抽出は、一度で終わりでなく、適切なオフロード領域探索のため、実行を試行して最適化するため反復される。
The offload range extraction unit 114a identifies processes that can be offloaded to the GPU/FPGA, such as loop statements and FFTs, and extracts an intermediate language corresponding to the offloaded process.
The intermediate language file output unit 114b outputs the extracted intermediate language file 133. The intermediate language extraction is not a one-time process, but is repeated to perform trial and error optimization to search for an appropriate offload area.

<リソース比決定部115>
リソース比決定部115は、性能測定結果をもとに、CPUとオフロードデバイスの処理時間(テストケースCPU処理時間とオフロードデバイス処理時間)を、リソース比として決定する(後記)。具体的には、リソース比決定部115は、CPUとオフロードデバイスの処理時間が同等オーダになるように、リソース比を決定する。また、リソース比決定部115は、CPUとオフロードデバイスの処理時間の差分が所定閾値以上の場合、リソース比を所定の上限値に設定する。
<Resource Ratio Determination Unit 115>
The resource ratio determination unit 115 determines the processing times of the CPU and the offload device (test case CPU processing time and offload device processing time) as a resource ratio based on the performance measurement results (described later). Specifically, the resource ratio determination unit 115 determines the resource ratio so that the processing times of the CPU and the offload device are of the same order. Furthermore, when the difference between the processing times of the CPU and the offload device is equal to or greater than a predetermined threshold, the resource ratio determination unit 115 sets the resource ratio to a predetermined upper limit value.

<リソース量設定部116>
リソース量設定部116は、決定したリソース比をもとに、所定のコスト条件を満たすように、CPUおよびオフロードデバイスのリソース量を設定する(後記)。具体的には、リソース量設定部116は、決定したリソース比を維持して、所定のコスト条件を満たす最大のリソース量を設定する。また、リソース量設定部116は、決定したリソース比を維持した最小リソース量の設定で所定のコスト条件を満たさない場合は、リソース比を崩してCPUとオフロードデバイスのリソース量をコスト条件を満たすより小さい値(例えば、最小)で設定する。
<Resource Amount Setting Unit 116>
The resource amount setting unit 116 sets the resource amounts of the CPU and offload device based on the determined resource ratio so as to satisfy a predetermined cost condition (described later). Specifically, the resource amount setting unit 116 maintains the determined resource ratio and sets the maximum resource amount that satisfies the predetermined cost condition. Furthermore, if the resource amount setting unit 116 does not satisfy the predetermined cost condition by setting the minimum resource amount while maintaining the determined resource ratio, it breaks the resource ratio and sets the resource amounts of the CPU and offload device to a value smaller (e.g., minimum) that satisfies the cost condition.

<並列処理パターン作成部117>
並列処理パターン作成部117は、コンパイルエラーが出るループ文(繰り返し文)に対して、オフロード対象外とするとともに、コンパイルエラーが出ない繰り返し文に対して、並列処理するかしないかの指定を行う並列処理パターンを作成する。
<Parallel processing pattern creation unit 117>
The parallel processing pattern creation unit 117 creates a parallel processing pattern that excludes loop statements (repetitive statements) that cause a compilation error from being offloaded, and specifies whether or not to process repetitive statements that do not cause a compilation error in parallel.

<性能測定部118>
性能測定部118は、並列処理パターンのアプリケーションプログラムをコンパイルして、検証用マシン14に配置し、アクセラレータにオフロードした際の性能測定用処理を実行する。
性能測定部118は、バイナリファイル配置部(Deploy binary files)118aを備える。バイナリファイル配置部118aは、GPU・FPGAを備えた検証用マシン14に、中間言語から導かれる実行ファイルをデプロイ(配置)する。
<Performance Measuring Unit 118>
The performance measurement unit 118 compiles an application program of a parallel processing pattern, places it on the verification machine 14, and executes a process for measuring performance when offloaded to the accelerator.
The performance measurement unit 118 includes a binary file deployment unit 118a. The binary file deployment unit 118a deploys an executable file derived from the intermediate language on the verification machine 14 including a GPU and FPGA.

性能測定部118は、配置したバイナリファイルを実行し、オフロードした際の性能を測定するとともに、性能測定結果を、オフロード範囲抽出部114aに戻す。この場合、オフロード範囲抽出部114aは、別の並列処理パターン抽出を行い、中間言語ファイル出力部114bは、抽出された中間言語をもとに、性能測定を試行する(後記図2の符号a参照)。The performance measurement unit 118 executes the placed binary file, measures the performance when offloaded, and returns the performance measurement results to the offload range extraction unit 114a. In this case, the offload range extraction unit 114a extracts another parallel processing pattern, and the intermediate language file output unit 114b attempts to measure performance based on the extracted intermediate language (see symbol a in Figure 2 below).

<実行ファイル作成部119>
実行ファイル作成部119は、所定回数繰り返された、性能測定結果をもとに、複数の並列処理パターンから高処理性能の並列処理パターンを複数選択し、高処理性能の並列処理パターンを交叉、突然変異処理により別の複数の並列処理パターンを作成する。そして、実行ファイル作成部119は、新たに性能測定までを行い、指定回数の性能測定後に、性能測定結果をもとに、複数の前記並列処理パターンから最高処理性能の並列処理パターンを選択し、最高処理性能の並列処理パターンをコンパイルして実行ファイルを作成する。
<Executable File Creation Unit 119>
The executable file creation unit 119 selects multiple parallel processing patterns with high processing performance from the multiple parallel processing patterns based on the performance measurement results repeated a predetermined number of times, crosses the parallel processing patterns with high processing performance, and creates multiple other parallel processing patterns by mutation processing.The executable file creation unit 119 then performs new performance measurements, and after the performance measurements have been performed a specified number of times, selects the parallel processing pattern with the highest processing performance from the multiple parallel processing patterns based on the performance measurement results, compiles the parallel processing pattern with the highest processing performance, and creates an executable file.

<本番環境配置部120>
本番環境配置部120は、作成した実行ファイルを、ユーザ向けの本番環境に配置する(「最終バイナリファイルの本番環境への配置」)。本番環境配置部120は、最終的なオフロード領域を指定したパターンを決定し、ユーザ向けの本番環境にデプロイする。
<Production Environment Deployment Unit 120>
The production environment deployment unit 120 deploys the created executable file in the production environment for the user ("Deployment of final binary file in production environment"). The production environment deployment unit 120 determines a pattern that specifies the final offload area, and deploys it to the production environment for the user.

<性能測定テスト抽出実行部121>
性能測定テスト抽出実行部121は、実行ファイル配置後、テストケースDB131から性能試験項目を抽出し、性能試験を実行する(「最終バイナリファイルの本番環境への配置」)。
性能測定テスト抽出実行部121は、実行ファイル配置後、ユーザに性能を示すため、性能試験項目をテストケースDB131から抽出し、抽出した性能試験を自動実行する。
<Performance Measurement Test Extraction Execution Unit 121>
After placing the executable file, the performance measurement test extraction execution unit 121 extracts performance test items from the test case DB 131 and executes the performance tests ("Placing the final binary file in the production environment").
After arranging the executable file, the performance measurement test extraction execution unit 121 extracts performance test items from the test case DB 131 and automatically executes the extracted performance tests in order to show the performance to the user.

<ユーザ提供部122>
ユーザ提供部122は、性能試験結果を踏まえた、価格・性能等の情報をユーザに提示する(「価格・性能等の情報のユーザへの提供」)。テストケースDB131には、性能試験項目が格納されている。ユーザ提供部122は、テストケースDB131に格納された試験項目に対応した性能試験の実施結果に基づいて、価格、性能等のデータを、上記性能試験結果と共にユーザに提示する。ユーザは、提示された価格・性能等の情報をもとに、サービスの課金利用開始を判断する。ここで、本番環境への一括デプロイには、非特許文献(Y. Yamato, M. Muroi, K. Tanaka and M. Uchimura, “Development of Template Management Technology for Easy Deployment of Virtual Resources on OpenStack,” Journal of Cloud Computing, Springer, 2014, 3:7, DOI: 10.1206/s13677-014-0007-3, 12 pages, June 2014.)の技術を、また、性能自動試験には、非特許文献5の技術を用いればよい。
<User provision unit 122>
The user providing unit 122 presents information such as price and performance based on the performance test results to the user ("Providing information such as price and performance to the user"). Performance test items are stored in the test case DB 131. The user providing unit 122 presents data such as price and performance to the user along with the performance test results based on the results of the performance tests corresponding to the test items stored in the test case DB 131. The user decides whether to start charging for the service based on the presented information such as price and performance. Here, the technology in non-patent document (Y. Yamato, M. Muroi, K. Tanaka and M. Uchimura, “Development of Template Management Technology for Easy Deployment of Virtual Resources on OpenStack,” Journal of Cloud Computing, Springer, 2014, 3:7, DOI: 10.1206/s13677-014-0007-3, 12 pages, June 2014.) can be used for bulk deployment to the production environment, and the technology in non-patent document 5 can be used for automatic performance testing.

[遺伝的アルゴリズムの適用]
オフロードサーバ1は、オフロードの最適化にGA(Genetic Algorithms)を用いることができる。GAを用いた場合のオフロードサーバ1の構成は下記の通りである。
すなわち、並列処理指定部114は、遺伝的アルゴリズムに基づき、コンパイルエラーが出ないループ文(繰り返し文)の数を遺伝子長とする。並列処理パターン作成部117は、アクセラレータ処理をする場合を1または0のいずれか一方、しない場合を他方の0または1として、アクセラレータ処理可否を遺伝子パターンにマッピングする。
[Application of genetic algorithm]
The offload server 1 can use GA (Genetic Algorithms) for optimizing the offload. The offload server 1 when using GA is configured as follows.
That is, the parallel processing specification unit 114 sets the number of loop statements (repetitive statements) that do not cause a compilation error as the gene length based on a genetic algorithm. The parallel processing pattern creation unit 117 maps the availability of accelerator processing to the gene pattern by setting either 1 or 0 when accelerator processing is performed and the other 0 or 1 when accelerator processing is not performed.

並列処理パターン作成部117は、遺伝子の各値を1か0にランダムに作成した指定個体数の遺伝子パターンを準備する。性能測定部118は、各個体に応じて、アクセラレータにおける並列処理指定文を指定したアプリケーションコードをコンパイルして、検証用マシン14に配置する。性能測定部118は、検証用マシン14において性能測定用処理を実行する。The parallel processing pattern creation unit 117 prepares a specified number of gene patterns in which each gene value is randomly created to be 1 or 0. The performance measurement unit 118 compiles application code that specifies a parallel processing specification statement in the accelerator according to each individual, and places it on the verification machine 14. The performance measurement unit 118 executes a performance measurement process on the verification machine 14.

ここで、性能測定部118は、途中世代で、以前と同じ並列処理パターンの遺伝子が生じた場合は、当該並列処理パターンに該当するアプリケーションコードのコンパイル、および、性能測定はせずに、性能測定値としては同じ値を使う。
また、性能測定部118は、コンパイルエラーが生じるアプリケーションコード、および、性能測定が所定時間で終了しないアプリケーションコードについては、タイムアウトの扱いとして、性能測定値を所定の時間(長時間)に設定する。
Here, if a gene with the same parallel processing pattern as before occurs in an intermediate generation, the performance measurement unit 118 does not compile the application code corresponding to that parallel processing pattern or measure its performance, but uses the same value as the performance measurement value.
Furthermore, for application code that causes a compilation error and application code for which performance measurement does not end within a predetermined time, the performance measurement unit 118 treats the application code as a timeout and sets the performance measurement value to a predetermined time (long time).

実行ファイル作成部119は、全個体に対して、性能測定を行い、処理時間の短い個体ほど適合度が高くなるように評価する。実行ファイル作成部119は、全個体から、適合度が所定値(例えば、全個数の上位n%、または全個数の上位m個 n,mは自然数)より高いものを性能の高い個体として選択し、選択された個体に対して、交叉、突然変異の処理を行い、次世代の個体を作成する。実行ファイル作成部119は、指定世代数の処理終了後、最高性能の並列処理パターンを解として選択する。The executable file creation unit 119 measures the performance of all the individuals, and evaluates them so that the shorter the processing time, the higher the fitness. From all the individuals, the executable file creation unit 119 selects those with a fitness higher than a predetermined value (e.g., the top n% of the total number, or the top m of the total number, where n and m are natural numbers) as high-performance individuals, and performs crossover and mutation processes on the selected individuals to create the next generation of individuals. After completing processing for the specified number of generations, the executable file creation unit 119 selects the parallel processing pattern with the highest performance as the solution.

以下、上述のように構成されたオフロードサーバ1の自動オフロード動作について説明する。
[自動オフロード動作]
図2は、オフロードサーバ1を用いた自動オフロード処理を示す図である。
図2に示すように、オフロードサーバ1は、環境適応ソフトウェアの要素技術に適用される。オフロードサーバ1は、制御部(自動オフロード機能部)11と、テストケースDB131と、設備リソースDB132と、中間言語ファイル133と、検証用マシン14と、を有している。
オフロードサーバ1は、ユーザが利用するアプリケーションコード(Application code)125を取得する。
The automatic offload operation of the offload server 1 configured as above will now be described.
[Automatic offload operation]
FIG. 2 is a diagram showing an automatic offload process using the offload server 1. As shown in FIG.
2, the offload server 1 is applied to the elemental technology of the environment adaptive software. The offload server 1 has a control unit (automatic offload function unit) 11, a test case DB 131, a facility resource DB 132, an intermediate language file 133, and a verification machine 14.
The offload server 1 acquires an application code 125 used by the user.

ユーザは、例えば、各種デバイス(Device151、CPU-GPUを有する装置152、CPU-FPGAを有する装置153、CPUを有する装置154)の利用を契約した人である。
オフロードサーバ1は、機能処理をCPU-GPUを有する装置152、CPU-FPGAを有する装置153のアクセラレータに自動オフロードする。
The user is, for example, a person who has signed a contract to use various devices (Device 151, device having CPU-GPU 152, device having CPU-FPGA 153, device having CPU 154).
The offload server 1 automatically offloads function processing to accelerators such as a device 152 having a CPU-GPU and a device 153 having a CPU-FPGA.

以下、図2のステップ番号を参照して各部の動作を説明する。
<ステップS11:Specify application code>
ステップS11において、アプリケーションコード指定部111(図1参照)は、受信したファイルに記載されたアプリケーションコードを、アプリケーションコード分析部112に渡す。
The operation of each unit will be described below with reference to the step numbers in FIG.
<Step S11: Specify application code>
In step S 11 , the application code designation unit 111 (see FIG. 1 ) passes the application code described in the received file to the application code analysis unit 112 .

<ステップS12:Analyze application code>
ステップS12において、アプリケーションコード分析部112(図1参照)は、処理機能のソースコードを分析し、ループ文やFFTライブラリ呼び出し等の構造を把握する。
<Step S12: Analyze application code>
In step S12, the application code analysis unit 112 (see FIG. 1) analyzes the source code of the processing function and grasps the structures of loop statements, FFT library calls, and the like.

<ステップS13:Extract offloadable area>
ステップS13において、並列処理指定部114(図1参照)は、アプリケーションのループ文(繰り返し文)を特定し、各繰り返し文に対して、アクセラレータにおける並列処理指定文を指定してコンパイルする。具体的には、オフロード範囲抽出部114a(図1参照)は、ループ文やFFT等、GPU・FPGAにオフロード可能な処理を特定し、オフロード処理に応じた中間言語を抽出する。
<Step S13: Extract offloadable area>
In step S13, the parallel processing specification unit 114 (see FIG. 1) identifies loop statements (repetitive statements) in the application, and compiles each repetitive statement by specifying a parallel processing specification statement in the accelerator. Specifically, the offload range extraction unit 114a (see FIG. 1) identifies processes that can be offloaded to the GPU/FPGA, such as loop statements and FFT, and extracts an intermediate language corresponding to the offloaded process.

<ステップS14:Output intermediate file>
ステップS14において、中間言語ファイル出力部114b(図1参照)は、中間言語ファイル133を出力する。中間言語抽出は、一度で終わりでなく、適切なオフロード領域探索のため、実行を試行して最適化するため反復される。
<Step S14: Output intermediate file>
In step S14, the intermediate language file output unit 114b (see FIG. 1) outputs the intermediate language file 133. The intermediate language extraction is not a one-time process, but is repeated to try and optimize the execution for an appropriate offload area search.

<ステップS15:Compile error>
ステップS15において、並列処理パターン作成部117(図1参照)は、コンパイルエラーが出るループ文に対して、オフロード対象外とするとともに、コンパイルエラーが出ない繰り返し文に対して、並列処理するかしないかの指定を行う並列処理パターンを作成する。
<Step S15: Compile error>
In step S15, the parallel processing pattern creation unit 117 (see FIG. 1 ) creates a parallel processing pattern that excludes loop statements that produce a compilation error from being offloaded, and specifies whether or not to perform parallel processing on repetitive statements that do not produce a compilation error.

<ステップS21:Deploy binary files>
ステップS21において、バイナリファイル配置部118a(図1参照)は、GPU・FPGAを備えた検証用マシン14に、中間言語から導かれる実行ファイルをデプロイする。
<Step S21: Deploy binary files>
In step S21, the binary file placement unit 118a (see FIG. 1) deploys an executable file derived from the intermediate language to the verification machine 14 equipped with a GPU/FPGA.

<ステップS22:Measure performances>
ステップS22において、性能測定部118(図1参照)は、配置したファイルを実行し、オフロードした際の性能を測定する。
オフロードする領域をより適切にするため、この性能測定結果は、オフロード範囲抽出部114aに戻され、オフロード範囲抽出部114aが、別パターンの抽出を行う。そして、中間言語ファイル出力部114bは、抽出された中間言語をもとに、性能測定を試行する(図2の符号a参照)。
<Step S22: Measure performance>
In step S22, the performance measurement unit 118 (see FIG. 1) executes the arranged file and measures the performance when offloaded.
In order to more appropriately determine the area to be offloaded, the performance measurement result is returned to the offload range extraction unit 114a, which extracts another pattern. The intermediate language file output unit 114b then attempts to measure performance based on the extracted intermediate language (see symbol a in FIG. 2).

図2の符号aに示すように、制御部11は、上記ステップS12乃至ステップS22を繰り返し実行する。制御部11の自動オフロード機能をまとめると、下記である。すなわち、並列処理指定部114は、アプリケーションプログラムのループ文(繰り返し文)を特定し、各繰返し文に対して、GPUでの並列処理指定文を指定して、コンパイルする。そして、並列処理パターン作成部117は、コンパイルエラーが出るループ文を、オフロード対象外とし、コンパイルエラーが出ないループ文に対して、並列処理するかしないかの指定を行う並列処理パターンを作成する。そして、バイナリファイル配置部118aは、該当並列処理パターンのアプリケーションプログラムをコンパイルして、検証用マシン14に配置し、性能測定部118が、検証用マシン14で性能測定用処理を実行する。実行ファイル作成部119は、所定回数繰り返された、性能測定結果をもとに、複数の並列処理パターンから最高処理性能のパターンを選択し、選択パターンをコンパイルして実行ファイルを作成する。As shown by the symbol a in FIG. 2, the control unit 11 repeatedly executes steps S12 to S22. The automatic offload function of the control unit 11 can be summarized as follows. That is, the parallel processing designation unit 114 identifies loop statements (repeated statements) of the application program, and compiles each repeated statement by designating a parallel processing designation statement in the GPU. The parallel processing pattern creation unit 117 creates a parallel processing pattern that excludes loop statements that generate compilation errors from offloading targets and designates whether or not to perform parallel processing for loop statements that do not generate compilation errors. The binary file placement unit 118a then compiles the application program of the corresponding parallel processing pattern and places it on the verification machine 14, and the performance measurement unit 118 executes the performance measurement process on the verification machine 14. The executable file creation unit 119 selects a pattern with the highest processing performance from a plurality of parallel processing patterns based on the performance measurement results repeated a predetermined number of times, and compiles the selected pattern to create an executable file.

<ステップS23:ユーザ運用条件によるリソース量設定>
ステップS23において、制御部11は、ユーザ運用条件によるリソース量設定を行う。すなわち、制御部11のリソース比決定部115は、CPUとオフロードデバイスのリソース比を決定する。そして、リソース量設定部116は、決定したリソース比をもとに、設備リソースDB132の情報を参照し、ユーザ運用条件を満たすように、CPUおよびオフロードデバイスのリソース量を設定する(図5により後記する)。
<Step S23: Setting resource amount according to user operation conditions>
In step S23, the control unit 11 sets the resource amount according to the user operation conditions. That is, the resource ratio determination unit 115 of the control unit 11 determines the resource ratio between the CPU and the offload device. Then, the resource amount setting unit 116 refers to the information in the facility resource DB 132 based on the determined resource ratio, and sets the resource amount of the CPU and the offload device so as to satisfy the user operation conditions (described later with reference to FIG. 5).

<ステップS24:Deploy final binary files to production environment>
ステップS24において、本番環境配置部120は、最終的なオフロード領域を指定したパターンを決定し、ユーザ向けの本番環境にデプロイする。
<Step S24: Deploy final binary files to production environment>
In step S24, the production environment deployment unit 120 determines a pattern that specifies the final offload area, and deploys it to the production environment for the user.

<ステップS25:Extract performance test cases and run automatically>
ステップS25において、性能測定テスト抽出実行部121は、実行ファイル配置後、ユーザに性能を示すため、性能試験項目をテストケースDB131から抽出し、抽出した性能試験を自動実行する。
<Step S25: Extract performance test cases and run automatically>
In step S25, after arranging the executable file, the performance measurement test extraction execution unit 121 extracts performance test items from the test case DB 131 and automatically executes the extracted performance tests in order to show the performance to the user.

<ステップS26:Provide price and performance to a user to judge>
ステップS26において、ユーザ提供部122は、性能試験結果を踏まえた、価格・性能等の情報をユーザに提示する。ユーザは、提示された価格・性能等の情報をもとに、サービスの課金利用開始を判断する。
<Step S26: Provide price and performance to a user to judge>
In step S26, the user providing unit 122 provides the user with information on price, performance, etc., based on the performance test results. The user determines whether to start using the service for which charges are required, based on the provided information on price, performance, etc.

上記ステップS11~ステップS26は、例えばユーザのサービス利用のバックグラウンドで行われ、例えば、仮利用の初日の間に行う等を想定している。The above steps S11 to S26 are assumed to be carried out, for example, in the background while the user is using the service, for example during the first day of trial use.

上記したように、オフロードサーバ1の制御部(自動オフロード機能部)11は、環境適応ソフトウェアの要素技術に適用した場合、機能処理のオフロードのため、ユーザが利用するアプリケーションプログラムのソースコードから、オフロードする領域を抽出して中間言語を出力する(ステップS11~ステップS15)。制御部11は、中間言語から導かれる実行ファイルを、検証用マシン14に配置実行し、オフロード効果を検証する(ステップS21~ステップS22)。検証を繰り返し、適切なオフロード領域を定めたのち、制御部11は、実際にユーザに提供する本番環境に、実行ファイルをデプロイし、サービスとして提供する(ステップS23~ステップS26)。As described above, when applied to the elemental technology of the environment-adaptive software, the control unit (automatic offload function unit) 11 of the offload server 1 extracts the area to be offloaded from the source code of the application program used by the user and outputs an intermediate language to offload functional processing (steps S11 to S15). The control unit 11 places and executes the executable file derived from the intermediate language on the verification machine 14 and verifies the offloading effect (steps S21 to S22). After repeating the verification and determining an appropriate offload area, the control unit 11 deploys the executable file in the production environment that will actually be provided to the user and provides it as a service (steps S23 to S26).

[GAを用いたGPU自動オフロード]
GPU自動オフロードは、GPUに対して、図2のステップS12~ステップS22を繰り返し、最終的にステップS23でデプロイするオフロードコードを得るための処理である。
[Automatic GPU offloading using GA]
The GPU automatic offload is a process in which steps S12 to S22 in FIG. 2 are repeated for the GPU to obtain the offload code to be deployed in step S23.

GPUは、一般的にレイテンシーは保証しないが、並列処理によりスループットを高めることに向いたデバイスである。暗号化処理や、カメラ映像分析のための画像処理、大量センサデータ分析のための機械学習処理等が代表的であり、それらは、繰り返し処理が多い。そこで、アプリケーションの繰り返し文をGPUに自動でオフロードすることでの高速化を狙う。 GPUs generally do not guarantee latency, but are devices suited to increasing throughput through parallel processing. Typical applications include encryption processing, image processing for analyzing camera footage, and machine learning processing for analyzing large amounts of sensor data, which involve a lot of repetitive processing. Therefore, the aim is to increase speed by automatically offloading repetitive statements in applications to the GPU.

しかし、従来技術で記載の通り、高速化には適切な並列処理が必要である。特に、GPUを使う場合は、CPUとGPU間のメモリ転送のため、データサイズやループ回数が多くないと性能が出ないことが多い。また、メモリデータ転送のタイミング等により、並列高速化できる個々のループ文(繰り返し文)の組み合わせが、最速とならない場合等がある。例えば、10個のfor文(繰り返し文)で、1番、5番、10番の3つがCPUに比べて高速化できる場合に、1番、5番、10番の3つの組み合わせが最速になるとは限らない等である。However, as described in the prior art, appropriate parallel processing is necessary to increase speed. In particular, when using a GPU, due to memory transfer between the CPU and GPU, performance is often not achieved unless the data size and number of loops are large. Also, depending on the timing of memory data transfer, the combination of individual loop statements (repeated statements) that can be accelerated in parallel may not be the fastest. For example, if there are 10 "for" statements (repeated statements), and numbers 1, 5, and 10 can be accelerated compared to the CPU, the combination of numbers 1, 5, and 10 will not necessarily be the fastest.

適切な並列領域指定のため、PGIコンパイラを用いて、for文の並列可否を試行錯誤して最適化する試みがある。しかし、試行錯誤には多くの稼働がかかり、サービスとして提供する際に、ユーザの利用開始が遅くなり、コストも上がってしまう問題がある。 In order to specify appropriate parallel regions, there have been attempts to optimize the parallelism of for statements through trial and error using the PGI compiler. However, trial and error requires a lot of work, and when offered as a service, this can delay users' start-up and increase costs.

そこで、本実施形態では、並列化を想定していない汎用プログラムから、自動で適切なオフロード領域を抽出する。このため、最初に並列可能for文のチェックを行い、次に並列可能for文群に対してGAを用いて検証環境で性能検証試行を反復し適切な領域を探索すること、を実現する。並列可能for文に絞った上で、遺伝子の部分の形で、高速化可能な並列処理パターンを保持し組み換えていくことで、取り得る膨大な並列処理パターンから、効率的に高速化可能なパターンを探索できる。 In this embodiment, therefore, suitable offload areas are automatically extracted from general-purpose programs that do not assume parallelization. For this purpose, parallelizable for statements are checked first, and then performance verification trials are repeated in a verification environment using GA for the group of parallelizable for statements to search for suitable areas. By narrowing down to parallelizable for statements and then retaining and recombining parallel processing patterns that can be accelerated in the form of genetic parts, it is possible to efficiently search for patterns that can be accelerated from the enormous number of possible parallel processing patterns.

[Simple GAによる制御部(自動オフロード機能部)11の探索イメージ]
図3は、Simple GAによる制御部(自動オフロード機能部)11の処理の探索イメージとfor文の遺伝子配列マッピングを示す図である。
GAは、生物の進化過程を模倣した組合せ最適化手法の一つである。GAのフローチャートは、初期化→評価→選択→交叉→突然変異→終了判定となっている。
本実施形態では、GAの中で、処理を単純にしたSimple GAを用いる。Simple GAは、遺伝子は1、0のみとし、ルーレット選択、一点交叉、突然変異は1箇所の遺伝子の値を逆にする等、単純化されたGAである。
[Search image of the control unit (automatic offload function unit) 11 using Simple GA]
FIG. 3 is a diagram showing a search image of the process of the control unit (automatic offload function unit) 11 by the Simple GA and a gene sequence mapping of a for statement.
GA is a combinatorial optimization method that mimics the evolutionary process of living organisms. The GA flowchart is as follows: Initialization → Evaluation → Selection → Crossover → Mutation → Termination decision.
In this embodiment, a simple GA with simplified processing is used among GAs. The simple GA is a simplified GA in which genes are only 1 and 0, and roulette selection, one-point crossover, and mutation reverse the value of one gene.

<初期化>
初期化では、アプリケーションコードの全for文の並列可否をチェック後、並列可能for文を遺伝子配列にマッピングする。GPU処理する場合は1、GPU処理しない場合は0とする。遺伝子は、指定の個体数Mを準備し、1つのfor文にランダムに1、0の割り当てを行う。
具体的には、制御部(自動オフロード機能部)11(図1参照)は、ユーザが利用するアプリケーションコード(Application code)125(図2参照)を取得し、図3に示すように、アプリケーションコード125のコードパターン(Code patterns)141からfor文の並列可否をチェックする。図3に示すように、コードパターン141から3つのfor文が見つかった場合(図3の符号b参照)、各for文に対して1桁、ここでは3つのfor文に対し3桁の1または0を割り当てる。例えば、CPUで処理する場合0、GPUに出す場合1とする。ただし、この段階では1または0をランダムに割り当てる。
遺伝子長に該当するコードが3桁であり、3桁の遺伝子長のコードは2パターン、例えば100、101、…となる。なお、図3では、コードパターン141中の丸印(○印)をコードのイメージとして示している。
<Initialization>
In the initialization, after checking whether all for statements in the application code can be parallelized, parallelizable for statements are mapped to gene arrays. If GPU processing is used, it is set to 1, and if not, it is set to 0. A specified number of individuals M is prepared for genes, and 1 or 0 is randomly assigned to each for statement.
Specifically, the control unit (automatic offload function unit) 11 (see FIG. 1) acquires the application code 125 (see FIG. 2) used by the user, and checks whether or not for statements can be parallelized from the code patterns 141 of the application code 125, as shown in FIG. 3. As shown in FIG. 3, if three for statements are found from the code pattern 141 (see symbol b in FIG. 3), one digit is assigned to each for statement, and three digits of 1 or 0 are assigned to the three for statements in this case. For example, 0 is assigned when processing is performed by the CPU, and 1 is assigned when output to the GPU. However, 1 or 0 is assigned randomly at this stage.
The code corresponding to the gene length is three digits, and the three-digit gene length code has 2-3 patterns, for example, 100, 101, .... In Fig. 3, the circles (○ marks) in the code pattern 141 are shown as an image of the code.

<評価>
評価では、デプロイとパフォーマンスの測定(Deploy & performance measurement)を行う(図3の符号c参照)。すなわち、性能測定部118(図1参照)は、遺伝子に該当するコードをコンパイルして検証用マシン14にデプロイして実行する。性能測定部118は、ベンチマーク性能測定を行う。性能が良いパターン(並列処理パターン)の遺伝子の適合度を高くする。
<Evaluation>
In the evaluation, deployment and performance measurement are performed (see symbol c in FIG. 3). That is, the performance measurement unit 118 (see FIG. 1) compiles the code corresponding to the gene, deploys it on the verification machine 14, and executes it. The performance measurement unit 118 performs benchmark performance measurement. The degree of suitability of genes of patterns with good performance (parallel processing patterns) is increased.

<選択>
選択では、適合度に基づいて、高性能コードパターンを選択(Select high performance code patterns)する(図3の符号d参照)。性能測定部118(図1参照)は、適合度に基づいて、高適合度の遺伝子を、指定の個体数選択する。本実施形態では、適合度に応じたルーレット選択および最高適合度遺伝子のエリート選択を行う。
図3では、選択されたコードパターン(Select code patterns)142の中の丸印(○印)が、3つに減ったことを探索イメージとして示している。
<Select>
In the selection, high performance code patterns are selected based on the fitness (see symbol d in FIG. 3). The performance measurement unit 118 (see FIG. 1) selects a specified number of genes with high fitness based on the fitness. In this embodiment, roulette selection according to the fitness and elite selection of the genes with the highest fitness are performed.
FIG. 3 shows, as a search image, that the number of circles (◯) in Select code patterns 142 has been reduced to three.

<交叉>
交叉では、一定の交叉率Pcで、選択された個体間で一部の遺伝子をある一点で交換し、子の個体を作成する。
ルーレット選択された、あるパターン(並列処理パターン)と他のパターンとの遺伝子を交叉させる。一点交叉の位置は任意であり、例えば上記3桁のコードのうち2桁目で交叉させる。
<Crossover>
In crossover, some genes are exchanged at a certain point between selected individuals at a certain crossover rate Pc to create offspring individuals.
The genes of a certain pattern (parallel processing pattern) selected by roulette wheel are crossed with those of another pattern. The position of the one-point crossover is arbitrary, and for example, the crossover is performed at the second digit of the above three-digit code.

<突然変異>
局所解を避けるため、突然変異を導入する。なお、演算量を削減するために突然変異を行わない態様でもよい。突然変異では、一定の突然変異率Pmで、個体の遺伝子の各値を0から1または1から0に変更する。
<Mutation>
In order to avoid local solutions, mutation is introduced. However, in order to reduce the amount of calculation, mutation may not be performed. In mutation, each value of an individual's genes is changed from 0 to 1 or from 1 to 0 at a certain mutation rate Pm.

<終了判定>
図3に示すように、交叉と突然変異後の次世代コードパターンの生成(Generate next generation code patterns after crossover & mutation)を行う(図3の符号e参照)。
終了判定では、指定の世代数T回、繰り返しを行った後に処理を終了し、最高適合度の遺伝子を解とする。
例えば、性能測定して、速い3つ101、010、001を選ぶ。この3つをGAにより、次の世代は、組み換えをして、例えば新しいパターン(並列処理パターン)101(一例)を作っていく。このとき、組み換えをしたパターンに、勝手に0を1にするなどの突然変異を入れる。上記を繰り返して、一番早いパターンを見付ける。指定世代(例えば、20世代)などを決めて、最終世代で残ったパターンを、最後の解とする。
<End Judgment>
As shown in FIG. 3, next generation code patterns after crossover & mutation are generated (see symbol e in FIG. 3).
In the termination determination, the process is terminated after repeating the process for a specified number of generations T, and the gene with the highest fitness is taken as the solution.
For example, performance is measured and the three fastest ones, 101, 010, and 001, are selected. These three are then recombined in the next generation using GA to create a new pattern (parallel processing pattern) 101 (one example), for example. At this time, a mutation is automatically introduced into the recombined pattern, such as changing 0 to 1. The above is repeated to find the fastest pattern. A designated generation (for example, the 20th generation) is decided, and the pattern remaining in the final generation is designated as the final solution.

<デプロイ(配置)>
最高適合度の遺伝子に該当する、最高処理性能の並列処理パターンで、本番環境に改めてデプロイして、ユーザに提供する。
<Deployment>
The parallel processing pattern with the highest processing performance that corresponds to the gene with the highest fitness is then redeployed into a production environment and provided to the user.

GPUにオフロードできないfor文(ループ文;繰り返し文)が相当数存在する場合について説明する。例えば、for文が200個あっても、GPUにオフロードできるものは30個くらいである。ここでは、エラーになるものを除外し、この30個について、GAを行う。 We will explain the case where there are a considerable number of for statements (loop statements; repetitive statements) that cannot be offloaded to the GPU. For example, even if there are 200 for statements, only about 30 can be offloaded to the GPU. Here, we will exclude those that will result in an error, and run GA on these 30 statements.

例えば、C/C++コードに対するGPUの処理を行う仕様であるOpenACCには、ディレクティブ #pragma acc kernelsで指定して、GPU向けバイトコードを抽出し、実行によりGPUオフロードを可能とするコンパイラがある。Python, Javaの場合は、CUDAやJava Lambda式などでGPU処理を指定すればよい。For example, OpenACC, a specification for GPU processing of C/C++ code, has a compiler that allows you to specify the directive #pragma acc kernels to extract bytecode for the GPU and execute it to enable GPU offloading. In the case of Python and Java, you can specify GPU processing using CUDA or Java Lambda expressions.

また、C/C++を使った場合、C/C++のコードを分析し、for文を見付ける。for文を見付けると、OpenACCで並列処理の文法である #pragma acc kernelsを使ってfor文に対して書き込む。詳細には、何も入っていない #pragma acc kernels に、一つ一つfor文を入れてコンパイルして、エラーであれば、そのfor文はそもそも、GPU処理できないので、除外する。このようにして、残るfor文を見付ける。そして、エラーが出ないものを、長さ(遺伝子長)とする。エラーのないfor文が5つであれば、遺伝子長は5であり、エラーのないfor文が10であれば、遺伝子長は10である。なお、並列処理できないものは、前の処理を次の処理に使うようなデータに依存がある場合である。
以上が準備段階である。次にGA処理を行う。
Also, when C/C++ is used, the C/C++ code is analyzed to find for statements. When a for statement is found, #pragma acc kernels, which is a parallel processing syntax in OpenACC, is used to write to the for statement. In detail, for statements are inserted one by one into an empty #pragma acc kernels and compiled. If an error occurs, the for statement is excluded since it cannot be processed by the GPU in the first place. In this way, the remaining for statements are found. The one that does not produce an error is taken as the length (gene length). If there are five for statements without errors, the gene length is 5, and if there are 10 for statements without errors, the gene length is 10. Note that parallel processing is not possible when there is a data dependency such that the previous processing is used for the next processing.
The above is the preparation stage. Next, the GA process is carried out.

for文の数に対応する遺伝子長を有するコードパターンが得られている。始めはランダムに並列処理パターン100、010、001、…を割り当てる。そして、GA処理を行い、コンパイルする。その時に、オフロードできるfor文であるにもかかわらず、エラーがでることがある。for文が階層になっている(どちらか指定すればGPU処理できる)場合である。この場合は、エラーとなったfor文は、残してもよい。具体的には、処理時間が多くなった形にして、タイムアウトさせる方法がある。 A code pattern with a gene length corresponding to the number of for statements is obtained. First, parallel processing patterns 100, 010, 001, ... are randomly assigned. Then, GA processing is performed and compilation is performed. At this time, an error may occur even though the for statements can be offloaded. This is the case when the for statements are hierarchical (GPU processing is possible if either one is specified). In this case, the for statement that caused the error can be left. Specifically, there is a method of making it take longer to process, causing a timeout.

検証用マシン14でデプロイして、ベンチマーク、例えば画像処理であればその画像処理でベンチマークする、その処理時間が短い程、適応度が高いと評価する。例えば、処理時間の逆数、処理時間10秒かかるものは1、100秒かかるものは0.1、1秒のものは10とする。
適応度が高いものを選択して、例えば10個のなかから、3~5個を選択して、それを組み替えて新しいコードパターンを作る。作成途中で、前と同じものができる場合がある。この場合、同じベンチマークを行う必要はないので、前と同じデータを使う。本実施形態では、コードパターンと、その処理時間は記憶部13に保存しておく。
Deploy it on the verification machine 14 and benchmark it - for example, if it is image processing, benchmark it with that image processing, and evaluate the adaptability as higher as the processing time is shorter. For example, the reciprocal of the processing time, 1 is given for a processing time of 10 seconds, 0.1 for a processing time of 100 seconds, and 10 for a processing time of 1 second.
Those with high adaptability are selected, for example, 3 to 5 out of 10 are selected, and a new code pattern is created by rearranging them. During the creation process, it is possible that the same code pattern as before is created. In this case, since it is not necessary to perform the same benchmark, the same data as before is used. In this embodiment, the code pattern and its processing time are stored in the storage unit 13.

以上で、Simple GAによる制御部(自動オフロード機能部)11の探索イメージについて説明した。 The above explains the search image of the control unit (automatic offload function unit) 11 using Simple GA.

以下、アプリケーションソフトウェアのループ文のGPU向けオフロード手法について説明する。
[《ループ文オフロード》フローチャート]
図4A-Bは、オフロードサーバ1の《ループ文オフロード》フローチャートであり、図4Aと図4Bは、結合子で繋がれる。
A method for offloading loop statements of application software to a GPU will be described below.
[Flowchart for offloading loop statements]
4A and 4B are flowcharts of the offloading of loop statements by the offload server 1, and FIGS. 4A and 4B are connected by a connector.

<アプリケーションコードおよび運用条件受信>
ステップS100で、制御部11(図1参照)は、アプリケーションコードおよび運用条件を受信する。運用条件は、例えばユーザ運用条件であり、制御部11(図1参照)が、設備リソースDB132(図1参照)の情報を参照することにより取得する。
<Receive application code and operating conditions>
In step S100, the control unit 11 (see FIG. 1) receives an application code and operation conditions. The operation conditions are, for example, user operation conditions, and the control unit 11 (see FIG. 1) acquires the operation conditions by referring to information in the facility resource DB 132 (see FIG. 1).

<コード解析>
ステップS101で、アプリケーションコード分析部112(図1参照)は、アプリケーションプログラムのコード解析を行う。
<Code Analysis>
In step S101, the application code analysis unit 112 (see FIG. 1) performs a code analysis of the application program.

<ループ文特定>
ステップS102で、並列処理指定部114(図1参照)は、アプリケーションプログラムのループ文、参照関係を特定する。
<Loop statement identification>
In step S102, the parallel processing specification unit 114 (see FIG. 1) identifies loop statements and reference relationships in the application program.

<ループ文ループ回数>
ステップS103で、並列処理指定部114は、ベンチマークツールを動作させ、ループ文ループ回数を把握し、閾値振分けする。
<Loop statement loop count>
In step S103, the parallel processing specification unit 114 runs a benchmark tool to grasp the number of loops of the loop statement and allocate a threshold value.

<ループ文の並列処理可能性>
ステップS104で、並列処理指定部114は、各ループ文の並列処理可能性をチェックする。
<Parallel processing of loop statements>
In step S104, the parallel processing specification unit 114 checks whether each loop statement can be processed in parallel.

<ループ文の繰り返し>
制御部(自動オフロード機能部)11は、ステップS105のループ始端とステップS108のループ終端間で、ステップS106-S107の処理についてループ文の数だけ繰り返す。
ステップS106で、並列処理指定部114は、各ループ文に対して、言語に応じた手法でGPU処理を指定してコンパイルまたはインタプリットする。
ステップS107で、並列処理指定部114は、エラー時は、該当for文からは、GPU処理指定を削除する。
ステップS109で、並列処理指定部114は、コンパイルエラーが出ないfor文の数をカウントし、遺伝子長とする。
<Repeat loop statement>
The control unit (automatic offload function unit) 11 repeats the processing of steps S106-S107 between the loop start point of step S105 and the loop end point of step S108 for the number of loop statements.
In step S106, the parallel processing specification unit 114 specifies GPU processing for each loop statement using a language-specific method, and compiles or interprets the loop statement.
In step S107, if an error occurs, the parallel processing designation unit 114 deletes the GPU processing designation from the corresponding for statement.
In step S109, the parallel processing designation unit 114 counts the number of for statements for which no compilation error occurs, and sets the count as the gene length.

<指定個体数パターン準備>
次に、初期値として、並列処理指定部114は、指定個体数の遺伝子配列を準備する。ここでは、0と1をランダムに割当てて作成する。
ステップS110で、並列処理指定部114は、アプリケーションプログラムのコードを、遺伝子にマッピングする。0と1がランダムに割当てられた遺伝子配列を遺伝子にマッピングすることで、指定個体数パターンを準備する。
準備された遺伝子配列に応じて、遺伝子の値が1の場合は並列処理を指定するディレクティブをアプリケーションプログラムのコードに挿入する(例えば図3の#pragmaディレクティブ参照)。
<Preparation of designated population patterns>
Next, the parallel processing designation unit 114 prepares a designated number of gene sequences as initial values. Here, these are created by randomly assigning 0 and 1.
In step S110, the parallel processing designation unit 114 maps the code of the application program to genes. A designated population pattern is prepared by mapping a gene sequence in which 0s and 1s are randomly assigned to genes.
According to the prepared gene sequence, a directive that specifies parallel processing when the gene value is 1 is inserted into the code of the application program (see, for example, the #pragma directive in FIG. 3).

制御部(自動オフロード機能部)11は、ステップS111のループ始端とステップS120のループ終端間で、ステップS112-S119の処理について指定世代数繰り返す。
また、上記指定世代数繰り返しにおいて、さらにステップS112のループ始端とステップS117のループ終端間で、ステップS113-S116の処理について指定個体数繰り返す。すなわち、指定世代数繰り返しの中で、指定個体数の繰り返しが入れ子状態で処理される。
The control unit (automatic offload function unit) 11 repeats the processing of steps S112-S119 for a designated number of generations between the loop start point of step S111 and the loop end point of step S120.
In addition, in the above-mentioned repetition of the specified number of generations, the processing of steps S113-S116 is further repeated a specified number of individuals between the loop start point of step S112 and the loop end point of step S117. That is, within the repetition of the specified number of generations, the repetition of the specified number of individuals is processed in a nested state.

<データ転送指定>
ステップS113で、データ転送指定部113は、変数参照関係から、言語に応じた手法でデータ転送を指定する。
<Data transfer specification>
In step S113, the data transfer specification unit 113 specifies a data transfer based on the variable reference relationship using a method appropriate for the language.

<コンパイル>
ステップS114で、並列処理パターン作成部117(図1参照)は、遺伝子パターンに応じてディレクティブ指定したコードをGPU処理基盤でコンパイルまたはインタプリットする。すなわち、並列処理パターン作成部117は、作成したアプリケーションプログラムのコードを、GPUを備えた検証用マシン14上のPGIコンパイラでコンパイルまたはインタプリットを行う。
ここで、ネストfor文を複数並列指定する場合等でコンパイルエラーとなることがある。この場合は、性能測定時の処理時間がタイムアウトした場合と同様に扱う。
<Compile>
In step S114, the parallel processing pattern creation unit 117 (see FIG. 1) compiles or interprets the code with directives specified according to the gene pattern on the GPU processing platform. That is, the parallel processing pattern creation unit 117 compiles or interprets the created application program code with a PGI compiler on the verification machine 14 equipped with a GPU.
Here, a compilation error may occur when multiple nested for statements are specified in parallel, etc. In this case, it is treated the same as when the processing time during performance measurement times out.

ステップS115で、性能測定部118(図1参照)は、CPU-GPU搭載の検証用マシン14に、実行ファイルをデプロイする。
ステップS116で、性能測定部118は、配置したバイナリファイルを実行し、オフロードした際のベンチマーク性能を測定する。
In step S115, the performance measurement unit 118 (see FIG. 1) deploys the executable file to the verification machine 14 equipped with a CPU and GPU.
In step S116, the performance measurement unit 118 executes the arranged binary file and measures the benchmark performance when offloaded.

ここで、途中世代で、以前と同じパターンの遺伝子については測定せず、同じ値を使う。つまり、GA処理の中で、以前と同じパターンの遺伝子が生じた場合は、その個体についてはコンパイルや性能測定をせず、以前と同じ測定値を用いる。
ステップS118で、実行ファイル作成部119(図1参照)は、処理時間が短い個体ほど適合度が高くなるように評価し、性能の高い個体を選択する。
Here, in the intermediate generation, genes with the same pattern as before are not measured, and the same values are used. In other words, if a gene with the same pattern as before is generated during the GA process, compilation or performance measurement is not performed for that individual, and the same measured value as before is used.
In step S118, the executable file creation unit 119 (see FIG. 1) evaluates the individuals with shorter processing times so that they have a higher fitness, and selects the individuals with the highest performance.

ステップS119で、実行ファイル作成部119は、選択された個体に対して、交叉、突然変異の処理を行い、次世代の個体を作成する。次世代の個体に対して、コンパイル、性能測定、適合度設定、選択、交叉、突然変異処理を行う。
すなわち、全個体に対して、ベンチマーク性能測定後、ベンチマーク処理時間に応じて、各遺伝子配列の適合度を設定する。設定された適合度に応じて、残す個体の選択を行う。選択された個体に対して、交叉処理、突然変異処理、そのままコピー処理のGA処理を行い、次世代の個体群を作成する。
In step S119, the executable file creation unit 119 performs crossover and mutation processes on the selected individuals to create the next generation individuals. The next generation individuals are subjected to compilation, performance measurement, fitness setting, selection, crossover, and mutation processes.
That is, after benchmark performance is measured for all individuals, the fitness of each gene sequence is set according to the benchmark processing time. Individuals to be left are selected according to the set fitness. The selected individuals are subjected to GA processing including crossover, mutation, and direct copy to create the next generation population.

ステップS121で、実行ファイル作成部119は、指定世代数のGA処理終了後、最高性能の遺伝子配列に該当するC/C++コード(最高性能の並列処理パターン)を解とする。In step S121, after the GA processing for the specified number of generations is completed, the executable file creation unit 119 determines that the C/C++ code corresponding to the highest-performance gene sequence (the highest-performance parallel processing pattern) is the solution.

<GAのパラメータ>
上記、個体数、世代数、交叉率、突然変異率、適合度設定、選択方法は、GAのパラメータである。GAのパラメータは、例えば、以下のように設定してもよい。
実行するSimple GAの、パラメータ、条件は例えば以下のようにできる。
遺伝子長:並列可能ループ文数
個体数M:遺伝子長以下
世代数T:遺伝子長以下
適合度:(処理時間)-1/2
この設定により、ベンチマーク処理時間が短い程、高適合度になる。また、適合度を、(処理時間)-1/2とすることで、処理時間が短い特定の個体の適合度が高くなり過ぎて、探索範囲が狭くなるのを防ぐことができる。また、性能測定が一定時間で終わらない場合は、タイムアウトさせ、処理時間1000秒等の時間(長時間)であるとして、適合度を計算する。このタイムアウト時間は、性能測定特性に応じて変更させればよい。
選択:ルーレット選択
ただし、世代での最高適合度遺伝子は交叉も突然変異もせず次世代に保存するエリート保存も合わせて行う。
交叉率Pc:0.9
突然変異率Pm:0.05
<GA parameters>
The above-mentioned number of individuals, number of generations, crossover rate, mutation rate, fitness setting, and selection method are parameters of the GA. The parameters of the GA may be set, for example, as follows.
The parameters and conditions for the Simple GA to be executed can be, for example, as follows:
Gene length: Number of loop statements that can be parallelized Number of individuals M: Less than or equal to gene length Number of generations T: Less than or equal to gene length Fitness: (processing time) -1/2
With this setting, the shorter the benchmark processing time, the higher the fitness. Also, by setting the fitness to (processing time) -1/2 , it is possible to prevent the fitness of a specific individual with a short processing time from becoming too high, narrowing the search range. Also, if the performance measurement does not end within a certain time, a timeout is set and the fitness is calculated assuming a processing time of 1000 seconds or the like (long time). This timeout time can be changed according to the performance measurement characteristics.
Selection: Roulette selection However, elite preservation is also performed in which the genes with the highest fitness in one generation are preserved in the next generation without crossover or mutation.
Crossover rate Pc: 0.9
Mutation rate Pm: 0.05

本実施形態では、gcov,gprof等を用いて、ループが多く実行時間がかかっているアプリケーションを事前に特定して、オフロード試行をする。これにより、効率的に高速化できるアプリケーションを見つけることができる。In this embodiment, applications that have many loops and take a long time to execute are identified in advance using gcov, gprof, etc., and offloading is attempted. This makes it possible to find applications that can be accelerated efficiently.

より短時間でオフロード部分を探索するためには、複数の検証用マシンで個体数分並列に性能測定することが考えられる。アプリケーションプログラムに応じて、タイムアウト時間を調整することも短時間化に繋がる。例えば、オフロード処理がCPUでの実行時間の2倍かかる場合はタイムアウトとする等である。また、個体数、世代数が多い方が、高性能な解を発見できる可能性が高まる。しかし、各パラメータを最大にする場合、個体数×世代数だけコンパイル、および性能ベンチマークを行う必要がある。このため、本番サービス利用開始までの時間がかかる。本実施形態では、GAとしては少ない個体数、世代数で行っているが、交叉率Pcを0.9と高い値にして広範囲を探索することで、ある程度の性能の解を早く発見するようにしている。 In order to search for the offloaded part in a shorter time, it is possible to measure the performance in parallel for the number of individuals on multiple verification machines. Adjusting the timeout time according to the application program can also shorten the time. For example, if the offload processing takes twice as long as the execution time on the CPU, a timeout can be set. In addition, the more individuals and generations there are, the higher the chance of finding a high-performance solution. However, when maximizing each parameter, compilation and performance benchmarking must be performed for the number of individuals x the number of generations. This takes time before the actual service can be used. In this embodiment, the GA is performed with a small number of individuals and generations, but by setting the crossover rate Pc to a high value of 0.9 and searching a wide range, a solution with a certain level of performance can be found quickly.

[リソース比とリソース量の設定フローチャート]
図5は、GPUやFPGAオフロード試行の後に追加されるリソース比とリソース量の設定フローチャートである。図5に示すフローチャートは、図4A-Bに示すGPUオフロード試行後に実行されるほか、後記する図7および図8に示すGPU、FPGAオフロード試行後に実行される。
[Flowchart for setting resource ratios and resource amounts]
Fig. 5 is a flowchart for setting the resource ratio and resource amount added after a GPU or FPGA offload attempt. The flowchart shown in Fig. 5 is executed after a GPU offload attempt shown in Figs. 4A-B, and also after a GPU or FPGA offload attempt shown in Figs. 7 and 8 described below.

ステップS51でリソース比決定部115は、ユーザ運用条件、テストケースCPU処理時間、オフロードデバイス処理時間を取得する。ユーザ運用条件は、ユーザがオフロードしたいコードを指定する際に合わせてユーザに指定してもらう。ユーザ運用条件は、リソース量設定部116が、設備リソースDB132の情報を参照してリソース量を決定する際に利用する。In step S51, the resource ratio determination unit 115 acquires the user operation conditions, the test case CPU processing time, and the offload device processing time. The user operation conditions are specified by the user when specifying the code that the user wants to offload. The resource amount setting unit 116 uses the user operation conditions when determining the resource amount by referring to the information in the equipment resource DB 132.

<リソース比決定部115の処理>
ステップS52でリソース比決定部115は、性能測定結果をもとに、CPUとオフロードデバイスの処理時間(テストケースCPU処理時間とオフロードデバイス処理時間)の比を、リソース比として決定する。
<Processing of resource ratio determination unit 115>
In step S52, the resource ratio determination unit 115 determines the ratio between the processing time of the CPU and the offload device (the test case CPU processing time and the offload device processing time) as a resource ratio based on the performance measurement result.

図3および図4で述べたように、本自動オフロードによって、コード変換の際には、既に検証環境での性能測定結果が得られている。この性能測定結果を用いて、リソース比決定部115は、CPUとオフロードデバイスのリソース比を決定する。具体的には、検証環境でのCPUとオフロードデバイスの処理時間の比に対して、適正なリソース比を決定する。例えば、検証環境でのテストケース処理時間が、CPU処理:10秒、GPU処理:5秒の場合は、リソース比は、CPU:GPU=2:1となる。 As described in Figures 3 and 4, this automatic offloading already obtains performance measurement results in the verification environment when converting code. Using these performance measurement results, the resource ratio determination unit 115 determines the resource ratio between the CPU and the offload device. Specifically, it determines an appropriate resource ratio for the ratio of the processing times of the CPU and the offload device in the verification environment. For example, if the test case processing time in the verification environment is CPU processing: 10 seconds, GPU processing: 5 seconds, the resource ratio will be CPU:GPU = 2:1.

リソース比決定部115は、CPUとオフロードデバイスの処理時間が同等オーダになるように、リソース比を決定する。CPUとオフロードデバイスの処理時間が同等オーダになるように、リソース比を決定することで、CPUとオフロードデバイスの処理時間を揃え、CPUとアクセラレータがGPU、FPGA、メニーコアCPU等の混在環境であってもリソース量を適切に設定することができる。The resource ratio determination unit 115 determines the resource ratio so that the processing times of the CPU and the offload device are of the same order. By determining the resource ratio so that the processing times of the CPU and the offload device are of the same order, the processing times of the CPU and the offload device are aligned, and the resource amount can be appropriately set even in a mixed environment where the CPU and accelerator are GPU, FPGA, many-core CPU, etc.

リソース比決定部115は、CPUとオフロードデバイスの処理時間の差分が所定閾値以上の場合、リソース比を所定の上限値に設定する。すなわち、検証環境でのCPUとオフロードデバイスの処理時間が、例えば10倍以上差分がある場合にリソース比を10倍以上にしてしまうと、コストパフォーマンス悪化につながる。この場合は、例えば、5:1等のリソース比を上限にする(上限値は、処理時間の5:1のリソース比)。リソース比に上限を設けることで、VM数の大幅増加を防ぐことができる。 If the difference in processing time between the CPU and the offload device is equal to or greater than a predetermined threshold, the resource ratio determination unit 115 sets the resource ratio to a predetermined upper limit. In other words, if the difference between the processing time of the CPU and the offload device in the verification environment is, for example, 10 times or more, setting the resource ratio to 10 times or more will lead to a deterioration in cost performance. In this case, for example, the resource ratio is set to an upper limit of 5:1 (the upper limit is a resource ratio of 5:1 processing time). By setting an upper limit on the resource ratio, a significant increase in the number of VMs can be prevented.

<リソース量設定部116の処理>
ステップS53でリソース量設定部116は、ユーザ運用条件と適切リソース比をもとに、リソース量を設定する。すなわち、リソース量設定部116は、ユーザが指定したコスト条件を満たすように、リソース比はできるだけキープして、リソース量を決定する。
<Processing of resource amount setting unit 116>
In step S53, the resource amount setting unit 116 sets the resource amount based on the user operation conditions and the appropriate resource ratio. That is, the resource amount setting unit 116 determines the resource amount while keeping the resource ratio as much as possible so as to satisfy the cost conditions specified by the user.

リソース量設定部116は、適切リソース比を維持して、ユーザ運用条件を満たす最大のリソース量を設定する。具体例を挙げると、CPU1VMは1000円/月、GPUは4000円/月、リソース比は2:1が適切であるとし、ユーザは月10000円以内の予算であるとする。この場合には、CPUは2、GPUは1を確保して商用環境に配置する。The resource amount setting unit 116 maintains an appropriate resource ratio and sets the maximum resource amount that satisfies the user's operational conditions. As a specific example, assume that a CPU 1VM costs 1,000 yen/month, a GPU costs 4,000 yen/month, a resource ratio of 2:1 is appropriate, and the user has a monthly budget of 10,000 yen or less. In this case, 2 CPUs and 1 GPU are secured and placed in a commercial environment.

リソース量設定部116は、リソース比を維持した最小リソース量でもユーザ運用条件を満たさない場合は、リソース比を崩してCPUとオフロードデバイスのリソース量をコスト条件を満たすように設定する。具体例を挙げると、CPU1VMは1000円/月、GPUは4000円/月、リソース比は2:1が適切であるとし、ユーザは月5000円以内の予算であるとする。この場合には、ユーザ予算が足りないため、リソース比はキープできないが、CPUとオフロードデバイスのリソース量をより小さく設定、すなわちCPUは1、GPUは1を確保して配置する。If the minimum resource amount while maintaining the resource ratio does not satisfy the user operation conditions, the resource amount setting unit 116 breaks the resource ratio and sets the resource amount of the CPU and offload device to satisfy the cost conditions. As a specific example, assume that the appropriate resource ratio is 2:1, with 1 VM CPU costing 1,000 yen/month and 4,000 yen/month GPU, and that the user has a monthly budget of 5,000 yen or less. In this case, since the user budget is insufficient, the resource ratio cannot be maintained, but the resource amount of the CPU and offload device is set smaller, i.e., 1 CPU and 1 GPU are secured and arranged.

上記ステップS53の処理を終え、商用環境にリソースを確保して配置した後は、ユーザが利用する前に、性能およびコストを確認するため、図2で述べた自動検証を実行する。これにより、商用環境でリソースを確保して、自動検証後、性能とコストをユーザに提示することができる。After completing the processing of step S53 above and reserving and placing resources in the commercial environment, the automatic verification described in Figure 2 is executed to check performance and cost before the user uses it. This allows resources to be reserved in the commercial environment, and after automatic verification, the performance and cost can be presented to the user.

<リソース比とリソース量の設定のまとめ>
リソース比を適切化するため、オフロードパターンの解を決める際の性能測定結果を用いる。実装は、テストケースの処理時間から、CPUとGPUの処理時間が同等オーダになるようリソース比を定める。例えば、テストケースの処理時間が、CPU処理:10秒、GPU処理:5秒の場合では、CPU側のリソースは2倍で同等の処理時間程度と考えられるため、リソース比は2:1となる。なお、仮想マシン等の数は整数となるため、リソース比は処理時間から計算する際に、整数比となるように四捨五入する。
<Summary of resource ratio and resource amount settings>
In order to optimize the resource ratio, the performance measurement results when determining the offload pattern solution are used. In the implementation, the resource ratio is determined based on the processing time of the test case so that the CPU and GPU processing times are of the same order of magnitude. For example, if the processing time of the test case is 10 seconds for CPU processing and 5 seconds for GPU processing, the CPU side resources are considered to be doubled and the processing time is approximately the same, so the resource ratio is 2:1. Note that since the number of virtual machines, etc. is an integer, the resource ratio is rounded off to an integer ratio when calculated from the processing time.

リソース比が決定されると、次に、商用環境へのアプリケーション配置を行う際のリソース量の設定を行う。実装は、リソース量決定には、ユーザがオフロード依頼時に指定したコスト要求を満たすように、リソース比はできるだけキープして、VM等の数を定める。具体的には、コスト範囲内で、リソース比をキープする中では、VM等の数は最大値を選択する。 Once the resource ratio has been determined, the next step is to set the amount of resources to be used when deploying applications in a commercial environment. In determining the amount of resources, the implementation determines the number of VMs, etc., while keeping the resource ratio as much as possible so as to satisfy the cost requirements specified by the user when requesting offloading. Specifically, the maximum number of VMs, etc. is selected while keeping the resource ratio within the cost range.

例えば、CPUに関して1VMは1000円/月、GPUは4000円/月、リソース比は2:1が適切であり、ユーザは月10000円以内の予算であった場合には、CPUは2、GPUは1を確保する。また、コスト範囲内で、リソース比をキープできない場合は、CPU1単位、GPU1単位から始めてできるだけ適切なリソース比に近くなるよう、リソース量を設定する。例えば、月5000円以内の予算であった場合には、リソース比はキープできないが、CPUは1、GPUは1を確保する。
リソース量を設定すると、実装では、例えばXen Serverの仮想化機能を用いて、CPUやGPUのリソースを割り当てる。
For example, for the CPU, 1 VM is 1000 yen/month, 4000 yen/month for the GPU, and a resource ratio of 2:1 is appropriate, and if the user has a monthly budget of 10,000 yen or less, 2 CPUs and 1 GPU are secured. If the resource ratio cannot be kept within the cost range, the resource amount is set so as to get as close as possible to the appropriate resource ratio, starting with 1 CPU and 1 GPU. For example, if the monthly budget is 5,000 yen or less, the resource ratio cannot be kept, but 1 CPU and 1 GPU are secured.
When the resource amount is set, the implementation allocates CPU and GPU resources using, for example, the virtualization function of Xen Server.

(第2の実施形態)
本発明は、自動オフロードにおけるリソース比とリソース量の設定に特徴がある。
第2の実施形態は、機能ブロックオフロードにおけるリソース比とリソース量の設定について記載する。まず、機能ブロックオフロードについて述べる。
図6~図8を参照して、機能ブロックオフロードの全体構成および動作を説明する。
Second Embodiment
The present invention is characterized by the setting of resource ratios and resource amounts in automatic offloading.
In the second embodiment, the setting of resource ratios and resource amounts in function block offloading will be described. First, the function block offloading will be described.
The overall configuration and operation of the function block offload will be described with reference to FIGS.

図6は、本発明の第2の実施形態に係るオフロードサーバ200の構成例を示す機能ブロック図である。図1と同一構成部分には、同一符号を付して重複箇所の説明を省略する。
オフロードサーバ200は、アプリケーションプログラムの特定処理をアクセラレータに自動的にオフロードする装置である。
6 is a functional block diagram showing a configuration example of an offload server 200 according to the second embodiment of the present invention. The same components as those in FIG. 1 are denoted by the same reference numerals, and the description of the overlapping parts will be omitted.
The offload server 200 is a device that automatically offloads specific processing of an application program to an accelerator.

図6に示すように、オフロードサーバ200は、制御部210と、入出力部12と、記憶部130と、検証用マシン14 (アクセラレータ検証用装置)と、を含んで構成される。As shown in FIG. 6, the offload server 200 includes a control unit 210, an input/output unit 12, a memory unit 130, and a verification machine 14 (accelerator verification device).

入出力部12は、各機器等との間で情報の送受信を行うための通信インタフェースと、タッチパネルやキーボード等の入力装置や、モニタ等の出力装置との間で情報の送受信を行うための入出力インタフェースとから構成される。The input/output unit 12 is composed of a communication interface for transmitting and receiving information between each device, etc., and an input/output interface for transmitting and receiving information between input devices such as a touch panel or keyboard, and output devices such as a monitor.

記憶部130は、ハードディスクやフラッシュメモリ、RAM等により構成され、制御部210の各機能を実行させるためのプログラム(オフロードプログラム)や、制御部210の処理に必要な情報(例えば、中間言語ファイル133)が一時的に記憶される。The memory unit 130 is composed of a hard disk, flash memory, RAM, etc., and temporarily stores programs (offload programs) for executing each function of the control unit 210, and information necessary for processing by the control unit 210 (e.g., intermediate language file 133).

記憶部13は、コードパターンDB(Code pattern database)230(後記)、テストケースDB131、設備リソースDB132、中間言語ファイル133を備える。The memory unit 13 includes a code pattern database 230 (described below), a test case DB 131, an equipment resource DB 132, and an intermediate language file 133.

テストケースDB131には、性能試験項目が格納される。テストケースDB131は、高速化するアプリケーションの性能を測定するような試験を行うための情報が格納される。例えば、画像分析処理の深層学習アプリケーションであれば、サンプルの画像とそれを実行する試験項目である。 Test case DB131 stores performance test items. Test case DB131 stores information for conducting tests to measure the performance of applications that are being accelerated. For example, in the case of a deep learning application for image analysis processing, the test items are sample images and the test items for executing them.

検証用マシン14は、環境適応ソフトウェアの検証用環境として、CPU(Central Processing Unit)、GPU、FPGAを備える。The verification machine 14 is equipped with a CPU (Central Processing Unit), GPU, and FPGA as a verification environment for the environment-adaptive software.

<コードパターンDB230>
・GPUライブラリ、IPコアの記憶
コードパターンDB230は、GPUやFPGA等にオフロード可能なライブラリおよびIPコア(後記)を記憶する。すなわち、コードパターンDB230は、後記<処理B-1>のために、特定のライブラリ、機能ブロックを高速化するGPU用ライブラリ(GPUライブラリ)やFPGA用IPコア(IPコア)とそれに関連する情報を保持する。例えば、コードパターンDB230は、FFT等算術計算等のライブラリリスト(外部ライブラリリスト)を保持する。
<Code Pattern DB230>
Storage of GPU libraries and IP cores The code pattern DB 230 stores libraries and IP cores (described later) that can be offloaded to a GPU, FPGA, etc. That is, for <Process B-1> described later, the code pattern DB 230 stores specific libraries, libraries for GPUs (GPU libraries) that speed up function blocks, IP cores for FPGAs (IP cores), and related information. For example, the code pattern DB 230 stores a library list (external library list) for arithmetic calculations such as FFT, etc.

・CUDAライブラリの記憶
コードパターンDB230は、GPUライブラリとして、例えばCUDAライブラリと当該CUDAライブラリを利用するためのライブラリ利用手順とを記憶する。すなわち、後記<処理C-1>において、置換するライブラリやIPコアをGPUやFPGAに実装し、ホスト側(CPU)プログラムと繋ぐ場合、ライブラリ利用手順も含めて登録しておき、その手順に従って利用する。例えば、CUDAライブラリでは、C言語コードからCUDAライブラリを利用する手順がライブラリとともに公開されているため、コードパターンDB230にライブラリ利用手順も含めて登録しておく。
Storage of CUDA library The code pattern DB 230 stores, as a GPU library, for example, a CUDA library and a library usage procedure for using the CUDA library. That is, in <Process C-1> described later, when a library or IP core to be replaced is implemented in a GPU or FPGA and connected to a host side (CPU) program, the library usage procedure is also registered and used according to the procedure. For example, in the CUDA library, the procedure for using the CUDA library from C language code is published together with the library, so the library usage procedure is also registered in the code pattern DB 230.

・クラス、構造体の記憶
コードパターンDB230は、ホストで計算する場合に記述が同様になる処理のクラスまたは構造体を記憶する。すなわち、後記<処理B-2>において、登録されていないライブラリ呼び出し以外の機能処理を検出するため、構文解析にてソースコードの定義記述からクラス、構造体等を検出する。コードパターンDB230は、後記<処理B-2>のために、ホストで計算する場合に記述が同様になる処理のクラスまたは構造体を登録しておく。なお、クラスまたは構造体の機能処理に対して、高速化するライブラリやIPコアがあることは、類似性検出ツール(後記)で検出する。
Storage of classes and structures The code pattern DB 230 stores classes or structures of processes that will be written in a similar manner when calculated on the host. That is, in <Process B-2> described later, in order to detect functional processes other than unregistered library calls, classes, structures, etc. are detected from the definition description of the source code by syntax analysis. For <Process B-2> described later, the code pattern DB 230 registers classes or structures of processes that will be written in a similar manner when calculated on the host. The existence of libraries or IP cores that speed up the functional processes of the classes or structures is detected by a similarity detection tool (described later).

・OpenCLコードの記憶
コードパターンDB230は、IPコア関連の情報としてOpenCLコードを記憶する。コードパターンDB230に、OpenCLコードを記憶しておくことで、OpenCLコードから、OpenCLインタフェースを用いたCPUとFPGAの接続および、FPGAへのIPコア実装が、XilinxやIntel等のFPGAベンダの高位合成ツール(後記)を介して行うことができる。
Storage of OpenCL code The code pattern DB 230 stores OpenCL code as information related to IP cores. By storing the OpenCL code in the code pattern DB 230, it is possible to connect a CPU and an FPGA using an OpenCL interface and to implement an IP core in an FPGA from the OpenCL code via a high-level synthesis tool (described later) of an FPGA vendor such as Xilinx or Intel.

<制御部210>
制御部210は、オフロードサーバ200全体の制御を司る自動オフロード機能部(Automatic Offloading function)であり、記憶部130に格納されたプログラム(オフロードプログラム)を不図示のCPUが、RAMに展開し実行することにより実現される。
<Control Unit 210>
The control unit 210 is an automatic offloading function that controls the entire offload server 200, and is realized by a CPU (not shown) that expands a program (offload program) stored in the memory unit 130 into RAM and executes it.

特に、制御部210は、CPU向けの既存プログラムコードの中にFPGAやGPUへオフロードすることで処理を高速化できる機能ブロックを検出し、検出した機能ブロックをGPU向けライブラリやFPGA向けIPコア等に置き換えることで高速化をする機能ブロックのオフロード処理を行う。In particular, the control unit 210 detects functional blocks in existing program code for the CPU that can be offloaded to an FPGA or GPU to speed up processing, and performs offload processing of the functional blocks to speed up processing by replacing the detected functional blocks with libraries for the GPU or IP cores for the FPGA, etc.

制御部210は、アプリケーションコード指定部(Specify application code)111と、アプリケーションコード分析部(Analyze application code)112と、置換機能検出部213と、置換処理部214と、リソース比決定部115と、リソース量設定部116と、オフロードパターン作成部215と、性能測定部118と、実行ファイル作成部119と、本番環境配置部(Deploy final binary files to production environment)120と、性能測定テスト抽出実行部(Extract performance test cases and run automatically)121と、ユーザ提供部(Provide price and performance to a user to judge)122と、を備える。The control unit 210 includes an application code specification unit 111, an application code analysis unit 112, a replacement function detection unit 213, a replacement processing unit 214, a resource ratio determination unit 115, a resource amount setting unit 116, an offload pattern creation unit 215, a performance measurement unit 118, an executable file creation unit 119, a production environment deployment unit 120, a performance measurement test extraction and execution unit 121, and a user provision unit 122.

<アプリケーションコード指定部111>
アプリケーションコード指定部111は、入力されたアプリケーションコードの指定を行う。具体的には、アプリケーションコード指定部111は、受信したファイルに記載されたアプリケーションコードを、アプリケーションコード分析部112に渡す。
<Application code specification unit 111>
The application code designation unit 111 designates the input application code. Specifically, the application code designation unit 111 passes the application code described in the received file to the application code analysis unit 112.

<アプリケーションコード分析部112>
アプリケーションコード分析部112は、後記<処理A-1>において、アプリケーションプログラムのソースコードを分析して、当該ソースコードに含まれる外部ライブラリの呼び出しを検出する。具体的には、アプリケーションコード分析部112は、Clang等の構文解析ツールを用いて、ループ文構造等とともに、コードに含まれるライブラリ呼び出しや、機能処理を分析するソースコードの分析を行う。
<Application Code Analysis Unit 112>
In <Process A-1> described later, the application code analysis unit 112 analyzes the source code of the application program and detects calls to external libraries contained in the source code. Specifically, the application code analysis unit 112 uses a syntax analysis tool such as Clang to analyze the source code to analyze library calls and functional processing contained in the code, along with loop statement structures, etc.

上述したコード分析は、オフロードするデバイスを想定した分析が必要になるため、一般化は難しい。ただし、ループ文や変数の参照関係等のコードの構造を把握したり、機能ブロックとしてFFT処理を行う機能ブロックであることや、FFT処理を行うライブラリを呼び出している等を把握することは可能である。機能ブロックの判断は、オフロードサーバが自動判断することは難しい。これもDeckard等の類似性検出ツールを用いて類似度判定等で把握することは可能である。ここで、Clangは、C/C++向けツールであるが、解析する言語に合わせたツールを選ぶ必要がある。 The code analysis described above is difficult to generalize, as it requires analysis that takes into account the device to be offloaded. However, it is possible to grasp the code structure, such as loop statements and variable reference relationships, and to determine that a functional block performs FFT processing and that it calls a library that performs FFT processing. It is difficult for the offload server to automatically determine the functional block. This can also be grasped by using a similarity detection tool such as Deckard to determine the similarity. Here, Clang is a tool for C/C++, but it is necessary to choose a tool that suits the language to be analyzed.

また、アプリケーションコード分析部112は、後記<処理A-2>において、ソースコードからクラスまたは構造体のコードを検出する。 In addition, in <Process A-2> described below, the application code analysis unit 112 detects class or structure code from the source code.

<置換機能検出部213>
置換機能検出部213は、後記<処理B-1>において、検出された呼び出しをキーにして、コードパターンDB230からGPUライブラリおよびIPコアを取得する。具体的には、置換機能検出部213は、検出したライブラリ呼び出しに対して、ライブラリ名をキーとして、コードパターンDB230と照合することで、GPU、FPGAにオフロードできるオフロード可能処理を抽出する。
<Replacement function detection unit 213>
In <Process B-1> described later, the replacement function detection unit 213 uses the detected call as a key to acquire a GPU library and an IP core from the code pattern DB 230. Specifically, the replacement function detection unit 213 compares the detected library call with the code pattern DB 230 using the library name as a key to extract offloadable processing that can be offloaded to a GPU or FPGA.

ここで、コードパターンDB230は、GPUライブラリとして、例えばCUDAライブラリと当該CUDAライブラリを利用するためのライブラリ利用手順とを記憶している。そして、置換機能検出部213は、ライブラリ利用手順をもとに、コードパターンDB230からCUDAライブラリを取得する。Here, the code pattern DB 230 stores, as a GPU library, for example, a CUDA library and a library usage procedure for using the CUDA library. The replacement function detection unit 213 then retrieves the CUDA library from the code pattern DB 230 based on the library usage procedure.

置換機能検出部213は、後記<処理B-2>において、検出されたクラスまたは構造体(後記)の定義記述コードをキーにして、コードパターンDB230からGPUライブラリおよびIPコアを取得する。具体的には、置換機能検出部213は、コピーコードやコピー後変更した定義記述コードを検出する類似性検出ツールを用いて、置換元コードに含まれるクラスや構造体に対して、コードパターンDB230から類似のクラスまたは構造体に紐づいて管理されているGPU、FPGAにオフロードできるGPUライブラリおよびIPコアを抽出する。In <Process B-2> described below, the replacement function detection unit 213 uses the definition description code of the detected class or structure (described below) as a key to obtain a GPU library and an IP core from the code pattern DB 230. Specifically, the replacement function detection unit 213 uses a similarity detection tool that detects copied code and definition description code that has been changed after copying to extract GPU libraries and IP cores that can be offloaded to a GPU or FPGA that are linked to a similar class or structure from the code pattern DB 230 for the class or structure included in the source code to be replaced.

<置換処理部214>
置換処理部214は、後記<処理C-1>において、アプリケーションプログラムのソースコードの置換元の処理記述を、置換機能検出部213が取得した置換先のライブラリおよびIPコアの処理記述に置換する。具体的には、置換処理部214は、抽出したオフロード可能処理を、GPU向けのライブラリやFPGA向けのIPコア等に置換する。
また、置換処理部214は、置換したライブラリおよびIPコアの処理記述を、オフロード対象の機能ブロックとして、GPUやFPGA等にオフロードする。具体的には、置換処理部214は、GPU向けのライブラリやFPGA向けのIPコア等に置換した機能ブロックを、CPUプログラムとのインタフェースを作成することでオフロードする。置換処理部214は、CUDA,OpenCL等の中間言語ファイル133を出力する。
<Replacement Processing Unit 214>
In <Processing C-1> described later, the replacement processing unit 214 replaces the processing description of the source of the application program source code with the processing description of the library and IP core of the replacement destination acquired by the replacement function detection unit 213. Specifically, the replacement processing unit 214 replaces the extracted offloadable processing with a library for GPU, an IP core for FPGA, or the like.
The replacement processing unit 214 also offloads the processing description of the replaced library and IP core to a GPU, FPGA, or the like as a functional block to be offloaded. Specifically, the replacement processing unit 214 offloads the functional block replaced by a library for a GPU or an IP core for an FPGA, or the like, by creating an interface with the CPU program. The replacement processing unit 214 outputs an intermediate language file 133 such as CUDA or OpenCL.

置換処理部214は、後記<処理C-2>において、アプリケーションプログラムのソースコードの置換元の処理記述を、取得したライブラリおよびIPコアの処理記述に置換するとともに、置換元と置換先で引数、戻り値の数または型が異なる場合に、その確認を通知する。 In the process C-2 described below, the replacement processing unit 214 replaces the source processing description of the application program source code with the processing description of the acquired library and IP core, and notifies the user of confirmation if the number or type of arguments or return values differs between the source and destination.

<オフロードパターン作成部215>
オフロードパターン作成部215は、1以上のオフロードするパターンを作成する。具体的には、ホストプログラムとのインタフェースを作成し、検証環境での性能測定を通じて、オフロードするしないを試行することで、より高速となるオフロードパターンを抽出する。
<Offload Pattern Creation Unit 215>
The offload pattern creation unit 215 creates one or more offloading patterns. Specifically, an interface with the host program is created, and the offloading and non-offloading patterns are tried through performance measurement in a verification environment, thereby extracting an offloading pattern that provides a higher speed.

ここで、コードパターンDB230は、IPコア関連の情報としてOpenCLコードを記憶している。オフロードパターン作成部215は、FPGA等のPLDにオフロードする場合は、OpenCLコードをもとにOpenCLインタフェースを用いてホストとPLDとを接続するとともに、OpenCLコードをもとにPLDへのIPコアの実装を行う。Here, the code pattern DB 230 stores OpenCL code as information related to IP cores. When offloading to a PLD such as an FPGA, the offload pattern creation unit 215 connects the host and the PLD using an OpenCL interface based on the OpenCL code, and implements the IP core in the PLD based on the OpenCL code.

OpenCLのAPIに沿う、カーネルプログラムとホストプログラムのインタフェース記述について述べる。なお、下記説明は、後記[処理C](ホスト側とのインタフェースの整合)の<処理C-1>の具体例に対応する。This section describes the interface description between the kernel program and the host program in accordance with the OpenCL API. Note that the following explanation corresponds to a specific example of <Process C-1> in [Process C] (matching the interface with the host side) described below.

OpenCLのC言語の文法に沿って作成したカーネルは、OpenCLのC言語のランタイムAPIを利用して、作成するホスト(例えば、CPU)側のプログラムによりデバイス(例えば、FPGA)で実行される。カーネル関数hello()をホスト側から呼び出す部分は、OpenCLランタイムAPIの一つであるclEnqueueTask()を呼び出すことである。
ホストコードで記述するOpenCLの初期化、実行、終了の基本フローは、下記ステップ1~13である。このステップ1~13のうち、ステップ1~10がカーネル関数hello()をホスト側から呼び出すまでの手続(準備)であり、ステップ11でカーネルの実行となる。
A kernel created according to the OpenCL C language syntax is executed on a device (e.g., FPGA) by a program created on the host (e.g., CPU) side using the OpenCL C language runtime API. The part where the kernel function hello() is called from the host side is to call clEnqueueTask(), which is one of the OpenCL runtime APIs.
The basic flow of OpenCL initialization, execution, and termination described in the host code consists of the following steps 1 to 13. Of these steps 1 to 13, steps 1 to 10 are the procedure (preparation) until the kernel function hello() is called from the host side, and step 11 is the execution of the kernel.

1.プラットフォーム特定
OpenCLランタイムAPIで定義されているプラットフォーム特定機能を提供する関数clGetPlatformIDs()を用いて、OpenCLが動作するプラットフォームを特定する。
1. Platform Specific
The platform on which OpenCL runs is identified using a function clGetPlatformIDs( ) that provides platform identification functionality defined in the OpenCL runtime API.

2.デバイス特定
OpenCLランタイムAPIで定義されているデバイス特定機能を提供する関数clGetDeviceIDs()を用いて、プラットフォームで使用するGPU等のデバイスを特定する。
2. Device Identification
A device such as a GPU to be used on the platform is identified using a function clGetDeviceIDs( ) that provides a device identification function defined in the OpenCL runtime API.

3.コンテキスト作成
OpenCLランタイムAPIで定義されているコンテキスト作成機能を提供する関数clCreateContext()を用いて、OpenCLを動作させる実行環境となるOpenCLコンテキストを作成する。
3. Creating a context
An OpenCL context that serves as an execution environment for running OpenCL is created using a function clCreateContext( ) that provides a context creation function defined in the OpenCL runtime API.

4.コマンドキュー作成
OpenCLランタイムAPIで定義されているコマンドキュー作成機能を提供する関数clCreateCommandQueue()を用いて、デバイスを制御する準備であるコマンドキューを作成する。OpenCLでは、コマンドキューを通して、ホストからデバイスに対する働きかけ(カーネル実行コマンドやホスト-デバイス間のメモリコピーコマンドの発行)を実行する。
4. Creating a command queue
A command queue is created in preparation for controlling the device using the function clCreateCommandQueue(), which provides a command queue creation function defined in the OpenCL runtime API. In OpenCL, the host issues commands to the device (such as issuing kernel execution commands and memory copy commands between the host and device) through the command queue.

5.メモリオブジェクト作成
OpenCLランタイムAPIで定義されているデバイス上にメモリを確保する機能を提供する関数clCreateBuffer()を用いて、ホスト側からメモリオブジェクトを参照できるようにするメモリオブジェクトを作成する。
5. Creating a memory object
A memory object that allows the host side to reference the memory object is created using a function clCreateBuffer( ) that provides a function for allocating memory on a device defined in the OpenCL runtime API.

6.カーネルファイル読み込み
デバイスで実行するカーネルは、その実行自体をホスト側のプログラムで制御する。このため、ホストプログラムは、まずカーネルプログラムを読み込む必要がある。カーネルプログラムには、OpenCLコンパイラで作成したバイナリデータや、OpenCL C言語で記述されたソースコードがある。このカーネルファイルを読み込む(記述省略)。なお、カーネルファイル読み込みでは、OpenCLランタイムAPIは使用しない。
6. Loading a kernel file The execution of the kernel executed on the device is controlled by the host program. For this reason, the host program must first load the kernel program. The kernel program includes binary data created by the OpenCL compiler and source code written in the OpenCL C language. This kernel file is loaded (description omitted). Note that the OpenCL runtime API is not used when loading the kernel file.

7.プログラムオブジェクト作成
OpenCLでは、カーネルプログラムをプログラムオブジェクトとして認識する。この手続きがプログラムオブジェクト作成である。
OpenCLランタイムAPIで定義されているプログラムオブジェクト作成機能を提供する関数clCreateProgramWithSource()を用いて、ホスト側からメモリオブジェクトを参照できるようにするプログラムオブジェクトを作成する。カーネルプログラムのコンパイル済みバイナリ列から作成する場合は、clCreateProgramWithBinary()を使用する。
7. Creating a program object
In OpenCL, a kernel program is recognized as a program object. This procedure is called program object creation.
Create a program object that allows the host to reference the memory object by using the function clCreateProgramWithSource(), which provides the program object creation function defined in the OpenCL runtime API. When creating a program object from a compiled binary sequence of a kernel program, use clCreateProgramWithBinary().

8.ビルド
ソースコードとして登録したプログラムオブジェクトを OpenCL Cコンパイラ・リンカを使いビルドする。
OpenCLランタイムAPIで定義されているOpenCL Cコンパイラ・リンカによるビルドを実行する関数clBuildProgram()を用いて、プログラムオブジェクトをビルドする。なお、clCreateProgramWithBinary()でコンパイル済みのバイナリ列からプログラムオブジェクトを生成した場合、このコンパイル手続は不要である。
8. Build Build the program object registered as source code using the OpenCL C compiler and linker.
A program object is built using the function clBuildProgram(), which executes a build by the OpenCL C compiler and linker defined in the OpenCL runtime API. Note that if a program object is generated from a compiled binary string using clCreateProgramWithBinary(), this compilation procedure is not necessary.

9.カーネルオブジェクト作成
OpenCLランタイムAPIで定義されているカーネルオブジェクト作成機能を提供する関数clCreateKernel()を用いて、カーネルオブジェクトを作成する。1つのカーネルオブジェクトは、1つのカーネル関数に対応するので、カーネルオブジェクト作成時には、カーネル関数の名前(hello)を指定する。また、複数のカーネル関数を1つのプログラムオブジェクトとして記述した場合、1つのカーネルオブジェクトは、1つのカーネル関数に1対1で対応するので、clCreateKernel()を複数回呼び出す。
9. Creating a kernel object
A kernel object is created using the function clCreateKernel(), which provides a kernel object creation function defined in the OpenCL runtime API. Since one kernel object corresponds to one kernel function, the name of the kernel function (hello) is specified when creating the kernel object. Furthermore, if multiple kernel functions are written as one program object, one kernel object corresponds one-to-one to one kernel function, so clCreateKernel() is called multiple times.

10.カーネル引数設定
OpenCLランタイムAPIで定義されているカーネルへ引数を与える(カーネル関数が持つ引数へ値を渡す)機能を提供する関数clSetKernel()を用いて、カーネル引数を設定する。
以上、上記ステップ1~10で準備が整い、ホスト側からデバイスでカーネルを実行するステップ11に入る。
10. Kernel argument settings
The kernel arguments are set using the function clSetKernel(), which provides a function for giving arguments to the kernel defined in the OpenCL runtime API (passing values to arguments held by the kernel function).
As described above, the preparation is completed in steps 1 to 10, and the process advances to step 11 in which the kernel is executed on the device from the host side.

11.カーネル実行
カーネル実行(コマンドキューへ投入)は、デバイスに対する働きかけとなるので、コマンドキューへのキューイング関数となる。
OpenCLランタイムAPIで定義されているカーネル実行機能を提供する関数clEnqueueTask()を用いて、カーネルhelloをデバイスで実行するコマンドをキューイングする。カーネルhelloを実行するコマンドがキューイングされた後、デバイス上の実行可能な演算ユニットで実行されることになる。
11. Kernel Execution Kernel execution (submission to the command queue) is an action on the device, so it is a queuing function for the command queue.
A command to execute the kernel hello on the device is queued using a function clEnqueueTask() that provides a kernel execution function defined in the OpenCL runtime API. After the command to execute the kernel hello is queued, it will be executed on an executable computing unit on the device.

12.メモリオブジェクトからの読み込み
OpenCLランタイムAPIで定義されているデバイス側のメモリからホスト側のメモリへデータをコピーする機能を提供する関数clEnqueueReadBuffer()を用いて、デバイス側のメモリ領域からホスト側のメモリ領域にデータをコピーする。また、ホスト側からデバイス側のメモリへデータをコピーする機能を提供する関数clEnqueueWrightBuffer()を用いて、ホスト側のメモリ領域からデバイス側のメモリ領域にデータをコピーする。なお、これらの関数は、デバイスに対する働きかけとなるので、一度コマンドキューへコピーコマンドがキューイングされてからデータコピーが始まることになる。
12. Reading from a memory object
Data is copied from the device memory area to the host memory area using the function clEnqueueReadBuffer(), which provides a function for copying data from device memory to host memory defined in the OpenCL runtime API. Data is also copied from the host memory area to the device memory area using the function clEnqueueWrightBuffer(), which provides a function for copying data from the host memory to the device memory. Note that these functions act on the device, so the copy command is queued in the command queue once before data copying begins.

13.オブジェクト解放
最後に、ここまでに作成してきた各種オブジェクトを解放する。
以上、OpenCL C言語に沿って作成されたカーネルの、デバイス実行について説明した。
13. Releasing objects Finally, release the various objects that you have created up to this point.
The above describes device execution of a kernel written in accordance with the OpenCL C language.

<性能測定部118>
性能測定部118は、作成された処理パターンのアプリケーションプログラムをコンパイルして、検証用マシン14に配置し、GPUやFPGA等にオフロードした際の性能測定用処理を実行する。
性能測定部118は、バイナリファイル配置部(Deploy binary files)118aを備える。バイナリファイル配置部118aは、GPUやFPGAを備えた検証用マシン14に、中間言語から導かれるバイナリファイルをデプロイ(配置)する。
<Performance Measuring Unit 118>
The performance measurement unit 118 compiles an application program of the created processing pattern, places it on the verification machine 14, and executes processing for performance measurement when offloaded to a GPU, FPGA, or the like.
The performance measurement unit 118 includes a binary file deployment unit 118a that deploys binary files derived from the intermediate language on the verification machine 14 that includes a GPU and an FPGA.

性能測定部118は、配置したバイナリファイルを実行し、オフロードした際の性能を測定するとともに、性能測定結果を、バイナリファイル配置部118aに戻す。この場合、性能測定部118は、抽出された別の処理パターンを用いて、抽出された中間言語をもとに、性能測定を試行する。The performance measurement unit 118 executes the placed binary file, measures the performance when offloaded, and returns the performance measurement results to the binary file placement unit 118a. In this case, the performance measurement unit 118 attempts to measure performance based on the extracted intermediate language using another extracted processing pattern.

性能測定の具体例について述べる。
オフロードパターン作成部215は、GPUやFPGAにオフロード可能な機能ブロックをオフロードする処理パターンを作成し、作成された処理パターンの中間言語を、実行ファイル作成部119がコンパイルする。性能測定部118は、コンパイルされたプログラムの性能を測定する(「1回目の性能測定」)。
A specific example of performance measurement will be described.
The offload pattern creation unit 215 creates a processing pattern for offloading a functional block that can be offloaded to a GPU or FPGA, and the intermediate language of the created processing pattern is compiled by the executable file creation unit 119. The performance measurement unit 118 measures the performance of the compiled program ("first performance measurement").

そして、オフロードパターン作成部215は、性能測定された中でCPUに比べ高性能化された処理パターンをリスト化する。オフロードパターン作成部215は、リストの処理パターンを組み合わせてオフロードする新たな処理パターンを作成する。オフロードパターン作成部215は、組み合わせたオフロード処理パターンと中間言語を作成し、中間言語を、実行ファイル作成部119がコンパイルする。
性能測定部118は、コンパイルされたプログラムの性能を測定する(「2回目の性能測定」)。
The offload pattern creation unit 215 then creates a list of processing patterns that have been measured and have higher performance than the CPU. The offload pattern creation unit 215 creates a new processing pattern for offloading by combining the processing patterns in the list. The offload pattern creation unit 215 creates the combined offload processing pattern and an intermediate language, and the executable file creation unit 119 compiles the intermediate language.
The performance measurement unit 118 measures the performance of the compiled program ("second performance measurement").

<実行ファイル作成部119>
実行ファイル作成部119は、オフロードする処理パターンの中間言語をコンパイルして実行ファイルを作成する。一定数繰り返された、性能測定結果をもとに、1以上の処理パターンから最高処理性能の処理パターンを選択し、最高処理性能の処理パターンをコンパイルして最終実行ファイルを作成する。
<Executable File Creation Unit 119>
The executable file creation unit 119 compiles the intermediate language of the processing pattern to be offloaded to create an executable file. Based on the performance measurement results obtained by repeating a certain number of times, the executable file creation unit 119 selects the processing pattern with the highest processing performance from one or more processing patterns, compiles the processing pattern with the highest processing performance, and creates a final executable file.

以下、上述のように構成されたオフロードサーバ200の機能ブロックオフロード処理について説明する。 Below, we will explain the functional block offload processing of the offload server 200 configured as described above.

上記、機能ブロックのオフロードの処理の概要と考慮点について説明する。
FPGAに関しては、ハードウェア回路設計に多大な時間がかかることもあり、一度設計した機能を、IPコア(Intellectual Property Core)という形で再利用可能にすることが多い。IPコアとは、FPGA、IC、LSIなどの半導体を構成するための部分的な回路情報であり、特に機能単位でまとめられている。IPコアは、暗号化/復号化処理、FFT(Fast Fourier Transform)等の算術演算、画像処理、音声処理等が代表的な機能例である。IPコアは、ライセンス料を支払うものが多いが、一部はフリーで提供されているものもある。
The outline of the above-mentioned function block offloading process and points to consider will be described below.
With regard to FPGAs, since hardware circuit design can take a lot of time, functions that have already been designed are often made reusable in the form of IP cores (Intellectual Property Cores). IP cores are partial circuit information for configuring semiconductors such as FPGAs, ICs, and LSIs, and are organized by function. Typical examples of IP core functions include encryption/decryption processing, arithmetic operations such as FFT (Fast Fourier Transform), image processing, and audio processing. Many IP cores require a license fee, but some are provided free of charge.

第2の実施形態では、FPGAに関しては、IPコアを自動オフロードに利用する。また、GPUに関しては、IPコアという言い方ではないものの、FFT、線形代数演算等が代表的な機能例であり、CUDAを用いて実装されたcuFFTやcuBLAS等がGPU向けライブラリとしてフリーで提供されている。本第2の実施形態では、GPUに関してこれらのライブラリを活用する。In the second embodiment, for FPGAs, IP cores are used for automatic offloading. For GPUs, although they are not called IP cores, FFT and linear algebra operations are typical examples of functions, and cuFFT and cuBLAS implemented using CUDA are provided free of charge as libraries for GPUs. In this second embodiment, these libraries are utilized for GPUs.

第2の実施形態では、CPU向けに作られた既存プログラムコードの中で、FFT処理等、GPU、FPGAにオフロードすることで高速化できるような機能ブロックが含まれる場合に、GPU向けライブラリやFPGA向けIPコア等に置き換えることでの高速化を図る。 In the second embodiment, when existing program code created for a CPU contains functional blocks such as FFT processing that can be accelerated by offloading to a GPU or FPGA, the code is accelerated by replacing the functional blocks with GPU libraries or FPGA IP cores.

[機能ブロックのオフロード処理詳細]
機能ブロックのオフロードについては、機能ブロックの検出(以下、「処理A」という)、その機能ブロックがオフロード用の既存ライブラリ/IPコア等があるかを検出(以下、「処理B」という)、機能ブロックをライブラリ/IPコア等と置換した際にホスト側とのインタフェースの整合(以下、「処理C」という)、の3つ要素を考慮する必要がある。上記3つ要素の考慮点に従い、機能ブロックのオフロード処理について詳細に述べる。
[Function block offload processing details]
For offloading of a functional block, three elements must be considered: detection of the functional block (hereinafter referred to as "Process A"), detection of whether the functional block has an existing library/IP core, etc. for offloading (hereinafter referred to as "Process B"), and consistency of the interface with the host side when replacing the functional block with the library/IP core, etc. (hereinafter referred to as "Process C"). The offloading process of the functional block will be described in detail according to the considerations of the above three elements.

[処理A](機能ブロックの検出)
「処理A」(機能ブロックの検出)は、ライブラリの関数呼び出しを行い、ライブラリの関数呼び出しを機能ブロックとする<処理A-1>と、登録されていないライブラリの関数呼び出しである場合、クラス、構造体等を検出して機能ブロックとする<処理A-2>と、に分けられる。すなわち、<処理A-1>は、既存のライブラリの関数呼び出しを検出して機能ブロックとするものであり、<処理A-2>は、<処理A-1>において機能ブロックを検出しない場合に、クラスまたは構造体から機能ブロックを抽出するものである。
[Process A] (detection of functional blocks)
"Processing A" (detection of function blocks) is divided into <Processing A-1>, which calls a function in a library and makes the function call in the library a function block, and <Processing A-2>, which detects a class, structure, etc. and makes the function block if the function call is in an unregistered library. That is, <Processing A-1> detects a function call in an existing library and makes it a function block, and <Processing A-2> extracts a function block from a class or structure if a function block is not detected in <Processing A-1>.

<処理A-1>
アプリケーションコード分析部112は、構文解析を用いて、ソースコードから外部のライブラリの関数呼び出しを行っていることを検知する。詳細には、下記の通りである。コードパターンDB230は、FFT等算術計算等のライブラリリストを保持している。アプリケーションコード分析部112は、ソースコードを構文解析し、コードパターンDB230が保持しているライブラリリストと照合して、外部のライブラリの関数呼び出しを行っていることを検知する。
<Process A-1>
The application code analysis unit 112 uses syntax analysis to detect whether a function of an external library is being called from source code. The details are as follows. The code pattern DB 230 holds a library list for arithmetic calculations such as FFT. The application code analysis unit 112 performs syntax analysis of the source code, and compares it with the library list held by the code pattern DB 230 to detect whether a function of an external library is being called.

<処理A-2>
アプリケーションコード分析部112は、登録されていないライブラリ呼び出し以外の機能処理を機能ブロックとして検出するため、構文解析を用いて、ソースコードの定義記述からクラスまたは構造体の機能処理を検出する。アプリケーションコード分析部112は、例えば、C言語のstructを使って定義されるいくつかの変数をひとまとまりにした型である構造体(structure)や、インスタンス化したオブジェクトの型が値型である構造体に対して参照型であるクラス(class)を検出する。また、アプリケーションコード分析部112は、例えばJava(登録商標)において構造体に代替使用されるクラスを検出する。
<Process A-2>
The application code analysis unit 112 detects the functional processing of a class or structure from the definition description of the source code using syntax analysis in order to detect functional processing other than unregistered library calls as functional blocks. The application code analysis unit 112 detects, for example, a structure that is a type that groups together several variables defined using the struct of the C language, and a class that is a reference type for a structure whose instantiated object type is a value type. The application code analysis unit 112 also detects a class that is used as an alternative to a structure in Java (registered trademark), for example.

[処理B](オフロード可能機能の検出)
[処理B](オフロード可能機能の検出)は、<処理A-1>を受け、コードパターンDB230を参照して置換可能GPUライブラリ、IPコアを取得する<処理B-1>と、<処理A-2>を受け、アプリコードの置換元の処理記述を、置換先のGPUライブラリ、IPコア処理記述に置換する<処理B-2>と、に分けられる。すなわち、<処理B-1>は、ライブラリ名をキーに、コードパターンDB230から置換可能GPUライブラリ、IPコアを取得するものである。<処理B-2>は、クラス、構造体等のコードをキーに、置換可能GPUライブラリ・IPコアを検出し、アプリコードの置換元の処理記述を、置換先のGPUライブラリ、IPコア処理記述に置換するものである。
[Process B] (Detection of offloadable functions)
[Processing B] (detection of offloadable functions) is divided into <Processing B-1>, which receives <Processing A-1> and refers to the code pattern DB 230 to obtain replaceable GPU libraries and IP cores, and <Processing B-2>, which receives <Processing A-2> and replaces the processing description of the application code to be replaced with the GPU library and IP core processing description to be replaced. That is, <Processing B-1> obtains replaceable GPU libraries and IP cores from the code pattern DB 230 using the library name as a key. <Processing B-2> detects replaceable GPU libraries and IP cores using codes such as classes and structures as a key, and replaces the processing description of the application code to be replaced with the GPU library and IP core processing description to be replaced.

処理Bの前提として、コードパターンDB230には、特定のライブラリ、機能ブロックを高速化するGPU用ライブラリやFPGA用IPコアとそれに関連する情報が保持されている。また、コードパターンDB230には、置換元のライブラリ、機能ブロックについては、機能名とともにコードや実行ファイルが登録されている。As a premise for process B, the code pattern DB 230 holds a specific library, a library for GPUs that speeds up a function block, an IP core for FPGAs, and related information. In addition, the code pattern DB 230 registers code and executable files along with function names for the original libraries and function blocks.

<処理B-1>
置換機能検出部213は、<処理A-1>でアプリケーションコード分析部112が検出したライブラリ呼び出しに対して、ライブラリ名をキーに、コードパターンDB230を検索し、コードパターンDB230から、置換可能GPUライブラリ(高速化できるGPU用ライブラリ)やFPGA用IPコアを取得する。
<Process B-1>
The replacement function detection unit 213 searches the code pattern DB 230 using the library name as a key for the library call detected by the application code analysis unit 112 in <Process A-1>, and obtains a replaceable GPU library (a library for GPUs that can be accelerated) and an IP core for FPGA from the code pattern DB 230.

<処理B-1>の例を記載する。
置換機能検出部213は、例えば、置換元の処理が2D FFTの処理であった場合は、その外部ライブラリ名をキーに、2D FFTを処理するFPGA処理として、OpenCLコードを検出する(ホストプログラム、カーネルプログラム)等)。なお、OpenCLコードは、コードパターンDB230に記憶されている。
An example of <Process B-1> is described below.
For example, if the processing to be replaced is 2D FFT processing, the replacement function detection unit 213 detects OpenCL code as FPGA processing for processing 2D FFT using the external library name as a key (host program, kernel program, etc.). The OpenCL code is stored in the code pattern DB 230.

置換機能検出部213は、例えば、置換元の処理が2D FFTの処理であった場合は、GPUライブラリとして検出されたcuFFTの中の関数呼び出しに置換する。なお、GPUライブラリは、コードパターンDB230に記憶されている。 For example, if the processing to be replaced is a 2D FFT processing, the replacement function detection unit 213 replaces it with a function call in cuFFT detected as a GPU library. The GPU library is stored in the code pattern DB 230.

<処理B-2>
置換機能検出部213は、<処理A-2>でアプリケーションコード分析部112が検出したクラス、構造体等のコードをキーに、コードパターンDB230を検索し、コードパターンDB230から、類似性検出ツールを用いて置換可能GPUライブラリ(高速化できるGPU用ライブラリ)やFPGA用IPコアを取得する。類似性検出ツールとは、Deckard等、コピーコードやコピー後変更したコードの検出を対象とするツールである。置換機能検出部213が、類似性検出ツールを用いることで、行列計算のコード等、CPUで計算する場合は記述が同様になる処理や、他者のコードをコピーして変更した処理等を一部検出できる。なお、類似性検出ツールは、新規に独立に作成したようなクラス等については検出が困難となるため対象外である。
<Process B-2>
The replacement function detection unit 213 searches the code pattern DB 230 using the code of the class, structure, etc. detected by the application code analysis unit 112 in <Process A-2> as a key, and obtains a replaceable GPU library (a library for GPU that can be accelerated) and an IP core for FPGA from the code pattern DB 230 using a similarity detection tool. The similarity detection tool is a tool that detects copied code and code that has been changed after copying, such as Deckard. By using the similarity detection tool, the replacement function detection unit 213 can detect some processes that are written in a similar manner when calculated by a CPU, such as matrix calculation code, and processes that have been copied and changed by copying someone else's code. Note that the similarity detection tool does not target classes that have been newly created independently, as it is difficult to detect them.

<処理B-2>の例を記載する。
置換機能検出部213は、置換元CPUコードに検知されたクラスや構造体に対して、Deckard等の類似性検知ツールを用いて、コードパターンDB230に登録された類似クラスや構造体を検索する。例えば、置換元の処理(非特許文献4等にコードがある)が2D FFTのクラスであった場合は、その類似クラスとしてコードパターンDB230に登録されたクラスが2D FFTのクラスが検出される。コードパターンDB230には、2D FFTをオフロード可能なIPコアやGPUライブラリが登録されている。そのため、<処理B-1>と同様に、2D FFTに対して、OpenCLコード(ホストプログラム、カーネルプログラム等)やGPUライブラリを検出する。
An example of <Process B-2> is described below.
The replacement function detection unit 213 searches for similar classes and structures registered in the code pattern DB 230 for classes and structures detected in the source CPU code using a similarity detection tool such as Deckard. For example, if the source process (whose code is in Non-Patent Document 4, etc.) is a 2D FFT class, the class registered in the code pattern DB 230 as its similar class is the 2D FFT class. The code pattern DB 230 registers IP cores and GPU libraries capable of offloading 2D FFT. Therefore, similar to <Process B-1>, OpenCL code (host program, kernel program, etc.) and GPU libraries are detected for 2D FFT.

[処理C](ホスト側とのインタフェースの整合)
[処理C](ホスト側とのインタフェースの整合)は、<処理C-1>と、<処理C-2>とを有する。<処理C-1>は、<処理B-1>を受け、アプリコードの置換元の処理記述を、置換先のGPUライブラリ、IPコア処理記述に置換するとともに、GPUライブラリ、IPコア呼び出しのためのインタフェース処理を記述する。<処理C-2>は、<処理B-2>を受け、アプリコードの置換元の処理記述を、置換先のGPUライブラリ、IPコア処理記述に置換するとともに、GPUライブラリ、IPコア呼び出しのためのインタフェース処理を記述する。ここで、上記GPUライブラリ、IPコア呼び出しのためのインタフェース処理の記述が、「ホスト側とのインタフェースの整合」に対応する。
[Process C] (Interface matching with the host side)
[Processing C] (matching the interface with the host side) includes <Processing C-1> and <Processing C-2>. <Processing C-1> receives <Processing B-1>, and replaces the processing description of the application code to be replaced with the GPU library and IP core processing description of the replacement destination, and also describes interface processing for calling the GPU library and IP core. <Processing C-2> receives <Processing B-2>, and replaces the processing description of the application code to be replaced with the GPU library and IP core processing description of the replacement destination, and also describes interface processing for calling the GPU library and IP core. Here, the description of the interface processing for calling the GPU library and IP core corresponds to "matching the interface with the host side".

<処理C-1>
置換処理部214は、アプリコードの置換元の処理記述を、置換先のGPUライブラリ、IPコア処理記述に置換する。そして、置換処理部214は、GPUライブラリ、IPコア呼び出しのためのインタフェース処理を記述し(OpenCL API等)、作成したパターンをコンパイルする。
<Process C-1>
The replacement processing unit 214 replaces the source processing description of the application code with the destination GPU library and IP core processing description. The replacement processing unit 214 then writes an interface process for calling the GPU library and IP core (OpenCL API, etc.), and compiles the created pattern.

<処理C-1>について、より詳細に説明する。
置換機能検出部213は、<処理A-1>で検出したライブラリ呼び出しに対して、<処理B-1>で該当するライブラリやIPコアを検索している。このため、置換処理部214は、置換するライブラリやIPコアをGPUやFPGAに実装し、ホスト側(CPU)プログラムと繋ぐインタフェース処理を行う。
<Process C-1> will now be described in more detail.
The replacement function detection unit 213 searches for a corresponding library or IP core in <Process B-1> for the library call detected in <Process A-1>. For this reason, the replacement processing unit 214 implements the library or IP core to be replaced in the GPU or FPGA, and performs interface processing to connect it to the host side (CPU) program.

ここで、GPU用ライブラリの場合は、CUDA等のライブラリを想定しており、C言語コードからCUDAライブラリを利用する手法がライブラリとともに公開されている。そこで、コードパターンDB230に、ライブラリ利用手法も含めて登録しておき、置換処理部214は、コードパターンDB230に登録されたライブラリ利用手法に従って、アプリコードの置換元の処理記述を、置換先のGPUライブラリに置換するとともに、GPUライブラリで利用する関数の呼び出し等の所定記述を行う。 In the case of a GPU library, a library such as CUDA is assumed, and a method for using the CUDA library from C language code is published together with the library. Therefore, the library usage method is also registered in the code pattern DB 230, and the replacement processing unit 214 replaces the source processing description of the application code with the destination GPU library according to the library usage method registered in the code pattern DB 230, and performs predetermined descriptions such as calling functions to be used in the GPU library.

FPGA用IPコアの場合は、HDL(Hardware Description Language)等が想定される。この場合、IPコア関連の情報としてOpenCLコードもコードパターンDB230に保持されている。置換処理部214は、FPGAとのインタフェース処理を、高位合成ツール(例えば、Xilinx Vivado, Intel HLS Compiler等)を介して行うことができる。置換処理部214は、例えば、OpenCLコードから、OpenCLインタフェースを用いたCPUとFPGAの接続を、高位合成ツールを介して行う。同様に、置換処理部214は、FPGAへのIPコア実装を、XilinxやIntel等のFPGAベンダの高位合成ツールを介して行う。In the case of an IP core for FPGA, HDL (Hardware Description Language) and the like are assumed. In this case, OpenCL code is also stored in the code pattern DB 230 as information related to the IP core. The replacement processing unit 214 can perform interface processing with the FPGA via a high-level synthesis tool (e.g., Xilinx Vivado, Intel HLS Compiler, etc.). The replacement processing unit 214 performs connection between the CPU and the FPGA using an OpenCL interface from the OpenCL code via the high-level synthesis tool. Similarly, the replacement processing unit 214 implements the IP core in the FPGA via a high-level synthesis tool of an FPGA vendor such as Xilinx or Intel.

<処理C-2>
置換処理部214は、アプリコードの置換元の処理記述を、置換先のGPUライブラリ、IPコア処理記述に置換する。そして、置換処理部214は、置換元と置換先で引数や戻り値の数や型が異なる場合に、ユーザに確認し、GPUライブラリ、IPコア呼び出しのためのインタフェース処理を記述(OpenCL API等)するとともに、作成したパターンをコンパイルする。すなわち、<処理C-2>では、置換処理部214は、<処理A-2>で検出したクラス、構造体等に対して、<処理B-2>で高速化できるライブラリやIPコアを検索している。このため、置換処理部214は、<処理C-2>では該当するライブラリやIPコアをGPUやFPGAに実装する。
<Process C-2>
The replacement processing unit 214 replaces the processing description of the application code to be replaced with the GPU library and IP core processing description to be replaced. If the number and type of arguments and return values are different between the source and destination, the replacement processing unit 214 checks with the user, describes interface processing for calling the GPU library and IP core (OpenCL API, etc.), and compiles the created pattern. That is, in <Process C-2>, the replacement processing unit 214 searches for libraries and IP cores that can be accelerated in <Process B-2> for the classes, structures, etc. detected in <Process A-2>. Therefore, in <Process C-2>, the replacement processing unit 214 implements the corresponding libraries and IP cores in the GPU or FPGA.

<処理C-2>について、より詳細に説明する。
<処理C-1>では、特定のライブラリ呼び出しに対して高速化するライブラリやIPコアであるため、インタフェース部分の生成等は必要になるものの、GPU、FPGAとホスト側プログラムの想定する引数、戻り値の数や型は合っていた。しかし、<処理B-2>は、類似性等で判断しているため、引数や戻り値の数や型等の基本的な部分が合っている保証はない。ライブラリやIPコアは、既存ノウハウであり、引数、戻り値の数や型が合っていない場合であっても、変更が頻繁にできるものではない。このため、オフロードを依頼するユーザに対して、元のコードの引数や戻り値の数や型について、ライブラリやIPコアに合わせて変更するか否かを確認する。そして、確認了承後にオフロード性能試験を試行する。
<Process C-2> will now be described in more detail.
In <Process C-1>, because it is a library or IP core that speeds up a specific library call, it is necessary to generate an interface, but the number and type of arguments and return values expected by the GPU, FPGA, and the host program match. However, in <Process B-2>, since it is judged based on similarity, there is no guarantee that basic parts such as the number and type of arguments and return values match. Libraries and IP cores are existing know-how, and even if the number and type of arguments and return values do not match, they cannot be changed frequently. For this reason, the user who requests offloading is asked whether the number and type of arguments and return values of the original code will be changed to match the library or IP core. After confirmation and approval, an offload performance test is attempted.

型の違いについて、floatとdouble等キャストすればよいだけであれば、処理パターン作成時にキャストする処理を追加し、特にユーザ確認せずに性能測定試行に入ってもよい。また、引数や戻り値で、元のプログラムとライブラリやIPコアで数が異なる場合、例えば、CPUプログラムで引数1,2が必須で引数3がオプションであり、ライブラリやIPコアで引数1,2が必須の場合等は、オプション引数3は省略しても問題はない。このような場合は、ユーザに確認せず、処理パターン作成時にオプション引数は自動で無しとして扱うなどしてもよい。なお、引数や戻り値の数や型が完全に合っている場合は、<処理C-1>と同様の処理でよい。 Regarding type differences, if casting between float and double etc. is all that is required, a casting process can be added when creating the processing pattern, and performance measurement trials can begin without user confirmation. Also, if the number of arguments or return values differs between the original program and the library or IP core, for example, arguments 1 and 2 are required in the CPU program and argument 3 is optional, and arguments 1 and 2 are required in the library or IP core, there is no problem with omitting optional argument 3. In such cases, optional arguments may be automatically treated as absent when creating the processing pattern, without user confirmation. Note that if the number and types of arguments and return values match exactly, processing similar to <Process C-1> may be used.

[《機能ブロックオフロード》フローチャート]
次に、図7および図8を参照してオフロードサーバ200の《機能ブロックオフロード》の動作概要を説明する。
[Function block offloading flowchart]
Next, an outline of the operation of the offload server 200 for offloading a functional block will be described with reference to FIGS.

・<処理A-1>と<処理B-1>と<処理C-1>のフローチャート
図7は、オフロードサーバ200の制御部(自動オフロード機能部)210が、《機能ブロックオフロード:共通》のオフロード処理において<処理A-1>と<処理B-1>と<処理C-1>とを実行する場合のフローチャートである。
Flowchart of <Processing A-1>, <Processing B-1>, and <Processing C-1> Figure 7 is a flowchart when the control unit (automatic offload function unit) 210 of the offload server 200 executes <Processing A-1>, <Processing B-1>, and <Processing C-1> in the offload processing of <<Function block offload: common>>.

ステップS200で、制御部210(図6参照)は、アプリケーションコードおよび運用条件を受信する。In step S200, the control unit 210 (see Figure 6) receives the application code and operational conditions.

ステップS201でアプリケーションコード分析部112(図6参照)は、アプリケーションプログラムのオフロードしたいソースコードの分析を行う。具体的には、アプリケーションコード分析部112は、Clang等の構文解析ツールを用いて、ループ文構造等とともに、コードに含まれるライブラリ呼び出しや、機能処理を分析するソースコードの分析を行う。In step S201, the application code analysis unit 112 (see FIG. 6) analyzes the source code of the application program to be offloaded. Specifically, the application code analysis unit 112 uses a syntax analysis tool such as Clang to analyze the source code, including the library calls and functional processing contained in the code, along with loop statement structures, etc.

ステップS202で置換機能検出部213(図6参照)は、アプリケーションプログラムの外部ライブラリ呼び出しを検出する。In step S202, the replacement function detection unit 213 (see Figure 6) detects an external library call of the application program.

ステップS203で置換機能検出部213は、コードパターンDB230から、ライブラリ名をキーに、置換可能GPUライブラリ、FPGA IPコアを取得する。具体的には、置換機能検出部213は、把握した外部ライブラリ呼び出しについて、コードパターンDB230と照合することで、検出した置換可能GPUライブラリ・IPコアを、GPU、FPGAにオフロードできるオフロード可能な機能ブロックとして取得する。In step S203, the replacement function detection unit 213 obtains replaceable GPU libraries and FPGA IP cores using the library names as keys from the code pattern DB 230. Specifically, the replacement function detection unit 213 compares the identified external library calls with the code pattern DB 230 to obtain the detected replaceable GPU libraries and IP cores as offloadable functional blocks that can be offloaded to the GPU and FPGA.

ステップS204で置換処理部214は、アプリケーションのソースコードの置換元の処理記述を、置換先のGPUライブラリ、FPGA IPコアの処理記述に置換する。In step S204, the replacement processing unit 214 replaces the source processing description of the application source code with the destination processing description of the GPU library and FPGA IP core.

ステップS205で置換処理部214は、置換したGPUライブラリ、FPGA IPコアの処理記述を、オフロード対象の機能ブロックとして、GPU、FPGAにオフロードする。In step S205, the replacement processing unit 214 offloads the processing descriptions of the replaced GPU library and FPGA IP core to the GPU and FPGA as functional blocks to be offloaded.

ステップS206で置換処理部214は、GPUライブラリ、FPGA IPコア呼び出しのためのインタフェース処理を記述する。
ステップS207で実行ファイル作成部119は、作成したパターンをコンパイルまたはインタプリットする。
In step S206, the replacement processing unit 214 describes interface processing for calling the GPU library and the FPGA IP core.
In step S207, the execution file creation unit 119 compiles or interprets the created pattern.

ステップS208で性能測定部118は、作成したパターンを検証環境で性能測定する(「1回目の性能測定」)。
ステップS209で実行ファイル作成部119は、1回目測定時に高速化できたパターンについて組合せパターンを作成する。
In step S208, the performance measurement unit 118 measures the performance of the created pattern in a verification environment ("first performance measurement").
In step S209, the execution file creation unit 119 creates a combination pattern for the pattern that was able to increase the speed during the first measurement.

ステップS210で実行ファイル作成部119は、作成した組合せパターンをコンパイルまたはインタプリットする。
ステップS211で性能測定部118は、作成した組合せパターンを検証環境で性能測定する(「2回目の性能測定」)。
In step S210, the execution file creation unit 119 compiles or interprets the created combination pattern.
In step S211, the performance measurement unit 118 measures the performance of the created combination pattern in a verification environment ("second performance measurement").

ステップS212で本番環境配置部120は、1回目と2回目の測定の中で最高性能のパターンを選択して本フローの処理を終了する。 In step S212, the production environment deployment unit 120 selects the pattern with the best performance between the first and second measurements and ends the processing of this flow.

・<処理A-2>と<処理B-2>と<処理C-2>のフローチャート
図8は、オフロードサーバ200の制御部(自動オフロード機能部)210が、機能ブロックのオフロード処理において<処理A-2>と<処理B-2>と<処理C-2>とを実行する場合のフローチャートである。なお、<処理A-2>からの処理は、<処理A-1>からの処理と並行して行えばよい。
8 is a flowchart of the case where the control unit (automatic offload function unit) 210 of the offload server 200 executes <processing A-2>, <processing B-2>, and <processing C-2> in the offload processing of the functional block. Note that the processing from <processing A-2> may be performed in parallel with the processing from <processing A-1>.

ステップS300で、制御部210(図6参照)は、アプリケーションコードおよび運用条件を受信する。In step S300, the control unit 210 (see Figure 6) receives the application code and operational conditions.

ステップS301でアプリケーションコード分析部112(図6参照)は、アプリケーションのオフロードしたいソースコードの分析を行う。具体的には、アプリケーションコード分析部112は、Clang等の構文解析ツールを用いて、ループ文構造等とともに、コードに含まれるライブラリ呼び出しや、機能処理を分析するソースコードの分析を行う。In step S301, the application code analysis unit 112 (see FIG. 6) analyzes the source code of the application to be offloaded. Specifically, the application code analysis unit 112 uses a syntax analysis tool such as Clang to analyze the source code, including the library calls and functional processing contained in the code, along with loop statement structures, etc.

ステップS302で置換機能検出部213(図6参照)は、ソースコードからクラスまたは構造体の定義記述コードを検出する。In step S302, the replacement function detection unit 213 (see Figure 6) detects definition description code of a class or structure from the source code.

ステップS303で置換機能検出部213は、コードパターンDB230から、類似性検出ツールを用いて、クラスまたは構造体の定義記述コードをキーにして、置換可能GPUライブラリ、FPGA IPコアを取得する。In step S303, the replacement function detection unit 213 uses a similarity detection tool to obtain replaceable GPU libraries and FPGA IP cores from the code pattern DB 230 using the definition description code of a class or structure as a key.

ステップS304で置換処理部214は、アプリケーションのソースコードの置換元の処理記述を、置換先のGPUライブラリ、FPGA IPコアの処理記述に置換する。In step S304, the replacement processing unit 214 replaces the source processing description of the application source code with the destination processing description of the GPU library and FPGA IP core.

ステップS305で置換処理部214は、置換元と置換先で引数、戻り値の数や型が異なる場合に、ユーザに確認する。 In step S305, the replacement processing unit 214 prompts the user if the number or type of arguments or return values differ between the source and destination.

ステップS306で置換機能検出部213は、置換したGPUライブラリ、FPGA IPコアの処理記述を、オフロード対象の機能ブロックとして、GPU、FPGAにオフロードする。In step S306, the replacement function detection unit 213 offloads the processing descriptions of the replaced GPU library and FPGA IP core to the GPU and FPGA as functional blocks to be offloaded.

ステップS307で置換処理部214は、GPUライブラリ、FPGA IPコア呼び出しのためのインタフェース処理を記述する。 In step S307, the replacement processing unit 214 describes interface processing for calling the GPU library and FPGA IP core.

ステップS308で実行ファイル作成部119は、作成したパターンをコンパイルまたはインタプリットする。
ステップS309で性能測定部118は、作成したパターンを検証環境で性能測定する(「1回目の性能測定」)。
In step S308, the executable file creation unit 119 compiles or interprets the created pattern.
In step S309, the performance measurement unit 118 measures the performance of the created pattern in a verification environment ("first performance measurement").

ステップS310で実行ファイル作成部119は、1回目測定時に高速化できたパターンについて組合せパターンを作成する。In step S310, the executable file creation unit 119 creates a combination pattern for the pattern that was able to be sped up during the first measurement.

ステップS311で実行ファイル作成部119は、作成した組合せパターンをコンパイルまたはインタプリットする。
ステップS312で性能測定部118は、作成した組合せパターンを検証環境で性能測定する(「2回目の性能測定」)。
In step S311, the execution file creation unit 119 compiles or interprets the created combination pattern.
In step S312, the performance measurement unit 118 measures the performance of the created combination pattern in a verification environment ("second performance measurement").

ステップS313で本番環境配置部120は、本番環境配置部120は、1回目と2回目の測定の中で最高性能のパターンを選択して本フローの処理を終了する。 In step S313, the production environment deployment unit 120 selects the pattern with the best performance between the first and second measurements and ends the processing of this flow.

以上、図7および図8に示すGPU、FPGAオフロード試行後に、図5に示すリソース比とリソース量の設定フローチャートが実行される。After the GPU and FPGA offload attempt shown in Figures 7 and 8 is completed, the resource ratio and resource amount setting flowchart shown in Figure 5 is executed.

[ハードウェア構成]
第1および第2の実施形態に係るオフロードサーバは、例えば図9に示すような構成の物理装置であるコンピュータ900によって実現される。
図9は、オフロードサーバ1,200の機能を実現するコンピュータの一例を示すハードウェア構成図である。コンピュータ900は、CPU(Central Processing Unit)901、ROM(Read Only Memory)902、RAM903、HDD(Hard Disk Drive)904、入出力I/F(Interface)905、通信I/F906およびメディアI/F907を有する。
[Hardware configuration]
The offload server according to the first and second embodiments is realized by a computer 900, which is a physical device having a configuration as shown in FIG.
9 is a hardware configuration diagram showing an example of a computer that realizes the functions of the offload servers 1 and 200. The computer 900 includes a CPU (Central Processing Unit) 901, a ROM (Read Only Memory) 902, a RAM 903, a HDD (Hard Disk Drive) 904, an input/output I/F (Interface) 905, a communication I/F 906, and a media I/F 907.

CPU901は、ROM902またはHDD904に記憶されたプログラムに基づき作動し、図1、図6に示すオフロードサーバ1,200の各処理部による制御を行う。ROM902は、コンピュータ900の起動時にCPU901により実行されるブートプログラムや、コンピュータ900のハードウェアに係るプログラム等を記憶する。The CPU 901 operates based on a program stored in the ROM 902 or the HDD 904, and controls each processing unit of the offload server 1, 200 shown in Figures 1 and 6. The ROM 902 stores a boot program executed by the CPU 901 when the computer 900 is started, programs related to the hardware of the computer 900, etc.

CPU901は、入出力I/F905を介して、マウスやキーボード等の入力装置910、および、ディスプレイ等の出力装置911を制御する。CPU901は、入出力I/F905を介して、入力装置910からデータを取得するともに、生成したデータを出力装置911へ出力する。The CPU 901 controls an input device 910 such as a mouse or keyboard, and an output device 911 such as a display, via the input/output I/F 905. The CPU 901 acquires data from the input device 910 via the input/output I/F 905, and outputs generated data to the output device 911.

HDD904は、CPU901により実行されるプログラムおよび当該プログラムによって使用されるデータ等を記憶する。通信I/F906は、通信網(例えば、NW(Network)920)を介して他の装置からデータを受信してCPU901へ出力し、また、CPU901が生成したデータを、通信網を介して他の装置へ送信する。The HDD 904 stores programs executed by the CPU 901 and data used by the programs. The communication I/F 906 receives data from other devices via a communication network (e.g., NW (Network) 920) and outputs the data to the CPU 901, and also transmits data generated by the CPU 901 to other devices via the communication network.

メディアI/F907は、記録媒体912に格納されたプログラムまたはデータを読み取り、RAM903を介してCPU901へ出力する。CPU901は、目的の処理に係るプログラムを、メディアI/F907を介して記録媒体912からRAM903上にロードし、ロードしたプログラムを実行する。記録媒体912は、DVD(Digital Versatile Disc)、PD(Phase change rewritable Disk)等の光学記録媒体、MO(Magneto Optical disk)等の光磁気記録媒体、磁気記録媒体、導体メモリテープ媒体又は半導体メモリ等である。The media I/F 907 reads a program or data stored in the recording medium 912 and outputs it to the CPU 901 via the RAM 903. The CPU 901 loads a program related to the target processing from the recording medium 912 onto the RAM 903 via the media I/F 907, and executes the loaded program. The recording medium 912 is an optical recording medium such as a DVD (Digital Versatile Disc) or a PD (Phase change rewritable Disc), a magneto-optical recording medium such as an MO (Magneto Optical disc), a magnetic recording medium, a conductive memory tape medium, or a semiconductor memory, etc.

例えば、コンピュータ900が第1および第2の実施形態に係るオフロードサーバ1,200として機能する場合、コンピュータ900のCPU901は、RAM903上にロードされたプログラムを実行することによりオフロードサーバ1,200の機能を実現する。また、HDD904には、RAM903内のデータが記憶される。CPU901は、目的の処理に係るプログラムを記録媒体912から読み取って実行する。この他、CPU901は、他の装置から通信網(NW920)を介して目的の処理に係るプログラムを読み込んでもよい。For example, when the computer 900 functions as the offload server 1, 200 according to the first and second embodiments, the CPU 901 of the computer 900 realizes the functions of the offload server 1, 200 by executing a program loaded onto the RAM 903. In addition, the data in the RAM 903 is stored in the HDD 904. The CPU 901 reads and executes a program related to the target processing from the recording medium 912. In addition, the CPU 901 may read a program related to the target processing from another device via a communication network (NW 920).

[効果]
以下、本発明に係るオフロードサーバ等の効果について説明する。
第1の実施形態に係るオフロードサーバ1(図1参照)は、アプリケーションプログラムの特定処理をCPUからオフロードデバイスにオフロードするオフロードサーバであって、アプリケーションプログラムのソースコードを分析するアプリケーションコード分析部112と、アプリケーションプログラムのループ文の中で用いられる変数の参照関係を分析し、ループ外でデータ転送してよいデータについては、ループ外でのデータ転送を明示的に指定する明示的指定行を用いたデータ転送指定を行うデータ転送指定部113と、アプリケーションプログラムのループ文を特定し、特定した各ループ文に対して、オフロードデバイスにおける並列処理指定文を指定してコンパイルする並列処理指定部114と、コンパイルエラーが出る繰り返し文に対して、オフロード対象外とするとともに、コンパイルエラーが出ないループ文に対して、並列処理するかしないかの指定を行う並列処理パターンを作成する並列処理パターン作成部117と、を備える。また、並列処理パターンのアプリケーションプログラムをコンパイルして、検証用マシン14に配置し、オフロードデバイスにオフロードした際の性能測定用処理を実行する性能測定部118と、性能測定結果をもとに、CPUとオフロードデバイスの処理時間の比を、リソース比として決定するリソース比決定部115と、決定したリソース比をもとに、所定のコスト条件を満たすように、CPUおよびオフロードデバイスのリソース量を設定するリソース量設定部116と、を備える。
[effect]
The effects of the offload server and the like according to the present invention will be described below.
The offload server 1 (see FIG. 1 ) according to the first embodiment is an offload server that offloads specific processing of an application program from a CPU to an offload device, and includes an application code analysis unit 112 that analyzes the source code of the application program, a data transfer specification unit 113 that analyzes the reference relationships of variables used in loop statements of the application program, and for data that may be transferred outside the loop, specifies data transfer using an explicit specification line that explicitly specifies data transfer outside the loop, a parallel processing specification unit 114 that identifies loop statements of the application program and compiles each identified loop statement by specifying a parallel processing specification statement in the offload device, and a parallel processing pattern creation unit 117 that creates a parallel processing pattern that excludes repetitive statements that cause compilation errors from being offloaded, and specifies whether or not to perform parallel processing for loop statements that do not cause compilation errors. The system also includes a performance measurement unit 118 that compiles an application program of a parallel processing pattern, places it on the verification machine 14, and executes processing for measuring performance when offloaded to the offload device, a resource ratio determination unit 115 that determines the ratio of processing times between the CPU and the offload device as a resource ratio based on the performance measurement results, and a resource amount setting unit 116 that sets the resource amounts of the CPU and the offload device based on the determined resource ratio so as to satisfy specified cost conditions.

このようにすることにより、ループ文の自動オフロードにおいて、CPUとオフロードデバイスの適切なリソース量を設定することができる。これにより、効率的にサーバのリソース量を設定でき、設備コストを低減できる。 In this way, appropriate resource amounts for the CPU and offload device can be set when automatically offloading loop statements. This allows server resource amounts to be set efficiently, reducing equipment costs.

第2の実施形態に係るオフロードサーバ200(図6参照)は、アプリケーションプログラムの特定処理をCPUからGPUまたはPLDを含むオフロードデバイスにオフロードするオフロードサーバであって、GPUまたはPLDにオフロード可能なライブラリおよびIPコアを記憶するコードパターンDB230(記憶部)と、アプリケーションプログラムのソースコードを分析して、当該ソースコードに含まれる外部ライブラリ呼び出しを検出するアプリケーションコード分析部112と、検出された外部ライブラリ呼び出しをキーにして、コードパターンDB230からライブラリおよびIPコアを取得する置換機能検出部213と、アプリケーションプログラムのソースコードの置換元の処理記述を、置換機能検出部213が取得した置換先のライブラリおよびIPコアの置換先の処理記述として置換するとともに、置換したライブラリおよびIPコアの処理記述を、オフロード対象の機能ブロックとして、GPUまたはPLDにオフロードする置換処理部214と、ホストプログラムとのインタフェースを作成し、検証環境での性能測定を通じて、オフロードするしないを試行することで、より高速となるオフロードパターンを抽出するオフロードパターン作成部215と、作成されたGPUまたはPLD処理パターンの前記アプリケーションをコンパイルして、実行ファイルを作成する実行ファイル作成部119と、作成された実行ファイルをアクセラレータ検証用装置に配置し、GPUまたはPLDにオフロードした際の性能測定用処理を実行する性能測定部118と、性能測定結果をもとに、CPUとオフロードデバイスの処理時間の比を、リソース比として決定するリソース比決定部115と、決定したリソース比をもとに、所定のコスト条件を満たすように、CPUおよびオフロードデバイスのリソース量を設定するリソース量設定部116と、を備える。The offload server 200 (see FIG. 6) according to the second embodiment is an offload server that offloads specific processing of an application program from a CPU to an offload device including a GPU or PLD, and includes a code pattern DB 230 (storage unit) that stores libraries and IP cores that can be offloaded to the GPU or PLD, an application code analysis unit 112 that analyzes the source code of the application program and detects external library calls contained in the source code, a replacement function detection unit 213 that acquires libraries and IP cores from the code pattern DB 230 using the detected external library calls as a key, and a replacement function detection unit 213 that replaces the processing description of the source of replacement in the source code of the application program with the processing description of the destination library and IP core acquired by the replacement function detection unit 213, and detects the processing description of the replaced library and IP core as the offloaded processing description. The target functional blocks include a substitution processing unit 214 that offloads to a GPU or a PLD, an offload pattern creation unit 215 that creates an interface with a host program and extracts an offload pattern that will be faster by trying whether to offload through performance measurement in a verification environment, an executable file creation unit 119 that compiles the application of the created GPU or PLD processing pattern to create an executable file, a performance measurement unit 118 that places the created executable file in an accelerator verification device and executes processing for performance measurement when offloaded to the GPU or the PLD, a resource ratio determination unit 115 that determines the ratio of processing times between the CPU and the offload device as a resource ratio based on the performance measurement results, and a resource amount setting unit 116 that sets the resource amounts of the CPU and the offload device so as to satisfy a specified cost condition based on the determined resource ratio.

このようにすることにより、機能ブロックの自動オフロードにおいて、CPUとオフロードデバイスの適切なリソース量を設定することができる。これにより、効率的にサーバのリソース量を設定でき、設備コストを低減できる。 In this way, appropriate resource amounts for the CPU and offload device can be set for automatic offloading of functional blocks. This allows server resource amounts to be set efficiently, reducing equipment costs.

第1および第2の実施形態に係るオフロードサーバ1,200において、リソース比決定部115は、CPUとオフロードデバイスの処理時間が同等オーダになるように、リソース比を決定することを特徴とする。In the offload server 1,200 according to the first and second embodiments, the resource ratio determination unit 115 is characterized in that it determines the resource ratio so that the processing times of the CPU and the offload device are of the same order.

このようにすることにより、CPUとオフロードデバイスの処理時間を同等オーダに揃えることで、タスク正準化を図ることができ、CPUとアクセラレータがGPU、FPGA、メニーコアCPU等の混在環境であってもリソース量を適切に設定することができる。また、リソース量を適切に設定することで、低速化を防ぎ、アプリケーションをコストパフォーマンス高く動作させることができる。 In this way, tasks can be normalized by aligning the processing times of the CPU and offload device to the same order, and the amount of resources can be set appropriately even in a mixed environment where the CPU and accelerator are GPUs, FPGAs, many-core CPUs, etc. In addition, by setting the amount of resources appropriately, slowdowns can be prevented and applications can be run with high cost performance.

第1および第2の実施形態に係るオフロードサーバ1,200において、リソース比決定部115は、CPUとオフロードデバイスの処理時間の差分が所定閾値以上の場合、リソース比を所定の上限値に設定することを特徴とする。In the offload server 1, 200 according to the first and second embodiments, the resource ratio determination unit 115 is characterized in that, when the difference in processing time between the CPU and the offload device is equal to or greater than a predetermined threshold, the resource ratio is set to a predetermined upper limit value.

このようにすることにより、リソース比に上限を設けることで、VM数の大幅増加を防ぐことができる。 By doing this, we can prevent a significant increase in the number of VMs by setting an upper limit on the resource ratio.

第1および第2の実施形態に係るオフロードサーバ1,200において、リソース量設定部116は、決定したリソース比を維持して、所定のコスト条件を満たす最大のリソース量を設定することを特徴とする。In the offload server 1, 200 according to the first and second embodiments, the resource amount setting unit 116 is characterized in that it maintains the determined resource ratio and sets the maximum resource amount that satisfies the specified cost conditions.

このようにすることにより、ユーザ運用条件を満たした適切なリソース量を設定することができる。 By doing this, it is possible to set an appropriate amount of resources that meets the user's operational requirements.

第1および第2の実施形態に係るオフロードサーバ1,200において、リソース量設定部116は、決定したリソース比を維持した最小リソース量の設定で所定のコスト条件を満たさない場合は、CPUとオフロードデバイスのリソース量を最小から始めてコスト条件を満たす中で設定したリソース比に近づけるようにリソース量を設定することを特徴とする。In the offload server 1, 200 according to the first and second embodiments, the resource amount setting unit 116 is characterized in that, if the specified cost condition is not satisfied by setting the minimum resource amount while maintaining the determined resource ratio, the resource amount setting unit 116 sets the resource amount so as to start from the minimum for the CPU and offload device and approach the set resource ratio while satisfying the cost condition.

このようにすることにより、ユーザ運用条件を満たしつつ、適切なリソース量を設定することができる。 By doing this, it is possible to set an appropriate amount of resources while still satisfying user operational requirements.

本発明は、コンピュータを、上記オフロードサーバとして機能させるためのオフロードプログラムとした。 The present invention is an offload program for causing a computer to function as the above-mentioned offload server.

このようにすることにより、一般的なコンピュータを用いて、上記オフロードサーバ1の各機能を実現させることができる。 By doing this, each function of the offload server 1 can be realized using a general-purpose computer.

また、上記実施形態において説明した各処理のうち、自動的に行われるものとして説明した処理の全部又は一部を手作業で行うこともでき、あるいは、手作業で行われるものとして説明した処理の全部又は一部を公知の方法で自動的に行うこともできる。この他、上述文書中や図面中に示した処理手順、制御手順、具体的名称、各種のデータやパラメータを含む情報については、特記する場合を除いて任意に変更することができる。
また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部又は一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的又は物理的に分散・統合して構成することができる。
Furthermore, among the processes described in the above embodiments, all or part of the processes described as being performed automatically can be performed manually, or all or part of the processes described as being performed manually can be performed automatically by a known method. In addition, the information including the processing procedures, control procedures, specific names, various data and parameters shown in the above documents and drawings can be changed arbitrarily unless otherwise specified.
In addition, each component of each device shown in the figure is a functional concept, and does not necessarily have to be physically configured as shown in the figure. In other words, the specific form of distribution and integration of each device is not limited to that shown in the figure, and all or part of them can be functionally or physically distributed and integrated in any unit depending on various loads, usage conditions, etc.

1,200 オフロードサーバ
11,210 制御部
12 入出力部
13,130 記憶部
14 検証用マシン (アクセラレータ検証用装置)
15 商用環境
111 アプリケーションコード指定部
112 アプリケーションコード分析部
113 データ転送指定部
114 並列処理指定部
114a オフロード範囲抽出部
114b 中間言語ファイル出力部
115 リソース比決定部
116 リソース量設定部
117 並列処理パターン作成部
118 性能測定部
118a バイナリファイル配置部
119 実行ファイル作成部
120 本番環境配置部
121 性能測定テスト抽出実行部
122 ユーザ提供部
125 アプリケーションコード
131 テストケースDB
132 設備リソースDB
133 中間言語ファイル
151 各種デバイス
152 CPU-GPUを有する装置
153 CPU-FPGAを有する装置
154 CPUを有する装置
213 置換機能検出部
214 置換処理部
215 オフロードパターン作成部
230 コードパターンDB
1,200 Offload server 11,210 Control unit 12 Input/output unit 13,130 Memory unit 14 Verification machine (accelerator verification device)
15 Commercial environment 111 Application code specification unit 112 Application code analysis unit 113 Data transfer specification unit 114 Parallel processing specification unit 114a Offload range extraction unit 114b Intermediate language file output unit 115 Resource ratio determination unit 116 Resource amount setting unit 117 Parallel processing pattern creation unit 118 Performance measurement unit 118a Binary file placement unit 119 Executable file creation unit 120 Production environment placement unit 121 Performance measurement test extraction and execution unit 122 User provision unit 125 Application code 131 Test case DB
132 Facility resource DB
133 Intermediate language file 151 Various devices 152 Device having CPU-GPU 153 Device having CPU-FPGA 154 Device having CPU 213 Replacement function detection unit 214 Replacement processing unit 215 Offload pattern creation unit 230 Code pattern DB

Claims (7)

アプリケーションプログラムの特定処理をCPUからオフロードデバイスにオフロードするオフロードサーバであって、
前記アプリケーションプログラムのソースコードを分析するアプリケーションコード分析部と、
前記アプリケーションプログラムのループ文の中で用いられる変数の参照関係を分析し、ループ外でデータ転送してよいデータについては、ループ外でのデータ転送を明示的に指定する明示的指定行を用いたデータ転送指定を行うデータ転送指定部と、
前記アプリケーションプログラムのループ文を特定し、特定した各前記ループ文に対して、前記オフロードデバイスにおける並列処理指定文を指定してコンパイルする並列処理指定部と、
コンパイルエラーが出るループ文に対して、オフロード対象外とするとともに、コンパイルエラーが出ないループ文に対して、並列処理するかしないかの指定を行う並列処理パターンを作成する並列処理パターン作成部と、
前記並列処理パターンの前記アプリケーションプログラムをコンパイルして、アクセラレータ検証用装置に配置し、前記オフロードデバイスにオフロードした際の性能測定用処理を実行する性能測定部と、
性能測定結果をもとに、前記CPUと前記オフロードデバイスの処理時間の比を、リソース比として決定するリソース比決定部と、
決定した前記リソース比をもとに、所定のコスト条件を満たすように、前記CPUおよび前記オフロードデバイスのリソース量を設定するリソース量設定部と、を備え、
前記リソース量設定部は、
決定した前記リソース比を維持した最小リソース量の設定で前記所定のコスト条件を満たさない場合は、前記CPUと前記オフロードデバイスのリソース量を最小から始めてコスト条件を満たす中で設定したリソース比に近づけるようにリソース量を設定する
ことを特徴とするオフロードサーバ。
An offload server that offloads a specific process of an application program from a CPU to an offload device,
an application code analysis unit that analyzes a source code of the application program;
a data transfer specification unit that analyzes reference relationships between variables used in a loop statement of the application program, and specifies data transfer using an explicit specification line that explicitly specifies data transfer outside the loop for data that may be transferred outside the loop;
a parallel processing specification unit that specifies loop statements of the application program, and specifies a parallel processing specification statement in the offload device for each of the specified loop statements to compile the loop statements;
a parallel processing pattern creation unit that creates a parallel processing pattern that excludes a loop statement that generates a compilation error from being subject to offloading and specifies whether or not a loop statement that does not generate a compilation error should be processed in parallel;
a performance measurement unit that compiles the application program of the parallel processing pattern, places it in an accelerator verification device, and executes a process for measuring performance when the application program is offloaded to the offload device;
a resource ratio determination unit that determines a ratio of processing times of the CPU and the offload device as a resource ratio based on a performance measurement result;
a resource amount setting unit that sets resource amounts of the CPU and the offload device based on the determined resource ratio so as to satisfy a predetermined cost condition ;
The resource amount setting unit,
If the predetermined cost condition is not satisfied by setting the minimum resource amount while maintaining the determined resource ratio, the resource amount of the CPU and the offload device is set so as to approach the set resource ratio starting from the minimum while satisfying the cost condition.
13. An offload server comprising:
アプリケーションプログラムの特定処理をCPUからGPU(Graphics Processing Unit)またはPLD(Programmable Logic Device)を含むオフロードデバイスにオフロードするオフロードサーバであって、
前記GPUまたは前記PLDにオフロード可能なライブラリおよびIPコアを記憶する記憶部と、
前記アプリケーションプログラムのソースコードを分析して、当該ソースコードに含まれる外部ライブラリ呼び出しを検出するアプリケーションコード分析部と、
検出された前記外部ライブラリ呼び出しをキーにして、前記記憶部から前記ライブラリおよび前記IPコアを取得する置換機能検出部と、
前記アプリケーションプログラムのソースコードの置換元の処理記述を、前記置換機能検出部が取得した前記ライブラリおよび前記IPコアの置換先の処理記述として置換するとともに、置換した前記ライブラリおよび前記IPコアの処理記述を、オフロード対象の機能ブロックとして、前記GPUまたは前記PLDにオフロードする置換処理部と、
ホストプログラムとのインタフェースを作成し、検証環境での性能測定を通じて、オフロードするしないを試行することで、より高速となるオフロードパターンを抽出するオフロードパターン作成部と、
作成されたGPUまたはPLD処理パターンの前記アプリケーションプログラムをコンパイルして、実行ファイルを作成する実行ファイル作成部と、
作成された前記実行ファイルをアクセラレータ検証用装置に配置し、前記GPUまたは前記PLDにオフロードした際の性能測定用処理を実行する性能測定部と、
性能測定結果をもとに、前記CPUと前記オフロードデバイスの処理時間の比を、リソース比として決定するリソース比決定部と、
決定した前記リソース比をもとに、所定のコスト条件を満たすように、前記CPUおよび前記オフロードデバイスのリソース量を設定するリソース量設定部と、を備え、
前記リソース量設定部は、
決定した前記リソース比を維持した最小リソース量の設定で前記所定のコスト条件を満たさない場合は、前記CPUと前記オフロードデバイスのリソース量を最小から始めてコスト条件を満たす中で設定したリソース比に近づけるようにリソース量を設定する
ことを特徴とするオフロードサーバ。
An offload server that offloads specific processing of an application program from a CPU to an offload device including a GPU (Graphics Processing Unit) or a PLD (Programmable Logic Device),
A storage unit that stores libraries and IP cores that can be offloaded to the GPU or the PLD;
an application code analysis unit that analyzes a source code of the application program and detects an external library call included in the source code;
a replacement function detection unit that acquires the library and the IP core from the storage unit using the detected external library call as a key;
a replacement processing unit that replaces a processing description of a source of replacement in the source code of the application program with a processing description of a replacement destination of the library and the IP core acquired by the replacement function detection unit , and offloads the replaced processing descriptions of the library and the IP core to the GPU or the PLD as functional blocks to be offloaded;
an offload pattern creation unit that creates an interface with a host program, and extracts an offload pattern that will be faster by testing whether or not to offload through performance measurement in a verification environment;
an execution file creation unit that compiles the application program of the created GPU or PLD processing pattern to create an execution file;
a performance measurement unit that places the created executable file in an accelerator verification device and executes a process for measuring performance when the executable file is offloaded to the GPU or the PLD;
a resource ratio determination unit that determines a ratio of processing times of the CPU and the offload device as a resource ratio based on a performance measurement result;
a resource amount setting unit that sets resource amounts of the CPU and the offload device based on the determined resource ratio so as to satisfy a predetermined cost condition ;
The resource amount setting unit,
If the predetermined cost condition is not satisfied by setting the minimum resource amount while maintaining the determined resource ratio, the resource amount of the CPU and the offload device is set so as to approach the set resource ratio starting from the minimum while satisfying the cost condition.
13. An offload server comprising:
前記リソース比決定部は、
前記CPUと前記オフロードデバイスの処理時間が同等オーダになるように、前記リソース比を決定する
ことを特徴とする請求項1または請求項2に記載のオフロードサーバ。
The resource ratio determination unit is
3. The offload server according to claim 1, wherein the resource ratio is determined so that the processing times of the CPU and the offload device are of the same order.
前記リソース比決定部は、
前記CPUと前記オフロードデバイスの処理時間の差分が所定閾値以上の場合、前記リソース比を所定の上限値に設定する
ことを特徴とする請求項1または請求項2に記載のオフロードサーバ。
The resource ratio determination unit is
3. The offload server according to claim 1, wherein when a difference between a processing time of the CPU and the offload device is equal to or greater than a predetermined threshold, the resource ratio is set to a predetermined upper limit value.
前記リソース量設定部は、
決定した前記リソース比を維持して、前記所定のコスト条件を満たす最大のリソース量を設定する
ことを特徴とする請求項1または請求項2に記載のオフロードサーバ。
The resource amount setting unit,
3. The offload server according to claim 1, further comprising: setting a maximum resource amount that satisfies the predetermined cost condition by maintaining the determined resource ratio.
アプリケーションプログラムの特定処理をCPUからオフロードデバイスにオフロードするオフロードサーバのオフロード制御方法であって、
前記オフロードサーバは、
前記アプリケーションプログラムのソースコードを分析するステップと、
前記アプリケーションプログラムのループ文の中で用いられる変数の参照関係を分析し、ループ外でデータ転送してよいデータについては、ループ外でのデータ転送を明示的に指定する明示的指定行を用いたデータ転送指定を行うステップと、
前記アプリケーションプログラムのループ文を特定し、特定した各前記ループ文に対して、前記オフロードデバイスにおける並列処理指定文を指定してコンパイルするステップと、
コンパイルエラーが出るループ文に対して、オフロード対象外とするとともに、コンパイルエラーが出ないループ文に対して、並列処理するかしないかの指定を行う並列処理パターンを作成するステップと、
前記並列処理パターンの前記アプリケーションプログラムをコンパイルして、アクセラレータ検証用装置に配置し、前記オフロードデバイスにオフロードした際の性能測定用処理を実行するステップと、
性能測定結果をもとに、前記CPUと前記オフロードデバイスの処理時間の比を、リソース比として決定するステップと、
決定した前記リソース比をもとに、所定のコスト条件を満たすように、前記CPUおよび前記オフロードデバイスのリソース量を設定するとともに、決定した前記リソース比を維持した最小リソース量の設定で前記所定のコスト条件を満たさない場合は、前記CPUと前記オフロードデバイスのリソース量を最小から始めてコスト条件を満たす中で設定したリソース比に近づけるようにリソース量を設定するステップと、を実行する
ことを特徴とするオフロード制御方法。
An offload control method for an offload server that offloads a specific process of an application program from a CPU to an offload device, comprising:
The offload server includes:
analyzing the source code of the application program;
a step of analyzing reference relationships of variables used in a loop statement of the application program, and for data that may be transferred outside the loop, specifying data transfer using an explicit specification line that explicitly specifies data transfer outside the loop;
identifying loop statements of the application program, and for each of the identified loop statements, specifying a parallel processing specification statement for the offload device and compiling the loop statements;
creating a parallel processing pattern for specifying that a loop statement that generates a compilation error is not to be offloaded and that a loop statement that does not generate a compilation error is to be processed in parallel or not;
A step of compiling the application program of the parallel processing pattern, disposing the application program in an accelerator verification device, and executing a process for measuring performance when the application program is offloaded to the offload device;
determining a ratio of processing times of the CPU and the offload device as a resource ratio based on a performance measurement result;
setting the resource amounts of the CPU and the offload device so as to satisfy a specified cost condition based on the determined resource ratio, and if the specified cost condition is not satisfied by setting a minimum resource amount that maintains the determined resource ratio, setting the resource amounts of the CPU and the offload device so as to approach the set resource ratio starting from a minimum while satisfying the cost condition .
コンピュータを、請求項1乃至のいずれか1項に記載のオフロードサーバとして機能させるためのオフロードプログラム。 An offload program for causing a computer to function as the offload server according to any one of claims 1 to 5 .
JP2022561797A 2020-11-12 2020-11-12 OFFLOAD SERVER, OFFLOAD CONTROL METHOD, AND OFFLOAD PROGRAM Active JP7544142B2 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2020/042342 WO2022102071A1 (en) 2020-11-12 2020-11-12 Offload server, offload control method, and offload program

Publications (2)

Publication Number Publication Date
JPWO2022102071A1 JPWO2022102071A1 (en) 2022-05-19
JP7544142B2 true JP7544142B2 (en) 2024-09-03

Family

ID=81601834

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022561797A Active JP7544142B2 (en) 2020-11-12 2020-11-12 OFFLOAD SERVER, OFFLOAD CONTROL METHOD, AND OFFLOAD PROGRAM

Country Status (2)

Country Link
JP (1) JP7544142B2 (en)
WO (1) WO2022102071A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120380455A (en) * 2023-01-06 2025-07-25 日本电信电话株式会社 Unloading server, unloading control method, and unloading program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019049905A (en) 2017-09-11 2019-03-28 日本電信電話株式会社 Device linkage server and device linkage program
JP2020137017A (en) 2019-02-22 2020-08-31 日本電信電話株式会社 Optimum arrangement method for software of off-road server, and program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019049905A (en) 2017-09-11 2019-03-28 日本電信電話株式会社 Device linkage server and device linkage program
JP2020137017A (en) 2019-02-22 2020-08-31 日本電信電話株式会社 Optimum arrangement method for software of off-road server, and program

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
山登庸次,アプリケーション機能ブロックのGPU, FPGA自動オフロード手法の評価,電子情報通信学会技術研究報告,日本,一般社団法人電子情報通信学会,2020年03月09日,Vol.119, No.482,pp.59-66(SC2019-44),ISSN 2432-6380
山登庸次,環境適応ソフトウェアの研究,BUSINESS COMMUNICATION,日本,株式会社ビジネスコミュニケーション社,2019年12月01日,Vol.56, No.12,pp.46-47,ISSN 0385-695X

Also Published As

Publication number Publication date
WO2022102071A1 (en) 2022-05-19
JPWO2022102071A1 (en) 2022-05-19

Similar Documents

Publication Publication Date Title
US11614927B2 (en) Off-load servers software optimal placement method and program
Pérez et al. Simplifying programming and load balancing of data parallel applications on heterogeneous systems
WO2015150342A1 (en) Program execution on heterogeneous platform
JP7632712B2 (en) OFFLOAD SERVER AND OFFLOAD CONTROL METHOD
CN112106023A (en) Offload server and offload program
JP7322978B2 (en) Offload server, offload control method and offload program
US12056475B2 (en) Offload server, offload control method, and offload program
JP7544142B2 (en) OFFLOAD SERVER, OFFLOAD CONTROL METHOD, AND OFFLOAD PROGRAM
US11947975B2 (en) Offload server, offload control method, and offload program
JP7521597B2 (en) OFFLOAD SERVER, OFFLOAD CONTROL METHOD, AND OFFLOAD PROGRAM
US12033235B2 (en) Offload server, offload control method, and offload program
JP7716632B2 (en) Offload server, offload control method, and offload program
JP7662037B2 (en) OFFLOAD SERVER, OFFLOAD CONTROL METHOD, AND OFFLOAD PROGRAM
JP7806893B2 (en) Offload server, offload control method, and offload program
JP7184180B2 (en) offload server and offload program
US20240192934A1 (en) Framework for development and deployment of portable software over heterogenous compute systems
WO2024147197A1 (en) Offload server, offload control method, and offload program
WO2024079886A1 (en) Offload server, offload control method, and offload program
WO2026094234A1 (en) Offload server and offload control method
Khalid et al. A Queueing Model of Hybrid Parallel Pipelines PDPTA’15

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230302

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20240521

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240705

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20240723

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240805

R150 Certificate of patent or registration of utility model

Ref document number: 7544142

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350