WO2019188180A1 - Scheduling method and scheduling device - Google Patents

Scheduling method and scheduling device Download PDF

Info

Publication number
WO2019188180A1
WO2019188180A1 PCT/JP2019/009632 JP2019009632W WO2019188180A1 WO 2019188180 A1 WO2019188180 A1 WO 2019188180A1 JP 2019009632 W JP2019009632 W JP 2019009632W WO 2019188180 A1 WO2019188180 A1 WO 2019188180A1
Authority
WO
WIPO (PCT)
Prior art keywords
processing
cache
tag
tag information
thread
Prior art date
Application number
PCT/JP2019/009632
Other languages
French (fr)
Japanese (ja)
Inventor
雅史 九里
英樹 杉本
Original Assignee
株式会社デンソー
株式会社エヌエスアイテクス
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社デンソー, 株式会社エヌエスアイテクス filed Critical 株式会社デンソー
Publication of WO2019188180A1 publication Critical patent/WO2019188180A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt

Definitions

  • the present disclosure relates to a scheduling method and a scheduling device for executing a program having a graph structure composed of a plurality of processing nodes.
  • Patent Document 1 The invention described in Patent Document 1 below has been proposed for the purpose of improving the use efficiency of the cache memory.
  • Patent Document 1 listed below is a processor-readable cache memory control program for causing a processor to execute a cache memory control process for controlling a cache memory by dividing it into a shared cache area and a dedicated cache area.
  • the difference between the cache hit rate when a dedicated cache area is allocated and the cache hit rate when a shared cache area is allocated in response to a dedicated area acquisition request that requests allocation of a dedicated cache area According to the effective cache usage based on the memory access frequency, the higher the cache effective usage, the more dedicated cache area is allocated, and the lower the cache effective allocation is, the cache area allocation process for allocating the shared cache area, and the release of the allocated dedicated cache area are requested.
  • Open dedicated area In response to the request, the dedicated cache region opening step of releasing the allocation of dedicated cache area, and has a.
  • Patent Document 1 since the cache memory is controlled by dividing it into a shared cache area and a dedicated cache area, it cannot be applied to a case where it is not divided into such areas. In particular, when a graph-structured program consisting of multiple processing nodes is executed, a large amount of parallel processing is performed. Therefore, the entire cache memory can be efficiently divided into areas such as a shared cache area and a dedicated cache area. It is necessary to utilize it.
  • This disclosure is intended to be able to efficiently use a cache memory even when a lot of parallel processing is performed.
  • the present disclosure relates to a scheduling method for executing a program having a graph structure composed of a plurality of processing nodes, and a tag reference step for reading tag information indicating contents of memory access used for each of a plurality of operations in the processing nodes And an allocation step for determining a processing order of a plurality of operations based on the tag information.
  • the present disclosure relates to a scheduling device for executing a program having a graph structure including a plurality of processing nodes, and a tag reference unit that reads tag information indicating the contents of memory access used for each of a plurality of operations in the processing nodes And an allocation unit that determines a processing order of a plurality of operations based on the tag information.
  • the present disclosure by reading the tag information, it is possible to grasp the status of memory access in each of a plurality of operations, and therefore, it is possible to determine the processing order of a plurality of operations so as to reduce cache memory rewriting. it can.
  • FIG. 1 is a diagram for explaining parallel processing which is a premise of the present embodiment.
  • FIG. 2 is a diagram showing a system configuration example for executing the parallel processing shown in FIG.
  • FIG. 3 is a diagram illustrating a configuration example of the DFP used in FIG.
  • FIG. 4 is a diagram for explaining a functional configuration example of the compiler.
  • FIG. 5 is a diagram for explaining a functional configuration example of the thread scheduler.
  • FIG. 6 is a diagram for explaining conventional scheduling.
  • FIG. 7 is a diagram for explaining the state of memory access when processing is performed based on conventional scheduling.
  • FIG. 8 is a diagram for explaining scheduling according to the present embodiment.
  • FIG. 9 is a diagram for explaining the state of memory access when processing is performed based on scheduling according to the present embodiment.
  • FIG. 1A shows a program code having a graph structure
  • FIG. 1B shows a thread state
  • FIG. 1C shows a state of parallel processing.
  • the program to be processed in this embodiment has a graph structure in which data and processing are divided. This graph structure maintains the task parallelism and graph parallelism of the program.
  • Parallel execution as shown in FIG. 1C can be performed on a large number of threads shown in FIG. 1B by dynamic register placement and thread scheduling by hardware. By dynamically allocating register resources during execution, a plurality of threads can be executed in parallel for different instruction streams.
  • a data processing system 2 which is a system configuration example including a DFP (Data Flow Processor) 10 as an accelerator for performing dynamic register placement and thread scheduling, will be described with reference to FIG.
  • DFP Data Flow Processor
  • the data processing system 2 includes a DFP 10, an event handler 20, a host CPU 21, a ROM 22, a RAM 23, an external interface 24, and a system bus 25.
  • the host CPU 21 is an arithmetic unit that mainly performs data processing.
  • the host CPU 21 supports the OS.
  • the event handler 20 is a part that generates an interrupt process.
  • ROM 22 is a read-only memory.
  • the RAM 23 is a read / write memory.
  • the external interface 24 is an interface for exchanging information with the outside of the data processing system 2.
  • the system bus 25 is for transmitting and receiving information between the DFP 10, the host CPU 21, the ROM 22, the RAM 23, and the external interface 24.
  • the DFP 10 is positioned as an individual master provided to cope with the heavy computation load of the host CPU 21.
  • the DFP 10 is configured to support the interrupt generated by the event handler 20.
  • the DFP 10 includes a command unit 12, a thread scheduler 14, an execution core 16, and a memory subsystem 18.
  • the command unit 12 is configured to be able to communicate information with the config interface.
  • the command unit 12 also functions as a command buffer.
  • the thread scheduler 14 is a part that schedules processing of a large number of threads as exemplified in FIG.
  • the thread scheduler 14 can perform scheduling across threads.
  • the execution core 16 has four processing elements, PE # 0, PE # 1, PE # 2, and PE # 3.
  • the execution core 16 has a number of pipelines that can be scheduled independently.
  • the memory subsystem 18 includes an arbiter 181, an L1 cache 18a, and an L2 cache 18b.
  • the memory subsystem 18 is configured to allow information communication between the system bus interface and the ROM interface.
  • the compiler 50 includes a locality detection unit 501 and a tag addition unit 502 as functional components.
  • the locality detection unit 501 is a part that detects memory information used in each processing node constituting the graph structure.
  • the tag assigning unit 502 is a part that assigns tag information based on the memory information detected by the locality detecting unit 501.
  • the tag information indicates the contents of memory access used for each of a plurality of operations in the processing node.
  • the thread scheduler 14 includes a tag reference unit 141 and an allocation unit 142 as functional components.
  • the tag reference unit 141 is a part that reads tag information indicating the contents of memory access used for each of a plurality of operations in the processing node.
  • the allocation unit 142 is a part that determines the processing order of a plurality of operations based on the tag information.
  • FIG. 6A shows a program for the thread 1.
  • FIG. 6B shows the state of the memory area.
  • “a”, “b”, “c”, “d”, “e”, and “f” are stored, and “g (for thread 1)” “h (thread) is stored as the storage area after the calculation. 1) ”and“ g (for thread 2) ”are provided.
  • FIG. 6C shows the state of the cache area.
  • the cache line 1 has a holding area for “a”, “b”, and “c”, and the cache line 2 has a holding area for “d”, “e”, and “f”.
  • FIG. 6 (D) shows a program for thread 2.
  • FIG. 7 shows the status of the cache area.
  • “a”, “b”, and “c” are held in the cache line 1.
  • FIG. 8A shows a program for the thread 1.
  • “TAG: a, b, c, d, e” is assigned as tag information to the processing group Gr1.
  • “TAG: c, g (thread 1)” is assigned as tag information to the processing group Gr2.
  • FIG. 8B shows the state of the memory area.
  • “a”, “b”, “c”, “d”, “e”, and “f” are stored, and “g (for thread 1)” “h (thread) is stored as the storage area after the calculation. 1) ”and“ g (for thread 2) ”are provided.
  • FIG. 8C shows the status of the cache area.
  • the cache line 1 has a holding area for “a”, “b”, and “c”, and the cache line 2 has a holding area for “d”, “e”, and “f”.
  • FIG. 8D shows a program for the thread 2.
  • “TAG: a, d, f” is assigned as tag information to the processing group Gr3.
  • “TAG: c, g (thread 2)” is assigned as tag information to the processing group Gr4.
  • the processing order is set so that the cache memory can be rewritten less.
  • the processing group Gr1 is executed first.
  • the processing group Gr3 to which the tag information “TAG: a, d, f” having many common parts with the tag information “TAG: a, b, c, d, e” of the processing group Gr1 is processed. Is determined.
  • the present embodiment is a scheduling method for executing a program having a graph structure composed of a plurality of processing nodes, and shows the contents of memory access used for each of a plurality of operations in the processing nodes.
  • a tag reference step for reading the tag information; and an allocation step for determining a processing order of a plurality of operations based on the tag information.
  • a thread scheduler 14 As a device, it is a thread scheduler 14 as a scheduling device when executing a program having a graph structure composed of a plurality of processing nodes, and a tag indicating the contents of memory access used for each of a plurality of operations in the processing nodes
  • a tag reference unit 141 that reads information and an allocation unit 142 that determines a processing order of a plurality of operations based on the tag information.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The present invention is provided with: a tag reference unit (141) for reading tag information indicating the content of memory access used for each of a plurality of operations at a processing node; and an allocation unit (142) for determining the processing order of the plurality of operations on the basis of the tag information.

Description

スケジューリング方法、スケジューリング装置Scheduling method and scheduling apparatus 関連出願の相互参照Cross-reference of related applications
 本出願は、2018年3月30日に出願された日本国特許出願2018-068434号に基づくものであって、その優先権の利益を主張するものであり、その特許出願の全ての内容が、参照により本明細書に組み込まれる。 This application is based on Japanese Patent Application No. 2018-068434 filed on March 30, 2018, and claims the benefit of its priority. Which is incorporated herein by reference.
 本開示は、複数の処理ノードで構成されるグラフ構造のプログラムを実行する際のスケジューリング方法及びスケジューリング装置に関する。 The present disclosure relates to a scheduling method and a scheduling device for executing a program having a graph structure composed of a plurality of processing nodes.
 キャッシュメモリの利用効率を高めることを目的とし、下記特許文献1に記載されている発明が提案されている。下記特許文献1には、キャッシュメモリを共用キャッシュ領域と専用キャッシュ領域とに分割して制御するキャッシュメモリ制御工程をプロセッサに実行させるプロセッサ読み取り可能なキャッシュメモリ制御プログラムであって,プロセッサによるプロセスの実行中に発行される専用キャッシュ領域の割当を要求する専用領域獲得要求に応答して,専用キャッシュ領域を割り当てた場合のキャッシュヒット率と共用キャッシュ領域を割り当てた場合のキャッシュヒット率との差と,メモリアクセス頻度とに基づくキャッシュ有効利用度に応じて,キャッシュ有効利用度が高い程専用キャッシュ領域を割当て,低い程共用キャッシュ領域を割り当てるキャッシュ領域割当工程と,割り当て済み専用キャッシュ領域の開放を要求する専用領域開放要求に応答して,専用キャッシュ領域の割当を解放する専用キャッシュ領域開放工程と、を有するものである。 The invention described in Patent Document 1 below has been proposed for the purpose of improving the use efficiency of the cache memory. Patent Document 1 listed below is a processor-readable cache memory control program for causing a processor to execute a cache memory control process for controlling a cache memory by dividing it into a shared cache area and a dedicated cache area. The difference between the cache hit rate when a dedicated cache area is allocated and the cache hit rate when a shared cache area is allocated in response to a dedicated area acquisition request that requests allocation of a dedicated cache area According to the effective cache usage based on the memory access frequency, the higher the cache effective usage, the more dedicated cache area is allocated, and the lower the cache effective allocation is, the cache area allocation process for allocating the shared cache area, and the release of the allocated dedicated cache area are requested. Open dedicated area In response to the request, the dedicated cache region opening step of releasing the allocation of dedicated cache area, and has a.
特開2015-36873号公報JP 2015-36873 A
 特許文献1では、キャッシュメモリを共用キャッシュ領域と専用キャッシュ領域とに分割して制御するため、このような領域に分けない場合に適用することができなかった。特に、複数の処理ノードで構成されるグラフ構造のプログラムを実行する際には、多くの並列処理が行われるため、共用キャッシュ領域や専用キャッシュ領域といった領域に分けないでキャッシュメモリ全体を効率的に活用する必要がある。 In Patent Document 1, since the cache memory is controlled by dividing it into a shared cache area and a dedicated cache area, it cannot be applied to a case where it is not divided into such areas. In particular, when a graph-structured program consisting of multiple processing nodes is executed, a large amount of parallel processing is performed. Therefore, the entire cache memory can be efficiently divided into areas such as a shared cache area and a dedicated cache area. It is necessary to utilize it.
 本開示は、多くの並列処理が行われる場合でもキャッシュメモリを効率的に活用することができることを目的とする。 This disclosure is intended to be able to efficiently use a cache memory even when a lot of parallel processing is performed.
 本開示は、複数の処理ノードで構成されるグラフ構造のプログラムを実行する際のスケジューリング方法であって、処理ノードにおける複数の演算それぞれに用いられるメモリアクセスの内容を示すタグ情報を読み取るタグ参照ステップと、タグ情報に基づいて複数の演算の処理順序を決定するアロケーションステップと、を備える。 The present disclosure relates to a scheduling method for executing a program having a graph structure composed of a plurality of processing nodes, and a tag reference step for reading tag information indicating contents of memory access used for each of a plurality of operations in the processing nodes And an allocation step for determining a processing order of a plurality of operations based on the tag information.
 本開示は、複数の処理ノードで構成されるグラフ構造のプログラムを実行する際のスケジューリング装置であって、処理ノードにおける複数の演算それぞれに用いられるメモリアクセスの内容を示すタグ情報を読み取るタグ参照部と、タグ情報に基づいて複数の演算の処理順序を決定するアロケーション部と、を備える。 The present disclosure relates to a scheduling device for executing a program having a graph structure including a plurality of processing nodes, and a tag reference unit that reads tag information indicating the contents of memory access used for each of a plurality of operations in the processing nodes And an allocation unit that determines a processing order of a plurality of operations based on the tag information.
 本開示によれば、タグ情報を読み取ることで、複数の演算それぞれにおけるメモリアクセスの状況を把握することができるので、キャッシュメモリの書き換えが減少するように複数の演算の処理順序を決定することができる。 According to the present disclosure, by reading the tag information, it is possible to grasp the status of memory access in each of a plurality of operations, and therefore, it is possible to determine the processing order of a plurality of operations so as to reduce cache memory rewriting. it can.
図1は、本実施形態の前提となる並列処理について説明するための図である。FIG. 1 is a diagram for explaining parallel processing which is a premise of the present embodiment. 図2は、図1に示される並列処理を実行するためのシステム構成例を示す図である。FIG. 2 is a diagram showing a system configuration example for executing the parallel processing shown in FIG. 図3は、図2に用いられるDFPの構成例を示す図である。FIG. 3 is a diagram illustrating a configuration example of the DFP used in FIG. 図4は、コンパイラの機能的な構成例を説明するための図である。FIG. 4 is a diagram for explaining a functional configuration example of the compiler. 図5は、スレッドスケジューラの機能的な構成例を説明するための図である。FIG. 5 is a diagram for explaining a functional configuration example of the thread scheduler. 図6は、従来のスケジューリングについて説明するための図である。FIG. 6 is a diagram for explaining conventional scheduling. 図7は、従来のスケジューリングに基づいて処理をした場合のメモリアクセスの状況を説明するための図である。FIG. 7 is a diagram for explaining the state of memory access when processing is performed based on conventional scheduling. 図8は、本実施形態のスケジューリングについて説明するための図である。FIG. 8 is a diagram for explaining scheduling according to the present embodiment. 図9は、本実施形態のスケジューリングに基づいて処理をした場合のメモリアクセスの状況を説明するための図である。FIG. 9 is a diagram for explaining the state of memory access when processing is performed based on scheduling according to the present embodiment.
 以下、添付図面を参照しながら本実施形態について説明する。説明の理解を容易にするため、各図面において同一の構成要素に対しては可能な限り同一の符号を付して、重複する説明は省略する。 Hereinafter, the present embodiment will be described with reference to the accompanying drawings. In order to facilitate the understanding of the description, the same constituent elements in the drawings will be denoted by the same reference numerals as much as possible, and redundant description will be omitted.
 図1(A)は、グラフ構造のプログラムコードを示しており、図1(B)は、スレッドの状態を示しており、図1(C)は、並列処理の状況を示している。 FIG. 1A shows a program code having a graph structure, FIG. 1B shows a thread state, and FIG. 1C shows a state of parallel processing.
 図1(A)に示されるように、本実施形態が処理対象とするプログラムは、データと処理とが分割されているグラフ構造を有している。このグラフ構造は、プログラムのタスク並列性、グラフ並列性を保持している。 As shown in FIG. 1A, the program to be processed in this embodiment has a graph structure in which data and processing are divided. This graph structure maintains the task parallelism and graph parallelism of the program.
 図1(A)に示されるプログラムコードに対して、コンパイラによる自動ベクトル化とグラフ構造の抽出を行うと、図1(B)に示されるような大量のスレッドを生成することができる。 1) When automatic vectorization and graph structure extraction are performed on the program code shown in FIG. 1A by a compiler, a large number of threads as shown in FIG. 1B can be generated.
 図1(B)に示される多量のスレッドに対して、ハードウェアによる動的レジスタ配置とスレッド・スケジューリングにより、図1(C)に示されるような並列実行を行うことができる。実行中にレジスタ資源を動的配置することで、異なる命令ストリームに対しても複数のスレッドを並列実行することができる。 1) Parallel execution as shown in FIG. 1C can be performed on a large number of threads shown in FIG. 1B by dynamic register placement and thread scheduling by hardware. By dynamically allocating register resources during execution, a plurality of threads can be executed in parallel for different instruction streams.
 続いて図2を参照しながら、動的レジスタ配置及びスレッド・スケジューリングを行うアクセラレータとしてのDFP(Data Flow Processor)10を含むシステム構成例である、データ処理システム2を説明する。 Next, a data processing system 2, which is a system configuration example including a DFP (Data Flow Processor) 10 as an accelerator for performing dynamic register placement and thread scheduling, will be described with reference to FIG.
 データ処理システム2は、DFP10と、イベントハンドラ20と、ホストCPU21と、ROM22と、RAM23と、外部インターフェイス24と、システムバス25と、を備えている。ホストCPU21は、データ処理を主として行う演算装置である。ホストCPU21は、OSをサポートしている。イベントハンドラ20は、割り込み処理を生成する部分である。 The data processing system 2 includes a DFP 10, an event handler 20, a host CPU 21, a ROM 22, a RAM 23, an external interface 24, and a system bus 25. The host CPU 21 is an arithmetic unit that mainly performs data processing. The host CPU 21 supports the OS. The event handler 20 is a part that generates an interrupt process.
 ROM22は、読込専用のメモリである。RAM23は、読み書き用のメモリである。外部インターフェイス24は、データ処理システム2外と情報授受を行うためのインターフェイスである。システムバス25は、DFP10と、ホストCPU21と、ROM22と、RAM23と、外部インターフェイス24との間で情報の送受信を行うためのものである。 ROM 22 is a read-only memory. The RAM 23 is a read / write memory. The external interface 24 is an interface for exchanging information with the outside of the data processing system 2. The system bus 25 is for transmitting and receiving information between the DFP 10, the host CPU 21, the ROM 22, the RAM 23, and the external interface 24.
 DFP10は、ホストCPU21の重い演算負荷に対処するために設けられている個別のマスタとして位置づけられている。DFP10は、イベントハンドラ20が生成した割り込みをサポートするように構成されている。 The DFP 10 is positioned as an individual master provided to cope with the heavy computation load of the host CPU 21. The DFP 10 is configured to support the interrupt generated by the event handler 20.
 続いて図3を参照しながら、DFP10について説明する。図3に示されるように、DFP10は、コマンドユニット12と、スレッドスケジューラ14と、実行コア16と、メモリサブシステム18と、を備えている。 Next, the DFP 10 will be described with reference to FIG. As shown in FIG. 3, the DFP 10 includes a command unit 12, a thread scheduler 14, an execution core 16, and a memory subsystem 18.
 コマンドユニット12は、コンフィグ・インターフェイスとの間で情報通信可能なように構成されている。コマンドユニット12は、コマンドバッファとしても機能している。 The command unit 12 is configured to be able to communicate information with the config interface. The command unit 12 also functions as a command buffer.
 スレッドスケジューラ14は、図1(B)に例示されるような多量のスレッドの処理をスケジューリングする部分である。スレッドスケジューラ14は、スレッドを跨いだスケジューリングを行うことが可能である。 The thread scheduler 14 is a part that schedules processing of a large number of threads as exemplified in FIG. The thread scheduler 14 can perform scheduling across threads.
 実行コア16は、4つのプロセッシングエレメントである、PE#0と、PE#1と、PE#2と、PE#3と、を有している。実行コア16は、独立してスケジューリング可能な多数のパイプラインを有している。 The execution core 16 has four processing elements, PE # 0, PE # 1, PE # 2, and PE # 3. The execution core 16 has a number of pipelines that can be scheduled independently.
 メモリサブシステム18は、アービタ181と、L1キャッシュ18aと、L2キャッシュ18bと、を有している。メモリサブシステム18は、システム・バス・インターフェイス及びROMインターフェイスとの間で情報通信可能なように構成されている。 The memory subsystem 18 includes an arbiter 181, an L1 cache 18a, and an L2 cache 18b. The memory subsystem 18 is configured to allow information communication between the system bus interface and the ROM interface.
 続いて、図4を参照しながら、コンパイラ50について説明する。コンパイラ50は、機能的な構成要素として、局所性検出部501と、タグ付与部502と、を備える。 Subsequently, the compiler 50 will be described with reference to FIG. The compiler 50 includes a locality detection unit 501 and a tag addition unit 502 as functional components.
 局所性検出部501は、グラフ構造を構成する個々の処理ノードにおいて利用するメモリ情報を検出する部分である。タグ付与部502は、局所性検出部501が検出したメモリ情報に基づいて、タグ情報を付与する部分である。タグ情報は、処理ノードにおける複数の演算それぞれに用いられるメモリアクセスの内容を示すものである。 The locality detection unit 501 is a part that detects memory information used in each processing node constituting the graph structure. The tag assigning unit 502 is a part that assigns tag information based on the memory information detected by the locality detecting unit 501. The tag information indicates the contents of memory access used for each of a plurality of operations in the processing node.
 続いて、図5を参照しながら、スレッドスケジューラ14の機能的な構成要素について説明する。スレッドスケジューラ14は、機能的な構成要素として、タグ参照部141と、アロケーション部142と、を備える。 Subsequently, functional components of the thread scheduler 14 will be described with reference to FIG. The thread scheduler 14 includes a tag reference unit 141 and an allocation unit 142 as functional components.
 タグ参照部141は、処理ノードにおける複数の演算それぞれに用いられるメモリアクセスの内容を示すタグ情報を読み取る部分である。 The tag reference unit 141 is a part that reads tag information indicating the contents of memory access used for each of a plurality of operations in the processing node.
 アロケーション部142は、タグ情報に基づいて複数の演算の処理順序を決定する部分である。 The allocation unit 142 is a part that determines the processing order of a plurality of operations based on the tag information.
 本実施形態におけるタグ参照部141及びアロケーション部142の処理を説明するのに先立って、比較のためタグ情報を用いない従来の処理方法について図6及び図7を参照しながら説明する。 Prior to describing the processing of the tag reference unit 141 and the allocation unit 142 in the present embodiment, a conventional processing method that does not use tag information for comparison will be described with reference to FIGS. 6 and 7.
 図6(A)は、スレッド1用のプログラムを示している。スレッド1用のプログラム中には、処理グループGr1として「d=a+b」「e=a+c」があり、処理グループGr2として「g=b+c」がある。 FIG. 6A shows a program for the thread 1. In the program for the thread 1, there are “d = a + b” and “e = a + c” as the processing group Gr1, and “g = b + c” as the processing group Gr2.
 図6(B)は、メモリ領域の状況を示している。メモリ領域には、データとして「a」「b」「c」「d」「e」「f」が格納されており、演算後の格納領域として、「g(スレッド1用)」「h(スレッド1用)」「g(スレッド2用)」が設けられている。 FIG. 6B shows the state of the memory area. In the memory area, “a”, “b”, “c”, “d”, “e”, and “f” are stored, and “g (for thread 1)” “h (thread) is stored as the storage area after the calculation. 1) ”and“ g (for thread 2) ”are provided.
 図6(C)は、キャッシュ領域の状況を示している。キャッシュライン1には、「a」「b」「c」の保持領域が確保され、キャッシュライン2には、「d」「e」「f」の保持領域が確保されている。 FIG. 6C shows the state of the cache area. The cache line 1 has a holding area for “a”, “b”, and “c”, and the cache line 2 has a holding area for “d”, “e”, and “f”.
 図6(D)は、スレッド2用のプログラムを示している。スレッド2用のプログラム中には、処理グループGr3として「f=a+d」があり、処理グループGr4として「g=b+c」がある。 FIG. 6 (D) shows a program for thread 2. In the program for the thread 2, there is “f = a + d” as the processing group Gr3 and “g = b + c” as the processing group Gr4.
 このような状況で、処理グループGr1、処理グループGr2、処理グループGr3、処理グループGr4の順に処理した場合のキャッシュ領域の変遷状況について、図7を参照しながら説明する。 In this situation, the transition status of the cache area when processing group Gr1, processing group Gr2, processing group Gr3, and processing group Gr4 are processed in this order will be described with reference to FIG.
 図7は、キャッシュ領域の状況を示している。処理グループGr1を実行するにあたっては、キャッシュライン1に「a」「b」「c」が保持される。処理グループGr1が処理されると、「d=a+b」「e=a+c」が演算され、キャッシュライン2に演算結果である「d」「e」と「f」が保持されている。 FIG. 7 shows the status of the cache area. In executing the processing group Gr1, “a”, “b”, and “c” are held in the cache line 1. When the processing group Gr1 is processed, “d = a + b” and “e = a + c” are calculated, and the calculation results “d”, “e”, and “f” are held in the cache line 2.
 処理グループGr1に続いて処理グループGr2が処理されると、「g=b+c」の演算結果である「g(スレッド1用)」を格納する必要があるため、キャッシュライン2が書き換えられる。 When processing group Gr2 is processed subsequent to processing group Gr1, cache line 2 is rewritten because it is necessary to store “g (for thread 1)”, which is the operation result of “g = b + c”.
 処理グループGr2に続いて処理グループGr3が処理されると、演算結果である「f」を格納する必要があるため、キャッシュライン2が書き換えられる。 When processing group Gr3 is processed subsequent to processing group Gr2, cache line 2 is rewritten because it is necessary to store “f” as the operation result.
 処理グループGr3に続いて処理グループGr4が処理されると、演算結果である「g(スレッド2用)」を格納する必要があるため、キャッシュライン2が書き換えられる。 When the processing group Gr4 is processed subsequent to the processing group Gr3, the cache line 2 is rewritten because it is necessary to store “g (for thread 2)” as the operation result.
 このような頻繁なキャッシュの書き換えを回避する一例について、図8及び図9を参照しながら説明する。 An example of avoiding such frequent cache rewriting will be described with reference to FIGS.
 図8(A)は、スレッド1用のプログラムを示している。スレッド1用のプログラム中には、処理グループGr1として「d=a+b」「e=a+c」があり、処理グループGr2として「g=b+c」がある。処理グループGr1には、タグ情報として「TAG:a,b,c,d,e」が付与されている。処理グループGr2には、タグ情報として「TAG:c,g(スレッド1)」が付与されている。 FIG. 8A shows a program for the thread 1. In the program for the thread 1, there are “d = a + b” and “e = a + c” as the processing group Gr1, and “g = b + c” as the processing group Gr2. “TAG: a, b, c, d, e” is assigned as tag information to the processing group Gr1. “TAG: c, g (thread 1)” is assigned as tag information to the processing group Gr2.
 図8(B)は、メモリ領域の状況を示している。メモリ領域には、データとして「a」「b」「c」「d」「e」「f」が格納されており、演算後の格納領域として、「g(スレッド1用)」「h(スレッド1用)」「g(スレッド2用)」が設けられている。 FIG. 8B shows the state of the memory area. In the memory area, “a”, “b”, “c”, “d”, “e”, and “f” are stored, and “g (for thread 1)” “h (thread) is stored as the storage area after the calculation. 1) ”and“ g (for thread 2) ”are provided.
 図8(C)は、キャッシュ領域の状況を示している。キャッシュライン1には、「a」「b」「c」の保持領域が確保され、キャッシュライン2には、「d」「e」「f」の保持領域が確保されている。 FIG. 8C shows the status of the cache area. The cache line 1 has a holding area for “a”, “b”, and “c”, and the cache line 2 has a holding area for “d”, “e”, and “f”.
 図8(D)は、スレッド2用のプログラムを示している。スレッド2用のプログラム中には、処理グループGr3として「f=a+d」があり、処理グループGr4として「g=b+c」がある。処理グループGr3には、タグ情報として「TAG:a,d,f」が付与されている。処理グループGr4には、タグ情報として「TAG:c,g(スレッド2)」が付与されている。 FIG. 8D shows a program for the thread 2. In the program for the thread 2, there is “f = a + d” as the processing group Gr3 and “g = b + c” as the processing group Gr4. “TAG: a, d, f” is assigned as tag information to the processing group Gr3. “TAG: c, g (thread 2)” is assigned as tag information to the processing group Gr4.
 このようにタグ情報が付与されていると、キャッシュメモリの書き換えが少なくて済むように処理の順番が設定される。一例としては、最初に実行されるのが処理グループGr1であると決定される。続いて、処理グループGr1のタグ情報「TAG:a,b,c,d,e」と共通部分が多いタグ情報「TAG:a,d,f」が付与されている処理グループGr3を処理することが決定される。 If the tag information is assigned in this way, the processing order is set so that the cache memory can be rewritten less. As an example, it is determined that the processing group Gr1 is executed first. Subsequently, the processing group Gr3 to which the tag information “TAG: a, d, f” having many common parts with the tag information “TAG: a, b, c, d, e” of the processing group Gr1 is processed. Is determined.
 続いて、処理グループGr3のタグ情報「TAG:a,d,f」と共通部分が多いタグ情報が付与されている処理グループを探すのであるが、共通部分があるタグ情報が付与されている処理グループが無いため、当初の順番に沿って、処理グループGr2、処理グループGr4の順に実行される。 Subsequently, a process group to which tag information having a lot of common parts with tag information “TAG: a, d, f” of the process group Gr3 is searched. Since there is no group, processing group Gr2 and processing group Gr4 are executed in the order of the original order.
 図9を参照しながら、処理グループGr1、処理グループGr3、処理グループGr2、処理グループGr4の順に処理した場合のキャッシュ領域の変遷状況について説明する。 Referring to FIG. 9, the transition state of the cache area when processing group Gr1, processing group Gr3, processing group Gr2, and processing group Gr4 are processed in this order will be described.
 処理グループGr1を実行するにあたっては、キャッシュライン1に「a」「b」「c」が保持される。処理グループGr1が処理されると、「d=a+b」「e=a+c」が演算され、キャッシュライン2に演算結果である「d」「e」と「f」が保持されている。 In executing the processing group Gr1, “a”, “b”, and “c” are held in the cache line 1. When the processing group Gr1 is processed, “d = a + b” and “e = a + c” are calculated, and the calculation results “d”, “e”, and “f” are held in the cache line 2.
 処理グループGr1に続いて処理グループGr3が処理されると、処理に用いるデータは既にキャッシュラインに格納されているため、キャッシュの書き換えは発生しない。 When the processing group Gr3 is processed subsequent to the processing group Gr1, the data used for the processing is already stored in the cache line, so that the cache is not rewritten.
 処理グループGr3に続いて処理グループGr2を実行するにあたっては、「g=b+c」の演算結果である「g(スレッド1用)」を格納する必要があるため、キャッシュライン2が書き換えられる。 When executing the processing group Gr2 subsequent to the processing group Gr3, it is necessary to store “g (for thread 1)” which is the calculation result of “g = b + c”, so the cache line 2 is rewritten.
 処理グループGr2に続いて処理グループGr4が実行される場合、「g(スレッド2用)」が確保されているため、キャッシュの書き換えは発生しない。 When the processing group Gr4 is executed subsequent to the processing group Gr2, cache rewriting does not occur because “g (for thread 2)” is secured.
 上記説明したように、本実施形態は、複数の処理ノードで構成されるグラフ構造のプログラムを実行する際のスケジューリング方法であって、処理ノードにおける複数の演算それぞれに用いられるメモリアクセスの内容を示すタグ情報を読み取るタグ参照ステップと、タグ情報に基づいて複数の演算の処理順序を決定するアロケーションステップと、を備える。 As described above, the present embodiment is a scheduling method for executing a program having a graph structure composed of a plurality of processing nodes, and shows the contents of memory access used for each of a plurality of operations in the processing nodes. A tag reference step for reading the tag information; and an allocation step for determining a processing order of a plurality of operations based on the tag information.
 装置として捉えれば、複数の処理ノードで構成されるグラフ構造のプログラムを実行する際のスケジューリング装置としてのスレッドスケジューラ14であって、処理ノードにおける複数の演算それぞれに用いられるメモリアクセスの内容を示すタグ情報を読み取るタグ参照部141と、タグ情報に基づいて複数の演算の処理順序を決定するアロケーション部142と、を備える。 As a device, it is a thread scheduler 14 as a scheduling device when executing a program having a graph structure composed of a plurality of processing nodes, and a tag indicating the contents of memory access used for each of a plurality of operations in the processing nodes A tag reference unit 141 that reads information and an allocation unit 142 that determines a processing order of a plurality of operations based on the tag information.
 本実施形態では、タグ情報を読み取ることで、複数の演算それぞれにおけるメモリアクセスの状況を把握することができるので、キャッシュメモリの書き換えが減少するように複数の演算の処理順序を決定することができる。 In this embodiment, by reading the tag information, it is possible to grasp the status of memory access in each of the plurality of operations, so that the processing order of the plurality of operations can be determined so that rewriting of the cache memory is reduced. .
 以上、具体例を参照しつつ本実施形態について説明した。しかし、本開示はこれらの具体例に限定されるものではない。これら具体例に、当業者が適宜設計変更を加えたものも、本開示の特徴を備えている限り、本開示の範囲に包含される。前述した各具体例が備える各要素およびその配置、条件、形状などは、例示したものに限定されるわけではなく適宜変更することができる。前述した各具体例が備える各要素は、技術的な矛盾が生じない限り、適宜組み合わせを変えることができる。 The embodiment has been described above with reference to specific examples. However, the present disclosure is not limited to these specific examples. Those in which those skilled in the art appropriately modify the design of these specific examples are also included in the scope of the present disclosure as long as they have the features of the present disclosure. Each element included in each of the specific examples described above and their arrangement, conditions, shape, and the like are not limited to those illustrated, and can be changed as appropriate. Each element included in each of the specific examples described above can be appropriately combined as long as no technical contradiction occurs.

Claims (2)

  1.  複数の処理ノードで構成されるグラフ構造のプログラムを実行する際のスケジューリング方法であって、
     処理ノードにおける複数の演算それぞれに用いられるメモリアクセスの内容を示すタグ情報を読み取るタグ参照ステップと、
     前記タグ情報に基づいて前記複数の演算の処理順序を決定するアロケーションステップと、を備えるスケジューリング方法。
    A scheduling method for executing a program having a graph structure composed of a plurality of processing nodes,
    A tag reference step for reading tag information indicating the contents of memory access used for each of a plurality of operations in the processing node;
    An allocation step for determining a processing order of the plurality of operations based on the tag information.
  2.  複数の処理ノードで構成されるグラフ構造のプログラムを実行する際のスケジューリング装置であって、
     処理ノードにおける複数の演算それぞれに用いられるメモリアクセスの内容を示すタグ情報を読み取るタグ参照部(141)と、
     前記タグ情報に基づいて前記複数の演算の処理順序を決定するアロケーション部(142)と、を備えるスケジューリング装置。
    A scheduling apparatus for executing a program having a graph structure composed of a plurality of processing nodes,
    A tag reference unit (141) for reading tag information indicating the contents of memory access used for each of a plurality of operations in the processing node;
    An allocation unit (142) that determines a processing order of the plurality of operations based on the tag information.
PCT/JP2019/009632 2018-03-30 2019-03-11 Scheduling method and scheduling device WO2019188180A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018068434A JP2019179417A (en) 2018-03-30 2018-03-30 Scheduling method and scheduling apparatus
JP2018-068434 2018-03-30

Publications (1)

Publication Number Publication Date
WO2019188180A1 true WO2019188180A1 (en) 2019-10-03

Family

ID=68061547

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/009632 WO2019188180A1 (en) 2018-03-30 2019-03-11 Scheduling method and scheduling device

Country Status (2)

Country Link
JP (1) JP2019179417A (en)
WO (1) WO2019188180A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0844577A (en) * 1994-07-26 1996-02-16 Sumisho Electron Kk Data dividing method and multi-processor system
JPH10116198A (en) * 1996-09-30 1998-05-06 Nec Corp Cache localization improving method for program
JP2008004082A (en) * 2006-05-26 2008-01-10 Matsushita Electric Ind Co Ltd Compiler apparatus, compiler method and compiler program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0844577A (en) * 1994-07-26 1996-02-16 Sumisho Electron Kk Data dividing method and multi-processor system
JPH10116198A (en) * 1996-09-30 1998-05-06 Nec Corp Cache localization improving method for program
JP2008004082A (en) * 2006-05-26 2008-01-10 Matsushita Electric Ind Co Ltd Compiler apparatus, compiler method and compiler program

Also Published As

Publication number Publication date
JP2019179417A (en) 2019-10-17

Similar Documents

Publication Publication Date Title
TWI537831B (en) Multi-core processor,method to perform process switching,method to secure a memory block, apparatus to enable transactional processing using a multi core device and method to perform memory transactional processing
US9378069B2 (en) Lock spin wait operation for multi-threaded applications in a multi-core computing environment
KR102334511B1 (en) Manage task dependencies
JP2012104140A (en) Sharing processor execution resources in waiting state
JP2013506179A (en) Execution management system combining instruction threads and management method
JP2009528610A (en) Method and apparatus for dynamically resizing cache partition based on task execution phase
KR101901587B1 (en) Method and apparatus to guarantee real time processing of soft real-time operating system
KR20100016347A (en) Thread de-emphasis instruction for multithreaded processor
US10545890B2 (en) Information processing device, information processing method, and program
WO2020121840A1 (en) Arithmetic control device
JP2009223842A (en) Virtual machine control program and virtual machine system
JP4253796B2 (en) Computer and control method
WO2023077875A1 (en) Method and apparatus for executing kernels in parallel
US11481250B2 (en) Cooperative workgroup scheduling and context prefetching based on predicted modification of signal values
WO2019188180A1 (en) Scheduling method and scheduling device
JP2013114538A (en) Information processing apparatus, information processing method and control program
JP4017005B2 (en) Arithmetic unit
JP7217341B2 (en) How processors and registers are inherited
WO2019188177A1 (en) Information processing device
WO2019188182A1 (en) Pre-fetch controller
JP6364827B2 (en) Information processing apparatus, resource access method thereof, and resource access program
JP2010026575A (en) Scheduling method, scheduling device, and multiprocessor system
JP7080698B2 (en) Information processing equipment
JP4878050B2 (en) Computer and control method
WO2019188171A1 (en) Code generation method and code generation device

Legal Events

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

Ref document number: 19776200

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19776200

Country of ref document: EP

Kind code of ref document: A1