1 of 37

SPPAM:

Signature

Pattern

Prediction and

Access-

Map Prefetcher

Maccoy Merrell, Lei Wang, Stavros Kalafatis, Paul V. Gratz

TEXAS A&M UNIVERSITY

2 of 37

Outline

  • Introduction
  • Background and Motivation

  • Design
  • Evaluation

  • Conclusion

  • AMPM
  • SPP

  • Single Core
  • Multi Core

TEXAS A&M UNIVERSITY

3 of 37

Introduction

 

[1] Lei Wang, Chia-Hang Lee, Maccoy Merrell, Gino Chacon, Daniel A. Jiménez, and Paul V. Gratz. 2025. R-Max: A Method for

Approximating the Benefit of Ideal Prefetching and Replacement Policy. IEEE Computer Architecture Letters 24, 2(2025),

293–296. doi:10.1109/LCA.2025.3611316

TEXAS A&M UNIVERSITY

4 of 37

Introduction

 

[2] Yasuo Ishii, Mary Inaba, and Kei Hiraki. 2011. Access map pattern matching for high performance data cache prefetch. Journal of Instruction-

Level Parallelism 13,2011 (2011), 1–24.

[3] Magnus Bruce. 2023. Arm Neoverse V2 platform: Leadership Performance and Power Efficiency for Next Generation Cloud Computing, ML and

HPC Workloads.IEEE.

[4] Stephan G Meier, Gerard R Williams, Hari S Kannan, and Pavlos Konas. 2015.Access map-pattern match based prefetch unit for a processor.

[5] Jinchun Kim, Seth H. Pugsley, Paul V. Gratz, A. L. Narasimha Reddy, Chris Wilk-erson, and Zeshan Chishti. 2016. Path confidence based

lookahead prefetching. InThe 49th Annual IEEE/ACM International Symposium on Microarchitecture (Taipei,Taiwan) (MICRO-49). IEEE Press,

Taipei, Taiwan, Article 60, 12 pages.

TEXAS A&M UNIVERSITY

5 of 37

Introduction

  • AMPM relies on hard-coded pattern detection which fails to adapt to complex workloads but provides consistent behavior

  • SPP/PPF is susceptible to pattern noise caused by the OoO core but can prefetch complex access patterns

  • SPPAM seeks to solve both problems,�overcoming the limitations of these previous designs

TEXAS A&M UNIVERSITY

6 of 37

Background - AMPM

  • For regions (typically pages) demand block accesses are recorded in bitmaps

  • When this access map shows a recognized pattern, prefetches are generated

  • AMPM’s strategy is self-filtering, as previously accessed demand blocks or prefetched blocks cannot be reprefetched

TEXAS A&M UNIVERSITY

7 of 37

Background - AMPM

Region 0xaa

Region

0xbb

Region

0xcc

Region: 0xaa

Offset: 0x3

Set bitmap

TEXAS A&M UNIVERSITY

8 of 37

Background - AMPM

Region 0xaa

Region

0xbb

Region

0xcc

Region: 0xbb

Offset: 0x3

Pattern match!

Prefetch 0xbb004

Set bitmap

TEXAS A&M UNIVERSITY

9 of 37

Background - SPP

  • SPP is a similar prefetcher to AMPM
    • Instead of an access map, we have a delta history (signature) for each region
    • This delta signature is a more descriptive, signed sequence of deltas

  • SPP adaptively identifies patterns, and forms an internal graph for determining prefetch paths
    • PPM / Markov chains

  • A recent-access filter functions similarly to AMPM’s prefetch map

TEXAS A&M UNIVERSITY

10 of 37

Background - SPP

Region 0xaa

Region

0xbb

Region

0xcc

Last Offset

Signature

Last Offset

Signature

Last Offset

Signature

3

2

1

1

1

1

3

-2

1

-1

-1

-1

Region: 0xbb

Offset: 0x3

3

-2

1

1

3

To Pattern Table

Signature is updated

TEXAS A&M UNIVERSITY

11 of 37

Background - SPP

Signature

[3, -2, 1]

Delta

Signature

[1, 1, 1]

Signature

[-2, 1, 1]

Conf

1

2

3

75

43

29

Delta

Conf

1

-1

2

99

7

0

Delta

Conf

1

-2

2

80

20

5

-2

1

1

3

Signature

Delta

76

Confidence is increased

TEXAS A&M UNIVERSITY

12 of 37

Background - SPP

Signature

[3, -2, 1]

Delta

Signature

[1, 1, 1]

Signature

[-2, 1, 1]

Conf

1

2

3

76

43

29

Delta

Conf

1

-1

2

99

7

0

Delta

Conf

1

-2

2

80

20

5

-2

1

1

3

Signature

Prefetch +1

The new signature is used to predict the next delta

TEXAS A&M UNIVERSITY

13 of 37

Background - SPP

Signature

[3, -2, 1]

Delta

Signature

[1, 1, 1]

Signature

[-2, 1, 1]

Conf

1

2

3

76

43

29

Delta

Conf

2

-1

2

99

7

0

Delta

Conf

1

-2

2

80

20

5

-2

1

1

3

Lookahead Signature

Prefetch +2

1

Prefetch +1

The delta of a previous prediction can be used to generate additional deltas

TEXAS A&M UNIVERSITY

14 of 37

Motivation - Weaknesses

  • AMPM cannot prefetch complex access patterns

  • SPP must learn patterns, and is sensitive to access reordering. A +1 stride may be represented as:

  • SPP has a short history and is systemically biased towards the most-common delta +1.
  • SPP’s pattern table is deceptively small

                  • SPP may be able to learn after multiple repetitions

                  • [1, 1, 1]
                  • [2, -1, 2]
                  • [1,2,-1]

                  • Each signature predicts a delta
                  • That delta is appended to the signature
                  • SPP can only link a small number of nodes within its graph

TEXAS A&M UNIVERSITY

15 of 37

Motivation - SPPAM

 

[6] S. Somogyi, T. F. Wenisch, A. Ailamaki, B. Falsafi, and A. Moshovos, ‘Spatial Memory Streaming’,

in 33rd International Symposium on Computer Architecture (ISCA’06), 2006, pp. 252–263.

TEXAS A&M UNIVERSITY

16 of 37

Design – Region Table

Region 0xaa

Region

0xbb

Region

0xcc

Region: 0xaa

Offset: 0x2

[1,0,1]

To Pattern Table

TEXAS A&M UNIVERSITY

17 of 37

Design – Pattern Table

Pattern 000

Pattern 001

[1,0,1]

Pattern …

Pattern 101

Pattern …

Prediction

Conf

000

100

010

86

43

5

Prediction

Conf

100

111

001

56

35

20

Prediction

Conf

Prediction

Conf

010

110

111

72

15

3

Prediction

Conf

Region: 0xaa

Offset: 0x2

Prefetch 0xaa at 0x4

010 can be used to perform lookahead

TEXAS A&M UNIVERSITY

18 of 37

Design - Learning

  • SPPAM can utilize the access map as it’s history, so it can wait until all references are complete until committing it to memory

  • Heuristics are used to reinforce the learning of timely information, since old regions tend to converge to all 1s

  • Time since last access
  • Accumulated access counts

TEXAS A&M UNIVERSITY

19 of 37

Design - Learning

Region 0xaa

Access Count:

Access Timer:

7

982

0

0

!

[101], [010]

[010], [101]

[101], [010]

[010], [101]

[101], [010]

[010], [101]

[101], [010]

To Pattern Table

TEXAS A&M UNIVERSITY

20 of 37

Design - Learning

Pattern 000

Pattern …

Pattern 010

Pattern …

Pattern 101

Prediction

Conf

000

100

010

86

43

5

Prediction

Conf

Prediction

Conf

101

111

100

98

50

10

Prediction

Conf

Prediction

Conf

011

000

001

49

20

5

[101], [010]

[010], [101]

[101], [010]

[010], [101]

[101], [010]

[010], [101]

[101], [010]

Prediction

Conf

011

000

010

49

20

4

010

4

TEXAS A&M UNIVERSITY

21 of 37

Design - Learning

Pattern 000

Pattern …

Pattern 010

Pattern …

Pattern 101

Prediction

Conf

000

100

010

86

43

5

Prediction

Conf

Prediction

Conf

101

111

100

98

50

10

Prediction

Conf

Prediction

Conf

011

000

010

49

20

4

[101], [010]

[010], [101]

[101], [010]

[010], [101]

[101], [010]

[010], [101]

[101], [010]

Prediction

Conf

101

111

100

51

25

5

51

25

5

TEXAS A&M UNIVERSITY

22 of 37

Design - Lookahead

  • Over time, SPPAM will compile a pattern table that encodes these patterns

  • This table is from SPEC2017’s 605.mcf workload

TEXAS A&M UNIVERSITY

23 of 37

Design - Lookahead

010011

011011

TEXAS A&M UNIVERSITY

24 of 37

Design - Lookahead

010011

011011

111101

TEXAS A&M UNIVERSITY

25 of 37

Design - Lookahead

011011

111101

101111

010011

TEXAS A&M UNIVERSITY

26 of 37

Design - Lookahead

110110

4 table references

18 prefetch targets

011011

111101

010011

101111

TEXAS A&M UNIVERSITY

27 of 37

Design - Filtering

  • SPPAM incorporates usefulness feedback by sampling usefulness for each pattern

  • Each pattern’s usefulness determines whether it will be probabilistically dropped and whether it may attempt lookahead prefetching

    • The pattern that triggered each prefetch can be inferred from the region’s access map
    • If region entries don’t last long enough, SPPAM falls back to utilizing global usefulness

TEXAS A&M UNIVERSITY

28 of 37

Design - Overview

 

  • Page associations from Berti
  • LLC occupancy from Bingo
  • Berti trains SPPAM well

[8] Mohammad Bakhshalipour, Mehran Shakerinava, Pejman Lotfi-Kamran, and Hamid Sarbazi-Azad. 2019. Bingo Spatial Data Prefetcher. In 2019

IEEE Interna-tional Symposium on High Performance Computer Architecture (HPCA). 399–411.doi:10.1109/HPCA.2019.00053

[9] Agustín Navarro-Torres, Biswabandan Panda, Jesús Alastruey-Benedé, PabloIbáñez, Víctor Viñals-Yúfera, and Alberto Ros. 2022. Berti: an

Accurate Local-Delta Data Prefetcher. In 2022 55th IEEE/ACM Int. Symp. on Microarchitecture.IEEE Press, Chicago, IL, USA, 975–991.

doi:10.1109/MICRO56248.2022.00072

TEXAS A&M UNIVERSITY

29 of 37

Evaluation – Single Core�Speedup over Berti + Pythia – Geomean: 6.2, 5.9%

TEXAS A&M UNIVERSITY

30 of 37

Evaluation – Multi CoreSpeedup over Berti + Pythia – Geomean: -2.12%

TEXAS A&M UNIVERSITY

31 of 37

Conclusion

  • SPPAM is still an unoptimized design in many ways

  • The general design trajectory of SPPAM seems to be leading somewhere interesting

 

  • AMPM, SPP, and SPPAM all have interesting parallels �with branch prediction (PPM)
  • Can we leverage what has been learned in that field for future�prefetcher designs?
  • DRAM-aware?

[10] M. Sutherland, A. Kannan, and N. Enright Jerger, ‘Not Quite My Tempo: Matching Prefetches to

Memory Access Times’, 06 2015.

TEXAS A&M UNIVERSITY

32 of 37

Q/A

TEXAS A&M UNIVERSITY

33 of 37

Background - Comparison

  • Both SPP and AMPM try to recognize history within regions

  • SPP builds its pattern table, while AMPM utilizes a pre-built catalogue

  • Each can issue multiple prefetches

                  • SPP keeps a detailed short-term history
                  • AMPM keeps a vague long-term history

                  • SPP can perform lookahead
                  • AMPM’s pattern catalogue can provide multiple targets

[2,-1,3]

1001001001

TEXAS A&M UNIVERSITY

34 of 37

Design - Filtering

 

[7] Viji Srinivasan, E.S. Davidson, and G.S. Tyson. 2004. A prefetch taxonomy. IEEETrans. Comput. 53, 2 (2004), 126–140.

doi:10.1109/TC.2004.1261824

[1] Lei Wang, Chia-Hang Lee, Maccoy Merrell, Gino Chacon, Daniel A. Jiménez, andPaul V. Gratz. 2025. R-Max: A Method for

Approximating the Benefit of Ideal Prefetching and Replacement Policy. IEEE Computer Architecture Letters 24, 2(2025),

293–296. doi:10.1109/LCA.2025.3611316

TEXAS A&M UNIVERSITY

35 of 37

Design

  • SPPAM learns the access behaviors and forms graphs to prefetch into regions
  • These are based on the encoded Markov chain

TEXAS A&M UNIVERSITY

36 of 37

Design – Learning

  • Why no offline learning?

  • A naïve approach leads�to this resulting graph

TEXAS A&M UNIVERSITY

37 of 37

Design – Learning

  • Why predict more than 1 bit?�SPP and branch prediction get by �with a single target prediction!
    • Costly to reference the table per-spatial prediction
    • A multi-bit prediction of all 0’s gives us a useful terminator symbol
    • Usefulness/Uselessness data is easier to correlate with multi-bit predictions

TEXAS A&M UNIVERSITY