JP2018120307A - Accelerator processing management apparatus, host apparatus, accelerator processing execution system, method and program - Google Patents
Accelerator processing management apparatus, host apparatus, accelerator processing execution system, method and program Download PDFInfo
- Publication number
- JP2018120307A JP2018120307A JP2017009729A JP2017009729A JP2018120307A JP 2018120307 A JP2018120307 A JP 2018120307A JP 2017009729 A JP2017009729 A JP 2017009729A JP 2017009729 A JP2017009729 A JP 2017009729A JP 2018120307 A JP2018120307 A JP 2018120307A
- Authority
- JP
- Japan
- Prior art keywords
- accelerator
- data string
- dedicated memory
- memory area
- usage status
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims description 103
- 230000004044 response Effects 0.000 claims abstract description 129
- 230000008569 process Effects 0.000 claims description 88
- 230000006870 function Effects 0.000 description 21
- 238000005516 engineering process Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 238000004590 computer program Methods 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Landscapes
- Advance Control (AREA)
- Multi Processors (AREA)
Abstract
Description
本発明は、マルチコアプロセッサおよび複数のアクセラレータを含むシステムに関する。 The present invention relates to a system including a multi-core processor and a plurality of accelerators.
マルチコアプロセッサおよび複数のアクセラレータを含むシステムが知られている。マルチコアプロセッサは、複数のプロセッサコアを有する。以下、プロセッサコアを、単にコアとも称する。マルチコアプロセッサは、複数のコアにおいて異なるタスクを並行して動作させることが可能である。なお、マルチコアプロセッサで動作するプロセスやスレッドをまとめてタスクと称する。マルチコアプロセッサに複数のアクセラレータを接続した場合、複数のタスクが複数のアクセラレータを共有することにより、負荷分散が可能となる。 Systems that include multi-core processors and multiple accelerators are known. The multi-core processor has a plurality of processor cores. Hereinafter, the processor core is also simply referred to as a core. The multi-core processor can operate different tasks in parallel in a plurality of cores. Note that processes and threads operating on a multi-core processor are collectively referred to as tasks. When a plurality of accelerators are connected to a multi-core processor, a plurality of tasks share a plurality of accelerators, thereby enabling load distribution.
そのようなアクセラレータの一例としては、無線などのアナログ信号処理やベースバンド信号などのディジタル信号処理がIC(Integrated Circuit)化されてセットになったモジュールがある。このようなモジュールは、CPU(Central Processing Unit)の外部バスや内部バスに接続され、ハードウェアアクセラレータとして動作する。 As an example of such an accelerator, there is a module in which analog signal processing such as radio and digital signal processing such as baseband signals are integrated into an IC (Integrated Circuit). Such a module is connected to an external bus or internal bus of a CPU (Central Processing Unit) and operates as a hardware accelerator.
このように、複数のアクセラレータがマルチコアプロセッサにバスを介して接続されるシステムでは、複数のコアにおいて並列に実行され得るタスクは、処理単位ごとにアクセラレータを呼び出し、データ転送を行う必要がある。データ転送の際には、メモリ等の主記憶装置(以下、メモリ領域とも称する)が、一時的な出力領域として使用される。このとき、データ転送を行うために使用されるメモリ領域等のリソースは、各タスクによって共有されるのが一般的である。そのため、共有のリソースに対して、排他制御が必要になる。 As described above, in a system in which a plurality of accelerators are connected to a multi-core processor via a bus, tasks that can be executed in parallel in the plurality of cores need to call the accelerator for each processing unit and perform data transfer. During data transfer, a main storage device such as a memory (hereinafter also referred to as a memory area) is used as a temporary output area. At this time, resources such as a memory area used for data transfer are generally shared by each task. Therefore, exclusive control is required for shared resources.
このようなシステムにおいて共有のリソースに対する排他制御を実装した場合、特定のタスクがリソースを占有している間、他のタスクが当該リソースにアクセスできないため、全体として処理性能が低下する場合がある。また、排他制御処理に関連して発生する処理のオーバーヘッドも、処理能力が低下する要因となる。 When exclusive control for a shared resource is implemented in such a system, while a specific task occupies the resource, other tasks cannot access the resource, and thus the processing performance as a whole may deteriorate. In addition, processing overhead that occurs in connection with the exclusive control processing also causes a reduction in processing capability.
このようなマルチコアプロセッサによるリソースアクセスに関連する技術の一例が、特許文献1〜2に開示されている。
Examples of techniques related to resource access by such a multi-core processor are disclosed in
特許文献1に記載された関連技術は、コア毎に専用メモリ領域を用意し、専用メモリ領域の空き状況によりタスクを動的にコアに割り当てる。これにより、この関連技術は、複数のタスクによって並行して行われるリソースアクセスを効率化する。
In the related technology described in
また、特許文献2に記載された関連技術は、それぞれ別々のコアで動作するスレッドが共用リソースに対するアクセス競合を発生させる競合周期を算出する。そして、この関連技術は、算出された競合周期にて割り当てられるスレッドのうち、いずれか一方のスレッドが割り当てられる時刻と、当該スレッドが割り当てられるコアにおける競合周期前後のいずれかの時刻に割り当てられるスレッドの時刻とを入れ替える。これにより、この関連技術は、リソースに対するアクセス競合を回避し、排他処理のオーバーヘッドを最小限にする。
Further, the related technology described in
さらに、複数のアクセラレータがマルチコアプロセッサにバスを介して接続されるシステムでは、アクセラレータに対する排他制御および振り分け処理が必要である。これは、各アクセラレータが、ある要求に対する処理の実行中には、他の要求を受け付けることができないからである。そして、並行して実行され得る各タスクからアクセラレータに要求される処理を、そのような複数のアクセラレータのいずれに振り分けるかという振り分け処理が必要となる。 Furthermore, in a system in which a plurality of accelerators are connected to a multi-core processor via a bus, exclusive control and distribution processing for the accelerators are necessary. This is because each accelerator cannot accept another request while executing a process for a certain request. Then, a distribution process is required in which a process required for the accelerator from each task that can be executed in parallel is distributed to such a plurality of accelerators.
アクセラレータに処理を実行させる方法に関連する技術が、特許文献3〜4に開示されている。 Technologies related to a method for causing an accelerator to execute processing are disclosed in Patent Documents 3 to 4.
特許文献3に記載された関連技術は、汎用プロセッサ及びアクセラレータを持つシステムにおいて、同期フラグ領域を設ける。そして、アクセラレータは、汎用プロセッサによる処理の完了を示すフラグが同期フラグ領域に書き込まれると、汎用プロセッサが他の処理を実行中であっても、フラグに対応するアクセラレーション処理を開始する。また、汎用プロセッサは、アクセラレーション処理の完了を示すフラグが同期フラグ領域に書き込まれると、アクセラレータが他の処理を実行中であっても、フラグに対応する処理を開始する。このように、この関連技術は、汎用プロセッサおよびアクセラレータによって互いに同期フラグの設定およびチェックを行うことにより、同期制御を効率的に行う。また、この関連技術は、並列化コンパイラによってソースコードを解析し、プロセッサおよびアクセラレータが並列に動作可能な区間を決定する。そして、この関連技術は、並列に動作可能な区間に関して、同期フラグを用いたプログラムをプロセッサ用およびアクセラレータ用に別々に生成する。もしくは、プログラマによって、上記のようなソースコードの解析およびプログラムの生成が行われる。 The related technique described in Patent Document 3 provides a synchronization flag area in a system having a general-purpose processor and an accelerator. Then, when the flag indicating the completion of the process by the general-purpose processor is written in the synchronization flag area, the accelerator starts the acceleration process corresponding to the flag even if the general-purpose processor is executing another process. In addition, when the flag indicating the completion of the acceleration process is written in the synchronization flag area, the general-purpose processor starts the process corresponding to the flag even if the accelerator is executing another process. As described above, this related technology efficiently performs synchronization control by setting and checking the synchronization flag with each other by the general-purpose processor and the accelerator. In this related technique, a source code is analyzed by a parallelizing compiler, and a section in which the processor and the accelerator can operate in parallel is determined. And this related technique produces | generates the program using a synchronous flag separately for a processor and an accelerator regarding the area which can operate | move in parallel. Alternatively, the programmer analyzes the source code and generates the program as described above.
また、特許文献4に記載された関連技術は、GPU(Graphics Processing Unit)等のアクセラレータで実行されるプログラムデータとプログラム実行順序を示すシナリオデータとを統合したプログラムデータを記憶領域に保存し、アクセラレータに入力する。これにより、この関連技術は、CPUとアクセラレータ間で実施されるデータのやりとりを削減し、効率的な処理を実現する。 Further, the related technology described in Patent Document 4 stores in a storage area program data obtained by integrating program data executed by an accelerator such as a GPU (Graphics Processing Unit) and scenario data indicating the program execution order. To enter. As a result, this related technique reduces the exchange of data performed between the CPU and the accelerator, and realizes efficient processing.
しかしながら、特許文献1〜4に記載された関連技術を、マルチコアプロセッサおよび複数のアクセラレータを含むシステムに適用するには、以下の課題がある。
However, applying the related techniques described in
特許文献1に記載された関連技術は、専用メモリ領域のデータを特定のファイルシステムやデータベースに出力する。もし、出力先となるファイルシステムやデータベースが複数ある場合、最終的な出力先の振り分けは、アプリケーション側で実施する必要がある。したがって、この関連技術における出力先として複数のアクセラレータを適用した場合、各タスクから呼び出されるアクセラレータ処理にいずれのアクセラレータを振り分けるかを、アプリケーション側でプログラミングする必要がある。その結果、アプリケーションプログラムが複雑になるという課題がある。
The related technology described in
また、特許文献2に記載された関連技術は、結局のところ、複数のコアで1つのリソースを共有している。そのため、リソースに対するアクセス競合を回避するための複雑な計算が必要となり、実装容易性に課題がある。また、複数の出力先がある場合、最終的な出力先の振り分けをアプリケーション側で実施する必要があるという点で、特許文献1と同様の課題がある。
Moreover, the related art described in
また、特許文献3に記載された関連技術では、汎用プロセッサ用のプログラムとアクセラレータ用のプログラムとが密に連携する必要がある。例えば、これらのプログラムは、共通のアルゴリズムでプログラミングされる必要がある。または、これらのプログラムは、共通のコンパイラで生成される必要がある。例えば、サードパーティ製品のアクセラレータ上で動作するプログラムがサードパーティ側で実装され、API(Application Programming Interface)のみが提供される場合がある。この場合、そのような複数のアクセラレータおよびマルチコアプロセッサを含むシステムにおいて、この関連技術を適用することは難しい。 In the related technique described in Patent Document 3, it is necessary that the general-purpose processor program and the accelerator program are closely linked. For example, these programs need to be programmed with a common algorithm. Alternatively, these programs need to be generated by a common compiler. For example, a program that operates on an accelerator of a third-party product may be implemented on the third-party side, and only an API (Application Programming Interface) may be provided. In this case, it is difficult to apply this related technique in a system including a plurality of accelerators and multi-core processors.
また、特許文献4に記載された関連技術は、CPUおよびアクセラレータ間で実施されるデータのやりとりを削減するものの、マルチコアやマルチタスクでの実施についてはなんら考慮していない。 Further, although the related technique described in Patent Document 4 reduces the data exchange performed between the CPU and the accelerator, no consideration is given to the implementation in multicore or multitasking.
このように、これらの関連技術は、複数のタスクによって並行してアクセラレータ処理を呼び出し可能にするためには、共有のリソースや複数のアクセラレータに対する排他制御や振り分け処理を、アプリケーション側で考慮しなければならない、という課題がある。 As described above, in order to enable the accelerator processing to be invoked in parallel by a plurality of tasks, these related technologies must consider exclusive control and distribution processing for shared resources and a plurality of accelerators on the application side. There is a problem of not becoming.
本発明は、上述の課題を解決するためになされたものである。すなわち、本発明は、共有のリソースや複数のアクセラレータに対する排他制御や振り分け処理をアプリケーション側で考慮せずに、複数のコアで実行される複数のタスクにより並行してアクセラレータ処理を呼び出し可能にする技術を提供することを目的とする。 The present invention has been made to solve the above-described problems. In other words, the present invention is a technique that enables accelerator processing to be called in parallel by a plurality of tasks executed by a plurality of cores without considering exclusive control and distribution processing for shared resources and a plurality of accelerators on the application side. The purpose is to provide.
本発明のアクセラレータ処理管理装置は、複数のプロセッサコアを含むマルチコアプロセッサに接続された複数のアクセラレータのそれぞれについて、前記複数のプロセッサコアによって並列に実行され得るタスクによる使用状況を表す使用状況情報を記憶するアクセラレータ使用状況記憶手段と、前記タスクからの前記アクセラレータの呼び出し処理に応じて、前記呼び出し処理を表す呼び出しデータ列を生成し、生成した呼び出しデータ列を、複数の専用メモリ領域のうち当該タスク用の専用メモリ領域に格納する呼び出しデータ列生成手段と、前記専用メモリ領域に前記呼び出しデータ列が格納されている場合、前記アクセラレータ使用状況記憶手段を参照することにより使用中でないアクセラレータの1つを選択し、選択したアクセラレータに対して、前記専用メモリ領域に格納された前記呼び出しデータ列を転送するとともに、前記アクセラレータ使用状況記憶手段における当該アクセラレータの前記使用状況情報を、使用中であることを表すよう更新するアクセラレータ選択転送手段と、前記アクセラレータから前記呼び出しデータ列の応答として受信された応答データ列を、前記呼び出し処理の呼び出し元のタスク用の前記専用メモリ領域に格納するとともに、前記アクセラレータ使用状況記憶手段における当該アクセラレータの前記使用状況情報を、使用中でないことを表すよう更新する応答データ列受信手段と、前記専用メモリ領域に格納された前記応答データ列に基づいて、前記呼び出し元の前記タスクに対して呼び出し処理結果を出力する処理結果出力手段と、を備える。 The accelerator processing management apparatus according to the present invention stores usage status information representing usage status by tasks that can be executed in parallel by the plurality of processor cores for each of the plurality of accelerators connected to a multi-core processor including a plurality of processor cores. Accelerator usage status storage means for generating a call data string representing the call process according to the accelerator call process from the task, and generating the call data string for the task among a plurality of dedicated memory areas Call data string generating means for storing in the dedicated memory area, and when the call data string is stored in the dedicated memory area, one of the accelerators not in use is selected by referring to the accelerator usage status storage means Select the access Accelerator selection for transferring the call data string stored in the dedicated memory area to the accelerator and updating the usage status information of the accelerator in the accelerator usage status storage means to indicate that it is in use A transfer means, and a response data string received as a response to the call data string from the accelerator, is stored in the dedicated memory area for the call source task of the call processing, and the accelerator in the accelerator usage status storage means A response data string receiving means for updating the usage status information to indicate that it is not in use, and a call process for the task of the caller based on the response data string stored in the dedicated memory area Processing result output means for outputting results , Comprising a.
また、本発明のホスト装置は、上述のアクセラレータ処理管理装置と、前記複数の専用メモリ領域を含むメモリ領域と、前記複数のプロセッサコアを含むマルチコアプロセッサと、を備える。 A host device according to the present invention includes the accelerator processing management device described above, a memory region including the plurality of dedicated memory regions, and a multi-core processor including the plurality of processor cores.
また、本発明のアクセラレータ処理実行システムは、上述のホスト装置と、前記複数のアクセラレータと、を備える。 An accelerator processing execution system according to the present invention includes the above-described host device and the plurality of accelerators.
また、本発明の方法は、コンピュータ装置が、複数のプロセッサコアを含むマルチコアプロセッサに接続された複数のアクセラレータのそれぞれについて、前記複数のプロセッサコアによって並列に実行され得るタスクによる使用状況を表す使用状況情報を記憶するアクセラレータ使用状況記憶手段を用いて、前記タスクからの前記アクセラレータの呼び出し処理に応じて、前記呼び出し処理を表す呼び出しデータ列を生成し、生成した呼び出しデータ列を、複数の専用メモリ領域のうち当該タスク用の専用メモリ領域に格納し、前記専用メモリ領域に前記呼び出しデータ列が格納されている場合、前記アクセラレータ使用状況記憶手段を参照することにより使用中でないアクセラレータの1つを選択し、選択したアクセラレータに対して、前記専用メモリ領域に格納された前記呼び出しデータ列を転送するとともに、前記アクセラレータ使用状況記憶手段における当該アクセラレータの前記使用状況情報を、使用中であることを表すよう更新し、前記アクセラレータから前記呼び出しデータ列の応答として受信された応答データ列を、前記呼び出し処理の呼び出し元のタスク用の前記専用メモリ領域に格納するとともに、前記アクセラレータ使用状況記憶手段における当該アクセラレータの前記使用状況情報を、使用中でないことを表すよう更新し、前記専用メモリ領域に格納された前記応答データ列に基づいて、前記呼び出し元の前記タスクに対して呼び出し処理結果を出力する。 Further, the method of the present invention is a usage status that represents a usage status of a plurality of accelerators connected to a multi-core processor including a plurality of processor cores by a task that can be executed in parallel by the plurality of processor cores. Using an accelerator usage status storage means for storing information, a call data string representing the call process is generated according to the accelerator call process from the task, and the generated call data string is stored in a plurality of dedicated memory areas. Is stored in the dedicated memory area for the task, and when the call data string is stored in the dedicated memory area, one of the accelerators that are not in use is selected by referring to the accelerator usage status storage means. For the selected accelerator, The call data string stored in the dedicated memory area is transferred, and the use status information of the accelerator in the accelerator use status storage means is updated to indicate that the accelerator is being used, and the call data is sent from the accelerator. The response data string received as a column response is stored in the dedicated memory area for the caller task of the call process, and the use status information of the accelerator in the accelerator use status storage means is not in use The call processing result is output to the caller task based on the response data string stored in the dedicated memory area.
また、本発明のプログラムは、複数のプロセッサコアを含むマルチコアプロセッサに接続された複数のアクセラレータのそれぞれについて、前記複数のプロセッサコアによって並列に実行され得るタスクによる使用状況を表す使用状況情報を記憶するアクセラレータ使用状況記憶手段を用いて、前記タスクからの前記アクセラレータの呼び出し処理に応じて、前記呼び出し処理を表す呼び出しデータ列を生成し、生成した呼び出しデータ列を、複数の専用メモリ領域のうち当該タスク用の専用メモリ領域に格納する呼び出しデータ列生成ステップと、前記専用メモリ領域に前記呼び出しデータ列が格納されている場合、前記アクセラレータ使用状況記憶手段を参照することにより使用中でないアクセラレータの1つを選択し、選択したアクセラレータに対して、前記専用メモリ領域に格納された前記呼び出しデータ列を転送するとともに、前記アクセラレータ使用状況記憶手段における当該アクセラレータの前記使用状況情報を、使用中であることを表すよう更新するアクセラレータ選択転送ステップと、前記アクセラレータから前記呼び出しデータ列の応答として受信された応答データ列を、前記呼び出し処理の呼び出し元の前記タスク用の前記専用メモリ領域に格納するとともに、前記アクセラレータ使用状況記憶手段における当該アクセラレータの前記使用状況情報を、使用中でないことを表すよう更新する応答データ列受信ステップと、前記専用メモリ領域に格納された前記応答データ列に基づいて、前記呼び出し元の前記タスクに対して呼び出し処理結果を出力する処理結果出力ステップと、をコンピュータ装置に実行させる。 The program of the present invention stores usage status information representing usage status by tasks that can be executed in parallel by the plurality of processor cores for each of a plurality of accelerators connected to a multi-core processor including a plurality of processor cores. Using an accelerator usage status storage unit, a call data string representing the call process is generated according to the accelerator call process from the task, and the generated call data string is stored in the task in a plurality of dedicated memory areas. A call data string generating step for storing in a dedicated memory area for the memory, and when the call data string is stored in the dedicated memory area, one of the accelerators not in use is referred to by referring to the accelerator usage status storage means Select the selected access Accelerator selection for transferring the call data string stored in the dedicated memory area to the accelerator and updating the usage status information of the accelerator in the accelerator usage status storage means to indicate that it is in use A transfer step, and a response data sequence received as a response to the call data sequence from the accelerator is stored in the dedicated memory area for the task that is the call source of the call processing, and the accelerator usage status storage means A response data string receiving step for updating the use status information of the accelerator to indicate that it is not in use, and a call to the task of the caller based on the response data string stored in the dedicated memory area Processing to output the processing result Executing a result output step, to the computer device.
本発明は、共有のリソースや複数のアクセラレータに対する排他制御や振り分け処理をアプリケーション側で考慮せずに、複数のコアで実行される複数のタスクにより並行してアクセラレータ処理を呼び出し可能にする技術を提供することができる。 The present invention provides a technology that enables accelerator processing to be called in parallel by a plurality of tasks executed on a plurality of cores without considering exclusive control and distribution processing on a shared resource or a plurality of accelerators on the application side. can do.
以下、本発明の実施の形態について、図面を参照して詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
(第1の実施の形態)
まず、本発明の第1の実施の形態としてのアクセラレータ処理実行システム1の構成を図1に示す。図1において、アクセラレータ処理実行システム1は、ホスト装置10と、複数のアクセラレータ20とを備える。ホスト装置10は、マルチコアプロセッサ110と、メモリ領域120と、アクセラレータ処理管理装置130とを含む。
(First embodiment)
First, FIG. 1 shows the configuration of an accelerator
マルチコアプロセッサ110は、複数のプロセッサコア111を含む。以降、プロセッサコア111を、単にコア111とも記載する。メモリ領域120は、複数の専用メモリ領域121を含む。アクセラレータ処理管理装置130は、アクセラレータ使用状況記憶部131と、呼び出しデータ列生成部132と、アクセラレータ選択転送部133と、応答データ列受信部134と、処理結果出力部135とを有する。
The
なお、図1には、3つのコア111と、4つの専用メモリ領域121と、3つのアクセラレータ20とが示されているが、これらの数は、限定されない。
Although FIG. 1 shows three
ここで、アクセラレータ処理実行システム1は、図2に示すようなハードウェア要素によって構成可能である。図2において、ホスト装置10は、マルチコアプロセッサ110と、API(Application Programming Interface)メモリ1002と、メモリコントローラ1003と、コード格納用メモリ1004と、デバイス接続インタフェース1005とを含む。前述のように、マルチコアプロセッサ110は、複数のコア111を含む。APIメモリ1002は、アクセラレータ処理管理装置130によって利用されるデータを記憶する。また、APIメモリ1002は、マルチコアプロセッサ110からメモリコントローラ1003を介してアクセス可能である。メモリコントローラ1003は、APIメモリ1002への入出力やデータの配置を制御する。コード格納用メモリ1004は、アクセラレータ処理管理装置130を動作させるプログラムのコード等を格納する。デバイス接続インタフェース1005は、アクセラレータ20を構成する後述のデバイス接続インタフェース2005に接続する。
Here, the accelerator
この場合、メモリ領域120は、APIメモリ1002によって構成される。また、アクセラレータ処理管理装置130のアクセラレータ使用状況記憶部131は、APIメモリ1002によって構成される。また、アクセラレータ処理管理装置130のその他の各機能ブロックは、コード格納用メモリ1004に格納されるプログラムのコードを読み込んで各ハードウェア要素を制御するマルチコアプロセッサ110によって構成される。
In this case, the
また、アクセラレータ20は、プロセッサ2001と、APIメモリ2002と、メモリコントローラ2003と、コード格納用メモリ2004と、デバイス接続インタフェース2005と、IP(Intellectual property)コアブロック2006とを含む。APIメモリ2002は、ホスト装置10から呼び出される処理をプロセッサ2001が実行する際に利用されるデータを記憶する。APIメモリ2002は、プロセッサ2001からメモリコントローラ2003を介してアクセス可能である。メモリコントローラ2003は、APIメモリ2002への入出力やデータの配置を制御する。コード格納用メモリ2004は、アクセラレータ20のファームウェア等のコードを格納する。デバイス接続インタフェース2005は、ホスト装置10のデバイス接続インタフェース1005に接続する。IPコアブロック2006は、アクセラレータ20特有の機能を実現する処理を実行する。アクセラレータ20は、プロセッサ2001によってコード格納用メモリ2004に記憶されたファームウェアを読み込んで実行し各部を制御する。
The
なお、アクセラレータ処理実行システム1およびその各機能ブロックのハードウェア構成は、上述の構成に限定されない。
Note that the hardware configuration of the accelerator
次に、各機能ブロックについて説明する。 Next, each functional block will be described.
各コア111は、他のコア111と並行してタスクを実行可能である。つまり、各コア111で実行されるタスクは、並列に実行され得る。以降、並列して実行され得る複数のタスクを、単に、複数のタスクとも記載する。また、あるタスクに対して、同時に実行され得る他のタスクを、単に、他のタスクとも記載する。各タスクは、アクセラレータ20に実行させるアクセラレータ処理を任意のタイミングで呼び出す。
Each
複数の専用メモリ領域121は、メモリ領域120上に確保される。1つの専用メモリ領域121は、複数のタスクのいずれかによって専有して利用される。以降、あるタスクによって専有して利用される専用メモリ領域121を、そのタスク用の専用メモリ領域121、とも記載する。また、あるタスク用の専用メモリ領域121は、他のタスク用とならないよう定められる。
A plurality of
例えば、複数のタスクのそれぞれに、異なる専用メモリ領域121が関連付けられていてもよい。この場合、各タスクに割り当てられるコア111が動的に切り替わる場合にも、各タスクは、他のタスクとメモリ領域120上の領域を共有することがない。なお、この場合は、複数のタスクの個数分の専用メモリ領域121が、メモリ領域120上に確保される。
For example, a different
あるいは、複数のタスクにいずれかのコア111が静的に割り当てられることを想定する。この場合、複数のコア111のそれぞれに、異なる専用メモリ領域121が関連付けられていてもよい。これにより、この場合も、各タスクは、自身に静的に割り当てられたコア111に関連付けられた専用メモリ領域121を利用するので、他のタスクとメモリ領域120上の領域を共有することがない。なお、この場合は、複数のコア111の個数分の専用メモリ領域121が、メモリ領域120上に確保される。
Alternatively, it is assumed that any
次に、アクセラレータ処理管理装置130の各機能ブロックの詳細について説明する。
Next, details of each functional block of the accelerator
アクセラレータ使用状況記憶部131は、複数のアクセラレータ20のそれぞれについて、タスクによる使用状況を表す使用状況情報を記憶する。使用状況情報は、各アクセラレータ20が使用中であるか否か、すなわち、処理を実行中であるか否かを表す。
The accelerator usage
呼び出しデータ列生成部132は、タスクからのアクセラレータ20の呼び出し処理に応じて、呼び出し処理を表す呼び出しデータ列を生成する。また、呼び出しデータ列生成部132は、生成した呼び出しデータ列を、当該タスク用の専用メモリ領域121に格納する。
The call data
アクセラレータ選択転送部133は、専用メモリ領域121に呼び出しデータ列が格納されている場合、アクセラレータ使用状況記憶部131を参照することにより、使用中でないアクセラレータ20の1つを選択する。また、アクセラレータ選択転送部133は、専用メモリ領域121に格納された呼び出しデータ列を、選択したアクセラレータ20に転送する。また、アクセラレータ選択転送部133は、アクセラレータ使用状況記憶部131において、選択したアクセラレータ20の使用状況情報を、使用中であることを表すよう更新する。
When the call data string is stored in the
応答データ列受信部134は、アクセラレータ20から呼び出しデータ列の応答として受信した応答データ列を、呼び出し処理の呼び出し元のタスク用の専用メモリ領域121に格納する。また、応答データ列受信部134は、アクセラレータ使用状況記憶部131において、応答データ列の送信元のアクセラレータ20の使用状況情報を、使用中でないことを表すよう更新する。
The response data
処理結果出力部135は、専用メモリ領域121に格納された応答データ列に基づいて、呼び出し元のタスクに呼び出し処理結果を出力する。
The processing
アクセラレータ20は、ホスト装置10からの要求に応じて処理を実行し、処理結果をホスト装置10に応答する。具体的には、アクセラレータ20は、ホスト装置10から呼び出しデータ列を受信すると、呼び出しデータ列に基づく処理を実行する。そして、アクセラレータ20は、ホスト装置10に対して、処理結果を含む応答データ列を送信する。
The
以上のように構成されたアクセラレータ処理実行システム1の動作について、図3を参照して説明する。
The operation of the accelerator
図3において、マルチコアプロセッサ110において実行されるタスクは、アクセラレータ処理を呼び出す(ステップS1)。
In FIG. 3, the task executed in the
次に、アクセラレータ処理管理装置130の呼び出しデータ列生成部132は、呼び出し元のタスク用の専用メモリ領域121に、呼び出し処理を表す呼び出しデータ列を生成して格納する(ステップS2)。
Next, the call data
次に、アクセラレータ処理管理装置130のアクセラレータ選択転送部133は、アクセラレータ使用状況記憶部131を参照することにより、使用中でないアクセラレータ20の1つを選択する(ステップS3)。
Next, the accelerator
次に、アクセラレータ処理管理装置130のアクセラレータ選択転送部133は、アクセラレータ使用状況記憶部131において、選択したアクセラレータ20の使用状況情報を、使用中であることを表すよう更新する(ステップS4)。
Next, the accelerator
次に、アクセラレータ処理管理装置130のアクセラレータ選択転送部133は、ステップS2で格納された呼び出しデータ列を、ステップS3で選択されたアクセラレータ20に対して転送する(ステップS5)。
Next, the accelerator
次に、アクセラレータ20は、呼び出しデータ列に基づいて処理を実行する(ステップS6)。
Next, the
次に、アクセラレータ20は、応答データ列をホスト装置10に対して送信する(ステップS7)。
Next, the
次に、アクセラレータ処理管理装置130の応答データ列受信部134は、アクセラレータ20から応答データ列を受信すると、応答データ列に対応する呼び出し元のタスク用の専用メモリ領域121に、応答データ列を格納する(ステップS8)。
Next, when the response data
次に、アクセラレータ処理管理装置130の処理結果出力部135は、専用メモリ領域121に格納された応答データ列に基づいて、呼び出し元のタスクに呼び出し処理結果を出力する(ステップS9)。
Next, the process
以上で、アクセラレータ処理実行システム1の動作の説明を終了する。
Above, description of operation | movement of the accelerator
次に、本発明の第1の実施の形態の効果について述べる。 Next, effects of the first exemplary embodiment of the present invention will be described.
本発明の第1の実施の形態は、共有のリソースや複数のアクセラレータに対する排他制御や振り分け処理をアプリケーション側で考慮せずに、複数のコアで実行される複数のタスクにより並行してアクセラレータ処理を呼び出し可能にする。 In the first embodiment of the present invention, an accelerator process is performed in parallel by a plurality of tasks executed by a plurality of cores without considering exclusive control and distribution processing for shared resources and a plurality of accelerators on the application side. Make callable.
その理由について説明する。本実施の形態では、複数のアクセラレータに接続されたホスト装置が、アクセラレータ処理管理装置を備える。アクセラレータ処理管理装置では、アクセラレータ使用状況記憶部が、複数のアクセラレータのそれぞれについて、複数のコアによって並列に実行され得るタスクによる使用状況を表す使用状況情報を記憶する。そして、呼び出しデータ列生成部が、タスクからのアクセラレータの呼び出し処理に応じて、呼び出し処理を表す呼び出しデータ列を生成し、生成した呼び出しデータ列を、当該タスク用の専用メモリ領域に格納する。また、アクセラレータ選択転送部が、専用メモリ領域に前記呼び出しデータ列が格納されている場合、アクセラレータ使用状況記憶部を参照することにより、使用中でないアクセラレータの1つを選択する。そして、アクセラレータ選択転送部が、専用メモリ領域に格納された呼び出しデータ列を、選択したアクセラレータに転送する。加えて、アクセラレータ選択転送部が、アクセラレータ使用状況記憶部における当該アクセラレータの使用状況情報を、使用中であることを表すよう更新するからである。さらに、応答データ列受信部が、アクセラレータから呼び出しデータ列の応答として受信された応答データ列を、呼び出し処理の呼び出し元のタスク用の専用メモリ領域に格納する。そして、応答データ列受信部が、アクセラレータ使用状況記憶部において、当該アクセラレータの使用状況情報を、使用中でないことを表すよう更新する。そして、処理結果出力部が、専用メモリ領域に格納された応答データ列に基づいて、呼び出し元のタスクに呼び出し処理結果を出力するからである。 The reason will be described. In the present embodiment, a host device connected to a plurality of accelerators includes an accelerator process management device. In the accelerator processing management apparatus, the accelerator usage status storage unit stores usage status information indicating usage status by tasks that can be executed in parallel by a plurality of cores for each of the plurality of accelerators. Then, the call data string generation unit generates a call data string representing the call process in accordance with the accelerator call process from the task, and stores the generated call data string in the dedicated memory area for the task. Further, when the call data string is stored in the dedicated memory area, the accelerator selection transfer unit selects one of the accelerators that is not in use by referring to the accelerator use state storage unit. Then, the accelerator selection transfer unit transfers the call data string stored in the dedicated memory area to the selected accelerator. In addition, the accelerator selection transfer unit updates the accelerator usage status information in the accelerator usage status storage unit to indicate that the accelerator is being used. Further, the response data string receiving unit stores the response data string received as a response to the call data string from the accelerator in the dedicated memory area for the task that called the call process. Then, the response data string receiving unit updates the usage status information of the accelerator to indicate that it is not in use in the accelerator usage status storage unit. This is because the processing result output unit outputs the call processing result to the caller task based on the response data string stored in the dedicated memory area.
このように、本実施の形態は、並列して実行され得るタスク毎に、専用メモリ領域を経由してアクセラレータに処理を要求する。これにより、本実施の形態は、アクセラレータとの送受信に用いられるリソースに対するタスク間またはコア間での排他制御を不要とする。また、本実施の形態は、タスクからのアクセラレータ処理の呼び出し処理を、専用メモリ領域およびアクセラレータ使用状況記憶部を用いて、空いているアクセラレータに対して振り分ける。したがって、本実施の形態を用いれば、アプリケーション側では、リソースやアクセラレータに対する排他制御やアクセラレータの宛先を考慮したプログラミングが不要となる。 As described above, the present embodiment requests processing from the accelerator via the dedicated memory area for each task that can be executed in parallel. As a result, this embodiment eliminates the need for exclusive control between tasks or between cores for resources used for transmission and reception with the accelerator. In the present embodiment, accelerator process call processing from a task is distributed to free accelerators using a dedicated memory area and an accelerator usage status storage unit. Therefore, if this embodiment is used, on the application side, it is not necessary to perform exclusive control for resources and accelerators and programming considering the accelerator destination.
(第2の実施の形態)
次に、本発明の第2の実施の形態としてのアクセラレータ処理実行システム2の構成を図4に示す。図4において、アクセラレータ処理実行システム2は、本発明の第1の実施の形態としてアクセラレータ処理実行システム2に対して、ホスト装置10に替えてホスト装置30を備える点が異なる。ホスト装置30は、本発明の第1の実施の形態におけるホスト装置10に対して、メモリ領域120に替えてメモリ領域320を含む点が異なる。メモリ領域320は、複数の専用メモリ領域321を含む。また、アクセラレータ処理管理装置130に替えてアクセラレータ処理管理装置330を含む点が異なる。
(Second Embodiment)
Next, the configuration of the accelerator
アクセラレータ処理管理装置330は、アクセラレータ使用状況記憶部331と、呼び出しデータ列生成部332と、アクセラレータ選択転送部333と、応答データ列受信部334と、処理結果出力部335とを有する。
The accelerator
ここで、アクセラレータ処理実行システム2およびその各機能ブロックは、図2を参照して説明した本発明の第1の実施の形態と同様のハードウェア要素によって構成可能である。ただし、アクセラレータ処理実行システム2およびその各機能ブロックのハードウェア構成は、上述の構成に限定されない。
Here, the accelerator
次に、各機能ブロックのうち、本発明の第1の実施の形態と異なる構成について説明する。 Next, among the functional blocks, a configuration different from the first embodiment of the present invention will be described.
メモリ領域320は、複数の専用メモリ領域321を含む。複数の専用メモリ領域321のそれぞれは、転送用の専用メモリ領域321Tと、応答用の専用メモリ領域321Rとからなる。また、専用メモリ領域321Tおよび320Rには、識別情報として、バッファ番号が付与される。以降、バッファ番号i(iは1〜n:nは専用メモリ領域321の個数)が付された専用メモリ領域321Tおよび320Rを、専用メモリ領域321Tiおよび320Riとも記載する。また、1組の専用メモリ領域321Tiおよび320Riを、まとめて専用メモリ領域321iとも記載する。
The
なお、1組の専用メモリ領域321iは、いずれか1つのタスク用であり、他のタスク用とならない点は、本発明の第1の実施の形態と同様である。また、複数のタスクのそれぞれに、異なる1組の異なる専用メモリ領域321iが関連付けられる場合、専用メモリ領域321Tiおよび320Riは、タスクの個数分ずつ確保される。また、複数のタスクにいずれかのコア111が静的に割り当てられ、複数のコア111のそれぞれに、異なる1組の専用メモリ領域321iが関連付けられる場合、専用メモリ領域321Tiおよび320Riは、複数のコア111の個数分ずつ確保される。
Note that the set of dedicated memory areas 321i is for any one task and is not for other tasks, as in the first embodiment of the present invention. Further, when a different set of different dedicated memory areas 321i are associated with each of the plurality of tasks, the dedicated memory areas 321Ti and 320Ri are secured by the number of tasks. In addition, when any one of the
アクセラレータ処理管理装置330は、コード格納用メモリ1004に格納されたプログラムのコードを実行することにより、例えば、図5に示すようなソフトウェア構成で各機能ブロックを実現する。図5において、アクセラレータ処理管理装置330により実行されるソフトウェアは、APIライブラリと、APIバッファマネージャとからなる。APIライブラリは、コア111によって実行されるホストアプリケーションに、API関数を提供する。また、APIライブラリは、API関数の呼び出しを契機に動作するAPIドライバと、APIドライバから呼び出されるデータリンクレイヤドライバとを含む。APIバッファマネージャは、専用メモリ領域321iのデータをアクセラレータ20との間で送受信するため、デバイス接続インタフェース1005を制御するドライバへのインタフェースを含む。
The accelerator
この場合、呼び出しデータ列生成部332および処理結果出力部335は、APIライブラリによって構成される。また、アクセラレータ選択転送部333および応答データ列受信部334は、APIバッファマネージャによって構成される。ただし、アクセラレータ処理管理装置330が各機能ブロックを実現するソフトウェア構成は、上述の構成に限定されない。
In this case, the call data
次に、アクセラレータ処理管理装置330の各機能ブロックの詳細について説明する。
Next, details of each functional block of the accelerator
アクセラレータ使用状況記憶部331は、複数のアクセラレータ20のそれぞれについて、タスクによる使用状況を表す使用状況情報として、次の情報を記憶する。すなわち、アクセラレータ使用状況記憶部331は、当該アクセラレータ20が使用中である場合には、当該アクセラレータ20に処理を要求したタスク用の専用メモリ領域321iの識別情報(バッファ番号i)を記憶する。また、アクセラレータ使用状況記憶部331は、当該アクセラレータ20が使用中でない場合には、使用中でないことを表す情報を記憶する。例えば、使用状況情報として、使用中の場合に前述のバッファ番号が適用される場合、使用中でないことを表す情報は、いずれの専用メモリ領域321iのバッファ番号にも該当しない値であればよい。例えば、n組の専用メモリ領域321iに対して1〜nのバッファ番号が付与されている場合、使用中でないことを表す情報は、0で表されていてもよい。
The accelerator usage
呼び出しデータ列生成部332は、タスクからのアクセラレータ20の呼び出し処理に応じて生成する呼び出しデータ列に、当該タスク用の専用メモリ領域321iの識別情報を含める。例えば、呼び出しデータ列は、当該タスク用の専用メモリ領域321iのバッファ番号iと、アクセラレータ20へ処理を要求する要求コマンドと、要求コマンドのパラメータとを含んでいてもよい。
The call data
なお、当該タスク用の専用メモリ領域321iの識別情報は、タスクからの呼び出し処理を表す情報に含まれていてもよい。つまり、専用メモリ領域321iの識別情報を引数の一つとして指定するよう定義された呼び出し処理が、API関数として提供されていてもよい。この場合、各タスクは、自身用の専用メモリ領域321iに付与されたバッファ番号iをAPI関数の引数に指定して、アクセラレータ処理を呼び出すことになる。 Note that the identification information of the dedicated memory area 321i for the task may be included in information representing the calling process from the task. That is, a call process defined to specify the identification information of the dedicated memory area 321i as one of the arguments may be provided as an API function. In this case, each task calls the accelerator process by specifying the buffer number i assigned to the dedicated memory area 321i for itself as an argument of the API function.
また、呼び出し処理に、複数の要求コマンドが含まれる場合も想定される。この場合、呼び出しデータ列生成部332は、それぞれの要求コマンドについて、呼び出しデータ列を生成する。
It is also assumed that the call process includes a plurality of request commands. In this case, the call data
また、呼び出しデータ列生成部332は、生成した呼び出しデータ列を、呼び出し処理の呼び出し元のタスク用の専用メモリ領域321Tiに格納する。前述のように、呼び出し処理に、複数の要求コマンドが含まれるとする。この場合、呼び出しデータ列生成部332は、呼び出しデータ列を1つ専用メモリ領域321Tiに格納し、当該呼び出しデータ列が転送された後、次の呼び出しデータ列を1つ専用メモリ領域321Tiに格納することを繰り返せばよい。
Further, the call data
アクセラレータ選択転送部333は、専用メモリ領域321Tiに呼び出しデータ列が格納されている場合、アクセラレータ使用状況記憶部331において、使用中でないことを表す情報(例えば、上述の0)に関連付けられたアクセラレータ20の1つを選択する。そして、アクセラレータ選択転送部333は、アクセラレータ使用状況記憶部331において、選択したアクセラレータ20の使用状況情報を、呼び出しデータ列が格納されている専用メモリ領域321Tiのバッファ番号iに更新する。これにより、選択されたアクセラレータ20の使用状況情報として、呼び出し元のタスク用の専用メモリ領域321iのバッファ番号iが格納されることになる。
When the call data string is stored in the dedicated memory area 321Ti, the accelerator
また、アクセラレータ選択転送部333は、専用メモリ領域321Tiに格納された呼び出しデータ列を、選択したアクセラレータ20に転送する。
Further, the accelerator
応答データ列受信部334は、アクセラレータ20から呼び出しデータ列の応答として受信した応答データ列を、呼び出し処理の呼び出し元のタスク用の専用メモリ領域321Riに格納する。また、応答データ列受信部334は、アクセラレータ使用状況記憶部331において、応答データ列の送信元のアクセラレータ20の使用状況情報を、使用中でないことを表すよう更新する。
The response data
ここで、アクセラレータ20からの応答データ列には、呼び出し元のタスク用の専用メモリ領域321iのバッファ番号iが含まれているものとする。すなわち、アクセラレータ20は、呼び出しデータ列に含まれるバッファ番号iを、呼び出しデータ列に応答する応答データ列に含めるよう構成されることが前提である。例えば、応答データ列は、呼び出しデータ列に含まれていたバッファ番号iと、要求コマンドに応答する応答コマンドと、要求コマンドによる処理結果とを含んでいてもよい。
Here, it is assumed that the response data string from the
処理結果出力部335は、専用メモリ領域321iに格納された応答データ列に基づいて、呼び出し元のタスクに対して、呼び出し処理結果として正常応答であるか否かを出力する。ここで、呼び出し処理には、1つ以上の要求コマンドが含まれる。そこで、処理結果出力部335は、1つ以上の要求コマンドに対応する応答データ列のそれぞれに含まれる処理結果が全て正常を示す場合に、正常応答である旨を出力すればよい。また、処理結果出力部335は、1つ以上の要求コマンドに対応する応答データ列の少なくとも1つに含まれる処理結果が正常を示さない場合に、正常応答でない旨を出力すればよい。
Based on the response data string stored in the dedicated memory area 321i, the processing
以上のように構成されたアクセラレータ処理実行システム2の動作について、図面を参照して説明する。ここでは、前述のように、呼び出しデータ列生成部332および処理結果出力部335が、APIライブラリによって構成されるとする。また、アクセラレータ選択転送部333および応答データ列受信部334が、APIバッファマネージャによって構成されるとする。
The operation of the accelerator
まず、APIライブラリの動作を図6に示す。 First, the operation of the API library is shown in FIG.
図6において、まず、呼び出しデータ列生成部332は、API関数の呼び出しをトリガに、API関数で定義された最初の要求コマンドについて処理を開始する(ステップS101)。
In FIG. 6, first, the call data
次に、呼び出しデータ列生成部332は、この要求コマンドを含む呼び出しデータ列を生成する(ステップS102)。
Next, the call data
例えば、呼び出しデータ列は、呼び出し元のタスク用の専用メモリ領域321iのバッファ番号i、要求コマンドのID、および、パラメータをそれぞれ表すデータ列からなる。 For example, the call data string is composed of a data string representing the buffer number i of the dedicated memory area 321 i for the caller task, the ID of the request command, and the parameter.
次に、呼び出しデータ列生成部332は、生成した呼び出しデータ列を、呼び出し元のタスク用の専用メモリ領域321Tiに格納する(ステップS103)。
Next, the call data
そして、専用メモリ領域321Tiへの呼び出しデータ列の格納を契機に、APIバッファマネージャが動作する。APIバッファマネージャの動作については後述する。APIバッファマネージャの動作により、専用メモリ領域321Tiの呼び出しデータ列がいずれかのアクセラレータ20に転送され、当該アクセラレータ20から受信された応答データ列が専用メモリ領域321Riに格納される。
Then, the API buffer manager operates when the call data string is stored in the dedicated memory area 321Ti. The operation of the API buffer manager will be described later. By the operation of the API buffer manager, the calling data string in the dedicated memory area 321Ti is transferred to one of the
次に、処理結果出力部335は、応答データ列の受信がAPIバッファマネージャから通知されたか否かを判断する(ステップS104)。通知されていない場合、ステップS104を繰り返すことにより、受信待ち状態となる。
Next, the processing
次に、応答データ列の受信がAPIバッファマネージャから通知されると(ステップS104でYes)、処理結果出力部335は、通知された情報が示す専用メモリ領域321Riから、応答データ列を読み込む(ステップS105)。
Next, when reception of the response data string is notified from the API buffer manager (Yes in Step S104), the processing
次に、処理結果出力部335は、応答データ列に含まれる処理結果が正常であるか否かを判断する(ステップS106)。
Next, the processing
ここで、処理結果が正常であると判断した場合(ステップS106でYes)、処理結果出力部335は、実行中のAPI関数において定義された次の要求コマンドがあるか否かを判断する(ステップS107)。
If it is determined that the processing result is normal (Yes in step S106), the processing
ここで、次の要求コマンドがある場合(ステップS107でYes)、呼び出しデータ列生成部332は、次の要求コマンドについて、処理を開始する(ステップS108)。
If there is a next request command (Yes in step S107), the call data
そして、呼び出しデータ列生成部332は、ステップS102からの処理を繰り返す。
Then, the call data
一方、ステップS106において、処理結果が正常でないと判断された場合について説明する(ステップS106でNo)。この場合、処理結果出力部335は、正常でないことを表す情報を、呼び出し元のタスクに出力して(ステップS109)、動作を終了する。
On the other hand, a case where it is determined in step S106 that the processing result is not normal will be described (No in step S106). In this case, the processing
また、ステップS107において、次の要求コマンドがないと判断された場合について説明する(ステップS107でNo)。この場合、処理結果出力部335は、処理結果が正常であることを表す情報を、呼び出し元のタスクに出力して(ステップS110)、動作を終了する。
A case where it is determined in step S107 that there is no next request command will be described (No in step S107). In this case, the processing
以上で、APIライブラリの動作の説明を終了する。 This is the end of the description of the API library operation.
次に、APIバッファマネージャが呼び出しデータ列を転送する動作を図7に示す。 Next, the operation in which the API buffer manager transfers the call data string is shown in FIG.
図7において、まず、アクセラレータ選択転送部333は、バッファ番号を示すインデックスiを初期化する(ステップS201)。例えば、n個の専用メモリ領域321に、バッファ番号1〜nまでがそれぞれ付与されている場合、インデックスiは、1に初期化される。
In FIG. 7, first, the accelerator
次に、アクセラレータ選択転送部333は、専用メモリ領域321Tiに、呼び出しデータ列が格納されているか否かを判断する(ステップS202)。
Next, the accelerator
ここで、専用メモリ領域321Tiに呼び出しデータ列が格納されている場合、アクセラレータ選択転送部333は、アクセラレータ使用状況記憶部331を参照することにより、使用中でないアクセラレータ20があるか否かを判断する(ステップS203)。
Here, when the call data string is stored in the dedicated memory area 321Ti, the accelerator
ここで、使用中でないアクセラレータ20がある場合、アクセラレータ選択転送部333は、使用中でないアクセラレータ20を1つ選択する(ステップS204)。
Here, if there is an
次に、アクセラレータ選択転送部333は、アクセラレータ使用状況記憶部331において、選択したアクセラレータ20の使用状況情報を、バッファ番号iに更新する(ステップS205)。
Next, the accelerator
次に、アクセラレータ選択転送部333は、専用メモリ領域321Tiに格納された呼び出しデータ列を、選択したアクセラレータ20に転送する(ステップS206)。
Next, the accelerator
具体的には、アクセラレータ選択転送部333は、専用メモリ領域321Tiの先頭ポインタアドレス、呼び出しデータ列のサイズおよび選択したアクセラレータ20の識別情報を、デバイス接続インタフェースドライバに通知すればよい。これにより、選択したアクセラレータ20に対し、専用メモリ領域321Tiの呼び出しデータ列が送信される。
Specifically, the accelerator
一方、ステップS203において、使用中でないアクセラレータ20が無いと判断された場合、アクセラレータ選択転送部333は、使用中でないアクセラレータ20が有ると判断されるまで、ステップS203を繰り返す。
On the other hand, if it is determined in step S203 that there is no
また、ステップS206におけるアクセラレータ20への転送処理が完了した場合、または、ステップS202において専用メモリ領域321Tiに、呼び出しデータ列が格納されていないと判断された場合について説明する。
A case will be described in which the transfer process to the
この場合、アクセラレータ選択転送部333は、インデックスiが、最大値n以下か否かを判断する(ステップS207)。
In this case, the accelerator
ここで、iがn以下であれば、アクセラレータ選択転送部333は、iを1だけインクリメントして、ステップS202からの処理を繰り返す。
Here, if i is n or less, the accelerator
一方、iがnを超えていれば(ステップS208でNo)、アクセラレータ選択転送部333は、ステップS201からの処理を繰り返す。すなわち、インデックスiが初期化されて、全ての専用メモリ領域321Tiについて再度処理が繰り返される。
On the other hand, if i exceeds n (No in step S208), the accelerator
以上で、APIバッファマネージャが呼び出しデータ列を転送する動作の説明を終了する。 This is the end of the description of the operation in which the API buffer manager transfers the call data string.
次に、APIバッファマネージャが応答データ列を受信する動作を図8に示す。 Next, FIG. 8 shows an operation in which the API buffer manager receives the response data string.
まず、応答データ列受信部334は、アクセラレータ20から受信された応答データ列を、その応答データ列に対応する呼び出し処理の呼び出し元のタスク用の専用メモリ領域321Riに格納する(ステップS301)。
First, the response data
前述のようにアクセラレータ20からの応答データ列は、呼び出し元のタスク用の専用メモリ領域321の識別情報であるバッファ番号iを含む。そこで、応答データ列受信部334は、アクセラレータ20から受信された応答データ列を、その応答データ列に含まれるバッファ番号iに対応する専用メモリ領域321Riに格納すればよい。
As described above, the response data string from the
次に、応答データ列受信部334は、アクセラレータ使用状況記憶部331において、応答データ列に含まれるバッファ番号iが使用状況情報として記憶されたアクセラレータ20を検索する。そして、応答データ列受信部334は、検索したアクセラレータ20の当該使用状況情報を、使用中でないことを表す情報に更新する(ステップS302)。
Next, the response data
次に、応答データ列受信部334は、APIライブラリに対して、専用メモリ領域321Riに応答データ列が受信されたことを通知する(ステップS303)。具体的には、応答データ列受信部334は、専用メモリ領域321Riの先頭アドレスを通知すればよい。これにより、APIライブラリでは、図6のステップS105からの動作が実行される。
Next, the response data
以上で、アクセラレータ処理実行システム2の動作の説明を終了する。
Above, description of operation | movement of the accelerator
次に、アクセラレータ処理実行システム2の動作を具体例で示す。
Next, the operation of the accelerator
ここでは、APIライブラリによって、アクセラレータ処理を呼び出すためのAPI関数として、API_Func01関数が定義されているものとする。API_Func01関数は、図9に例示する形式で関数呼び出しを行うよう定義されていることを想定する。すなわち、第一引数には、呼び出し元のタスク用のバッファ番号が指定される。この例では、バッファ番号1を表す「0x0001」が指定されている。また、第二引数には、API_Func01関数固有のパラメータの設定値が指定される。この例では、設定値として「0x0000」が指定されている。また、API_Func01関数では、アクセラレータ20に対して、複数の要求コマンドが送信されるシナリオが定義されている。ここでは、API_Func01関数は、要求コマンド0x0001および要求コマンド0x0011をアクセラレータ20に順次送信するよう定義されているものとする。なお、コマンドIDが「xxxxxx」の要求コマンドを、「要求コマンドxxxxxx」と記載している。
Here, it is assumed that the API_Func01 function is defined as an API function for calling an accelerator process by the API library. It is assumed that the API_Func01 function is defined to make a function call in the format illustrated in FIG. That is, the buffer number for the calling task is specified as the first argument. In this example, “0x0001” representing
また、ここでは、複数のアクセラレータ20のそれぞれの識別情報は、「#x(xは正の整数)」と表されるものとする。また、識別情報が「#x」のアクセラレータ20を、「アクセラレータ20#x」とも記載する。
Also, here, the identification information of each of the plurality of
また、ここでは、アクセラレータ使用状況記憶部331には、図10に一例を示すように使用状況情報が格納されるものとする。この例では、アクセラレータ20#1の使用状況としては、バッファ番号2を専有するタスクにより使用中であることを表す「0x0002」が使用状況情報として格納されている。また、アクセラレータ20#2の使用状況としては、使用中でない0を表す「0x0000」が使用状況情報として格納されている。
Here, it is assumed that usage status information is stored in the accelerator usage
また、ここでは、ホスト装置30およびアクセラレータ20を接続するデバイス接続インタフェース1005および2005は、SPI(Serial Peripheral Interface)であるものとする。
Here, it is assumed that the
まず、APIライブラリにおいて、呼び出しデータ列生成部332は、API_Func01関数の実行をトリガに、API_Func01関数のシナリオで定義された最初の要求コマンド0x0001について処理を開始する(図6のステップS101)。
First, in the API library, the call data
次に、呼び出しデータ列生成部332は、要求コマンド0x0001について呼び出しデータ列を生成する(ステップS102)。ここでは、生成される呼び出しデータ列は、図11に示す通りとなる。
Next, the call data
次に、呼び出しデータ列生成部332は、生成した呼び出しデータ列を、API_Func01関数の第一引数で指定されたバッファ番号0x0001が示す専用メモリ領域321T1に格納する(ステップS103)。
Next, the call data
専用メモリ領域321T1に格納される情報は、図12に示す通りとなる。 Information stored in the dedicated memory area 321T1 is as shown in FIG.
そして、専用メモリ領域321T1への呼び出しデータ列の格納を契機に、APIバッファマネージャが動作する。 Then, the API buffer manager operates when the call data string is stored in the dedicated memory area 321T1.
まず、アクセラレータ選択転送部333は、専用メモリ領域321T1に、呼び出しデータ列が格納されていると判断する(ステップS201、S202でYes)。
First, the accelerator
次に、アクセラレータ選択転送部333は、アクセラレータ使用状況記憶部331を参照することにより、使用中でないアクセラレータ20#2を選択する(ステップS203でYes、S204)。
Next, the accelerator
次に、アクセラレータ選択転送部333は、アクセラレータ使用状況記憶部331において、アクセラレータ20#2の使用状況情報を、使用中でないことを表す「0x0001」から、バッファ番号1を表す「0x0001」に更新する(ステップS205)。
Next, in the accelerator usage
これにより、アクセラレータ使用状況記憶部331に格納される使用状況情報は、図13に示した通りとなる。
Accordingly, the usage status information stored in the accelerator usage
次に、アクセラレータ選択転送部333は、専用メモリ領域321T1の先頭ポインタアドレス、サイズおよび選択したアクセラレータ20の識別情報「#2」を、SPIドライバに通知する(ステップS206)。これにより、選択したアクセラレータ20#2に対し、専用メモリ領域321T1の呼び出しデータ列が送信される。
Next, the accelerator
そして、アクセラレータ20#2において、受信された呼び出しデータ列に含まれる命令コマンド0x0001に応じた処理が行われる。その結果、アクセラレータ20#2から、ホスト装置30に対して、SPIを介して、応答データ列が返却される。この応答データ列は、呼び出し元のタスク用の専用メモリ領域321の識別情報であるバッファ番号1、応答コマンドのID、および、処理結果をそれぞれ表すデータ列を含む。SPIドライバは、APIバッファマネージャに、応答データ列が受信されたことを割り込みにより通知する。
Then, the
そこで、応答データ列受信部334は、受信された応答データ列を、当該応答データ列に含まれるバッファ番号「0x0001」に対応する専用メモリ領域321R1に格納する。この具体例では、専用メモリ領域321R1に、図14に示すような応答データ列が格納されたとする。
Therefore, the response data
次に、応答データ列受信部334は、アクセラレータ使用状況記憶部331において、応答データ列に含まれるバッファ番号「0x0001」が使用状況情報として関連付けられたアクセラレータ20を検索する。ここでは、アクセラレータ20#2が検索される。そこで、応答データ列受信部334は、検索したアクセラレータ20#2の当該使用状況情報を、使用中でない0を表す「0x0000」に更新する(ステップS302)。
Next, the response data
これにより、アクセラレータ使用状況記憶部331に格納される使用状況情報は、図10に示した通りとなる。
As a result, the usage status information stored in the accelerator usage
次に、応答データ列受信部334は、APIライブラリに、専用メモリ領域321R1の先頭アドレスを通知する(ステップS303)。
Next, the response data
そこで、APIライブラリにおいて、処理結果出力部335は、通知されたアドレスの専用メモリ領域321R1から、応答データ列を読み込む(ステップS105)。
Therefore, in the API library, the processing
次に、処理結果出力部335は、応答データ列に基づいて、処理結果が正常であると判断したとする(ステップS106でYes)。
Next, it is assumed that the processing
そこで、次に、処理結果出力部335は、実行中のAPI_Func01関数において定義された次の要求コマンド0x0011があると判断する(ステップS107でYes)。
Therefore, next, the processing
そこで、呼び出しデータ列生成部332は、次の要求コマンド0x0011について、処理を開始する(ステップS108)。
Therefore, the call data
そして、呼び出しデータ列生成部332は、ステップS102からの処理を繰り返す。
Then, the call data
命令コマンド0x0001の場合とほぼ同様に、ステップS102〜S103、S201〜S206、S301〜S303、S105が実行される。ここでは、命令コマンド0x0011に対する応答データ列の処理結果も、正常であったとする(ステップS106でYes)。 Steps S102 to S103, S201 to S206, S301 to S303, and S105 are executed in substantially the same manner as in the case of the instruction command 0x0001. Here, it is assumed that the processing result of the response data string for the instruction command 0x0011 is also normal (Yes in step S106).
そして、次に、処理結果出力部335は、実行中のAPI_Func01関数において定義された次の要求コマンドはないと判断する(ステップS107でNo)。
Next, the processing
そこで、処理結果出力部335は、呼び出し元のタスクに、処理結果が正常応答であることを表す情報を出力する(ステップS110)。
Therefore, the processing
以上で、アクセラレータ処理実行システム2の動作の具体例の説明を終了する。
Above, description of the specific example of operation | movement of the accelerator
次に、本発明の第2の実施の形態の効果について述べる。 Next, the effect of the second exemplary embodiment of the present invention will be described.
本発明の第2の実施の形態は、共有のリソースや複数のアクセラレータに対する排他制御や振り分け処理をアプリケーション側で考慮せずに、より効率的に、複数のコアで実行される複数のタスクにより並行してアクセラレータ処理を呼び出し可能にする。 The second embodiment of the present invention is more efficient in parallel with a plurality of tasks executed by a plurality of cores without considering exclusive control and distribution processing for shared resources and a plurality of accelerators on the application side. To make the accelerator process callable.
その理由について説明する。本実施の形態は、本発明の第1の実施の形態と同様の構成に加えて、次のように構成されるからである。すなわち、専用メモリ領域が、転送用の専用メモリ領域および応答用の専用メモリ領域からなる。そして、呼び出しデータ列生成部が、呼び出しデータ列を呼び出し元のタスク用の転送用の専用メモリ領域に格納する。そして、アクセラレータ選択転送部が、転送用の専用メモリ領域に呼び出しデータ列が格納されている場合に動作するからである。また、応答データ列受信部が、応答データ列を、呼び出し元のタスク用の応答用の専用メモリ領域に格納する。そして、処理結果出力部が、応答用の専用メモリ領域に格納された応答データ列に基づいて動作するからである。 The reason will be described. This is because the present embodiment is configured as follows in addition to the same configuration as that of the first embodiment of the present invention. That is, the dedicated memory area includes a dedicated memory area for transfer and a dedicated memory area for response. Then, the call data string generation unit stores the call data string in the dedicated memory area for transfer for the caller task. This is because the accelerator selection transfer unit operates when the call data string is stored in the dedicated memory area for transfer. In addition, the response data string receiving unit stores the response data string in a dedicated memory area for response for the caller task. This is because the processing result output unit operates based on the response data string stored in the response dedicated memory area.
このように、本実施の形態は、転送用および応答用のいずれの専用メモリ領域にデータ列が格納されているかに応じて動作するため、リソースの排他制御を不要とする専用メモリ領域を、より効率的に利用することができる。 As described above, since the present embodiment operates depending on whether the data string is stored in the dedicated memory area for transfer or response, the dedicated memory area that does not require exclusive control of resources is It can be used efficiently.
さらなる理由について説明する。本実施の形態では、呼び出しデータ列生成部が、呼び出しデータ列に、呼び出し元のタスク用の専用メモリ領域の識別情報を含めて生成する。また、アクセラレータ選択転送部が、選択したアクセラレータの使用状況情報を、転送する呼び出しデータ列に含まれる専用メモリ領域の識別情報に更新することにより、使用中であることを表す。また、応答データ列受信部が、応答データ列に含まれる識別情報が示す専用メモリ領域に応答データ列を格納するとともに、当該識別情報が使用状況情報として格納されたアクセラレータの使用状況情報を、使用中でないことを表すよう更新するからである。 A further reason will be described. In the present embodiment, the call data string generation unit generates the call data string including the identification information of the dedicated memory area for the caller task. Further, the accelerator selection transfer unit updates the usage status information of the selected accelerator to the identification information of the dedicated memory area included in the call data sequence to be transferred, thereby indicating that the accelerator is being used. Further, the response data string receiving unit stores the response data string in the dedicated memory area indicated by the identification information included in the response data string, and uses the accelerator usage status information in which the identification information is stored as usage status information. This is because it is updated to indicate that it is not in the middle.
これにより、各機能ブロックは、呼び出し処理の呼び出し元のタスクを、呼び出しデータ列、応答データ列、または、使用状況情報に含まれる専用メモリ領域の識別情報に基づいて容易に特定でき、効率的に動作を実行できる。 As a result, each functional block can easily identify the call source task of the call process based on the identification information of the dedicated memory area included in the call data string, the response data string, or the usage status information, and efficiently. Can perform actions.
その結果、本実施の形態は、並列して実行され得るタスク毎に、専用メモリ領域を経由してアクセラレータに処理を要求する際に、メモリに対するタスク間またはコア間での排他制御を不要とする処理を、より効率的に行うことができる。また、本実施の形態は、タスクからのアクセラレータ処理の呼び出し処理を、専用メモリ領域およびアクセラレータ使用状況記憶部を用いて、空いているアクセラレータに対して振り分ける処理を、より効率的に行うことができる。したがって、本実施の形態を用いれば、アプリケーション側では、リソースやアクセラレータに対する排他制御やアクセラレータの宛先を考慮したプログラミングが不要となる。 As a result, this embodiment eliminates the need for exclusive control between tasks or cores for memory when processing is requested from the accelerator via a dedicated memory area for each task that can be executed in parallel. Processing can be performed more efficiently. In addition, according to the present embodiment, it is possible to more efficiently perform the process of allocating the accelerator process from the task to the free accelerator using the dedicated memory area and the accelerator usage status storage unit. . Therefore, if this embodiment is used, on the application side, it is not necessary to perform exclusive control for resources and accelerators and programming considering the accelerator destination.
次に、本発明の実施の形態の最小構成となるアクセラレータ処理管理装置130を、図15に示す。図15において、アクセラレータ処理管理装置130は、アクセラレータ使用状況記憶部131と、呼び出しデータ列生成部132と、アクセラレータ選択転送部133と、応答データ列受信部134と、処理結果出力部135とを含む。
Next, FIG. 15 shows an accelerator
アクセラレータ処理管理装置130は、マルチコアプロセッサを有するホスト装置に含まれる。また、マルチコアプロセッサは、ホスト装置の外部の複数のアクセラレータに接続される。
The accelerator
アクセラレータ処理管理装置130の各機能ブロックは、本発明の第1の実施の形態において説明したように構成され、図3を参照して説明したように動作する。
Each functional block of the accelerator
これにより、本発明の実施の形態の最小構成となるアクセラレータ処理管理装置130は、複数のアクセラレータに接続されたマルチコアプロセッサを含むホスト装置に含まれることにより、次の効果を奏する。すなわち、アクセラレータ処理管理装置130は、複数のコアによって並列に実行され得る複数のタスクによる、並行したアクセラレータ処理の呼び出しを可能とする。しかも、アプリケーション側で、リソースおよびアクセラレータに対する排他制御や振り分け処理を考慮する必要がないという利点がある。
Thereby, the accelerator
また、本発明の実施の形態の他の最小構成となるホスト装置10を、図16に示す。図16において、ホスト装置10は、複数のコア111と、複数の専用メモリ領域121と、アクセラレータ処理管理装置130とを含む。また、ホスト装置10は、外部の複数のアクセラレータに接続される。
Further, FIG. 16 shows a
ホスト装置10の各機能ブロックは、本発明の第1の実施の形態において説明したように構成される。そして、ホスト装置10においてアクセラレータ処理管理装置130が、図3を参照して説明したように動作する。
Each functional block of the
これにより、本発明の実施の形態の他の最小構成となるホスト装置10は、複数のアクセラレータに接続された場合に、次の効果を奏する。すなわち、ホスト装置10は、複数のコアによって並列に実行され得る複数のタスクによる、並行したアクセラレータ処理の呼び出しを可能とする。しかも、アプリケーション側で、リソースおよびアクセラレータに対する排他制御や振り分け処理を考慮する必要がないという利点がある。
Thereby, the
なお、上述した本発明の第2の実施の形態において、ホスト装置およびアクセラレータを接続するデバイス接続インタフェースとして、SPIを適用する例について説明したが、これに限られない。例えば、デバイス接続インタフェースは、PCI(Peripheral Component Interconnect)等のシステムバスやEthernet(登録商標)であってもよい。 In the above-described second embodiment of the present invention, the example in which the SPI is applied as the device connection interface for connecting the host device and the accelerator has been described. However, the present invention is not limited to this. For example, the device connection interface may be a system bus such as PCI (Peripheral Component Interconnect) or Ethernet (registered trademark).
また、上述した本発明の各実施の形態において、専用メモリ領域を確保するメモリは、例えば、揮発性のRAM(Random Access Memory)等により構成してよい。 Further, in each of the embodiments of the present invention described above, the memory for securing the dedicated memory area may be constituted by, for example, a volatile RAM (Random Access Memory).
また、上述した各実施の形態において、アクセラレータとしては、例えば、無線モジュールなどの特定用途向けIC(Integrated Circuit)が適用可能であるが、これに限られない。例えば、アクセラレータとしては、DSP(Digital Signal Processor)や、FPGA(field-programmable gate array)等が適用されてもよい。 Further, in each of the above-described embodiments, as an accelerator, for example, an application-specific IC (Integrated Circuit) such as a wireless module can be applied. For example, a DSP (Digital Signal Processor), an FPGA (field-programmable gate array), or the like may be applied as the accelerator.
また、上述した本発明の各実施の形態において、アクセラレータ処理管理装置の各機能ブロックが、メモリに記憶されたプログラムを実行するプロセッサによって実現される例を中心に説明した。これに限らず、各機能ブロックの一部、全部、または、それらの組み合わせが専用のハードウェアにより実現されていてもよい。 Further, in each of the above-described embodiments of the present invention, the example in which each functional block of the accelerator processing management apparatus is realized by a processor that executes a program stored in a memory has been described. However, the present invention is not limited to this, and some, all, or a combination of each functional block may be realized by dedicated hardware.
また、上述した本発明の各実施の形態において、各フローチャートを参照して説明したアクセラレータ処理管理装置の動作を、本発明のコンピュータ・プログラムとしてコンピュータ装置の記憶装置(記憶媒体)に格納しておく。そして、係るコンピュータ・プログラムを当該CPUが読み出して実行するようにしてもよい。そして、このような場合において、本発明は、係るコンピュータ・プログラムのコードあるいは記憶媒体によって構成される。 In each of the embodiments of the present invention described above, the operation of the accelerator processing management apparatus described with reference to the flowcharts is stored in the storage device (storage medium) of the computer apparatus as the computer program of the present invention. . Then, the computer program may be read and executed by the CPU. In such a case, the present invention is constituted by the code of the computer program or a storage medium.
また、上述した各実施の形態は、適宜組み合わせて実施されることが可能である。 Moreover, each embodiment mentioned above can be implemented in combination as appropriate.
また、本発明は、上述した各実施の形態に限定されず、様々な態様で実施されることが可能である。 The present invention is not limited to the above-described embodiments, and can be implemented in various modes.
1、2 アクセラレータ処理実行システム
10、30 ホスト装置
20 アクセラレータ
110 マルチコアプロセッサ
111 コア
120、320 メモリ領域
121、321 専用メモリ領域
130、330 アクセラレータ処理管理装置
131、331 アクセラレータ使用状況記憶部
132、332 呼び出しデータ列生成部
133、333 アクセラレータ選択転送部
134、334 応答データ列受信部
135、335 処理結果出力部
2001 プロセッサ
1002、2002 APIメモリ
1003、2003 メモリコントローラ
1004、2004 コード格納用メモリ
1005、2005 デバイス接続インタフェース
2006 IPコアブロック
1, 2 Accelerator
Claims (8)
前記タスクからの前記アクセラレータの呼び出し処理に応じて、前記呼び出し処理を表す呼び出しデータ列を生成し、生成した呼び出しデータ列を、複数の専用メモリ領域のうち当該タスク用の専用メモリ領域に格納する呼び出しデータ列生成手段と、
前記専用メモリ領域に前記呼び出しデータ列が格納されている場合、前記アクセラレータ使用状況記憶手段を参照することにより使用中でないアクセラレータの1つを選択し、選択したアクセラレータに対して、前記専用メモリ領域に格納された前記呼び出しデータ列を転送するとともに、前記アクセラレータ使用状況記憶手段における当該アクセラレータの前記使用状況情報を、使用中であることを表すよう更新するアクセラレータ選択転送手段と、
前記アクセラレータから前記呼び出しデータ列の応答として受信された応答データ列を、前記呼び出し処理の呼び出し元のタスク用の前記専用メモリ領域に格納するとともに、前記アクセラレータ使用状況記憶手段における当該アクセラレータの前記使用状況情報を、使用中でないことを表すよう更新する応答データ列受信手段と、
前記専用メモリ領域に格納された前記応答データ列に基づいて、前記呼び出し元の前記タスクに対して呼び出し処理結果を出力する処理結果出力手段と、
を備えたアクセラレータ処理管理装置。 Accelerator usage status storage means for storing usage status information representing usage status by tasks that can be executed in parallel by the plurality of processor cores for each of a plurality of accelerators connected to a multi-core processor including a plurality of processor cores;
In response to the accelerator call process from the task, a call data string representing the call process is generated, and the generated call data string is stored in a dedicated memory area for the task among a plurality of dedicated memory areas Data string generation means;
When the call data string is stored in the dedicated memory area, one of the accelerators that are not in use is selected by referring to the accelerator usage status storage unit, and the selected accelerator is stored in the dedicated memory area. An accelerator selection transfer means for transferring the stored call data string and updating the accelerator usage status information in the accelerator usage status storage means to indicate that the accelerator is being used;
The response data sequence received as a response to the call data sequence from the accelerator is stored in the dedicated memory area for the call source task of the call processing, and the usage status of the accelerator in the accelerator usage status storage means A response data string receiving means for updating the information to indicate that the information is not in use;
Based on the response data string stored in the dedicated memory area, processing result output means for outputting a call processing result to the task of the caller;
Accelerator processing management device.
前記呼び出しデータ列生成手段は、生成した前記呼び出しデータ列を、前記呼び出し元のタスク用の前記転送用の専用メモリ領域に格納し、
前記アクセラレータ選択転送手段は、前記転送用の専用メモリ領域に前記呼び出しデータ列が格納されている場合に動作し、
前記応答データ列受信手段は、前記応答データ列を、前記呼び出し元のタスク用の前記応答用の専用メモリ領域に格納し、
前記処理結果出力手段は、前記応答用の前記専用メモリ領域に格納された応答データ列に基づいて動作することを特徴とする請求項1に記載のアクセラレータ処理管理装置。 When the dedicated memory area consists of a dedicated memory area for transfer and a dedicated memory area for response,
The call data string generation means stores the generated call data string in the dedicated memory area for transfer for the caller task,
The accelerator selection transfer means operates when the call data string is stored in the dedicated memory area for transfer,
The response data string receiving means stores the response data string in the response dedicated memory area for the caller task,
The accelerator processing management apparatus according to claim 1, wherein the processing result output unit operates based on a response data string stored in the dedicated memory area for the response.
前記応答データ列受信手段は、前記応答データ列に前記呼び出し元のタスクの前記専用メモリ領域の識別情報が含まれる場合に、当該応答データ列に含まれる識別情報が示す専用メモリ領域に前記応答データ列を格納することを特徴とする請求項1または請求項2に記載のアクセラレータ処理管理装置。 The call data string generation means generates the call data string including identification information of the dedicated memory area for the caller task,
When the response data string includes the identification information of the dedicated memory area of the caller task, the response data string receiving means stores the response data in the dedicated memory area indicated by the identification information included in the response data string. The accelerator processing management apparatus according to claim 1, wherein the accelerator processing management apparatus stores a column.
前記アクセラレータ選択転送手段は、選択したアクセラレータの前記使用状況情報を、選択したアクセラレータに転送される呼び出しデータ列が格納された前記専用メモリ領域の識別情報に更新し、
前記応答データ列受信手段は、前記応答データ列が格納された前記専用メモリ領域の識別情報が前記使用状況情報として記憶されたアクセラレータの当該使用状況情報を、使用中でないことを表す情報に更新することを特徴とする請求項1から請求項3のいずれか1項に記載のアクセラレータ処理管理装置。 The accelerator usage status storage means stores, as the usage status information, identification information of the dedicated memory area for the task that is calling the process being executed by the accelerator for each of the accelerators in use,
The accelerator selection transfer means updates the usage status information of the selected accelerator to identification information of the dedicated memory area in which a call data string to be transferred to the selected accelerator is stored,
The response data string receiving unit updates the usage status information of the accelerator in which the identification information of the dedicated memory area in which the response data string is stored is stored as the usage status information to information indicating that the accelerator is not in use. The accelerator process management apparatus according to claim 1, wherein the accelerator process management apparatus is any one of claims 1 to 3.
前記複数の専用メモリ領域を含むメモリ領域と、
前記複数のプロセッサコアを含むマルチコアプロセッサと、
を備えたホスト装置。 The accelerator process management device according to any one of claims 1 to 4,
A memory area including the plurality of dedicated memory areas;
A multi-core processor including the plurality of processor cores;
Host device with
前記複数のアクセラレータと、
を備えたアクセラレータ処理実行システム。 A host device according to claim 5;
The plurality of accelerators;
Accelerator processing execution system with
複数のプロセッサコアを含むマルチコアプロセッサに接続された複数のアクセラレータのそれぞれについて、前記複数のプロセッサコアによって並列に実行され得るタスクによる使用状況を表す使用状況情報を記憶するアクセラレータ使用状況記憶手段を用いて、
前記タスクからの前記アクセラレータの呼び出し処理に応じて、前記呼び出し処理を表す呼び出しデータ列を生成し、生成した呼び出しデータ列を、複数の専用メモリ領域のうち当該タスク用の専用メモリ領域に格納し、
前記専用メモリ領域に前記呼び出しデータ列が格納されている場合、前記アクセラレータ使用状況記憶手段を参照することにより使用中でないアクセラレータの1つを選択し、選択したアクセラレータに対して、前記専用メモリ領域に格納された前記呼び出しデータ列を転送するとともに、前記アクセラレータ使用状況記憶手段における当該アクセラレータの前記使用状況情報を、使用中であることを表すよう更新し、
前記アクセラレータから前記呼び出しデータ列の応答として受信された応答データ列を、前記呼び出し処理の呼び出し元のタスク用の前記専用メモリ領域に格納するとともに、前記アクセラレータ使用状況記憶手段における当該アクセラレータの前記使用状況情報を、使用中でないことを表すよう更新し、
前記専用メモリ領域に格納された前記応答データ列に基づいて、前記呼び出し元の前記タスクに対して呼び出し処理結果を出力する方法。 Computer equipment
For each of a plurality of accelerators connected to a multi-core processor including a plurality of processor cores, using an accelerator usage status storage unit that stores usage status information indicating usage status by tasks that can be executed in parallel by the plurality of processor cores ,
In response to the accelerator call process from the task, generate a call data string representing the call process, store the generated call data string in a dedicated memory area for the task among a plurality of dedicated memory areas,
When the call data string is stored in the dedicated memory area, one of the accelerators that are not in use is selected by referring to the accelerator usage status storage unit, and the selected accelerator is stored in the dedicated memory area. Transferring the stored call data string, and updating the use status information of the accelerator in the accelerator use status storage means to indicate that it is in use;
The response data sequence received as a response to the call data sequence from the accelerator is stored in the dedicated memory area for the call source task of the call processing, and the usage status of the accelerator in the accelerator usage status storage means Update the information to indicate that it is not in use,
A method for outputting a call processing result to the caller task based on the response data string stored in the dedicated memory area.
前記タスクからの前記アクセラレータの呼び出し処理に応じて、前記呼び出し処理を表す呼び出しデータ列を生成し、生成した呼び出しデータ列を、複数の専用メモリ領域のうち当該タスク用の専用メモリ領域に格納する呼び出しデータ列生成ステップと、
前記専用メモリ領域に前記呼び出しデータ列が格納されている場合、前記アクセラレータ使用状況記憶手段を参照することにより使用中でないアクセラレータの1つを選択し、選択したアクセラレータに対して、前記専用メモリ領域に格納された前記呼び出しデータ列を転送するとともに、前記アクセラレータ使用状況記憶手段における当該アクセラレータの前記使用状況情報を、使用中であることを表すよう更新するアクセラレータ選択転送ステップと、
前記アクセラレータから前記呼び出しデータ列の応答として受信された応答データ列を、前記呼び出し処理の呼び出し元の前記タスク用の前記専用メモリ領域に格納するとともに、前記アクセラレータ使用状況記憶手段における当該アクセラレータの前記使用状況情報を、使用中でないことを表すよう更新する応答データ列受信ステップと、
前記専用メモリ領域に格納された前記応答データ列に基づいて、前記呼び出し元の前記タスクに対して呼び出し処理結果を出力する処理結果出力ステップと、
をコンピュータ装置に実行させるプログラム。 For each of a plurality of accelerators connected to a multi-core processor including a plurality of processor cores, using an accelerator usage status storage unit that stores usage status information indicating usage status by tasks that can be executed in parallel by the plurality of processor cores ,
In response to the accelerator call process from the task, a call data string representing the call process is generated, and the generated call data string is stored in a dedicated memory area for the task among a plurality of dedicated memory areas A data string generation step;
When the call data string is stored in the dedicated memory area, one of the accelerators that are not in use is selected by referring to the accelerator usage status storage unit, and the selected accelerator is stored in the dedicated memory area. Transferring the stored call data sequence, and updating the accelerator selection transfer step of updating the accelerator usage status information in the accelerator usage status storage means to indicate that it is in use;
The response data string received as a response to the call data string from the accelerator is stored in the dedicated memory area for the task that is the caller of the call process, and the use of the accelerator in the accelerator usage status storage unit A response data string receiving step for updating the status information to indicate that it is not in use;
Based on the response data string stored in the dedicated memory area, a process result output step for outputting a call process result to the caller task;
That causes a computer device to execute the program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017009729A JP6817827B2 (en) | 2017-01-23 | 2017-01-23 | Accelerator processing management device, host device, accelerator processing execution system, method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017009729A JP6817827B2 (en) | 2017-01-23 | 2017-01-23 | Accelerator processing management device, host device, accelerator processing execution system, method and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018120307A true JP2018120307A (en) | 2018-08-02 |
JP6817827B2 JP6817827B2 (en) | 2021-01-20 |
Family
ID=63045246
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017009729A Active JP6817827B2 (en) | 2017-01-23 | 2017-01-23 | Accelerator processing management device, host device, accelerator processing execution system, method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6817827B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020004045A1 (en) | 2018-06-25 | 2020-01-02 | 株式会社ブリヂストン | Tire and tire manufacturing method |
WO2024037239A1 (en) * | 2022-08-15 | 2024-02-22 | 华为技术有限公司 | Accelerator scheduling method and related device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006048661A (en) * | 2004-07-06 | 2006-02-16 | Matsushita Electric Ind Co Ltd | Processor system for controlling data transfer between processor and coprocessor |
JP2006065850A (en) * | 2004-07-28 | 2006-03-09 | Renesas Technology Corp | Microcomputer |
JP2011204052A (en) * | 2010-03-26 | 2011-10-13 | Seiko Epson Corp | Image processor and image processing program |
JP2013196206A (en) * | 2012-03-16 | 2013-09-30 | Fujitsu Ltd | Accelerator management device, accelerator management method, and input/output device |
JP2015513715A (en) * | 2012-01-27 | 2015-05-14 | クゥアルコム・インコーポレイテッドQualcomm Incorporated | Buffer management for graphics parallel processing unit |
JP2015170270A (en) * | 2014-03-10 | 2015-09-28 | 日本電気株式会社 | Information processing apparatus, resource access method thereof and resource access program |
JP2018045415A (en) * | 2016-09-14 | 2018-03-22 | セイコーエプソン株式会社 | Image processing device and image processing method |
-
2017
- 2017-01-23 JP JP2017009729A patent/JP6817827B2/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006048661A (en) * | 2004-07-06 | 2006-02-16 | Matsushita Electric Ind Co Ltd | Processor system for controlling data transfer between processor and coprocessor |
JP2006065850A (en) * | 2004-07-28 | 2006-03-09 | Renesas Technology Corp | Microcomputer |
JP2011204052A (en) * | 2010-03-26 | 2011-10-13 | Seiko Epson Corp | Image processor and image processing program |
JP2015513715A (en) * | 2012-01-27 | 2015-05-14 | クゥアルコム・インコーポレイテッドQualcomm Incorporated | Buffer management for graphics parallel processing unit |
JP2013196206A (en) * | 2012-03-16 | 2013-09-30 | Fujitsu Ltd | Accelerator management device, accelerator management method, and input/output device |
JP2015170270A (en) * | 2014-03-10 | 2015-09-28 | 日本電気株式会社 | Information processing apparatus, resource access method thereof and resource access program |
JP2018045415A (en) * | 2016-09-14 | 2018-03-22 | セイコーエプソン株式会社 | Image processing device and image processing method |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020004045A1 (en) | 2018-06-25 | 2020-01-02 | 株式会社ブリヂストン | Tire and tire manufacturing method |
WO2024037239A1 (en) * | 2022-08-15 | 2024-02-22 | 华为技术有限公司 | Accelerator scheduling method and related device |
Also Published As
Publication number | Publication date |
---|---|
JP6817827B2 (en) | 2021-01-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9311157B2 (en) | Method and apparatus for dynamic resource allocation of processing units on a resource allocation plane having a time axis and a processing unit axis | |
US7444632B2 (en) | Balancing computational load across a plurality of processors | |
TWI525540B (en) | Mapping processing logic having data-parallel threads across processors | |
WO2017070900A1 (en) | Method and apparatus for processing task in a multi-core digital signal processing system | |
JP2009265963A (en) | Information processing system and task execution control method | |
US20050071828A1 (en) | System and method for compiling source code for multi-processor environments | |
CN114020470B (en) | Resource allocation method and device, readable medium and electronic equipment | |
JP2013546105A (en) | Optimizing communication of system call requests | |
CN113284038B (en) | Method, computing device, computing system, and storage medium for performing computations | |
US20170344398A1 (en) | Accelerator control device, accelerator control method, and program storage medium | |
JPWO2011148920A1 (en) | Multiprocessor system, execution control method, execution control program | |
JP5885481B2 (en) | Information processing apparatus, information processing method, and program | |
CN115421787A (en) | Instruction execution method, apparatus, device, system, program product, and medium | |
JP6817827B2 (en) | Accelerator processing management device, host device, accelerator processing execution system, method and program | |
JP7122299B2 (en) | Methods, apparatus, devices and storage media for performing processing tasks | |
CN115775199B (en) | Data processing method and device, electronic equipment and computer readable storage medium | |
KR101620896B1 (en) | Executing performance enhancement method, executing performance enhancement apparatus and executing performance enhancement system for map-reduce programming model considering different processing type | |
CN115599507A (en) | Data processing method, execution workstation, electronic device and storage medium | |
CN114675954A (en) | Task scheduling method and device | |
US20120137300A1 (en) | Information Processor and Information Processing Method | |
US10503557B2 (en) | Method of processing OpenCL kernel and computing device therefor | |
CN113760524A (en) | Task execution method and device | |
CN113094099A (en) | Matrix data broadcast architecture | |
JP2008276322A (en) | Information processing device, system, and method | |
US20130166887A1 (en) | Data processing apparatus and data processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20170621 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20170622 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20191216 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20201125 |
|
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: 20201208 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20201225 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6817827 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |