WO2019188182A1 - プリフェッチコントローラ - Google Patents

プリフェッチコントローラ Download PDF

Info

Publication number
WO2019188182A1
WO2019188182A1 PCT/JP2019/009634 JP2019009634W WO2019188182A1 WO 2019188182 A1 WO2019188182 A1 WO 2019188182A1 JP 2019009634 W JP2019009634 W JP 2019009634W WO 2019188182 A1 WO2019188182 A1 WO 2019188182A1
Authority
WO
WIPO (PCT)
Prior art keywords
prefetch
amount
thread
fetch
unit
Prior art date
Application number
PCT/JP2019/009634
Other languages
English (en)
French (fr)
Inventor
雅史 九里
英樹 杉本
Original Assignee
株式会社デンソー
株式会社エヌエスアイテクス
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社デンソー, 株式会社エヌエスアイテクス filed Critical 株式会社デンソー
Publication of WO2019188182A1 publication Critical patent/WO2019188182A1/ja

Links

Images

Classifications

    • 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead

Definitions

  • This disclosure relates to a prefetch controller provided in a processor.
  • a prefetch function is widely used to prevent a decrease in processing performance due to waiting for a cache fill after a cache miss.
  • the prefetch function is a function that predicts an instruction that the processor will execute in the future, and reads it in a prefetch buffer such as an instruction cache in advance before a cache miss occurs (see Patent Document 1 below).
  • This disclosure is intended to provide a prefetch controller that alleviates instruction fetch contention and bandwidth shortage when a plurality of threads are processed in parallel.
  • the present disclosure is a prefetch controller provided in a processor, and includes a prefetch amount comparison unit that compares an average instruction consumption amount preset for each of a plurality of threads and a prefetch amount at a current time, and a prefetch amount comparison unit.
  • a priority order changing unit that raises the prefetch priority order of a thread having a relatively short prefetch amount based on the comparison result.
  • the prefetch priority can be changed in accordance with a change in the actual prefetch amount, it is possible to alleviate instruction fetch contention and insufficient bandwidth when processing a plurality of threads in parallel.
  • 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 the processing of the compiler.
  • FIG. 6 is a diagram for explaining a functional configuration example of the prefetch controller.
  • FIG. 7 is a diagram for explaining processing of the prefetch controller.
  • 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 loop structure analysis unit 501 and an average instruction consumption calculation unit 502 as functional components.
  • the loop structure analysis unit 501 is a part that identifies a plurality of threads by analyzing a program code having a graph structure as shown in FIG.
  • the average instruction consumption calculation unit 502 is a part that calculates the average instruction consumption for each of the plurality of threads specified by the loop structure analysis unit 501.
  • the average instruction consumption of thread 1 is 1500
  • the average instruction consumption of thread 2 is 2000
  • the average instruction consumption of thread 3 is 1000
  • the average instruction consumption of thread 4 is 5000. Yes.
  • the average instruction consumption calculation unit 502 notifies the DFP 10 of the calculated average instruction consumption.
  • the prefetch controller 60 includes a prefetch amount comparison unit 601 and a priority change unit 602 as functional components.
  • the prefetch amount comparison unit 601 is a part that compares the average instruction consumption amount notified from the average instruction consumption amount calculation unit 502 with the current prefetch amount.
  • the priority changing unit 602 is a part that increases the prefetch priority of a thread having a relatively short prefetch amount based on the comparison result of the prefetch amount comparing unit 601.
  • the priority changing unit 602 can determine the priority by adding the execution priority of the thread to the comparison result.
  • the average instruction consumption of thread 1 is 1500 for prefetch quantity 600
  • the average instruction consumption of thread 2 is 2000
  • prefetch quantity is 1700
  • the average instruction consumption of thread 3 is
  • the prefetch amount is 1000 for 1000
  • the average instruction consumption of the thread 4 is 5000
  • the prefetch amount is 100.
  • the present embodiment is a prefetch controller 60 provided in the DFP 10 that is a processor, and compares the average instruction consumption set in advance for each of a plurality of threads with the current prefetch amount.
  • a prefetch amount comparison unit 601 and a priority order change unit 602 that increases the prefetch priority of a thread having a relatively short prefetch amount based on the comparison result of the prefetch amount comparison unit.
  • the prefetch priority can be changed according to the actual fluctuation of the prefetch amount, it is possible to alleviate instruction fetch contention and bandwidth shortage when a plurality of threads are processed in parallel.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Advance Control (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

プロセッサに設けられるプリフェッチコントローラであって、複数のスレッド毎に予め設定されている平均命令消費量と、現時点でのプリフェッチ量とを比較するプリフェッチ量比較部(601)と、プリフェッチ量比較部(601)の比較結果に基づいて、プリフェッチ量が相対的に不足しているスレッドのプリフェッチ優先順位を上昇させる優先順位変更部(602)と、を備える。

Description

プリフェッチコントローラ 関連出願の相互参照
 本出願は、2018年3月30日に出願された日本国特許出願2018-068436号に基づくものであって、その優先権の利益を主張するものであり、その特許出願の全ての内容が、参照により本明細書に組み込まれる。
 本開示は、プロセッサに設けられるプリフェッチコントローラに関する。
 命令キャッシュを備えるプロセッサでは、キャッシュミス後のキャッシュフィルを待たされることによって処理性能が低下するのを防止するために、プリフェッチ機能が広く採用されている。プリフェッチ機能は、プロセッサが将来実行するであろう命令を予測し、キャッシュミスが発生する前に予め命令キャッシュ等のプリフェッチバッファに読み込んでおく機能である(下記特許文献1参照)。
特開2016-157371号公報
 特許文献1に記載されているプリフェッチ手法では、複数のスレッドを並列処理する際に、命令フェッチの競合や帯域不足が発生するおそれがある。
 本開示は、複数のスレッドを並列処理する際に、命令フェッチの競合や帯域不足を緩和するプリフェッチコントローラを提供することを目的とする。
 本開示は、プロセッサに設けられるプリフェッチコントローラであって、複数のスレッド毎に予め設定されている平均命令消費量と、現時点でのプリフェッチ量とを比較するプリフェッチ量比較部と、プリフェッチ量比較部の比較結果に基づいて、プリフェッチ量が相対的に不足しているスレッドのプリフェッチ優先順位を上昇させる優先順位変更部と、を備える。
 本開示によれば、実際のプリフェッチ量の変動に応じてプリフェッチ優先順位を変更できるので、複数のスレッドを並列処理する際に、命令フェッチの競合や帯域不足を緩和することができる。
図1は、本実施形態の前提となる並列処理について説明するための図である。 図2は、図1に示される並列処理を実行するためのシステム構成例を示す図である。 図3は、図2に用いられるDFPの構成例を示す図である。 図4は、コンパイラの機能的な構成例を説明するための図である。 図5は、コンパイラの処理を説明するための図である。 図6は、プリフェッチコントローラの機能的な構成例を説明するための図である。 図7は、プリフェッチコントローラの処理を説明するための図である。
 以下、添付図面を参照しながら本実施形態について説明する。説明の理解を容易にするため、各図面において同一の構成要素に対しては可能な限り同一の符号を付して、重複する説明は省略する。
 図1(A)は、グラフ構造のプログラムコードを示しており、図1(B)は、スレッドの状態を示しており、図1(C)は、並列処理の状況を示している。
 図1(A)に示されるように、本実施形態が処理対象とするプログラムは、データと処理とが分割されているグラフ構造を有している。このグラフ構造は、プログラムのタスク並列性、グラフ並列性を保持している。
 図1(A)に示されるプログラムコードに対して、コンパイラによる自動ベクトル化とグラフ構造の抽出を行うと、図1(B)に示されるような大量のスレッドを生成することができる。
 図1(B)に示される多量のスレッドに対して、ハードウェアによる動的レジスタ配置とスレッド・スケジューリングにより、図1(C)に示されるような並列実行を行うことができる。実行中にレジスタ資源を動的配置することで、異なる命令ストリームに対しても複数のスレッドを並列実行することができる。
 続いて図2を参照しながら、動的レジスタ配置及びスレッド・スケジューリングを行うアクセラレータとしてのDFP(Data Flow Processor)10を含むシステム構成例である、データ処理システム2を説明する。
 データ処理システム2は、DFP10と、イベントハンドラ20と、ホストCPU21と、ROM22と、RAM23と、外部インターフェイス24と、システムバス25と、を備えている。ホストCPU21は、データ処理を主として行う演算装置である。ホストCPU21は、OSをサポートしている。イベントハンドラ20は、割り込み処理を生成する部分である。
 ROM22は、読込専用のメモリである。RAM23は、読み書き用のメモリである。外部インターフェイス24は、データ処理システム2外と情報授受を行うためのインターフェイスである。システムバス25は、DFP10と、ホストCPU21と、ROM22と、RAM23と、外部インターフェイス24との間で情報の送受信を行うためのものである。
 DFP10は、ホストCPU21の重い演算負荷に対処するために設けられている個別のマスタとして位置づけられている。DFP10は、イベントハンドラ20が生成した割り込みをサポートするように構成されている。
 続いて図3を参照しながら、DFP10について説明する。図3に示されるように、DFP10は、コマンドユニット12と、スレッドスケジューラ14と、実行コア16と、メモリサブシステム18と、を備えている。
 コマンドユニット12は、コンフィグ・インターフェイスとの間で情報通信可能なように構成されている。コマンドユニット12は、コマンドバッファとしても機能している。
 スレッドスケジューラ14は、図1(B)に例示されるような多量のスレッドの処理をスケジューリングする部分である。スレッドスケジューラ14は、スレッドを跨いだスケジューリングを行うことが可能である。
 実行コア16は、4つのプロセッシングエレメントである、PE#0と、PE#1と、PE#2と、PE#3と、を有している。実行コア16は、独立してスケジューリング可能な多数のパイプラインを有している。
 メモリサブシステム18は、アービタ181と、L1キャッシュ18aと、L2キャッシュ18bと、を有している。メモリサブシステム18は、システム・バス・インターフェイス及びROMインターフェイスとの間で情報通信可能なように構成されている。
 続いて、図4を参照しながら、コンパイラ50について説明する。コンパイラ50は、機能的な構成要素として、ループ構造解析部501と、平均命令消費量算出部502と、を備える。
 ループ構造解析部501は、図1に示されるようなグラフ構造のプログラムコードを解析して複数のスレッドを特定する部分である。
 平均命令消費量算出部502は、ループ構造解析部501が特定した複数のスレッドそれぞれに対して平均命令消費量を算出する部分である。図5に示される例では、スレッド1の平均命令消費量が1500、スレッド2の平均命令消費量が2000、スレッド3の平均命令消費量が1000、スレッド4の平均命令消費量が5000となっている。平均命令消費量算出部502は、算出した平均命令消費量をDFP10に通知する。
 続いて、図6を参照しながら、DFP10に設けられるプリフェッチコントローラ60について説明する。プリフェッチコントローラ60は、機能的な構成要素として、プリフェッチ量比較部601と、優先順位変更部602と、を備える。
 プリフェッチ量比較部601は、平均命令消費量算出部502から通知された平均命令消費量と、現時点でのプリフェッチ量とを比較する部分である。
 優先順位変更部602は、プリフェッチ量比較部601の比較結果に基づいて、プリフェッチ量が相対的に不足しているスレッドのプリフェッチ優先順位を上昇させる部分である。優先順位変更部602は、この比較結果にスレッドの実行優先度を加味して優先順位を決定することができる。
 図7に示される例では、スレッド1の平均命令消費量が1500に対してプリフェッチ量が600、スレッド2の平均命令消費量が2000に対してプリフェッチ量が1700、スレッド3の平均命令消費量が1000に対してプリフェッチ量が1000、スレッド4の平均命令消費量が5000に対してプリフェッチ量が100となっている。
 図7に示される例の場合、スレッド1及びスレッド4の相対的なプリフェッチ量が相対的に不足しているのでプリフェッチ優先順位を上げ、スレッド2及びスレッド3のプリフェッチ優先順位を下げる。
 上記説明したように、本実施形態は、プロセッサであるDFP10に設けられるプリフェッチコントローラ60であって、複数のスレッド毎に予め設定されている平均命令消費量と、現時点でのプリフェッチ量とを比較するプリフェッチ量比較部601と、プリフェッチ量比較部の比較結果に基づいて、プリフェッチ量が相対的に不足しているスレッドのプリフェッチ優先順位を上昇させる優先順位変更部602と、を備える。
 本実施形態によれば、実際のプリフェッチ量の変動に応じてプリフェッチ優先順位を変更できるので、複数のスレッドを並列処理する際に、命令フェッチの競合や帯域不足を緩和することができる。
 以上、具体例を参照しつつ本実施形態について説明した。しかし、本開示はこれらの具体例に限定されるものではない。これら具体例に、当業者が適宜設計変更を加えたものも、本開示の特徴を備えている限り、本開示の範囲に包含される。前述した各具体例が備える各要素およびその配置、条件、形状などは、例示したものに限定されるわけではなく適宜変更することができる。前述した各具体例が備える各要素は、技術的な矛盾が生じない限り、適宜組み合わせを変えることができる。

Claims (1)

  1.  プロセッサに設けられるプリフェッチコントローラであって、
     複数のスレッド毎に予め設定されている平均命令消費量と、現時点でのプリフェッチ量とを比較するプリフェッチ量比較部(601)と、
     前記プリフェッチ量比較部の比較結果に基づいて、プリフェッチ量が相対的に不足しているスレッドのプリフェッチ優先順位を上昇させる優先順位変更部(602)と、を備えるプリフェッチコントローラ。
PCT/JP2019/009634 2018-03-30 2019-03-11 プリフェッチコントローラ WO2019188182A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018068436A JP7157542B2 (ja) 2018-03-30 2018-03-30 プリフェッチコントローラ
JP2018-068436 2018-03-30

Publications (1)

Publication Number Publication Date
WO2019188182A1 true WO2019188182A1 (ja) 2019-10-03

Family

ID=68061548

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/009634 WO2019188182A1 (ja) 2018-03-30 2019-03-11 プリフェッチコントローラ

Country Status (2)

Country Link
JP (1) JP7157542B2 (ja)
WO (1) WO2019188182A1 (ja)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001350638A (ja) * 2000-04-04 2001-12-21 Internatl Business Mach Corp <Ibm> 多重スレッド使用方法、多重スレッド処理システム、スレッド実行コントローラおよびバッファ使用方法
JP2006343872A (ja) * 2005-06-07 2006-12-21 Keio Gijuku マルチスレッド中央演算装置および同時マルチスレッディング制御方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6965982B2 (en) 2001-06-29 2005-11-15 International Business Machines Corporation Multithreaded processor efficiency by pre-fetching instructions for a scheduled thread
US9921839B1 (en) 2016-09-23 2018-03-20 Intel Corporation Coordinated thread criticality-aware memory scheduling

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001350638A (ja) * 2000-04-04 2001-12-21 Internatl Business Mach Corp <Ibm> 多重スレッド使用方法、多重スレッド処理システム、スレッド実行コントローラおよびバッファ使用方法
JP2006343872A (ja) * 2005-06-07 2006-12-21 Keio Gijuku マルチスレッド中央演算装置および同時マルチスレッディング制御方法

Also Published As

Publication number Publication date
JP2019179419A (ja) 2019-10-17
JP7157542B2 (ja) 2022-10-20

Similar Documents

Publication Publication Date Title
US9858115B2 (en) Task scheduling method for dispatching tasks based on computing power of different processor cores in heterogeneous multi-core processor system and related non-transitory computer readable medium
KR101834195B1 (ko) 다중코어 시스템 및 로드 밸런싱 방법
US9772879B2 (en) System and method for isolating I/O execution via compiler and OS support
KR101885211B1 (ko) Gpu의 자원 할당을 위한 방법 및 장치
US20150121387A1 (en) Task scheduling method for dispatching tasks based on computing power of different processor cores in heterogeneous multi-core system and related non-transitory computer readable medium
US9424105B2 (en) Preempting tasks at a preemption point of a kernel service routine based on current execution mode
CN104094235A (zh) 多线程计算
JP4381459B1 (ja) 情報処理装置、粒度調整方法およびプログラム
WO2020121840A1 (ja) 演算制御装置
US9417924B2 (en) Scheduling in job execution
CN111045800A (zh) 一种基于短作业优先的优化gpu性能的方法及***
JP4908363B2 (ja) 情報処理装置、並列処理最適化方法およびプログラム
US20130117757A1 (en) Method and apparatus for scheduling application programs
WO2019188182A1 (ja) プリフェッチコントローラ
US20160267621A1 (en) Graphic processing system and method thereof
WO2019188175A1 (ja) デッドロック回避方法、デッドロック回避装置
WO2019188177A1 (ja) 情報処理装置
JP2007122337A (ja) 演算装置
WO2019188181A1 (ja) スケジューリング方法、スケジューリング装置
WO2019188180A1 (ja) スケジューリング方法、スケジューリング装置
WO2019188171A1 (ja) コード生成方法、コード生成装置
JP7039365B2 (ja) デッドロック回避方法、デッドロック回避装置
CN117130787A (zh) 资源调度方法、装置、电子设备及存储介质
JP5146272B2 (ja) 情報処理装置

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

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19776989

Country of ref document: EP

Kind code of ref document: A1