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
JP7305052B2 - Delay update device, processing system and program - Google Patents
[go: Go Back, main page]

JP7305052B2 - Delay update device, processing system and program - Google Patents

Delay update device, processing system and program Download PDF

Info

Publication number
JP7305052B2
JP7305052B2 JP2022539830A JP2022539830A JP7305052B2 JP 7305052 B2 JP7305052 B2 JP 7305052B2 JP 2022539830 A JP2022539830 A JP 2022539830A JP 2022539830 A JP2022539830 A JP 2022539830A JP 7305052 B2 JP7305052 B2 JP 7305052B2
Authority
JP
Japan
Prior art keywords
program
processing
data parallel
cores
delay amount
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
JP2022539830A
Other languages
Japanese (ja)
Other versions
JPWO2022024214A1 (en
JPWO2022024214A5 (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Publication of JPWO2022024214A1 publication Critical patent/JPWO2022024214A1/ja
Publication of JPWO2022024214A5 publication Critical patent/JPWO2022024214A5/en
Application granted granted Critical
Publication of JP7305052B2 publication Critical patent/JP7305052B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)

Description

本開示は、マルチコアプロセッサシステムに関する。 The present disclosure relates to multicore processor systems.

特許文献1に記載されているように、従来、処理の高速化を図るために、複数のコアを有するマルチコアプロセッサを使用して並列処理を実行するマルチコアプロセッサシステムに関する技術が提案されている。また、マルチコアプロセッサシステムの処理性能を高めるため、複数のコアでキャッシュを共有する技術が知られている。 As described in Patent Literature 1, conventionally, in order to speed up processing, there has been proposed a technology related to a multicore processor system that executes parallel processing using a multicore processor having a plurality of cores. Also, in order to improve the processing performance of a multi-core processor system, a technology is known in which a plurality of cores share a cache.

マルチコアプロセッサシステムにおいて、全プログラムがキャッシュに格納される場合には、マルチコアプロセッサは効率よくプログラムを実行することができる。 In a multi-core processor system, if all programs are cached, the multi-core processor can execute programs efficiently.

しかしながら、ソフトウェアの肥大化等により、全プログラムがキャッシュに格納されない場合、キャッシュに収まりきらないプログラムは、キャッシュミスの発生都度、キャッシュへロードされる。そのため、マルチコアプロセッサの実行効率が低下する可能性がある。 However, if the entire program cannot be stored in the cache due to software bloat or the like, the program that cannot be stored in the cache is loaded into the cache each time a cache miss occurs. Therefore, the execution efficiency of the multicore processor may decrease.

一方で、並列処理方法としては、複数のデータに対して複数コアが同じ処理を並列に実行するデータ並列処理が知られている。 On the other hand, as a parallel processing method, data parallel processing is known in which a plurality of cores execute the same processing on a plurality of data in parallel.

特開2008-191949号公報JP 2008-191949 A

マルチコアプロセッサシステムについては、マルチコアプロセッサを有効利用できることは望ましい。 For multi-core processor systems, it is desirable to be able to take advantage of multi-core processors.

そこで、本開示は上述の点に鑑みて成されたものであり、マルチコアプロセッサの有効利用を図ることが可能な技術を提供することを目的とする。 Therefore, the present disclosure has been made in view of the above points, and an object thereof is to provide a technology that enables effective use of a multi-core processor.

プログラム作成装置の一態様は、複数のコアを含むマルチコアプロセッサと、前記複数のコアで共有される共有キャッシュとを備えるマルチコアプロセッサシステムの前記マルチコアプロセッサが実行するプログラムを作成するプログラム作成装置であって、処理対象プログラムにおいて、データ並列処理が記述されたデータ並列プログラムに変換される対象の部分プログラムである対象部分プログラムを特定する特定部と、前記複数のコアにおいて、一部のコアでの処理開始タイミングが、他のコアでの処理開始タイミングよりも遅延するような前記データ並列処理が記述された前記データ並列プログラムに前記対象部分プログラムを変換し、それによって得られた前記データ並列プログラムを含む実行対象プログラムを生成する生成部とを備える。 One aspect of a program creation device is a program creation device that creates a program to be executed by the multi-core processor of a multi-core processor system comprising a multi-core processor including a plurality of cores and a shared cache shared by the plurality of cores, a specifying unit for specifying a target partial program, which is a target partial program to be converted into a data parallel program in which data parallel processing is described, in the processing target program; Execution including the data parallel program obtained by converting the target partial program into the data parallel program describing the data parallel processing whose timing is delayed from the processing start timing of other cores. and a generator for generating the target program.

また、遅延量更新装置の一態様は、上記のプログラム作成装置が作成した前記データ並列プログラムに記述された前記データ並列処理において前記一部のコアでの処理開始タイミングの遅延量を更新する遅延量更新装置であって、前記マルチコアプロセッサでの前記データ並列処理の実行状態を示す実行状態情報を取得する取得部と、前記実行状態情報に基づいて前記遅延量を更新する更新部とを備える。 Further, one aspect of the delay amount updating device is a delay amount for updating the delay amount of the processing start timing in the part of the cores in the data parallel processing described in the data parallel program created by the program creating device. An update device, comprising: an acquisition unit that acquires execution state information indicating an execution state of the data parallel processing in the multi-core processor; and an update unit that updates the delay amount based on the execution state information.

また、処理システムの一態様は、上記のプログラム作成装置と、上記の遅延量更新装置とを備える。 Further, one aspect of the processing system includes the above program creation device and the above delay amount updating device.

また、プログラムの一態様は、複数のコアを含むマルチコアプロセッサと、前記複数のコアで共有される共有キャッシュとを備えるマルチコアプロセッサシステムの前記マルチコアプロセッサが実行するプログラムを作成するためのプログラムであって、コンピュータ装置に、処理対象プログラムにおいて、データ並列処理が記述されたデータ並列プログラムに変換される対象の部分プログラムである対象部分プログラムを特定する工程と、前記複数のコアにおいて、一部のコアでの処理開始タイミングが、他のコアでの処理開始タイミングよりも遅延するような前記データ並列処理が記述された前記データ並列プログラムに前記対象部分プログラムを変換し、それによって得られた前記データ並列プログラムを含む実行対象プログラムを生成する工程とを実行させるためのものである。 Further, one aspect of the program is a program for creating a program to be executed by the multi-core processor of a multi-core processor system comprising a multi-core processor including a plurality of cores and a shared cache shared by the plurality of cores, specifying, in a computer device, a target partial program that is a target partial program to be converted into a data parallel program in which data parallel processing is described in a processing target program; converting the target partial program into the data parallel program in which the data parallel processing is described such that the processing start timing of the other cores is delayed from the processing start timing of the other cores, and the data parallel program obtained thereby and a step of generating an execution target program including

また、プログラムの一態様は、上記のプログラム作成装置が作成した前記データ並列プログラムに記述された前記データ並列処理において前記一部のコアでの処理開始タイミングの遅延量を更新するためのプログラムであって、コンピュータ装置に、前記マルチコアプロセッサでの前記データ並列処理の実行状態を示す実行状態情報を取得する工程と、前記実行状態情報に基づいて前記遅延量を更新する工程とを実行させるためのものである。 Further, one aspect of the program is a program for updating the delay amount of the processing start timing in the part of the cores in the data parallel processing described in the data parallel program created by the program creation device. a step of obtaining execution state information indicating an execution state of the data parallel processing in the multi-core processor; and a step of updating the delay amount based on the execution state information. is.

マルチコアプロセッサの有効利用を図ることができる。 Effective use of a multi-core processor can be achieved.

本開示の目的、特徴、態様、および利点は、以下の詳細な説明と添付図面とによって、より明白となる。 Objects, features, aspects and advantages of the present disclosure will become more apparent with the following detailed description and accompanying drawings.

処理システムの構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of a processing system. プログラム作成装置の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of a program creation apparatus. プログラム書き込み装置の構成の一例を示すブロック図である。1 is a block diagram showing an example of the configuration of a program writing device; FIG. プログラム作成装置の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of a program creation apparatus. プログラム作成装置の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation|movement of a program creation apparatus. マルチコアプロセッサの動作の一例を示す図である。FIG. 4 is a diagram showing an example of the operation of a multicore processor; FIG. マルチコアプロセッサの動作の一例を示す図である。FIG. 4 is a diagram showing an example of the operation of a multicore processor; FIG. for文の一例を示す図である。It is a figure which shows an example of a for sentence. 遅延データ並列プログラムの一例を示す図である。It is a figure which shows an example of a delayed data parallel program. 遅延量更新装置の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of a delay amount update apparatus. 遅延量更新装置の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation|movement of a delay amount update apparatus. マルチコアプロセッサの動作の一例を示す図である。FIG. 4 is a diagram showing an example of the operation of a multicore processor; FIG. マルチコアプロセッサの動作の一例を示す図である。FIG. 4 is a diagram showing an example of the operation of a multicore processor; FIG. 指定記述の一例を示す図である。It is a figure which shows an example of a designation|designated description. エンジニアリングツールの一部の構成の一例を示す図である。It is a figure which shows an example of a structure of a part of engineering tool. 更新部の一例を示すブロック図である。It is a block diagram which shows an example of an update part. 遅延量更新装置の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation|movement of a delay amount update apparatus.

実施の形態1.
図1は本実施の形態に係る処理システム1の構成の一例を示すブロック図である。処理システム1は、マルチコアプロセッサシステム2と、エンジニアリングツール3とを備える。エンジニアリングツール3は、マルチコアプロセッサシステム2が実行するプログラムを作成する。そして、エンジニアリングツール3は、作成したプログラムをマルチコアプロセッサシステム2に書き込む。
Embodiment 1.
FIG. 1 is a block diagram showing an example of the configuration of a processing system 1 according to this embodiment. A processing system 1 comprises a multi-core processor system 2 and an engineering tool 3 . The engineering tool 3 creates programs to be executed by the multicore processor system 2 . The engineering tool 3 then writes the created program to the multicore processor system 2 .

<マルチコアプロセッサシステムの構成例>
マルチコアプロセッサシステム2(単にプロセッサシステム2ともいう)は、例えば、家電機器及びIoT(Internet of Things)機器等の組み込み機器に搭載される。プロセッサシステム2は組み込み機器以外の装置に搭載されてもよい。
<Configuration example of multi-core processor system>
A multi-core processor system 2 (simply referred to as a processor system 2) is installed in built-in devices such as home appliances and IoT (Internet of Things) devices. The processor system 2 may be installed in a device other than an embedded device.

図1に示されるように、プロセッサシステム2は、例えば、複数のコア21を備えるマルチコアプロセッサ20と、複数のコア21で共有される共有キャッシュ22と、複数のコア21で共有される共有メモリ23とを備える。各コア21は一種の演算回路であって、プログラムを実行することが可能である。複数のコア21は、互いに独立して共通のプログラムを実行することが可能である。複数のコア21は例えば1つのパッケージ内に収容されている。マルチコアプロセッサ20は、例えば、CPU(Central Processing Unit)の一種であると言える。 As shown in FIG. 1, the processor system 2 includes, for example, a multi-core processor 20 having a plurality of cores 21, a shared cache 22 shared by the plurality of cores 21, and a shared memory 23 shared by the plurality of cores 21. and Each core 21 is a kind of arithmetic circuit and can execute a program. A plurality of cores 21 can execute a common program independently of each other. A plurality of cores 21 are accommodated, for example, in one package. The multi-core processor 20 can be said to be a kind of CPU (Central Processing Unit), for example.

共有メモリ23(単にメモリ23ともいう)は、プログラム等の各種データを記憶する記憶回路である。メモリ23はメインメモリとも呼ばれる。メモリ23内のプログラムはマルチコアプロセッサ20によって実行される。メモリ23は、例えば、メインプログラム230、更新プログラム231及び遅延量232を記憶する。メインプログラム230は、例えば、プロセッサシステム2が搭載される組み込み機器が実行する各種処理が記述されたプログラムである。遅延量232は、後述するように、メインプログラム230の実行時に参照されるパラメータである。更新プログラム231は、遅延量232を更新する処理が記述されたプログラムである。メモリ23は、例えばROM(Read Only Memory)で構成されている。メモリ23は、フラッシュROMで構成されてもよいし、フラッシュROM以外のメモリで構成されてもよい。 The shared memory 23 (simply called memory 23) is a storage circuit that stores various data such as programs. The memory 23 is also called main memory. Programs in the memory 23 are executed by the multicore processor 20 . The memory 23 stores a main program 230, an update program 231 and a delay amount 232, for example. The main program 230 is, for example, a program in which various types of processing to be executed by an embedded device in which the processor system 2 is installed are described. The delay amount 232 is a parameter that is referenced when the main program 230 is executed, as will be described later. The update program 231 is a program in which processing for updating the delay amount 232 is described. The memory 23 is composed of, for example, a ROM (Read Only Memory). The memory 23 may be composed of a flash ROM, or may be composed of a memory other than the flash ROM.

共有キャッシュ22(単にキャッシュ22ともいう)は、プログラム等の各種データを一時的に記憶する記憶回路である。キャッシュ22の記憶容量は、メモリ23の記憶容量よりも小さくなっている。また、キャッシュ22の速度はメモリ23の速度よりも速くなっている。キャッシュ22は、例えばRAM(Random Access Memory)で構成されている。キャッシュ22は、SRAM(Static Random Access Memory)で構成されてもよいし、SRAM以外のメモリで構成されてもよい。 The shared cache 22 (simply referred to as cache 22) is a storage circuit that temporarily stores various data such as programs. The storage capacity of cache 22 is smaller than the storage capacity of memory 23 . Also, the speed of the cache 22 is faster than the speed of the memory 23 . The cache 22 is composed of, for example, a RAM (Random Access Memory). The cache 22 may be composed of SRAM (Static Random Access Memory), or may be composed of memory other than SRAM.

各コア21は、プログラムを実行する場合、キャッシュ22内に処理対象のデータ(プログラムも含む)が存在するときにはキャッシュ22から処理対象のデータを読み出す。キャッシュ22内に処理対象のデータ(言い換えれば必要なデータ)が存在することは、キャッシュヒットと呼ばれる。一方で、各コア21は、キャッシュ22内に処理対象のデータが存在しないときには、共有メモリ23から処理対象のデータを読み出してキャッシュ22内に一旦記憶する。そして、各コア21は、キャッシュ22から処理対象のデータを読み出す。キャッシュ22内に処理対象のデータが存在しないことは、キャッシュミスと呼ばれる。 When executing a program, each core 21 reads the data to be processed from the cache 22 if the data to be processed (including the program) exists in the cache 22 . The presence of data to be processed (in other words, necessary data) in the cache 22 is called a cache hit. On the other hand, when the data to be processed does not exist in the cache 22 , each core 21 reads the data to be processed from the shared memory 23 and temporarily stores it in the cache 22 . Then, each core 21 reads data to be processed from the cache 22 . The absence of data to be processed in the cache 22 is called a cache miss.

<エンジニアリングツールの構成例>
図1に示されるように、エンジニアリングツール3は、プログラム作成装置30(単に作成装置30ともいう)及びプログラム書き込み装置35(単に書き込み装置35ともいう)を備える。作成装置30は、マルチコアプロセッサ20が実行するメインプログラム230を作成することが可能である。書き込み装置35は、作成装置30が作成したメインプログラム230をメモリ23に書き込むことが可能である。なお、作成装置30は、更新プログラム231を作成してもよい。この場合、書き込み装置35は、作成装置30が作成した更新プログラム231をメモリ23に書き込んでもよい。
<Engineering tool configuration example>
As shown in FIG. 1, the engineering tool 3 includes a program creation device 30 (simply referred to as creation device 30) and a program writing device 35 (simply referred to as writing device 35). The creating device 30 can create the main program 230 that the multicore processor 20 executes. The writing device 35 can write the main program 230 created by the creating device 30 into the memory 23 . Note that the creation device 30 may create the update program 231 . In this case, the writing device 35 may write the update program 231 created by the creating device 30 into the memory 23 .

図2は作成装置30のハードウェア構成の一例を示すブロック図である。作成装置30は一種のコンピュータ装置である。作成装置30は、パーソナルコンピュータであってもよいし、他のコンピュータ装置であってもよい。図2に示されるように、作成装置30は、ハードウェアとして、例えば、処理回路300と、記憶装置301と、通信装置302と、入力装置303と、表示装置304とを備える。 FIG. 2 is a block diagram showing an example of the hardware configuration of the creation device 30. As shown in FIG. The creation device 30 is a kind of computer device. The creation device 30 may be a personal computer or another computer device. As shown in FIG. 2, the creation device 30 includes, for example, a processing circuit 300, a storage device 301, a communication device 302, an input device 303, and a display device 304 as hardware.

処理回路300は、例えば、少なくとも一つのプロセッサを備える。処理回路300は、例えば、プロセッサの一種であるCPUを備える。処理回路300は、複数のCPUを備えてもよいし、少なくとも一つのDSP(Digital Signal Processor)を備えてもよい。処理回路300は処理部300とも言える。 Processing circuitry 300 comprises, for example, at least one processor. The processing circuit 300 includes, for example, a CPU, which is a type of processor. The processing circuit 300 may include multiple CPUs or at least one DSP (Digital Signal Processor). The processing circuit 300 can also be called a processing unit 300 .

なお、処理回路300の少なくとも一部は、その機能の実現にソフトウェアが不要なハードウェア回路によって実現されてもよい。この場合には、処理回路300の少なくとも一部は、例えば、単一回路、複合回路、プログラム化されたプロセッサ、並列プログラム化されたプロセッサ、ASIC(Application Specific Integrated Circuit)及びFPGA(field-programmable gate array)の少なくとも一つで構成されてもよい。 Note that at least part of the processing circuit 300 may be implemented by a hardware circuit that does not require software to implement its functions. In this case, at least part of the processing circuit 300 may be, for example, a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, an ASIC (Application Specific Integrated Circuit) and an FPGA (field-programmable gate). array).

記憶装置301は、例えば、ROM及びRAMなどの、CPU等のプロセッサが読み取り可能な非一時的な記録媒体を含む。記憶装置301は、ROM及びRAM以外の、コンピュータが読み取り可能な非一時的な記録媒体を備えてもよい。記憶装置301は、例えば、HDD(Hard Disk Drive)またはSSD(Solid State Drive)などを備えてもよい。 The storage device 301 includes non-temporary recording media such as ROM and RAM, which are readable by a processor such as a CPU. The storage device 301 may comprise a non-temporary computer-readable recording medium other than ROM and RAM. The storage device 301 may include, for example, an HDD (Hard Disk Drive) or an SSD (Solid State Drive).

記憶装置301は、プログラム作成装置30を制御するためのプログラム301aを記憶する。プログラム301aには、例えばOS(Operating System)が含まれる。処理回路300のプロセッサがプログラム301aを実行することによって、処理回路300の各種機能が実現される。 The storage device 301 stores a program 301 a for controlling the program creating device 30 . The program 301a includes, for example, an OS (Operating System). Various functions of the processing circuit 300 are realized by the processor of the processing circuit 300 executing the program 301a.

表示装置304は、文字、記号及び図形等の各種情報を表示することが可能である。表示装置304は、液晶表示装置であってもよいし、他の種類の表示装置であってもよい。入力装置303は、ユーザからの入力を受け付けることが可能である。入力装置303は、例えば、キーボード及びマウスを備える。入力装置303は、タッチセンサを備えてもよい。この場合、表示装置304は、入力装置303が備えるタッチセンサを有するタッチパネルディスプレイであってもい。入力装置303はマイクを備えてもよい。 The display device 304 can display various types of information such as characters, symbols, and graphics. The display device 304 may be a liquid crystal display device or another type of display device. The input device 303 can accept input from the user. Input device 303 includes, for example, a keyboard and a mouse. Input device 303 may include a touch sensor. In this case, the display device 304 may be a touch panel display having a touch sensor included in the input device 303 . Input device 303 may comprise a microphone.

通信装置302は、作成装置30の外部の装置と通信することが可能である。通信装置302は通信回路とも言える。通信装置302は、例えば、書き込み装置35と通信することが可能である。通信装置302は、例えば、書き込み装置35と直接的に有線通信を行う。通信装置302は、書き込み装置35と無線通信を行ってもよい。また、通信装置302は、インターネット等を含むネットワークを通じて書き込み装置35と通信してもよい。 The communication device 302 can communicate with devices external to the creation device 30 . The communication device 302 can also be said to be a communication circuit. The communication device 302 can communicate with the writing device 35, for example. The communication device 302 performs wired communication directly with the writing device 35, for example. The communication device 302 may perform wireless communication with the writing device 35 . Also, the communication device 302 may communicate with the writing device 35 through a network including the Internet.

なお、作成装置30のハードウェア構成は上記の例に限られない。例えば、作成装置30は、処理回路300、記憶装置301、通信装置302、入力装置303及び表示装置304以外の装置を備えてもよい。 Note that the hardware configuration of the creation device 30 is not limited to the above example. For example, the creation device 30 may include devices other than the processing circuitry 300 , the storage device 301 , the communication device 302 , the input device 303 and the display device 304 .

図3は書き込み装置35のハードウェア構成の一例を示すブロック図である。書き込み装置35は一種のコンピュータ装置である。図3に示されるように、書き込み装置35は、ハードウェアとして、例えば、処理回路350と、記憶装置351と、通信装置352と、通信装置353とを備える。 FIG. 3 is a block diagram showing an example of the hardware configuration of the writing device 35. As shown in FIG. The writing device 35 is a kind of computer device. As shown in FIG. 3, the writing device 35 includes, for example, a processing circuit 350, a storage device 351, a communication device 352, and a communication device 353 as hardware.

処理回路350は、例えば、少なくとも一つのプロセッサを備える。処理回路350は、例えば、プロセッサの一種であるCPUを備える。処理回路350は、複数のCPUを備えてもよいし、少なくとも一つのDSPを備えてもよい。 Processing circuitry 350 includes, for example, at least one processor. The processing circuitry 350 includes, for example, a CPU, which is a type of processor. The processing circuitry 350 may comprise multiple CPUs and may comprise at least one DSP.

なお、処理回路350の少なくとも一部は、その機能の実現にソフトウェアが不要なハードウェア回路によって実現されてもよい。この場合には、処理回路350の少なくとも一部は、例えば、単一回路、複合回路、プログラム化されたプロセッサ、並列プログラム化されたプロセッサ、ASIC及びFPGAの少なくとも一つで構成されてもよい。 Note that at least part of the processing circuit 350 may be implemented by a hardware circuit that does not require software to implement its functions. In this case, at least a portion of processing circuitry 350 may comprise, for example, single circuits, multiple circuits, programmed processors, parallel programmed processors, ASICs, and/or FPGAs.

記憶装置351は、例えば、ROM及びRAMなどの、CPU等のプロセッサが読み取り可能な非一時的な記録媒体を含む。記憶装置351は、記憶装置301と同様に、ROM及びRAM以外の、コンピュータが読み取り可能な非一時的な記録媒体を備えてもよい。 The storage device 351 includes, for example, non-temporary recording media such as ROM and RAM that are readable by a processor such as a CPU. As with the storage device 301, the storage device 351 may include a non-temporary computer-readable recording medium other than ROM and RAM.

記憶装置351は、書き込み装置35を制御するためのプログラム351aを記憶する。処理回路350のプロセッサがプログラム351aを実行することによって、処理回路350の各種機能が実現される。 The storage device 351 stores a program 351a for controlling the writing device 35. FIG. Various functions of the processing circuit 350 are realized by the processor of the processing circuit 350 executing the program 351a.

通信装置352は、作成装置30の通信装置302と通信することが可能である。通信装置353は、プロセッサシステム2と通信することが可能である。プロセッサシステム2は通信装置353を通信する通信装置を備える。通信装置353は、プロセッサシステム2と直接通信してもよいし、インターネット等を含むネットワークを通じてプロセッサシステム2と通信してもよい。通信装置353は有線通信を行ってもよいし、無線通信を行ってもよい。 The communication device 352 can communicate with the communication device 302 of the creation device 30 . Communication device 353 is capable of communicating with processor system 2 . Processor system 2 includes a communication device that communicates with communication device 353 . The communication device 353 may communicate directly with the processor system 2 or may communicate with the processor system 2 through a network including the Internet. The communication device 353 may perform wired communication or wireless communication.

なお、書き込み装置35のハードウェア構成は上記の例に限られない。例えば、書き込み装置35は、処理回路350、記憶装置351、通信装置352及び通信装置353以外の装置を備えてもよい。例えば、書き込み装置35は、ユーザからの入力を受け付けることが可能な入力装置を備えてもよい。 Note that the hardware configuration of the writing device 35 is not limited to the above example. For example, writing device 35 may comprise devices other than processing circuitry 350 , storage device 351 , communication device 352 and communication device 353 . For example, writing device 35 may comprise an input device capable of accepting input from a user.

以上のようなハードウェア構成例を有するエンジニアリングツール3では、作成装置30の処理回路300がメインプログラム230を作成する。そして、作成装置30の通信装置302は、処理回路300で作成されたメインプログラム230を書き込み装置35の通信装置352に送信する。書き込み装置35では、処理回路350が、通信装置352で受信されたメインプログラム230を通信装置353に入力する。通信装置353は、入力されたメインプログラム230を、プロセッサシステム2の通信装置を通じてメモリ23内に書き込む。 In the engineering tool 3 having the hardware configuration example as described above, the processing circuit 300 of the creation device 30 creates the main program 230 . The communication device 302 of the creating device 30 then transmits the main program 230 created by the processing circuit 300 to the communication device 352 of the writing device 35 . In the writing device 35 , the processing circuit 350 inputs the main program 230 received by the communication device 352 to the communication device 353 . The communication device 353 writes the input main program 230 into the memory 23 through the communication device of the processor system 2 .

なお、書き込み装置35は、プロセッサシステム2と常に接続されている必要はない。例えば、書き込み装置35がネットワークを通じてプロセッサシステム2と接続されている場合、メインプログラム230がメモリ23内に書き込まれた後、書き込み装置35は当該ネットワークから切り離されてもよい。 Note that the writing device 35 does not have to be always connected to the processor system 2 . For example, if the writing device 35 is connected to the processor system 2 through a network, the writing device 35 may be disconnected from the network after the main program 230 is written into the memory 23 .

また、上記の例では、書き込み装置35は、プロセッサシステム2に搭載されたメモリ23に対してプログラムを書き込んでいるが、プロセッサシステム2に搭載されていない状態のメモリ23に対してプログラムを書き込んでもよい。この場合、書き込み装置35は、例えば、ソケット等のメモリ23を保持する保持部品を備える。そして、書き込み装置35の処理回路350は、保持部品に保持されたメモリ23に対してプログラムを書き込む。プログラムが書き込まれたメモリ23は、プロセッサシステム2に搭載される。 In the above example, the writing device 35 writes the program to the memory 23 mounted on the processor system 2, but writing the program to the memory 23 not mounted on the processor system 2 good. In this case, the writing device 35 comprises a holding part, for example a socket, holding the memory 23 . Then, the processing circuit 350 of the writing device 35 writes the program to the memory 23 held in the holding component. A memory 23 in which a program is written is installed in the processor system 2 .

<プログラム作成装置の機能ブロック構成例>
図4は作成装置30の機能ブロック構成の一例を示す図である。図4に示されるように、作成装置30は、機能ブロックとして、プログラム記述部310と、特定部320と、生成部330と、コンパイル部340とを備える。プログラム記述部310、特定部320、生成部330及びコンパイル部340のそれぞれは、例えば、処理回路300がプログラム301aを実行することによって処理回路300に実現される機能ブロックで構成されている。なお、処理回路300の少なくとも一部が、その機能の実現にソフトウェアが不要なハードウェア回路によって実現される場合には、プログラム記述部310、特定部320、生成部330及びコンパイル部340の少なくとも一つが、その機能の実現にソフトウェアが不要なハードウェア回路によって実現されてもよい。
<Example of functional block configuration of programming device>
FIG. 4 is a diagram showing an example of the functional block configuration of the creation device 30. As shown in FIG. As shown in FIG. 4, the creation device 30 includes a program description unit 310, a specification unit 320, a generation unit 330, and a compilation unit 340 as functional blocks. Each of the program description unit 310, the specifying unit 320, the generating unit 330, and the compiling unit 340 is composed of, for example, functional blocks realized by the processing circuit 300 when the processing circuit 300 executes the program 301a. Note that when at least part of the processing circuit 300 is realized by a hardware circuit that does not require software to realize its functions, at least one of the program description unit 310, the identification unit 320, the generation unit 330, and the compilation unit 340 One may be implemented by a hardware circuit that does not require software to implement its functions.

プログラム記述部310は、入力装置303が受け付けるユーザからの入力に基づいて第1テキスト形式プログラム401を記述することが可能である。ユーザは、プログラム記述部310の機能を利用して、プログラム作成装置30上で、第1テキスト形式プログラム401を記述することが可能である。プログラム記述部310は、入力装置303が受け付けるユーザの入力に基づいて第1テキスト形式プログラム401を作成する。 The program description unit 310 can describe the first text format program 401 based on the input from the user received by the input device 303 . The user can use the function of the program writing unit 310 to write the first text format program 401 on the program creation device 30 . The program description unit 310 creates the first text format program 401 based on user input received by the input device 303 .

プログラム記述部310は、例えば、スレッド単位で処理を記述することができる。プログラム記述部310は、各スレッドについて、そのスレッドをどのコア21が実行するかを、ユーザの指示に応じて第1テキスト形式プログラム401に記述することができる。 The program description unit 310 can describe processing in units of threads, for example. The program description unit 310 can describe, for each thread, which core 21 executes the thread in the first text format program 401 according to the user's instruction.

プログラム記述部310は、例えば、プログラム301aに含まれるOSが処理回路300で実行されることによって実現される。OSには、例えば、プログラムの一種であるテキストエディタが含まれており、当該テキストエディタが実行されることによってプログラム記述部310が実現される。プログラム記述部310が作成する第1テキスト形式プログラム401は、例えば表示装置304に表示される。これにより、ユーザは、例えば、表示装置304に表示される作成中の第1テキスト形式プログラム401を見ながら、第1テキスト形式プログラム401の記述を進めることができる。 The program description unit 310 is realized by executing an OS included in the program 301a in the processing circuit 300, for example. The OS includes, for example, a text editor, which is a type of program, and the program description unit 310 is realized by executing the text editor. The first text format program 401 created by the program description unit 310 is displayed on the display device 304, for example. As a result, the user can advance the description of the first text format program 401 while watching the first text format program 401 being created displayed on the display device 304, for example.

特定部320は、第1テキスト形式プログラム401において、データ並列処理が記述されたデータ並列プログラムに変換される対象の部分プログラムを特定する。以後、当該部分プログラムを変換対象部分プログラムと呼ぶことがある。 The identification unit 320 identifies a partial program to be converted into a data parallel program describing data parallel processing in the first text format program 401 . Hereinafter, the partial program may be called a conversion target partial program.

ここで、データ並列処理とは、複数のデータ(あるいは複数のデータセット)に対して複数のコアが同じ処理を並列実行する処理である。言い換えれば、データ並列処理とは、複数のデータ(あるいは複数のデータセット)に対して複数のコアが共通のプログラム(言い換えれば同一のプログラム)を用いて並列処理を行うことである。プロセッサシステム2の複数のコア21は、互いに依存関係の無い独立した複数のデータ(あるいは複数のデータセット)に対して同じ処理を並列実行することが可能である。データ並列処理は、データ並列とも呼ばれることがある。以後、データ並列処理において個々のコアが実行する処理を並列個別処理と呼ぶことがある。特定部320の動作については後で詳細に説明する。 Here, data parallel processing is processing in which a plurality of cores execute the same processing in parallel on a plurality of data (or a plurality of data sets). In other words, data parallel processing means that multiple cores perform parallel processing on multiple data (or multiple data sets) using a common program (in other words, the same program). The plurality of cores 21 of the processor system 2 can parallelly execute the same processing on a plurality of independent data (or a plurality of data sets) that are independent of each other. Data parallelism is sometimes called data parallelism. Hereinafter, processing executed by individual cores in data parallel processing may be referred to as parallel individual processing. The operation of the identification unit 320 will be described later in detail.

生成部330は、特定部320での特定結果に基づいて、第1テキスト形式プログラム401から第2テキスト形式プログラム402を生成する。具体的には、生成部330は、複数のコア21において、一部のコア21での処理開始タイミングが、他のコア21での処理開始タイミングよりも遅延するようなデータ並列処理(遅延データ並列処理ともいう)が記述されたデータ並列プログラム(遅延データ並列プログラムともいう)に、変換対象部分プログラムを変換する。処理開始タイミングは、処理開始時刻であるとも言える。そして、生成部330は、遅延データ並列プログラムを含む第2テキスト形式プログラム402を生成する。第2テキスト形式プログラム402は、第1テキスト形式プログラム401において、変換対象部分プログラムが遅延データ並列プログラムに置き換えられたものである。後述するように、第2テキスト形式プログラム402は、コンパイルされた後にマルチコアプロセッサ20で実行されることから、実行対象プログラムであると言える。生成部330の動作については後で詳細に説明する。 The generation unit 330 generates the second text format program 402 from the first text format program 401 based on the identification result of the identification unit 320 . Specifically, the generation unit 330 performs data parallel processing (delayed data parallel processing) such that the processing start timing of some cores 21 is delayed from the processing start timing of other cores 21 among the plurality of cores 21 . process) is described (also called delayed data parallel program). The processing start timing can also be said to be the processing start time. The generation unit 330 then generates the second text format program 402 including the delayed data parallel program. The second text format program 402 is obtained by replacing the conversion target partial program in the first text format program 401 with a delayed data parallel program. As will be described later, the second text format program 402 can be said to be a program to be executed because it is executed by the multi-core processor 20 after being compiled. The operation of the generator 330 will be described later in detail.

コンパイル部340は、第2テキスト形式プログラム402をコンパイルして、第2テキスト形式プログラム402を実行形式プログラム403に変換する。実行形式プログラム403は、メインプログラム230として、書き込み装置35によってメモリ23に書き込まれる。 The compiling unit 340 compiles the second text format program 402 and converts the second text format program 402 into the executable format program 403 . The executable program 403 is written into the memory 23 by the writing device 35 as the main program 230 .

上記の説明から理解できるように、メインプログラム230には、遅延データ並列プログラム(詳細には実行形式に変換された遅延データ並列プログラム)が含まれる。この遅延データ並列プログラムに記述された遅延データ並列処理では、一部のコア21が実行する並列個別処理の開始タイミングが、他のコア21が実行する並列個別処理の開始タイミングよりも遅延している。 As can be understood from the above description, the main program 230 includes a delayed data parallel program (more specifically, a delayed data parallel program converted into executable form). In the delayed data parallel processing described in this delayed data parallel program, the start timing of the parallel individual processing executed by some cores 21 is delayed from the start timing of the parallel individual processing executed by the other cores 21. .

以後、並列個別処理をジョブと呼ぶことがある。また、遅延データ並列処理において、他の並列個別処理と比較して、開始タイミングが遅延している並列個別処理を、遅延並列個別処理あるいは遅延ジョブと呼ぶことがある。また、遅延データ並列処理において、他の並列個別処理と比較して、開始タイミングが先行している並列個別処理を、先行並列個別処理あるいは先行ジョブと呼ぶことがある。 Hereafter, parallel individual processing may be called a job. In the delayed data parallel processing, a parallel individual process whose start timing is later than other parallel individual processes may be called a delayed parallel individual process or a delayed job. Also, in the delayed data parallel processing, a parallel individual process whose start timing is earlier than other parallel individual processes may be called a preceding parallel individual process or a preceding job.

メモリ23内の遅延量232は、先行並列個別処理(先行ジョブ)の開始タイミングに対する遅延並列個別処理(遅延ジョブ)の開始タイミングの遅延量を示している。遅延量232は、メインプログラム230に含まれる遅延データ並列プログラムの実行中に、遅延ジョブを実行するコア21によって参照される。遅延データ並列プログラムを実行中のコア21は、遅延量232を参照する場合、キャッシュ22内に遅延量232が記憶されていれば、キャッシュ22から遅延量232を読み出して参照する。一方で、コア21は、キャッシュ22内に遅延量232が記憶されていなければ、メモリ23から遅延量232を読み出して一旦キャッシュ22に記憶する。そして、コア21は、キャッシュ22から遅延量232を読み出して参照する。 The delay amount 232 in the memory 23 indicates the delay amount of the start timing of the delayed parallel individual processing (delayed job) with respect to the start timing of the preceding parallel individual processing (preceding job). The delay amount 232 is referenced by the core 21 executing the delayed job during execution of the delayed data parallel program included in the main program 230 . When the core 21 executing the delayed data parallel program refers to the delay amount 232, if the delay amount 232 is stored in the cache 22, the delay amount 232 is read from the cache 22 and referred to. On the other hand, if the delay amount 232 is not stored in the cache 22 , the core 21 reads the delay amount 232 from the memory 23 and temporarily stores it in the cache 22 . The core 21 then reads the delay amount 232 from the cache 22 and refers to it.

図5はエンジニアリングツール3の動作の一例を示すフローチャートである。図5に示されるように、ステップs1において、プログラム記述部310が、ユーザの入力に基づいて第1テキスト形式プログラム401を記述して作成する。次にステップs2において、特定部320は、第1テキスト形式プログラム401において、データ並列プログラムに変換される対象の部分プログラム、つまり変換対象部分プログラムを特定する。次にステップs3において、生成部330は、変換対象部分プログラムを遅延データ並列プログラムに変換し、それによって得られた遅延データ並列プログラムを含む第2テキスト形式プログラム402を生成する。次にステップs4において、コンパイル部340は、第2テキスト形式プログラム402をコンパイルして実行形式プログラム403を生成する。そしてステップs5において、書き込み装置35が、実行形式プログラム403をメインプログラム230としてメモリ23に書き込む。プロセッサシステム2が搭載された組み込み機器の実稼働中に、メモリ23内のメインプログラム230が実行されることによって、当該組み込み機器の各種機能が実現される。メインプログラム230の実行中においては、例えば、遅延データ並列処理が繰り返し実行される。なお、第1テキスト形式プログラム401は、プログラム作成装置30以外の装置で作成されてもよい。 FIG. 5 is a flow chart showing an example of the operation of the engineering tool 3. As shown in FIG. As shown in FIG. 5, in step s1, the program description unit 310 describes and creates a first text format program 401 based on user input. Next, at step s2, the identification unit 320 identifies a partial program to be converted into a data parallel program, that is, a partial program to be converted, in the first text format program 401. FIG. Next, in step s3, the generation unit 330 converts the conversion target partial program into a delayed data parallel program, and generates the second text format program 402 including the delayed data parallel program thus obtained. Next, in step s4, the compiling section 340 compiles the second text format program 402 to generate the executable program 403. FIG. Then, in step s5, the writing device 35 writes the executable program 403 to the memory 23 as the main program 230. FIG. Various functions of the embedded device are implemented by executing the main program 230 in the memory 23 during actual operation of the embedded device on which the processor system 2 is mounted. During execution of the main program 230, for example, delayed data parallel processing is repeatedly executed. Note that the first text format program 401 may be created by a device other than the program creating device 30 .

以上のように、データ並列処理では、複数のデータに対して複数のコア21が共通のプログラムを用いて並列処理を行うことから、データ並列処理の実行によって、マルチコアプロセッサ20での処理時間を短縮することができる。 As described above, in data parallel processing, a plurality of cores 21 perform parallel processing on a plurality of data using a common program. can do.

図6はマルチコアプロセッサ20がデータ並列処理50を実行する場合の当該マルチコアプロセッサ20の動作の一例を示す図である。図6の例では、複数のコア21は、4個のコア21a~21dで構成されている。コア21a~21dは、データ並列処理50において、並列個別処理51~54をそれぞれ実行する。また、データ並列処理50は遅延データ並列処理ではなく、データ並列処理50では、複数の並列個別処理51~54の開始タイミングは同じに設定されている。複数の並列個別処理51~54の間では、処理対象のデータは異なるものの、処理内容は同じとなっている。 FIG. 6 is a diagram showing an example of the operation of the multicore processor 20 when the multicore processor 20 executes the data parallel processing 50. As shown in FIG. In the example of FIG. 6, the multiple cores 21 are composed of four cores 21a to 21d. In the data parallel processing 50, the cores 21a-21d execute parallel individual processing 51-54, respectively. Also, the data parallel processing 50 is not delayed data parallel processing, and the start timings of the plurality of parallel individual processings 51 to 54 are set to be the same. The data to be processed are different among the plurality of parallel individual processes 51 to 54, but the processing contents are the same.

図6の例では、コア21aは、並列個別処理51の前に逐次処理55を行い、並列個別処理51の後に逐次処理56を行う。データ並列処理50では、逐次処理55で得られた複数のデータセットに対して同じ処理が並列実行される。コア21aは、データ並列処理50で得られた複数のデータセットに対して逐次処理56を行う。 In the example of FIG. 6 , the core 21 a performs serial processing 55 before parallel individual processing 51 and serial processing 56 after parallel individual processing 51 . In data parallel processing 50 , the same processing is executed in parallel on multiple data sets obtained in serial processing 55 . The core 21 a performs serial processing 56 on the multiple data sets obtained by the data parallel processing 50 .

また、コア21b~21dは、低優先度処理57~59をそれぞれ実行する。低優先度処理57~59は、データ並列処理50、逐次処理55及び逐次処理56よりも処理優先度が低い処理である。低優先度処理57~59は、例えば、データ並列処理50、逐次処理55及び逐次処理56とは無関係の独立した処理である。 The cores 21b-21d also execute low-priority processes 57-59, respectively. The low priority processes 57 to 59 are processes with processing priorities lower than those of the data parallel processing 50, serial processing 55 and serial processing 56. FIG. The low-priority processes 57-59 are independent processes unrelated to the data parallel process 50, the serial process 55 and the serial process 56, for example.

図6の例では、コア21aが逐次処理55を開始し、コア21b~21dが低優先度処理57~59をそれぞれ開始する。逐次処理55が完了すると、データ並列処理50の実行が可能となる。コア21aは、逐次処理55の実行後に並列個別処理51を実行する。コア21bは、優先度の低い低優先度処理57の実行を中断して、優先度の高い並列個別処理52を実行する。同様に、コア21cは低優先度処理58の実行を中断して並列個別処理53を実行し、コア21dは低優先度処理59の実行を中断して並列個別処理54を実行する。優先度の高いデータ並列処理50が完了すると、コア21b~21dは、中断していた低優先度処理57~59の実行をそれぞれ再開し、コア21aは逐次処理56を実行する。 In the example of FIG. 6, core 21a initiates sequential processing 55, and cores 21b-21d initiate low-priority processing 57-59, respectively. Once the serial processing 55 is completed, the data parallel processing 50 can be performed. The core 21 a executes the parallel individual processing 51 after executing the serial processing 55 . The core 21b suspends execution of the low-priority process 57 and executes the parallel individual process 52 of high priority. Similarly, the core 21c suspends execution of the low-priority process 58 and executes the parallel individual process 53, and the core 21d suspends execution of the low-priority process 59 and executes the parallel individual process . When the high-priority data parallel processing 50 is completed, the cores 21b-21d resume the suspended low-priority processing 57-59, respectively, and the core 21a executes the serial processing 56. FIG.

このように、データ並列処理50が実行されることで、優先度の高い処理全体の完了時間を短縮することができる。 By executing the data parallel processing 50 in this way, it is possible to shorten the completion time of the entire high-priority processing.

図7は、マルチコアプロセッサ20が遅延データ並列処理150を実行する場合の当該マルチコアプロセッサ20の動作の一例を示す図である。図7の例では、複数のコア21は、4個のコア21a~21dで構成されている。コア21a~21dは、遅延データ並列処理150において、並列個別処理51~54をそれぞれ実行する。図7に示される遅延データ並列処理150では、例えば、コア21b~21dが実行する並列個別処理52~54の開始タイミングが、コア21aが実行する並列個別処理51の開始タイミングよりも遅延している。遅延データ並列処理150では、並列個別処理51が先行ジョブとなり、並列個別処理52~54が遅延ジョブとなる。並列個別処理52~54の開始タイミングは、並列個別処理51の開始タイミングよりも遅延量232だけ遅れている。 FIG. 7 is a diagram showing an example of the operation of the multicore processor 20 when the multicore processor 20 executes the delayed data parallel processing 150. As shown in FIG. In the example of FIG. 7, the multiple cores 21 are composed of four cores 21a to 21d. In the delayed data parallel processing 150, the cores 21a-21d execute parallel individual processing 51-54, respectively. In the delayed data parallel processing 150 shown in FIG. 7, for example, the start timing of the parallel individual processes 52 to 54 executed by the cores 21b to 21d is delayed from the start timing of the parallel individual process 51 executed by the core 21a. . In the delayed data parallel processing 150, the parallel individual processing 51 is the preceding job, and the parallel individual processings 52-54 are the delayed jobs. The start timings of the parallel individual processes 52 to 54 are delayed from the start timing of the parallel individual process 51 by a delay amount 232 .

図7の例では、図6の例と同様に、コア21aが逐次処理55を開始し、コア21b~21dが低優先度処理57~59をそれぞれ開始する。逐次処理55が完了すると、遅延データ並列処理150の実行が可能となる。コア21aは、逐次処理55の実行後に並列個別処理51を開始する。コア21bは、並列個別処理51の開始後に並列個別処理52の開始タイミングになると、優先度の低い低優先度処理57を中断して、優先度の高い並列個別処理52を開始する。同様に、コア21cは、並列個別処理53の開始タイミングになると、低優先度処理58を中断して並列個別処理53を開始する。同様に、コア21dは、並列個別処理54の開始タイミングになると、低優先度処理59を中断して並列個別処理54を開始する。優先度の高い遅延データ並列処理150が完了すると、コア21b~21dは、中断していた低優先度処理57~59の実行をそれぞれ再開し、コア21aは逐次処理56を実行する。 In the example of FIG. 7, as in the example of FIG. 6, the core 21a starts the sequential process 55 and the cores 21b-21d start the low priority processes 57-59, respectively. Once the serial processing 55 is completed, the delayed data parallel processing 150 can be executed. The core 21 a starts the parallel individual processing 51 after executing the serial processing 55 . When the parallel individual processing 52 starts after the parallel individual processing 51 has started, the core 21 b interrupts the low priority low priority processing 57 and starts the high priority parallel individual processing 52 . Similarly, the core 21 c interrupts the low-priority processing 58 and starts the parallel individual processing 53 at the start timing of the parallel individual processing 53 . Similarly, the core 21 d interrupts the low-priority processing 59 and starts the parallel individual processing 54 at the start timing of the parallel individual processing 54 . When the high-priority delayed data parallel processing 150 is completed, the cores 21b-21d resume the suspended low-priority processing 57-59, respectively, and the core 21a executes the serial processing 56. FIG.

図6の例では、マルチコアプロセッサ20がデータ並列処理50を実行する場合には、コア21a~21dは、データ並列処理50が記述された共通のデータ並列プログラムを実行することになる。データ並列プログラムがキャッシュ22内に存在しない場合には、メモリ23からデータ並列プログラムがキャッシュ22にロードされる必要がある。データ並列プログラムのキャッシュ22へのロード中においては、マルチコアプロセッサ20の待ち時間が発生する。データ並列処理50では、複数の並列個別処理51~54の開始タイミングが同じであることから、データ並列プログラムのキャッシュ22へのロードの待ち時間がコア21a~21dのすべてにおいて同じように発生する。 In the example of FIG. 6, when the multi-core processor 20 executes the data parallel processing 50, the cores 21a to 21d execute a common data parallel program in which the data parallel processing 50 is written. If the data parallel program is not present in cache 22, the data parallel program must be loaded into cache 22 from memory 23. FIG. A latency of the multi-core processor 20 occurs while the data parallel program is being loaded into the cache 22 . In the data parallel processing 50, since the start timings of the plurality of parallel individual processes 51-54 are the same, the same waiting time for loading the data parallel program to the cache 22 occurs in all of the cores 21a-21d.

これに対して、図7に示される遅延データ並列処理150では、並列個別処理52~54の開始タイミングが並列個別処理51の開始タイミングよりも遅延している。これにより、遅延データ並列処理150の実行中に、コア21b~21cは、並列個別処理52~54以外の処理を実行することができる。図7の例では、コア21b~21cは、遅延データ並列処理150の実行中に低優先度処理57~59を実行しており、並列個別処理52~54の開始タイミングの遅延分だけ、低優先度処理57~59を長く実行している。これにより、マルチコアプロセッサ20の有効利用を図ることができる。 On the other hand, in the delayed data parallel processing 150 shown in FIG. 7, the start timings of the parallel individual processings 52 to 54 are delayed from the start timing of the parallel individual processing 51 . As a result, the cores 21b-21c can execute processes other than the parallel individual processes 52-54 while the delayed data parallel processing 150 is being executed. In the example of FIG. 7, the cores 21b-21c are executing the low-priority processes 57-59 during the execution of the delayed data parallel processing 150, and the low-priority processes 52-54 are delayed by the start timings of the parallel individual processes 52-54. The processing 57 to 59 is executed for a long time. As a result, the multi-core processor 20 can be used effectively.

さらに、遅延データ並列プログラムのキャッシュ22へのロードの待ち時間がコア21a~21dのすべてにおいて同じようには発生しない。つまり、遅延データ並列プログラムにおいて、先行して処理を開始するコア21aの並列個別処理51の実行中にキャッシュ22へロードされた部分を、コア21b~21dは実行することができることから、コア21b~21dの待ち時間を、コア21aの待ち時間よりも小さくすることができる。よって、コア21b~21dでの処理開始タイミングを遅延させたとしても遅延データ並列処理150全体の処理時間を短くすることができる。図6及び7の例では、遅延データ並列処理150全体の処理時間(言い換えれば、遅延データ並列処理150の完了時間)と、データ並列処理50全体の処理時間(言い換えれば、データ並列処理50の完了時間)とがほぼ同じとなっている。 Furthermore, the latency of loading delayed data parallel programs into cache 22 does not occur equally in all of cores 21a-21d. That is, in the delayed data parallel program, the cores 21b to 21d can execute the portion loaded into the cache 22 during the execution of the parallel individual processing 51 of the core 21a that starts processing earlier. 21d can be made smaller than the latency of core 21a. Therefore, even if the processing start timings of the cores 21b to 21d are delayed, the processing time of the entire delayed data parallel processing 150 can be shortened. In the examples of FIGS. 6 and 7, the processing time of the entire delay data parallel processing 150 (in other words, the completion time of the delay data parallel processing 150) and the processing time of the entire data parallel processing 50 (in other words, the completion of the data parallel processing 50) time) are almost the same.

<特定部及び生成部の動作例の詳細説明>
特定部320は、第1テキスト形式プログラム401において変換対象部分プログラムを特定する場合には、例えば、ループ処理に着目する。例えば、第1テキスト形式プログラム401がC言語で記述されている場合を考える。この場合、特定部320は、第1テキスト形式プログラム401においてfor文を特定する。そして、特定部320は、特定したfor文で記述されたループ処理がループ間で独立したデータを扱っている場合、特定したfor文を変換対象部分プログラムとする。
<Detailed description of operation examples of the specifying unit and the generating unit>
When identifying the conversion target partial program in the first text format program 401, the identifying unit 320 focuses on loop processing, for example. For example, consider the case where the first text format program 401 is written in C language. In this case, the identifying unit 320 identifies the for statement in the first text format program 401 . Then, when the loop processing described by the specified for statement handles independent data between loops, the specifying unit 320 sets the specified for statement as the conversion target partial program.

図8は、第1テキスト形式プログラム401に含まれるfor文の一例を示す図である。図8に示されるfor文で記述されたループ処理では、ループ間で、V〔i]=X[i]+Y[i]という同じ処理が行われる。図8のループ処理は、ループ回数i(0≦i≦399)に応じたデータセット(V〔i],X[i],Y[i])を扱っており、ループ間で独立したデータを扱っている。このため、図8に示されるfor文で記述されたループ処理は、データ並列処理に変換されることが可能である。特定部320は、第1テキスト形式プログラム401において図8に示されるfor文を特定した場合、特定したfor文を、変換対象部分プログラム、つまり、データ並列処理が記述されたデータ並列プログラムに変換する対象の部分プログラムとする。 FIG. 8 is a diagram showing an example of a for statement included in the first text format program 401. As shown in FIG. In the loop processing described by the for statement shown in FIG. 8, the same processing of V[i]=X[i]+Y[i] is performed between loops. The loop processing in FIG. 8 handles data sets (V[i], X[i], Y[i]) corresponding to the number of loops i (0≤i≤399), and independent data is processed between loops. are dealing with Therefore, the loop processing described by the for statement shown in FIG. 8 can be converted into data parallel processing. When identifying the for statement shown in FIG. 8 in the first text format program 401, the identification unit 320 converts the identified for statement into a partial program to be converted, that is, a data parallel program in which data parallel processing is described. Let it be the target partial program.

生成部330は、特定部320で特定された変換対象部分プログラムを遅延データ並列プログラムに変換する。図9は、遅延データ並列プログラム550の一例を示す図である。図9の遅延データ並列プログラム550は、図8に示されるfor文が変換されたものである。図9の遅延データ並列プログラム550は、例えば4つのコア21a,21b,21c,21dで実行される。 The generation unit 330 converts the conversion target partial program identified by the identification unit 320 into a delayed data parallel program. FIG. 9 is a diagram showing an example of the delayed data parallel program 550. As shown in FIG. A delayed data parallel program 550 in FIG. 9 is obtained by converting the for statement shown in FIG. The delayed data parallel program 550 of FIG. 9 is executed, for example, by four cores 21a, 21b, 21c, and 21d.

図9の例では、例えばコア21aが、データセット(X[i],Y[i])(0≦i≦99)に対して、V〔i]=X[i]+Y[i]を実行する。コア21aが、0≦i≦99の範囲においてV〔i]=X[i]+Y[i]を行う処理が、遅延データ並列処理においてコア21aが行う並列個別処理(言い換えればジョブ)となる。また、例えばコア21bが、データセット(X[i],Y[i])(100≦i≦199)に対して、V〔i]=X[i]+Y[i]を実行する。コア21bが、100≦i≦199の範囲においてV〔i]=X[i]+Y[i]を行う処理が、遅延データ並列処理においてコア21bが行う並列個別処理となる。また、例えばコア21cが、データセット(X[i],Y[i])(200≦i≦299)に対して、V〔i]=X[i]+Y[i]を実行する。コア21cが、200≦i≦299の範囲においてV〔i]=X[i]+Y[i]を行う処理が、遅延データ並列処理においてコア21cが行う並列個別処理となる。そして、例えばコア21dが、データセット(X[i],Y[i])(300≦i≦399)に対して、V〔i]=X[i]+Y[i]を実行する。コア21dが、300≦i≦399の範囲においてV〔i]=X[i]+Y[i]を行う処理が、遅延データ並列処理においてコア21dが行う並列個別処理となる。 In the example of FIG. 9, for example, the core 21a executes V[i]=X[i]+Y[i] for the data set (X[i], Y[i]) (0≤i≤99). do. A process performed by the core 21a to perform V[i]=X[i]+Y[i] in the range of 0≤i≤99 is parallel individual processing (in other words, job) performed by the core 21a in the delayed data parallel processing. Also, for example, the core 21b executes V[i]=X[i]+Y[i] for the data set (X[i], Y[i]) (100≤i≤199). The process of performing V[i]=X[i]+Y[i] in the range of 100≤i≤199 by the core 21b is parallel individual processing performed by the core 21b in the delayed data parallel processing. Also, for example, the core 21c executes V[i]=X[i]+Y[i] for the data set (X[i], Y[i]) (200≦i≦299). The process of performing V[i]=X[i]+Y[i] in the range of 200≤i≤299 by the core 21c is parallel individual processing performed by the core 21c in the delayed data parallel processing. Then, for example, the core 21d executes V[i]=X[i]+Y[i] for the data set (X[i], Y[i]) (300≤i≤399). The process of performing V[i]=X[i]+Y[i] in the range of 300≤i≤399 by the core 21d is parallel individual processing performed by the core 21d in the delayed data parallel processing.

また、図9の遅延データ並列プログラム550には、3個のコア21b,21c,21dのそれぞれについて、コア21が行う並列個別処理の開始タイミングを遅延させる遅延処理が記述されたプログラム550aが含まれる。コア21b,21c,21dのそれぞれが遅延処理を実行することによって、コア21b,21c,21dが行う並列個別処理の開始タイミングが、コア21aが行う並列個別処理の開始タイミングよりも遅延する。図9の例では、コア21aが行う並列個別処理が先行ジョブとなり、コア21b,21c,21dが行う並列個別処理が遅延ジョブとなる。図9の例では、OpenMPが用いられてプログラム550aが記述されている。 The delayed data parallel program 550 of FIG. 9 includes a program 550a describing delay processing for delaying the start timing of parallel individual processing performed by the core 21 for each of the three cores 21b, 21c, and 21d. . As each of the cores 21b, 21c, and 21d executes the delay processing, the start timing of the parallel individual processing performed by the cores 21b, 21c, and 21d is delayed from the start timing of the parallel individual processing performed by the core 21a. In the example of FIG. 9, the parallel individual processing performed by the core 21a is the preceding job, and the parallel individual processing performed by the cores 21b, 21c, and 21d is the delayed job. In the example of FIG. 9, OpenMP is used to describe the program 550a.

また、図9の遅延データ並列プログラム550には、4個のコア21a~21dのそれぞれについて、コア21での並列個別処理の実行状態を監視する監視処理が記述されたプログラム550bが含まれている。コア21は、監視処理の実行中に、当該コア21での並列個別処理の実行状態を示す実行状態情報(コア実行状態情報ともいう)を出力する。コア実行状態情報には、例えば、並列個別処理の実行時間、並列個別処理での実行命令数、並列個別処理の実行中のキャッシュミス回数及び並列個別処理の実行中のストール回数が含まれる。あるコア21での並列個別処理の実行時間は、当該あるコア21での遅延データ並列処理の実行時間であるとも言える。コア実行状態情報は、後述するように、遅延量232の更新で使用される。コア実行状態情報に含まれる情報はこの限りではない。 The delay data parallel program 550 of FIG. 9 also includes a program 550b describing monitoring processing for monitoring the execution state of parallel individual processing in the core 21 for each of the four cores 21a to 21d. . The core 21 outputs execution state information (also referred to as core execution state information) indicating the execution state of parallel individual processing in the core 21 during execution of the monitoring process. The core execution state information includes, for example, the execution time of parallel individual processing, the number of executed instructions in parallel individual processing, the number of cache misses during execution of parallel individual processing, and the number of stalls during execution of parallel individual processing. It can also be said that the execution time of parallel individual processing in a certain core 21 is the execution time of delayed data parallel processing in the certain core 21 . The core execution state information is used in updating the delay amount 232 as described later. Information included in the core execution state information is not limited to this.

生成部330は、遅延データ並列プログラムを生成すると、当該遅延データ並列プログラムを含む第2テキスト形式プログラム402を生成する。この第2テキスト形式プログラム402は、第1テキスト形式プログラム401において、変換対象部分プログラムが遅延データ並列プログラムに置き換えられたものである。生成部330で生成された第2テキスト形式プログラム402はコンパイルされた後にメモリ23に書き込まれる。 After generating the delayed data parallel program, the generator 330 generates the second text format program 402 including the delayed data parallel program. This second text format program 402 is obtained by replacing the conversion target partial program in the first text format program 401 with a delayed data parallel program. The second text format program 402 generated by the generation unit 330 is written to the memory 23 after being compiled.

<遅延量更新装置の一例>
本例の処理システム1は、遅延量232を更新する遅延量更新装置250を備える。本例では、例えば、マルチコアプロセッサ20が遅延量更新装置250として機能する。図10は遅延量更新装置250の一例を示すブロック図である。
<Example of delay update device>
The processing system 1 of this example includes a delay amount updating device 250 that updates the delay amount 232 . In this example, for example, the multicore processor 20 functions as the delay update device 250 . FIG. 10 is a block diagram showing an example of the delay update device 250. As shown in FIG.

図10に示されるように、遅延量更新装置250は、例えば、マルチコアプロセッサ20での遅延データ並列処理の実行状態を示す実行状態情報600(プロセッサ実行状態情報600ともいう)を取得する取得部251と、取得部251で取得された実行状態情報600に基づいて遅延量232を更新する更新部252とを備える。プロセッサ実行状態情報600には、各コア21についてのコア実行状態情報が含まれる。また、プロセッサ実行状態情報600には、遅延データ並列処理全体の実行時間が含まれる。 As shown in FIG. 10, the delay update device 250 includes, for example, an acquisition unit 251 that acquires execution state information 600 (also referred to as processor execution state information 600) indicating the execution state of parallel processing of delayed data in the multi-core processor 20. and an update unit 252 that updates the delay amount 232 based on the execution state information 600 acquired by the acquisition unit 251 . The processor execution state information 600 includes core execution state information for each core 21 . The processor execution state information 600 also includes the execution time of the entire delay data parallel processing.

取得部251及び更新部252のそれぞれは、例えば、マルチコアプロセッサ20のあるコア21が更新プログラム231を実行することによって実現される機能ブロックで構成されている。取得部251は、遅延データ並列プログラムの実行中のマルチコアプロセッサ20の各コア21からコア実行状態情報を取得する。また、取得部251は、遅延データ並列プログラムの実行中に、遅延データ並列処理全体の実行時間を取得する。 Each of the acquisition unit 251 and the update unit 252 is configured by a functional block realized by executing the update program 231 by a certain core 21 of the multi-core processor 20, for example. The acquisition unit 251 acquires core execution state information from each core 21 of the multi-core processor 20 that is executing the delayed data parallel program. Also, the acquisition unit 251 acquires the execution time of the entire delay data parallel processing during execution of the delay data parallel program.

図11は、遅延量更新装置250が行う更新処理の一例を示すフローチャートである。図11に示される更新処理は、プロセッサシステム2の実稼働中(言い換えれば、プロセッサシステム2が搭載された組み込み機器の実稼働中)に実行されてもよいし、プロセッサシステム2の実稼働前(例えば、プロセッサシステム2が搭載された組み込み機器の出荷前)に実行されてもよい。 FIG. 11 is a flowchart showing an example of update processing performed by the delay update device 250. As shown in FIG. The update process shown in FIG. 11 may be executed during the actual operation of the processor system 2 (in other words, during the actual operation of the embedded device in which the processor system 2 is mounted), or before the actual operation of the processor system 2 ( For example, it may be executed before shipment of an embedded device in which the processor system 2 is mounted.

図11に示されるように、ステップs11において、取得部251が、マルチコアプロセッサ20にメインプログラム230を実行させる。次に、ステップs12において、取得部251は、メインプログラム230の実行中に、プロセッサ実行状態情報600を取得する。 As shown in FIG. 11, in step s11, the acquisition unit 251 causes the multi-core processor 20 to execute the main program 230. As shown in FIG. Next, in step s12, the acquisition unit 251 acquires the processor execution state information 600 while the main program 230 is being executed.

メインプログラム230の実行中には、遅延データ並列処理が繰り返し実行される。遅延データ並列処理で使用される遅延量232の初期値は、例えば、先行並列個別処理(先行ジョブ)の完了時刻が、遅延並列個別処理(遅延ジョブ)の開始時刻となるような値に設定される。遅延量232の初期値はこれに限られない。 During execution of the main program 230, delayed data parallel processing is repeatedly executed. The initial value of the delay amount 232 used in the delayed data parallel processing is set to a value such that, for example, the completion time of the preceding parallel individual processing (preceding job) becomes the start time of the delayed parallel individual processing (delayed job). be. The initial value of the delay amount 232 is not limited to this.

図12は、遅延量232が初期値に設定されている場合の遅延データ並列処理150とその前後の処理の一例を示す図である。図12では、上述の低優先度処理57~59が示されていないが、実際には、図7に示されるように、コア21b~21dは、並列個別処理を実行していないときに、低優先度処理57~59をそれぞれ実行する。後述の図13についても同様である。 FIG. 12 is a diagram showing an example of the delay data parallel processing 150 and the processing before and after the delay data parallel processing 150 when the delay amount 232 is set to the initial value. Although FIG. 12 does not show the low priority processes 57 to 59 described above, actually, as shown in FIG. Priority processing 57 to 59 are executed respectively. The same applies to FIG. 13 described later.

先行並列個別処理51は、その開始タイミングが遅延せずに、逐次処理55の直後に開始する。本例では、先行並列個別処理(先行ジョブ)51の実行時間はt_normalで表されている。遅延並列個別処理(遅延ジョブ)52~54は、先行並列個別処理51の終了タイミングから開始し、遅延量232はt_delayで表されている。また、遅延並列個別処理52~54の実行時間はt_fastで表されている。そして、遅延データ並列処理150全体の実行時間、つまり、先行ジョブの開始から全ジョブの終了までの時間が、t_totalで表されている。 The preceding parallel individual processing 51 is started immediately after the sequential processing 55 without any delay in its start timing. In this example, the execution time of the preceding parallel individual processing (preceding job) 51 is represented by t_normal. The delayed parallel individual processes (delayed jobs) 52 to 54 start at the end timing of the preceding parallel individual process 51, and the delay amount 232 is represented by t_delay. Also, the execution time of the delayed parallel individual processes 52 to 54 is represented by t_fast. The overall execution time of the delayed data parallel processing 150, that is, the time from the start of the preceding job to the end of all jobs is represented by t_total.

上述のように、コア21b~21dは、遅延データ並列プログラムにおいて、先行並列個別処理51の実行中にキャッシュ22へロードされた部分を実行することができる。そのため、コア21b~21dの待ち時間を、コア21aの待ち時間よりも小さくすることができる。そのため、t_normal≧t_fastとなる。 As described above, the cores 21b-21d can execute portions of the delayed data parallel program that were loaded into the cache 22 during execution of the preceding parallel individual processes 51. FIG. Therefore, the waiting time of the cores 21b to 21d can be made smaller than the waiting time of the core 21a. Therefore, t_normal≧t_fast.

ステップs12の後、ステップs13において、更新部252は、遅延量232の更新の終了条件である更新終了条件が成立するか否かを判定する。本例では、例えば、以下の条件式(1)が更新終了条件として採用される。 After step s12, in step s13, the update unit 252 determines whether or not an update termination condition, which is a termination condition for updating the delay amount 232, is satisfied. In this example, for example, the following conditional expression (1) is adopted as the update end condition.

Figure 0007305052000001
Figure 0007305052000001

ステップs13において、更新部252は、ステップs12で取得されたプロセッサ実行状態情報に含まれる先行ジョブの実行時間と、当該プロセッサ実行状態情報に含まれる遅延データ並列処理150全体の実行時間とを用いて、条件式(1)が成立するか否かを判定する。 In step s13, the updating unit 252 uses the execution time of the preceding job included in the processor execution state information acquired in step s12 and the overall execution time of the delayed data parallel processing 150 included in the processor execution state information to , determines whether or not the conditional expression (1) is satisfied.

ステップs12において、更新終了条件(条件式(1))が成立したと判定されると、更新処理が終了して、メインプログラム230の実行が終了する。これにより、遅延量232の更新が完了する。一方で、ステップs13において、更新終了条件(条件式(1))が成立しないと判定されると、ステップs14が実行される。 When it is determined in step s12 that the update end condition (conditional expression (1)) is satisfied, the update process ends and the execution of the main program 230 ends. This completes the updating of the delay amount 232 . On the other hand, if it is determined in step s13 that the update end condition (conditional expression (1)) is not satisfied, step s14 is executed.

ステップs14では、更新部252が遅延量232を更新する。ステップs14において、まず、更新部252は、例えば以下の式(2)を用いて、新たな遅延量232(t_delay)を求める。そして、更新部252は、メモリ23内の遅延量232を新たな遅延量232で置き換える。これにより、メモリ23内の遅延量232が更新される。 In step s14, the update unit 252 updates the delay amount 232. FIG. In step s14, first, the updating unit 252 obtains a new delay amount 232 (t_delay) using, for example, the following equation (2). Then, the updating unit 252 replaces the delay amount 232 in the memory 23 with the new delay amount 232 . Thereby, the delay amount 232 in the memory 23 is updated.

Figure 0007305052000002
Figure 0007305052000002

ステップs14において、更新部252は、ステップs12で取得されたプロセッサ実行状態情報に含まれる先行ジョブの実行時間と、当該プロセッサ実行状態情報に含まれる遅延ジョブの実行時間とを用いて、新たな遅延量を求める。 In step s14, the update unit 252 uses the execution time of the preceding job included in the processor execution state information acquired in step s12 and the execution time of the delayed job included in the processor execution state information to create a new delay. ask for quantity.

ステップs14の後、ステップs12が再度実行されて、新しいプロセッサ実行状態情報が取得される。その後、同様にしてステップs13が実行され、以後、遅延量更新装置250は同様に動作する。 After step s14, step s12 is executed again to obtain new processor execution state information. After that, step s13 is executed in a similar manner, and the delay update device 250 operates in a similar manner thereafter.

ここで、キャッシュ22の使用状態は、遅延ジョブの遅延量232に応じて変化することから、遅延量232に応じて、先行ジョブの実行時間(t_normal)と遅延ジョブの実行時間(t_fast)も変化する。したがって、式(2)を用いて遅延量232を更新したとしても、1度の更新で、条件式(1)が成立するとは限らない。そのため、本例では、遅延量更新装置250は、条件式(1)が成立するまで繰り返し遅延量232を更新している。 Here, since the usage state of the cache 22 changes according to the delay amount 232 of the delayed job, the execution time (t_normal) of the preceding job and the execution time (t_fast) of the delayed job also change according to the delay amount 232. do. Therefore, even if the delay amount 232 is updated using the formula (2), the conditional formula (1) does not necessarily hold with one update. Therefore, in this example, the delay amount updating device 250 repeatedly updates the delay amount 232 until the conditional expression (1) is satisfied.

図13は、更新完了後の遅延量232が用いられて実行される遅延データ並列処理150とその前後の処理の一例を示す図である。図13にも示されるように、本例では、遅延データ並列処理150の実行時間(t_total)が、先行並列個別処理51の実行時間(t_normal)と一致するように遅延量232(t_delay)が更新される。複数の並列個別処理51~52の演算量は同等であることから、本例のように遅延量232が更新されることによって、遅延並列個別処理52~52は、先行並列個別処理51と同じタイミングで終了する。 FIG. 13 is a diagram showing an example of the delayed data parallel processing 150 executed using the post-update delay amount 232 and the processing before and after that. As also shown in FIG. 13, in this example, the delay amount 232 (t_delay) is updated so that the execution time (t_total) of the delayed data parallel processing 150 matches the execution time (t_normal) of the preceding parallel individual processing 51. be done. Since the amount of calculation of the plurality of parallel individual processes 51 to 52 is the same, by updating the delay amount 232 as in this example, the delayed parallel individual processes 52 to 52 can be executed at the same timing as the preceding parallel individual process 51. end with .

このように、遅延並列個別処理52~52が先行並列個別処理51と同じタイミングで終了するように遅延量232が更新されることによって、並列個別処理52~52の開始タイミングを遅延させたとしても、遅延データ並列処理150の実行時間(t_total)を小さくすることができる。例えば、上述の図6及び7に示されるように、遅延データ並列処理150全体の実行時間を、遅延並列個別処理を含まないデータ並列処理50全体の実行時間と同等にすることができる。 In this way, by updating the delay amount 232 so that the delayed parallel individual processes 52 to 52 end at the same timing as the preceding parallel individual process 51, even if the start timings of the parallel individual processes 52 to 52 are delayed, , the execution time (t_total) of the delayed data parallel processing 150 can be reduced. For example, as shown in FIGS. 6 and 7 above, the overall execution time of the delayed data parallel processing 150 can be made equivalent to the overall execution time of the data parallel processing 50 that does not include delayed parallel individual processing.

なお、更新終了条件としては、上記の条件式(1)以外の条件が採用されてもよい。遅延量232が変化しない場合であっても並列個別処理の実行時間はばらつくことから、更新終了条件としては、例えば以下の条件式(3)が採用されてもよい。 Note that conditions other than conditional expression (1) above may be adopted as the update end condition. Even if the delay amount 232 does not change, the execution time of the parallel individual processing varies, so the following conditional expression (3), for example, may be adopted as the update end condition.

Figure 0007305052000003
Figure 0007305052000003

条件式(3)のパラメータeの値は、並列個別処理の実行時間のばらつきに基づく値である。パラメータeの値が決定される場合には、例えば、同じ遅延量232が用いられて複数回遅延データ並列処理が実行される。そして、その結果から得られる並列個別処理の実行時間のばらつきに基づいてパラメータeの値が事前に決定される。 The value of parameter e in conditional expression (3) is a value based on variations in execution time of parallel individual processing. When the value of parameter e is determined, for example, the same delay amount 232 is used to execute delayed data parallel processing multiple times. Then, the value of the parameter e is determined in advance based on the variation in the execution time of the parallel individual processing obtained from the result.

また、実稼働中のプロセッサシステム2では、遅延データ並列処理中のコア21での割り込み処理等により、並列個別処理の実行時間等が変動することがある。そこで、プロセッサシステム2の実稼働中では、図11に示される更新処理が繰り返し実行されてもよい。これにより、並列個別処理の実行時間等が変動する場合であっても、遅延量232を適切な値に設定することができる。更新処理は、定期的に繰り返し実行されてもよいし、不定期的に繰り返し実行されてもよい。また、更新処理は、ユーザの指示に応じて実行されてもよい。 In addition, in the processor system 2 in actual operation, the execution time of parallel individual processing may fluctuate due to interrupt processing or the like in the core 21 during parallel processing of delayed data. Therefore, during the actual operation of the processor system 2, the update process shown in FIG. 11 may be repeatedly executed. As a result, the delay amount 232 can be set to an appropriate value even when the execution time of parallel individual processing fluctuates. The update process may be repeatedly executed periodically or may be repeatedly executed irregularly. Also, the update process may be executed according to a user's instruction.

上記の例では、特定部320は、第1テキスト形式プログラム401に含まれる特定のfor文を変換対象部分プログラムとしていたが、第1テキスト形式プログラム401に含まれる他の部分プログラムを変換対象部分プログラムとしてもよい。例えば、特定部320は、第1テキスト形式プログラム401に含まれる特定のwhile文を変換対象部分プログラムとしてもよい。この場合、特定部320は、while文で記述されたループ処理がループ間で独立したデータを扱っている場合、当該while文を変換対象部分プログラムとしてもよい。また、特定部320は、第1テキスト形式プログラム401に含まれる特定のfor文及び特定のwhile文のそれぞれを変換対象部分プログラムとしてもよい。 In the above example, the identification unit 320 selects the specific for statement included in the first text format program 401 as the conversion target partial program, but the other partial program included in the first text format program 401 is the conversion target partial program. may be For example, the identification unit 320 may set a specific while statement included in the first text format program 401 as a partial program to be converted. In this case, if the loop processing described by the while statement handles independent data between loops, the specifying unit 320 may set the while statement as the partial program to be converted. Further, the identifying unit 320 may set each of the specific for statement and the specific while statement included in the first text format program 401 as the partial program to be converted.

特定部320が、複数の変換対象部分プログラムを特定する場合には、生成部330は、当該複数の変換対象部分プログラムのそれぞれについて、当該変換対象部分プログラムを遅延データ並列プログラムに変換する。そして、生成部330は、得られた複数の遅延データ並列プログラムを含む第2テキスト形式プログラム402を生成する。複数の遅延データ並列プログラムを含む第2テキスト形式プログラム402は、コンパイル後に、メインプログラム230としてメモリ23に書き込まれる。この場合、メモリ23には、複数の遅延データ並列プログラムでそれぞれ使用される複数の遅延量232が記憶される。そして、遅延量更新装置250は、複数の遅延量232のそれぞれを上述のようにして更新する。 When the identifying unit 320 identifies a plurality of conversion target partial programs, the generating unit 330 converts each of the plurality of conversion target partial programs into a delayed data parallel program. The generation unit 330 then generates the second text format program 402 including the obtained multiple delayed data parallel programs. The second text format program 402 including multiple delayed data parallel programs is written to memory 23 as main program 230 after compilation. In this case, the memory 23 stores a plurality of delay amounts 232 respectively used in a plurality of delay data parallel programs. Then, the delay amount update device 250 updates each of the plurality of delay amounts 232 as described above.

上記の例では、遅延量232は更新されているが、予め決定された遅延量232が更新されずに常に使用されてもよい。また、上記の図7,12,13等の例では、遅延データ並列処理を構成する複数の並列個別処理のうち、1つの並列個別処理だけが先行ジョブとなっているが、複数の並列個別処理が先行ジョブとなってもよい。例えば、コア21aが実行する並列個別処理だけではなく、コア21bが実行する並列個別処理も先行ジョブとなってもよい。また、コア21a,21b,21cがそれぞれ実行する3つの並列個別処理が先行ジョブとなり、コア21dが実行する並列個別処理が遅延ジョブとなってもよい。 Although the delay amount 232 is updated in the above example, the predetermined delay amount 232 may always be used without being updated. In the examples of FIGS. 7, 12, 13, etc., only one parallel individual processing is the preceding job among the plurality of parallel individual processings that constitute the delayed data parallel processing. may be the predecessor job. For example, not only the parallel individual processing executed by the core 21a but also the parallel individual processing executed by the core 21b may be the preceding job. Also, the three parallel individual processes executed by the cores 21a, 21b, and 21c may be the preceding jobs, and the parallel individual processes executed by the core 21d may be the delayed jobs.

以上のように、本実施の形態では、遅延データ並列処理において、一部のコア21での開始タイミングが他のコア21での開始タイミングよりも遅延している。これにより、遅延データ並列処理の実行中に、一部のコア21は、並列個別処理以外の処理を実行することができる。これにより、マルチコアプロセッサ20の有効利用を図ることができる。 As described above, in the present embodiment, the start timing of some cores 21 is delayed from the start timing of other cores 21 in delayed data parallel processing. This allows some of the cores 21 to execute processes other than the parallel individual processes during execution of the delayed data parallel processing. As a result, the multi-core processor 20 can be used effectively.

さらに、一部のコア21は、遅延データ並列プログラムにおいて、先行して処理を開始する他のコアの並列個別処理の実行中にキャッシュ22へロードされた部分を実行することができること。そのため、一部のコア21の待ち時間を、他のコア21の待ち時間よりも小さくすることができる。よって、一部のコア21での処理開始タイミングを遅延させたとしても遅延データ並列処理全体の処理時間を短くすることができる。 Furthermore, some cores 21 can execute a portion of the delayed data parallel program that is loaded into the cache 22 during execution of parallel individual processing of other cores that start processing earlier. Therefore, the waiting time of some cores 21 can be made smaller than the waiting time of other cores 21 . Therefore, even if the processing start timings of some of the cores 21 are delayed, the processing time of the entire delayed data parallel processing can be shortened.

実施の形態2.
本実施の形態では、変換対象部分プログラムがユーザによって指定される。本実施の形態に係る処理システム1の構成は、上述の実施の形態1に係る処理システム1の構成と同じである。
Embodiment 2.
In this embodiment, the user designates a partial program to be converted. The configuration of the processing system 1 according to this embodiment is the same as the configuration of the processing system 1 according to the first embodiment described above.

本実施の形態では、ユーザは、プログラム記述部310の機能を用いて、第1テキスト形式プログラム401において変換対象部分プログラムを指定することができる。具体的には、ユーザは、プログラム記述部310の機能を用いて、第1テキスト形式プログラム401において、その部分プログラムが遅延データ並列プログラムに変換される対象であることを示す記述(指定記述ともいう)を第1テキスト形式プログラム401に含めることができる。指定記述は一種のプログラムである。プログラム記述部310は、入力装置303が受け付けるユーザからの入力に基づいて、第1テキスト形式プログラム401に指定記述を含める。指定記述は、ユーザによって指定された部分プログラムが遅延データ並列プログラムに変換される対象であることを示す記述であると言える。 In this embodiment, the user can use the function of the program description unit 310 to specify the partial program to be converted in the first text format program 401 . Specifically, the user uses the function of the program description unit 310 to write a description (also referred to as a designation description) in the first text format program 401 that indicates that the partial program is to be converted into a delayed data parallel program. ) can be included in the first textual program 401 . A specified description is a kind of program. The program description unit 310 includes a specified description in the first text format program 401 based on the input from the user received by the input device 303 . The specified description can be said to be a description indicating that the partial program specified by the user is to be converted into the delayed data parallel program.

図14は指定記述410の一例を示す図である。図14の例では、OpenMPが用いられて指定記述410が表されている。図14の指定記述410は、そのすぐ下のfor文が遅延データ並列プログラムに変換される対象であることを示している。第1テキスト形式プログラム401には複数の指定記述が含まれてもよい。 FIG. 14 is a diagram showing an example of the designation description 410. As shown in FIG. In the example of FIG. 14, the specification description 410 is expressed using OpenMP. The designation description 410 in FIG. 14 indicates that the for statement immediately below it is to be converted into a delayed data parallel program. The first text format program 401 may include multiple specified descriptions.

本実施の形態では、特定部320は、第1テキスト形式プログラム401において指定記述410を特定する。そして、特定部320は、特定した指定記述410に基づいて変換対象部分プログラムを特定する。図14の例では、特定部320は、指定記述410のすぐ下のfor文を変換対象部分プログラムとして特定する。そして、生成部330は、特定部320で特定された変換対象部分プログラムを遅延データ並列プログラムに変換し、それによって得られた遅延データ並列プログラムを含む第2テキスト形式プログラム402を生成する。生成部330で生成された第2テキスト形式プログラム402は、コンパイル後にメモリ23に記憶される。本実施の形態に係る処理システム1の他の動作については、実施の形態1に係る処理システム1と同様である。 In this embodiment, the identifying unit 320 identifies the designated description 410 in the first text format program 401 . Then, the specifying unit 320 specifies the conversion target partial program based on the specified specification description 410 . In the example of FIG. 14, the identifying unit 320 identifies the for statement immediately below the specified description 410 as the conversion target partial program. The generation unit 330 then converts the conversion target partial program identified by the identification unit 320 into the delayed data parallel program, and generates the second text format program 402 including the resulting delayed data parallel program. The second text format program 402 generated by the generation unit 330 is stored in the memory 23 after compilation. Other operations of the processing system 1 according to the present embodiment are the same as those of the processing system 1 according to the first embodiment.

このように、本実施の形態では、第1テキスト形式プログラム401は、ユーザによって指定された部分プログラムが遅延データ並列プログラムに変換される対象であることを示す指定記述を含んでいる。これにより、特定部320は、ユーザによって指定された部分プログラムを変換対象部分プログラムとすることができる。つまり、ユーザは変換対象部分プログラムを指定することができる。 Thus, in this embodiment, the first text format program 401 includes a specification description indicating that a partial program specified by the user is to be converted into a delayed data parallel program. As a result, the specifying unit 320 can set the partial program specified by the user as the conversion target partial program. That is, the user can specify the partial program to be converted.

ここで、データ並列処理の実行中に複数のコア21間で通信が行われることがある。例えば、複数のコア21がそれぞれ実行する複数の並列個別処理の完了を同期させる必要がある場合には、複数のコア21間で通信が行われることがある。第1テキスト形式プログラム401に含まれる部分プログラムによっては、それを遅延データ並列プログラムに変換した場合、当該遅延データ並列プログラムの実行時の複数のコア21間の通信によるオーバーヘッドによって、遅延データ並列プログラムに変換するメリットが小さい場合がある。 Here, communication may be performed between multiple cores 21 during execution of data parallel processing. For example, when it is necessary to synchronize the completion of a plurality of parallel individual processes respectively executed by a plurality of cores 21, communication may be performed between the plurality of cores 21. FIG. Depending on the partial program included in the first text format program 401, if it is converted into a delayed data parallel program, the overhead due to communication between the multiple cores 21 during execution of the delayed data parallel program may cause the delay data parallel program to The merit of converting may be small.

本実施の形態では、ユーザは、変換対象部分プログラムを指定することができることから、それを遅延データ並列プログラムに変換するメリットが大きい部分プログラムを、変変換対象部分プログラムに指定することができる。よって、マルチコアプロセッサ20での処理時間をより確実に短縮することができる。 In this embodiment, since the user can specify the partial program to be converted, the user can specify, as the partial program to be converted, a partial program that is highly advantageous in converting it into a delayed data parallel program. Therefore, the processing time in the multi-core processor 20 can be shortened more reliably.

実施の形態3.
本実施の形態では、エンジニアリングツール3は、図15に示されるように、遅延量232を出力する遅延量推定モデル460と、遅延量推定モデル460を学習するモデル学習部360とをさらに備える。遅延量推定モデル460及びモデル学習部360は、例えば、エンジニアリングツール3のプログラム作成装置30に設けられる。遅延量推定モデル460及びモデル学習部360のそれぞれは、例えば、処理回路300がプログラム301aを実行することによって処理回路300に実現される。
Embodiment 3.
In this embodiment, the engineering tool 3 further includes a delay amount estimation model 460 that outputs the delay amount 232 and a model learning unit 360 that learns the delay amount estimation model 460, as shown in FIG. The delay amount estimation model 460 and the model learning unit 360 are provided in the programming device 30 of the engineering tool 3, for example. Each of the delay amount estimation model 460 and the model learning unit 360 is implemented in the processing circuit 300 by the processing circuit 300 executing the program 301a, for example.

学習済みの遅延量推定モデル460は、例えば、プロセッサ実行状態情報に基づいて、遅延並列個別処理が先行並列個別処理と同じタイミングで終了するような遅延量232を推定して出力する。言い換えれば、学習済みの遅延量推定モデル460は、例えば、プロセッサ実行状態情報に基づいて、遅延並列個別処理の完了時刻と先行並列個別処理の完了時刻とが同時刻となる遅延量232を推定して出力する。 The learned delay amount estimation model 460 estimates and outputs the delay amount 232 that makes the delayed parallel individual processing end at the same timing as the preceding parallel individual processing, for example, based on the processor execution state information. In other words, the learned delay amount estimation model 460 estimates the delay amount 232 at which the completion time of the delayed parallel individual processing and the completion time of the preceding parallel individual processing are the same time, for example, based on the processor execution state information. output.

遅延量推定モデル460は、例えば、ニューラルネットワークで構成されている。遅延量推定モデル460を構成するニューラルネットワーク(第1ニューラルネットワークともいう)の入力層には、プロセッサ実行状態情報600が入力される。第1ニューラルネットワークの出力層からは遅延量232が出力される。第1ニューラルネットワークは、畳み込みニューラルネットワーク(CNN(Convolutional Neural Network))であってもよいし、他の種類のニューラルネットワークであってもよい。第1ニューラルネットワークは、モデル学習部360によって学習されるパラメータを含む。このパラメータには、人工ニューロン間の結合の重みを示す重み付け係数が含まれる。第1ニューラルネットワークは、入力層に入力されるプロセッサ実行状態情報600に対してパラメータに基づく演算を行って、出力層から遅延量232を出力する。 The delay amount estimation model 460 is composed of, for example, a neural network. Processor execution state information 600 is input to the input layer of the neural network (also referred to as the first neural network) that constitutes delay estimation model 460 . A delay amount 232 is output from the output layer of the first neural network. The first neural network may be a convolutional neural network (CNN) or another type of neural network. The first neural network includes parameters learned by model learning section 360 . This parameter includes a weighting factor that indicates the weight of the connections between artificial neurons. The first neural network performs a parameter-based operation on the processor execution state information 600 input to the input layer, and outputs a delay amount 232 from the output layer.

モデル学習部360は、例えば、第1ニューラルネットワークのパラメータを機械学習することによって、遅延量推定モデル460を学習する。第1ニューラルネットワークのパラメータが学習されることによって、遅延量推定モデル460は、遅延並列個別処理が先行並列個別処理と同じタイミングで終了するような遅延量232をプロセッサ実行状態情報に基づいて出力することが可能となる。モデル学習部360は、例えば教師あり学習法を用いて、第1ニューラルネットワークのパラメータを学習する。 The model learning unit 360 learns the delay amount estimation model 460 by machine learning the parameters of the first neural network, for example. By learning the parameters of the first neural network, the delay amount estimation model 460 outputs the delay amount 232 based on the processor execution state information so that the delayed parallel individual processing ends at the same timing as the preceding parallel individual processing. becomes possible. The model learning unit 360 learns the parameters of the first neural network using, for example, a supervised learning method.

記憶装置301には、第1ニューラルネットワークのパラメータの学習で使用される教師データと学習用データ(学習データともいう)が記憶されている。学習用データ及び教師データはまとめて教師付き学習データと呼ばれることがある。本例では、例えば、プロセッサシステム2が学習用データ及び教師データを生成する。 The storage device 301 stores teacher data and learning data (also referred to as learning data) used in learning the parameters of the first neural network. Learning data and teacher data are sometimes collectively referred to as supervised learning data. In this example, for example, the processor system 2 generates learning data and teacher data.

教師データには、遅延並列個別処理が先行並列個別処理と同じタイミングで終了するような遅延量232が含まれる。以後、教師データに含まれる遅延量232を基準遅延量232と呼ぶことがある。 The teacher data includes a delay amount 232 such that the delayed parallel individual processing ends at the same timing as the preceding parallel individual processing. Hereinafter, the delay amount 232 included in the teacher data may be referred to as the reference delay amount 232 .

基準遅延量232としては、例えば、上述の図11の更新処理において更新が完了した遅延量232が採用される。教師データには複数の基準遅延量232が含まれる。本実施の形態では、第1ニューラルネットワークのパラメータの学習が実行される前に、図11の更新処理がプロセッサシステム2において繰り返し実行されることによって、複数の基準遅延量232が取得される。 As the reference delay amount 232, for example, the delay amount 232 that has been updated in the above-described update processing of FIG. 11 is used. Teacher data includes a plurality of reference delay amounts 232 . In the present embodiment, a plurality of reference delay amounts 232 are acquired by repeatedly executing the updating process in FIG. 11 in the processor system 2 before learning the parameters of the first neural network.

ここで、上述のように、遅延量232に応じてキャッシュ22の使用状態は変化する。そして、キャッシュ22の使用状態に応じてプロセッサ実行状態情報は変化する。よって、遅延量232に応じてプロセッサ実行状態情報が変化する。つまり、遅延量232とプロセッサ実行状態情報との間には相関関係がある。 Here, as described above, the usage state of the cache 22 changes according to the delay amount 232 . The processor execution state information changes according to the state of use of the cache 22 . Therefore, the processor execution state information changes according to the delay amount 232 . In other words, there is a correlation between the delay amount 232 and the processor execution state information.

そこで、本例では、学習用データとしてプロセッサ実行状態情報が採用される。具体的には、学習用データには、教師データに含まれる複数の基準遅延量232にそれぞれ対応する複数のプロセッサ実行状態情報が含まれる。ここで、基準遅延量232に対応するプロセッサ実行状態情報とは、当該基準遅延量232が使用されて遅延済みデータ並列プログラムが実行されているときに取得部251で取得されるプロセッサ実行状態情報を意味する。学習用データに含まれるプロセッサ実行状態情報は、遅延並列個別処理が先行並列個別処理と同じタイミングで終了するような遅延量232が使用されて遅延済みデータ並列プログラムが実行されているときに取得部251で取得されるプロセッサ実行状態情報であると言える。以後、学習用データに含まれるプロセッサ実行状態情報を学習用実行状態情報と呼ぶことがある。 Therefore, in this example, processor execution state information is employed as learning data. Specifically, the learning data includes a plurality of pieces of processor execution state information respectively corresponding to the plurality of reference delay amounts 232 included in the teacher data. Here, the processor execution state information corresponding to the reference delay amount 232 is the processor execution state information acquired by the acquisition unit 251 when the delayed data parallel program is executed using the reference delay amount 232. means. The processor execution state information included in the learning data is acquired by the acquisition unit when the delayed data parallel program is executed using the delay amount 232 that causes the delay parallel individual processing to end at the same timing as the preceding parallel individual processing. It can be said that it is the processor execution state information acquired in 251 . Hereinafter, processor execution state information included in learning data may be referred to as learning execution state information.

学習用実行状態情報には、例えば、各コア21についてのコア実行状態情報と、遅延データ並列処理全体の実行時間とが含まれる。学習用実行状態情報に含まれるコア実行状態情報には、例えば、並列個別処理の実行時間、並列個別処理での実行命令数、並列個別処理の実行中のキャッシュミス回数及び並列個別処理の実行中のストール回数が含まれる。 The learning execution state information includes, for example, core execution state information for each core 21 and the execution time of the entire delayed data parallel processing. The core execution state information included in the learning execution state information includes, for example, the execution time of parallel individual processing, the number of instructions executed in parallel individual processing, the number of cache misses during execution of parallel individual processing, and the number of cache misses during execution of parallel individual processing. stall count.

モデル学習部360は、第1ニューラルネットワークの学習を行う場合、第1ニューラルネットワークの入力層に学習用データを入力する。そして、モデル学習部360は、第1ニューラルネットワークの出力層から出力される出力データについての教師データに対する誤差が小さくなるように、第1ニューラルネットワークのパラメータを調整する。より詳細には、モデル学習部360は、学習用データに含まれる学習用実行状態情報を第1ニューラルネットワークの入力層に入力する。そして、モデル学習部360は、入力層に学習用実行状態情報を入力した場合に第1ニューラルネットワークの出力層から出力される出力データ(言い換えれば遅延量232)についての、当該学習用実行状態情報に対応する基準遅延量232に対する誤差が小さくなるように、パラメータを調整する。パラメータの調整方法としては、誤差逆伝播法が採用されてもよし、他の方法が採用されてもよい。パラメータの調整が完了すると、パラメータの学習が終了する。調整後のパラメータ、学習済みパラメータとなり、記憶装置301に記憶される。記憶装置301内の学習済みパラメータは、例えば、書き込み装置35を通じてプロセッサシステム2のメモリ23に書き込まれる。プロセッサシステム2では、学習済みパラメータが使用されて遅延量232が更新される。なお、第1ニューラルネットワークのパラメータの学習方法はこの限りではない。 When learning the first neural network, the model learning unit 360 inputs learning data to the input layer of the first neural network. Model learning section 360 then adjusts the parameters of the first neural network so that the error of the output data output from the output layer of the first neural network with respect to the teacher data is reduced. More specifically, the model learning unit 360 inputs the learning execution state information included in the learning data to the input layer of the first neural network. Then, the model learning unit 360 obtains the learning execution state information for the output data (in other words, the delay amount 232) output from the output layer of the first neural network when the learning execution state information is input to the input layer. The parameters are adjusted so that the error with respect to the reference delay amount 232 corresponding to is small. As a parameter adjustment method, an error backpropagation method may be adopted, or another method may be adopted. When parameter tuning is complete, parameter learning ends. The adjusted parameters and learned parameters are stored in the storage device 301 . The learned parameters in the storage device 301 are written into the memory 23 of the processor system 2 through the writing device 35, for example. In the processor system 2, the learned parameters are used to update the delay amount 232. FIG. Note that the method of learning the parameters of the first neural network is not limited to this.

本実施の形態では、遅延量更新装置250は、図16に示される更新部252aをさらに備える。更新部252aは学習済みモデル460aを備える。更新部252aは、学習済みモデル460aを用いて遅延量232を更新する。本例では、教師データ及び学習用データの生成に上述の更新部252が使用され、学習済みパラメータの生成後は、更新部252aが使用されて遅延量232が更新される。 In this embodiment, the delay update device 250 further includes an updating unit 252a shown in FIG. The updating unit 252a has a trained model 460a. The updating unit 252a updates the delay amount 232 using the trained model 460a. In this example, the update unit 252 described above is used to generate teacher data and learning data, and after the learned parameters are generated, the update unit 252a is used to update the delay amount 232. FIG.

学習済みモデル460aは、例えば、モデル学習部360で生成された学習済みパラメータを含む第2ニューラルネットワークで構成されている。第2ニューラルネットワークは、第1ニューラルネットワークと同じ構成を有している。第2ニューラルネットワークの入力層には、取得部251が取得するプロセッサ実行状態情報600が入力される。第2ニューラルネットワークは、入力層に入力されるプロセッサ実行状態情報600に対して学習済みパラメータに基づく演算を行って、出力層から遅延量232を出力する。これにより、第2ニューラルネットワークの出力層から、遅延並列個別処理が先行並列個別処理と同じタイミングで終了するような遅延量232が出力される。 The trained model 460a is composed of, for example, a second neural network including trained parameters generated by the model learning unit 360. FIG. The second neural network has the same configuration as the first neural network. The processor execution state information 600 acquired by the acquisition unit 251 is input to the input layer of the second neural network. The second neural network performs an operation based on learned parameters on the processor execution state information 600 input to the input layer, and outputs the delay amount 232 from the output layer. As a result, the delay amount 232 is output from the output layer of the second neural network such that the delayed parallel individual processing ends at the same timing as the preceding parallel individual processing.

図17は、更新部252aが使用された更新処理の一例を示すフローチャートである。図17に示される更新処理は、プロセッサシステム2の実稼働中(言い換えれば、プロセッサシステム2が搭載された組み込み機器の実稼働中)に実行されてもよいし、プロセッサシステム2の実稼働前(例えば、プロセッサシステム2が搭載された組み込み機器の出荷前)に実行されてもよい。以後、図11の更新処理を第1更新処理と呼び、図17の更新処理を第2更新処理と呼ぶことがある。 FIG. 17 is a flowchart showing an example of update processing using the update unit 252a. The update process shown in FIG. 17 may be executed during the actual operation of the processor system 2 (in other words, during the actual operation of the embedded device in which the processor system 2 is mounted), or before the actual operation of the processor system 2 ( For example, it may be executed before shipment of an embedded device in which the processor system 2 is mounted. Henceforth, the update process of FIG. 11 may be called the 1st update process, and the update process of FIG. 17 may be called the 2nd update process.

図17に示されるように、上述のステップs11及びs12が実行される。その後、ステップs24において、更新部252aは、ステップs12で取得されたプロセッサ実行状態情報600に基づいて新たな遅延量232を求める。具体的には、更新部252aは、第2ニューラルネットワークの入力層に対して、ステップs12で取得されたプロセッサ実行状態情報を入力する。そして、更新部252aは、第2ニューラルネットワークの出力層から出力される遅延量232を新たな遅延量232とする。更新部252は、メモリ23内の遅延量232を新たな遅延量232で置き換える。これにより、メモリ23内の遅延量232が更新され、第2更新処理が終了する。 As shown in FIG. 17, steps s11 and s12 described above are performed. After that, in step s24, the updating unit 252a obtains a new delay amount 232 based on the processor execution state information 600 acquired in step s12. Specifically, the updating unit 252a inputs the processor execution state information acquired in step s12 to the input layer of the second neural network. Then, the updating unit 252 a sets the delay amount 232 output from the output layer of the second neural network as the new delay amount 232 . The updating unit 252 replaces the delay amount 232 in the memory 23 with a new delay amount 232 . As a result, the delay amount 232 in the memory 23 is updated, and the second update process ends.

なお、プロセッサシステム2の実稼働中において、第2更新処理が繰り返し実行されてもよい。この場合、第2更新処理は、定期的に繰り返し実行されてもよいし、不定期的に繰り返し実行されてもよい。また、第2更新処理は、ユーザの指示に応じて実行されてもよい。 Note that the second update process may be repeatedly executed during the actual operation of the processor system 2 . In this case, the second update process may be repeatedly executed periodically or irregularly. Also, the second update process may be executed according to a user's instruction.

また、プロセッサシステム2の実稼働中において、まず、第1更新処理が繰り返し実行されて遅延量232が更新され、その後、第2更新処理が繰り返し実行されて遅延量232が更新されてもよい。この場合、第1更新処理の繰り返し実行によって得られた教師データ及び学習用データに基づいて学習済みパラメータが生成され、その学習済みパラメータが使用されて第2更新処理が繰り返し実行されてもよい。 Also, during the actual operation of the processor system 2 , first, the first update process may be repeatedly executed to update the delay amount 232 , and then the second update process may be repeatedly executed to update the delay amount 232 . In this case, learned parameters may be generated based on teacher data and learning data obtained by repeatedly executing the first update process, and the second update process may be repeatedly executed using the learned parameters.

また、上記の例では、マルチコアプロセッサシステム2が教師データ及び学習用データを生成しているが、マルチコアプロセッサシステム2と同様の構成を有するマルチコアプロセッサシステムが、第1更新処理と同様の処理を繰り返し実行することによって、教師データ及び学習用データを生成してもよい。この場合には、遅延量更新装置250には更新部252が不要になる。 Also, in the above example, the multi-core processor system 2 generates teacher data and learning data, but the multi-core processor system having the same configuration as the multi-core processor system 2 repeats the same process as the first update process. By executing, teacher data and learning data may be generated. In this case, the delay amount updating device 250 does not need the updating unit 252 .

また、上記の例では、エンジニアリングツール3がモデル学習部360及び遅延量推定モデル460を備えているが、プロセッサシステム2がモデル学習部360及び遅延量推定モデル460を備えてもよい。この場合、学習済みの遅延量推定モデル460が学習済みモデル460aとして使用されてもよい。 Also, in the above example, the engineering tool 3 includes the model learning section 360 and the delay amount estimation model 460 , but the processor system 2 may include the model learning section 360 and the delay amount estimation model 460 . In this case, the learned delay estimation model 460 may be used as the learned model 460a.

また、遅延量推定モデル460は再学習されてもよい。この場合、第2更新処理が繰り返し実行されることによって新たな教師データ及び学習用データが取得され、これらの新たな教師データ及び学習用データに基づいて遅延量推定モデル460が再学習されてもよい。そして、再学習された遅延量推定モデル460の学習済みパラメータが使用されて第2更新処理が実行されてもよい。 Also, the delay amount estimation model 460 may be re-learned. In this case, new teacher data and learning data are acquired by repeatedly executing the second update process, and the delay amount estimation model 460 is re-learned based on these new teacher data and learning data. good. Then, the learned parameters of the re-learned delay amount estimation model 460 may be used to perform the second update process.

上記の例では、プロセッサシステム2が遅延量更新装置250として機能していたが、遅延量更新装置250はプロセッサシステム2とは別に設けられてもよい。この場合、エンジニアリングツール3及び遅延量更新装置250を備える処理システム1に、プロセッサシステム2が含められなくてもよい。つまり、エンジニアリングツール3及び遅延量更新装置250を備える処理システム1と、それとは別のプロセッサシステム2とを備えるシステムが構築されてもよい。 Although the processor system 2 functions as the delay update device 250 in the above example, the delay update device 250 may be provided separately from the processor system 2 . In this case, the processor system 2 may not be included in the processing system 1 including the engineering tool 3 and the delay update device 250 . That is, a system may be constructed that includes the processing system 1 that includes the engineering tool 3 and the delay update device 250, and the processor system 2 that is separate from it.

本開示は詳細に説明されたが、上記した説明は、すべての局面において、例示であって、限定的なものではない。例示されていない無数の変形例が想定され得るものと解される。 While the present disclosure has been described in detail, the foregoing description is, in all respects, illustrative and not restrictive. It is understood that a myriad of variations not illustrated may be envisioned.

また、各実施の形態を自由に組み合わせたり、各実施の形態を適宜、変形、省略することが可能である。 In addition, it is possible to freely combine each embodiment, and to modify or omit each embodiment as appropriate.

1 処理システム、2 マルチコアプロセッサシステム、20 マルチコアプロセッサ、21,21a,21b,21c,21d コア、22 共有キャッシュ、30 プログラム作成装置、231 更新プログラム、250 遅延量更新装置、251 取得部、252,252a 更新部、320 特定部、330 生成部、301a プログラム。 1 processing system, 2 multi-core processor system, 20 multi-core processor, 21, 21a, 21b, 21c, 21d core, 22 shared cache, 30 program creation device, 231 update program, 250 delay amount update device, 251 acquisition unit, 252, 252a Update unit, 320 identification unit, 330 generation unit, 301a program.

Claims (4)

複数のコアを含むマルチコアプロセッサと、前記複数のコアで共有される共有キャッシュとを備えるマルチコアプロセッサシステムの前記マルチコアプロセッサが実行するプログラムを作成するプログラム作成装置が作成した当該プログラムに関する処理を行う遅延量更新装置であって、 A delay amount for processing a program created by a program creation device that creates a program to be executed by the multi-core processor of a multi-core processor system comprising a multi-core processor including a plurality of cores and a shared cache shared by the plurality of cores an update device,
前記プログラム作成装置は、 The programming device is
処理対象プログラムにおいて、データ並列処理が記述されたデータ並列プログラムに変換される対象の部分プログラムである対象部分プログラムを特定する特定部と、 a specifying unit for specifying a target partial program, which is a target partial program to be converted into a data parallel program in which data parallel processing is described, in the processing target program;
前記複数のコアにおいて、一部のコアでの処理開始タイミングが、他のコアでの処理開始タイミングよりも遅延するような前記データ並列処理が記述された前記データ並列プログラムに前記対象部分プログラムを変換し、それによって得られた前記データ並列プログラムを含む実行対象プログラムを生成する生成部と In the plurality of cores, the target partial program is converted into the data parallel program in which the data parallel processing is described such that the processing start timing of some cores is delayed from the processing start timing of the other cores. and a generation unit that generates an execution target program including the data parallel program obtained thereby;
を備え、with
前記遅延量更新装置は、 The delay update device,
前記マルチコアプロセッサでの前記データ並列処理の実行状態を示す実行状態情報を取得する取得部と、 an acquisition unit that acquires execution state information indicating an execution state of the data parallel processing in the multi-core processor;
前記実行状態情報に基づいて、前記データ並列プログラムに記述された前記データ並列処理において前記一部のコアでの処理開始タイミングの遅延量を更新する更新部と an updating unit that updates, based on the execution state information, a delay amount of processing start timing in the part of the cores in the data parallel processing described in the data parallel program;
を備え、with
前記実行状態情報は、前記一部のコアでの前記データ並列処理の実行時間と、前記他のコアでの前記データ並列処理の実行時間とを含む、遅延量更新装置。 The delay update device, wherein the execution state information includes an execution time of the data parallel processing in the part of the cores and an execution time of the data parallel processing in the other cores.
請求項1に記載の遅延量更新装置であって、 The delay amount update device according to claim 1,
前記更新部は、前記実行状態情報が入力されたときに前記遅延量を出力する学習済みモデルを用いて、前記遅延量を更新する、遅延量更新装置。 The delay amount updating device, wherein the update unit updates the delay amount using a learned model that outputs the delay amount when the execution state information is input.
請求項1または請求項2に記載の遅延量更新装置と、 A delay amount update device according to claim 1 or claim 2,
前記遅延量更新装置において対象となる前記データ並列プログラムを生成する前記プログラム作成装置と the program creation device for generating the data parallel program to be targeted in the delay update device;
を備える、処理システム。A processing system comprising:
複数のコアを含むマルチコアプロセッサと、前記複数のコアで共有される共有キャッシュとを備えるマルチコアプロセッサシステムの前記マルチコアプロセッサが実行するプログラムを作成するプログラム作成装置が作成した当該プログラムに関する処理をコンピュータ装置に実行させるためのプログラムであって、 In a multi-core processor system comprising a multi-core processor including a plurality of cores and a shared cache shared by the plurality of cores, a program creation device creates a program to be executed by the multi-core processor. A program for executing
前記プログラム作成装置は、 The programming device is
処理対象プログラムにおいて、データ並列処理が記述されたデータ並列プログラムに変換される対象の部分プログラムである対象部分プログラムを特定する特定部と、 a specifying unit for specifying a target partial program, which is a target partial program to be converted into a data parallel program in which data parallel processing is described, in the processing target program;
前記複数のコアにおいて、一部のコアでの処理開始タイミングが、他のコアでの処理開始タイミングよりも遅延するような前記データ並列処理が記述された前記データ並列プログラムに前記対象部分プログラムを変換し、それによって得られた前記データ並列プログラムを含む実行対象プログラムを生成する生成部と In the plurality of cores, the target partial program is converted into the data parallel program in which the data parallel processing is described such that the processing start timing of some cores is delayed from the processing start timing of the other cores. and a generation unit that generates an execution target program including the data parallel program obtained thereby;
を備え、with
前記プログラムは、コンピュータ装置に、 The program, in a computer device,
前記マルチコアプロセッサでの前記データ並列処理の実行状態を示す実行状態情報を取得する工程と、 obtaining execution state information indicating an execution state of the data parallel processing in the multi-core processor;
前記実行状態情報に基づいて、前記データ並列プログラムに記述された前記データ並列処理において前記一部のコアでの処理開始タイミングの遅延量を更新する工程と a step of updating the delay amount of the processing start timing of the some cores in the data parallel processing described in the data parallel program based on the execution state information;
を実行させ、and
前記実行状態情報は、前記一部のコアでの前記データ並列処理の実行時間と、前記他のコアでの前記データ並列処理の実行時間とを含む、プログラム。 The program according to claim 1, wherein the execution state information includes an execution time of the data parallel processing in the part of the cores and an execution time of the data parallel processing in the other cores.
JP2022539830A 2020-07-28 2020-07-28 Delay update device, processing system and program Active JP7305052B2 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2020/028868 WO2022024214A1 (en) 2020-07-28 2020-07-28 Program creation device, delay amount update device, processing system, and program

Publications (3)

Publication Number Publication Date
JPWO2022024214A1 JPWO2022024214A1 (en) 2022-02-03
JPWO2022024214A5 JPWO2022024214A5 (en) 2022-08-22
JP7305052B2 true JP7305052B2 (en) 2023-07-07

Family

ID=80037789

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022539830A Active JP7305052B2 (en) 2020-07-28 2020-07-28 Delay update device, processing system and program

Country Status (2)

Country Link
JP (1) JP7305052B2 (en)
WO (1) WO2022024214A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011204208A (en) 2010-03-26 2011-10-13 Fujitsu Ltd Multi-core processor
WO2013010159A1 (en) 2011-07-14 2013-01-17 Siemens Corporation Reducing the scan cycle time of control applications through multi-core execution of user programs
US20150081985A1 (en) 2013-09-18 2015-03-19 International Business Machines Corporation Administering inter-core communication via shared memory
JP2016029554A (en) 2014-07-23 2016-03-03 富士通株式会社 Calculation apparatus, calculation method and calculation program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011204208A (en) 2010-03-26 2011-10-13 Fujitsu Ltd Multi-core processor
WO2013010159A1 (en) 2011-07-14 2013-01-17 Siemens Corporation Reducing the scan cycle time of control applications through multi-core execution of user programs
US20150081985A1 (en) 2013-09-18 2015-03-19 International Business Machines Corporation Administering inter-core communication via shared memory
JP2016029554A (en) 2014-07-23 2016-03-03 富士通株式会社 Calculation apparatus, calculation method and calculation program

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MAKOTO, Ishihara, et al.,Interactive parallelizing assistance tool for OpenMP: iPat/OMP,Proc. Fifth European Workshop on OpenMP (EWOMP ‘03),2003年
TIAN, Tian, et al.,Software Techniques for Shared-Cache Multi-Core Systems [online],Intel,2012年03月08日,[検索日 2020.08.27], Internet: <URL:https://software.intel.com/content/www/us/en/develop/articles/software-techniques-for-shared-cache-multi-core-systems.html>

Also Published As

Publication number Publication date
JPWO2022024214A1 (en) 2022-02-03
WO2022024214A1 (en) 2022-02-03

Similar Documents

Publication Publication Date Title
EP3757761B1 (en) Methods and apparatus for intentional programming for heterogeneous systems
US11694075B2 (en) Partitioning control dependency edge in computation graph
Bak et al. Memory-aware scheduling of multicore task sets for real-time systems
JP4621786B2 (en) Information processing apparatus, parallel processing optimization method, and program
WO2019095873A1 (en) Task parallel processing method, apparatus and system, storage medium and computer device
CN112148293A (en) Method and apparatus for runtime multi-scheduling of software executing on heterogeneous systems
JP2020518881A (en) Computer-implemented method, computer-readable medium and heterogeneous computing system
US12288141B2 (en) Multi-level caching for dynamic deep learning models
US12014202B2 (en) Method and apparatus with accelerator
US12360804B2 (en) Data dependency-aware scheduling
JP4381459B1 (en) Information processing apparatus, granularity adjustment method, and program
CA2433379A1 (en) Modulo scheduling of multiple instruction chains
Forsberg et al. HePREM: A predictable execution model for GPU-based heterogeneous SoCs
US20150168936A1 (en) Pipelining for cyclic control systems
US8196146B2 (en) Information processing apparatus, parallel processing optimization method, and program
Cheng et al. {PipeThreader}:{Software-Defined} Pipelining for Efficient {DNN} Execution
JP2025542316A (en) Dynamic control of work scheduling
EP3401784A1 (en) Multicore processing system
US20080271041A1 (en) Program processing method and information processing apparatus
JP7305052B2 (en) Delay update device, processing system and program
CN100593169C (en) Multithreaded reachability
US20250208924A1 (en) Systems and Methods for Heterogeneous Model Parallelism and Adaptive Graph Partitioning
JP2020087009A (en) Optimization device and method for controlling optimization device
Huang et al. Serico: Scheduling real-time i/o requests in computational storage drives
US20260079636A1 (en) Efficient data movement for ai accelerators

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220623

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220623

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: 20230530

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230627

R150 Certificate of patent or registration of utility model

Ref document number: 7305052

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150