Machines with Convergence Set Enumeration Youwei Zhuo , Jinglei - - PowerPoint PPT Presentation

machines with convergence
SMART_READER_LITE
LIVE PREVIEW

Machines with Convergence Set Enumeration Youwei Zhuo , Jinglei - - PowerPoint PPT Presentation

CSE: Parallel Finite State Machines with Convergence Set Enumeration Youwei Zhuo , Jinglei Cheng, Qinyi Luo, Jidong Zhai, Yanzhi Wang, Zhongzhi Luan, Xuehai Qian University of Southern California Tsinghua University Syracuse University


slide-1
SLIDE 1

CSE: Parallel Finite State Machines with Convergence Set Enumeration

Youwei Zhuo, Jinglei Cheng, Qinyi Luo, Jidong Zhai, Yanzhi Wang, Zhongzhi Luan, Xuehai Qian

University of Southern California Tsinghua University Syracuse University Beihang University

slide-2
SLIDE 2

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

2

Finite State Machine (FSM)

  • Network Intrusion Detection
  • Huffman Decoding
  • XML Parsing
slide-3
SLIDE 3

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

3

“Embarrassingly Sequential”

  • State
  • Start state
  • Accept state
  • State transition

S0 *x S1 / / x S2 /x S3 * * x * / S0 S0

slide-4
SLIDE 4

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

4

“Embarrassingly Sequential”

  • State
  • Start state
  • Accept state
  • State transition

S0 *x S1 / / x S2 /x S3 * * x * / S1 S1 / S0 S0

slide-5
SLIDE 5

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

5

“Embarrassingly Sequential”

  • State
  • Start state
  • Accept state
  • State transition

S0 *x S1 / / x S2 /x S3 * * x * / S1 S1 S2 S2 / * S0 S0

slide-6
SLIDE 6

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

6

“Embarrassingly Sequential”

  • State
  • Start state
  • Accept state
  • State transition

S0 *x S1 / / x S2 /x S3 * * x * / S1 S1 S2 S2 S2 S2 / * x S0 S0

slide-7
SLIDE 7

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

7

“Embarrassingly Sequential”

  • State
  • Start state
  • Accept state
  • State transition

S0 *x S1 / / x S2 /x S3 * * x * / S1 S1 S2 S2 S2 S2 S2 S2 S3 S3 S3 S3 S0 S0 / * x x * * / S0 S0

slide-8
SLIDE 8

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

8

Challenges of Parallel FSM

  • Divide Input into segments
  • Process segments in parallel?

/ * x x * * / S0 S0

slide-9
SLIDE 9

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

9

Challenges of Parallel FSM

  • Divide Input into segments
  • Process segments in parallel?

Same as sequential! / * x x * * / S0 S0

slide-10
SLIDE 10

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

10

Challenges of Parallel FSM

  • Divide Input into segments
  • Process segments in parallel?

Same as sequential! S1 S1 S2 S2 S2 S2 / * x x * * / S0 S0

slide-11
SLIDE 11

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

11

Challenges of Parallel FSM

  • Divide Input into segments
  • Process segments in parallel?

Same as sequential! Unknown Start State? S1 S1 S2 S2 S2 S2 / * x x * * / S0 S0 ?

slide-12
SLIDE 12

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

12

Challenges of Parallel FSM

  • Divide Input into segments
  • Process segments in parallel?

Same as sequential! Unknown Start State? S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ?

slide-13
SLIDE 13

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

13

Enumeration

  • Enumerate every state as start state

“Data-parallel finite-state machines.”, ASPLOS’14

S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ?

slide-14
SLIDE 14

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

14

Enumeration

  • Enumerate every state as start state

“Data-parallel finite-state machines.”, ASPLOS’14

S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ? S0 S0 S3 S3 S2 S2 S1 S1

slide-15
SLIDE 15

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

15

Enumeration

  • Enumerate every state as start state

“Data-parallel finite-state machines.”, ASPLOS’14

S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ? S0 S0 S0 S0 S0 S0 S1 S1 S2 S2 S3 S3 S3 S3 S0 S0 S2 S2 S3 S3 S3 S3 S0 S0 S2 S2 S3 S3 S3 S3 S0 S0 S0 S0 S3 S3 S2 S2 S1 S1

slide-16
SLIDE 16

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

16

Enumeration

  • Enumerate every state as start state

“Data-parallel finite-state machines.”, ASPLOS’14

Enumeration works! S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ? S0 S0 S0 S0 S0 S0 S1 S1 S2 S2 S3 S3 S3 S3 S0 S0 S2 S2 S3 S3 S3 S3 S0 S0 S2 S2 S3 S3 S3 S3 S0 S0 S0 S0 S3 S3 S2 S2 S1 S1

slide-17
SLIDE 17

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

17

Enumeration

  • Enumerate every state as start state

“Data-parallel finite-state machines.”, ASPLOS’14

Overhead? Enumeration works! S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ? S0 S0 S0 S0 S0 S0 S1 S1 S2 S2 S3 S3 S3 S3 S0 S0 S2 S2 S3 S3 S3 S3 S0 S0 S2 S2 S3 S3 S3 S3 S0 S0 S0 S0 S3 S3 S2 S2 S1 S1

slide-18
SLIDE 18

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

18

Enumeration

  • Enumerate every state as start state
  • Overhead=#State=4

“Data-parallel finite-state machines.”, ASPLOS’14

Overhead? Enumeration works! S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ? S0 S0 S0 S0 S0 S0 S1 S1 S2 S2 S3 S3 S3 S3 S0 S0 S2 S2 S3 S3 S3 S3 S0 S0 S2 S2 S3 S3 S3 S3 S0 S0 S0 S0 S3 S3 S2 S2 S1 S1

slide-19
SLIDE 19

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

19

Convergence

  • States transition to the same state

S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ? S0 S0 S3 S3 S2 S2 S1 S1

slide-20
SLIDE 20

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

20

Convergence

  • States transition to the same state

S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ? S0 S0 S2 S2 S2 S2 S2 S2 S0 S0 S3 S3 S2 S2 S1 S1

slide-21
SLIDE 21

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

21

Convergence

  • States transition to the same state

S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ? S0 S0 S2 S2 S2 S2 S2 S2 S0 S0 S3 S3 S2 S2 S1 S1

slide-22
SLIDE 22

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

22

Convergence

  • States transition to the same state

S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ? S0 S0 S0 S0 S0 S0 S1 S1 S2 S2 S3 S3 S3 S3 S0 S0 S2 S2 S2 S2 S0 S0 S3 S3 S2 S2 S1 S1

slide-23
SLIDE 23

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

23

Convergence

  • States transition to the same state
  • #ReachableState in the current segment

is non-increasing

S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ? S0 S0 S0 S0 S0 S0 S1 S1 S2 S2 S3 S3 S3 S3 S0 S0 S2 S2 S2 S2 S0 S0 S3 S3 S2 S2 S1 S1

slide-24
SLIDE 24

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

24

Convergence

  • States transition to the same state
  • #ReachableState in the current segment

is non-increasing

  • Overhead=#ReachableState=4→2

S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ? S0 S0 S0 S0 S0 S0 S1 S1 S2 S2 S3 S3 S3 S3 S0 S0 S2 S2 S2 S2 S0 S0 S3 S3 S2 S2 S1 S1

slide-25
SLIDE 25

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

25

Convergence

  • States transition to the same state
  • #ReachableState in the current segment

is non-increasing

  • Overhead=#ReachableState=4→2

Convergence works! S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ? S0 S0 S0 S0 S0 S0 S1 S1 S2 S2 S3 S3 S3 S3 S0 S0 S2 S2 S2 S2 S0 S0 S3 S3 S2 S2 S1 S1

slide-26
SLIDE 26

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

26

Speculation

  • Speculate one state as start state

Challenging the "embarrassingly sequential": parallelizing finite state machine- based computations through principled speculation. ASPLOS’14

S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ? S0 S0 S3 S3 S2 S2 S1 S1

slide-27
SLIDE 27

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

27

Speculation

  • Speculate one state as start state

Challenging the "embarrassingly sequential": parallelizing finite state machine- based computations through principled speculation. ASPLOS’14

S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ? S2 S2 S3 S3 S3 S3 S0 S0 S0 S0 S3 S3 S2 S2 S1 S1

slide-28
SLIDE 28

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

28

Speculation

  • Speculate one state as start state

Challenging the "embarrassingly sequential": parallelizing finite state machine- based computations through principled speculation. ASPLOS’14

S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ? S2 S2 S3 S3 S3 S3 S0 S0 S0 S0 S3 S3 S2 S2 S1 S1

slide-29
SLIDE 29

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

29

Speculation

  • Speculate one state as start state
  • Overhead=#SpeculationState=1

Challenging the "embarrassingly sequential": parallelizing finite state machine- based computations through principled speculation. ASPLOS’14

S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ? S2 S2 S3 S3 S3 S3 S0 S0 S0 S0 S3 S3 S2 S2 S1 S1

slide-30
SLIDE 30

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

30

Speculation

  • Speculate one state as start state
  • Overhead=#SpeculationState=1

Challenging the "embarrassingly sequential": parallelizing finite state machine- based computations through principled speculation. ASPLOS’14

S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ? S2 S2 S3 S3 S3 S3 S0 S0 S0 S0 S3 S3 S2 S2 S1 S1 Speculation works!

slide-31
SLIDE 31

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

31

Speculation

  • Speculate one state as start state
  • Overhead=#SpeculationState=1

Challenging the "embarrassingly sequential": parallelizing finite state machine- based computations through principled speculation. ASPLOS’14

S1 S1 S2 S2 S2 S2 ? ? ? ? / * x x * * / S0 S0 ? S2 S2 S3 S3 S3 S3 S0 S0 S0 S0 S3 S3 S2 S2 S1 S1 Re-execution! Speculation works!

slide-32
SLIDE 32

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

32

Motivation

Overhead rhead Re Re-executi ecution

  • n

Enumeration High: Gradually reduce

  • verhead from N to M

(M<<N) No Speculation Low High: speculating individual state is sensitive to input

slide-33
SLIDE 33

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

33

Motivation

Overhead rhead Re Re-executi ecution

  • n

Enumeration High: Gradually reduce

  • verhead from N to M

(M<<N) No Speculation Low High: speculating individual state is sensitive to input ? Low Low Low Low

slide-34
SLIDE 34

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

34

Outline

  • Background
  • CSE: Convergence Set Enumeration
  • Evaluation
slide-35
SLIDE 35

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

35

From State→State to Set→Set

slide-36
SLIDE 36

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

36

From State→State to Set→Set

  • One-hot encoding of State

1 S1 S1 State te

slide-37
SLIDE 37

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

37

From State→State to Set→Set

  • One-hot encoding of State

S2 S2 1 S1 S1 1 State te State te

slide-38
SLIDE 38

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

38

From State→State to Set→Set

  • One-hot encoding of State

S2 S2 1 S1 S1 1 State te State te

slide-39
SLIDE 39

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

39

From State→State to Set→Set

  • One-hot encoding of State
  • “One-hot” encoding of StateSet

S2 S2 1 S1 S1 1 S1 S1 S2 S2 S3 S3 1 1 1 State te StateSet teSet State te

slide-40
SLIDE 40

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

40

From State→State to Set→Set

  • One-hot encoding of State
  • “One-hot” encoding of StateSet

S2 S2 1 S1 S1 1 S1 S1 S2 S2 S3 S3 S1 S1 S2 S2 S3 S3 1 1 1 1 1 State te StateSet teSet StateSet teSet State te

slide-41
SLIDE 41

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

41

From State→State to Set→Set

  • One-hot encoding of State
  • “One-hot” encoding of StateSet
  • State transition ≈ StateSet transition

S2 S2 1 S1 S1 1 S1 S1 S2 S2 S3 S3 S1 S1 S2 S2 S3 S3 1 1 1 1 1 State te StateSet teSet StateSet teSet State te

slide-42
SLIDE 42

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

42

From State→State to Set→Set

  • One-hot encoding of State
  • “One-hot” encoding of StateSet
  • State transition ≈ StateSet transition
  • No track of individual state

S2 S2 1 S1 S1 1 S1 S1 S2 S2 S3 S3 S1 S1 S2 S2 S3 S3 1 1 1 1 1 State te StateSet teSet StateSet teSet State te

slide-43
SLIDE 43

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

43

From State→State to Set→Set

  • One-hot encoding of State
  • “One-hot” encoding of StateSet
  • State transition ≈ StateSet transition
  • No track of individual state

S2 S2 1 S1 S1 1 S1 S1 S2 S2 S3 S3 S1 S1 S2 S2 S3 S3 1 1 1 1 1 State te StateSet teSet StateSet teSet State te

slide-44
SLIDE 44

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

44

When is Set→Set useful?

slide-45
SLIDE 45

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

45

  • StateSet contains N State

1 (1StateSet → 1StateSet)

When is Set→Set useful?

slide-46
SLIDE 46

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

46

  • StateSet contains N State

1 (1StateSet → 1StateSet)  N (1State→1State)

When is Set→Set useful?

slide-47
SLIDE 47

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

47

  • StateSet contains N State

1 (1StateSet → 1StateSet)  1 (NState→MState) (M≤N)  N (1State→1State)

When is Set→Set useful?

slide-48
SLIDE 48

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

48

  • StateSet contains N State

1 (1StateSet → 1StateSet)  1 (NState→MState) (M≤N)  1 (NState→1State) (if M=1)  N (1State→1State)

When is Set→Set useful?

slide-49
SLIDE 49

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

49

  • StateSet contains N State
  • ConvergenceSet: StateSet that converge

to 1 State (M=1) 1 (1StateSet → 1StateSet)  1 (NState→MState) (M≤N)  1 (NState→1State) (if M=1)  N (1State→1State)

When is Set→Set useful?

slide-50
SLIDE 50

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

50

  • StateSet contains N State
  • ConvergenceSet: StateSet that converge

to 1 State (M=1)

  • State can be partitioned into disjoint

ConvergenceSets 1 (1StateSet → 1StateSet)  1 (NState→MState) (M≤N)  1 (NState→1State) (if M=1)  N (1State→1State)

When is Set→Set useful?

slide-51
SLIDE 51

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

51

How to use ConvergenceSet?

slide-52
SLIDE 52

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

52

How to use ConvergenceSet?

  • Enumeration
slide-53
SLIDE 53

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

53

How to use ConvergenceSet?

  • Enumeration

S0 S0 S3 S3 S2 S2 S1 S1

slide-54
SLIDE 54

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

54

How to use ConvergenceSet?

  • Enumeration

S0 S0 S3 S3 S2 S2 S1 S1 1 1 1 1

slide-55
SLIDE 55

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

55

How to use ConvergenceSet?

  • Enumeration

x * * / S0 S0 S3 S3 S2 S2 S1 S1 1 1 1 1 1 1 1 1

slide-56
SLIDE 56

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

56

How to use ConvergenceSet?

  • Enumeration

x * * / S0 S0 S3 S3 S2 S2 S1 S1 1 1 1 1 1 1 1 1 1 1 1 1

slide-57
SLIDE 57

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

57

How to use ConvergenceSet?

  • Enumeration

x * * / S0 S0 S3 S3 S2 S2 S1 S1 1 1 1 1 1 S1 S1 1 1 1 1 1 1 1 S0 S0

slide-58
SLIDE 58

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

58

How to use ConvergenceSet?

  • Enumeration

CSE works! x * * / S0 S0 S3 S3 S2 S2 S1 S1 1 1 1 1 1 S1 S1 1 1 1 1 1 1 1 S0 S0

slide-59
SLIDE 59

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

59

How to use ConvergenceSet?

  • Enumeration
  • Overhead=#ConvergenceSet=2

CSE works! x * * / S0 S0 S3 S3 S2 S2 S1 S1 1 1 1 1 1 S1 S1 1 1 1 1 1 1 1 S0 S0

slide-60
SLIDE 60

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

60

How to get ConvergenceSet?

slide-61
SLIDE 61

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

61

How to get ConvergenceSet?

  • Speculation
slide-62
SLIDE 62

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

62

How to get ConvergenceSet?

  • Speculation
  • Profiling
  • Emulate FSM execution with random input
  • Generate partition of disjoint StateSet

for each input

  • Choose the one with largest frequency
slide-63
SLIDE 63

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

63

How to get ConvergenceSet?

  • Speculation
  • Profiling
  • Emulate FSM execution with random input
  • Generate partition of disjoint StateSet

for each input

  • Choose the one with largest frequency

S1 S1 S2 S2 S3 S3 S0 S0 S0 S0 1 S1 S1 S3 S3 S2 S2 80% 80% 15% S0 S0 1 S1 S1 S2 S2 S3 S3 S0 S0 S1 S1 S2 S2 S3 S3 1% 1%

slide-64
SLIDE 64

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

64

Is profiling good enough?

slide-65
SLIDE 65

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

65

Is profiling good enough?

  • Largest frequency partition is only from

60% to 80%

S1 S1 S2 S2 S3 S3 S0 S0 S0 S0 1 S1 S1 S3 S3 S2 S2 80% 80% 15% S0 S0 1 S1 S1 S2 S2 S3 S3 S0 S0 S1 S1 S2 S2 S3 S3 1% 1%

slide-66
SLIDE 66

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

66

Is profiling good enough?

  • Largest frequency partition is only from

60% to 80%

  • Refinement: partition merge from largest

frequency partitions

Robert Paige and Robert Tarjan. “Three partition refinement algorithms.”,

S1 S1 S2 S2 S3 S3 S0 S0 S0 S0 1 S1 S1 S3 S3 S2 S2 80% 80% 15% S0 S0 1 S1 S1 S2 S2 S3 S3 S0 S0 S1 S1 S2 S2 S3 S3 1% 1%

slide-67
SLIDE 67

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

67

Is profiling good enough?

  • Largest frequency partition is only from

60% to 80%

  • Refinement: partition merge from largest

frequency partitions

Robert Paige and Robert Tarjan. “Three partition refinement algorithms.”,

S1 S1 S2 S2 S3 S3 S0 S0 S0 S0 1 S1 S1 S3 S3 S2 S2 80% 80% 15% S0 S0 1 S1 S1 S2 S2 S3 S3 S0 S0 S1 S1 S2 S2 S3 S3 1% 1%

S0 S0 S2 S2 S1 S1 S3 S3 95% 95%

slide-68
SLIDE 68

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

68

Re-execution

  • Needed when speculated ConvergenceSet

does not converge to 1 state

slide-69
SLIDE 69

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

69

Re-execution

  • Needed when speculated ConvergenceSet

does not converge to 1 state

S0 S0 S3 S3 S2 S2 S1 S1

slide-70
SLIDE 70

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

70

Re-execution

  • Needed when speculated ConvergenceSet

does not converge to 1 state

x * * / S0 S0 S3 S3 S2 S2 S1 S1 1 1 1 1 1 S1 S1 1 1 1 1 1 1 1 1 1 1 S0 S0 S1 S1

slide-71
SLIDE 71

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

71

Re-execution

  • Needed when speculated ConvergenceSet

does not converge to 1 state

x * * / S0 S0 S3 S3 S2 S2 S1 S1 1 1 1 1 1 S1 S1 1 1 1 1 1 1 1 1 1 1 S0 S0 S1 S1 Re-execution!

slide-72
SLIDE 72

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

72

Re-execution

  • Avoid unnecessary re-execution
  • Details in the paper
slide-73
SLIDE 73

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

73

Workflow

Speculate ConvergenceSet Profiling Refinement Enumerate ConvergenceSet Detect wrong speculations & Re-execution

slide-74
SLIDE 74

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

74

Why CSE is better?

Overhead rhead Re Re-executi ecution

  • n

Enumeration High: Gradually reduce

  • verhead from N to M

(M<<N) No Speculation Low High: speculating individual state is sensitive to input Convergence Set Enumeration Low: w: Direct ectly ly reduce uce

  • verhea

erhead d to M by specula culatio tion Low: w: specula culating ting state e set is only ly depende endent nt

  • n FSM
slide-75
SLIDE 75

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

75

Outline

  • Background
  • CSE
  • Evaluation
slide-76
SLIDE 76

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

76

Methodology

  • Simulator
  • VASim
  • Cycle-accurate
  • FSM Benchmark
  • ANMLzoo
  • Real-world input
  • Synthesized input

[VASim] "VASim: An Open Virtual Automata Simulator for Automata Processing Application and Architecture Research.“ [ANMLzoo] "ANMLzoo: a benchmark suite for exploring bottlenecks in automata processing engines and architectures.“, IISWC’16

slide-77
SLIDE 77

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

77

Methodology

  • Baseline
  • Enumeration: Parallel Automata Processor

(PAP)

  • Architecture
  • Micron Automata Processor (MicronAP)
  • 1 rank/16 half-core

[PAP] “Parallel Automata Processor.”, ISCA’17 [MicronAP] "An efficient and scalable semiconductor architecture for parallel automata processing.”, TPDS, Dec.2014

slide-78
SLIDE 78

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

78

Speedup

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

PAP CSE Sequential Ideal Parallel

  • Ideal speedup: perfect speculation of start state with no overhead
  • PAP in some benchmarks is similar sequential execution
  • CSE performs consistently better than PAP with almost ideal speedup
slide-79
SLIDE 79

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

79

Enumeration Overhead

0.1 1 10 100 1000 PAP CSE

  • CSE reduces overhead by ~10x.
slide-80
SLIDE 80

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

80

Enumeration Overhead

0.1 1 10 100 1000 PAP CSE

  • CSE reduces overhead by ~10x.
  • PAP optimization reduces enumeration overhead by dividing the

input at specific positions which will lead to unbalanced segments.

slide-81
SLIDE 81

ALCHEM

alchem.usc.edu

CSE: Parallel Finite State Machines with Convergence Set Enumeration

81

Conclusion

  • This paper proposes CSE, a novel

parallelization approach for FSM

  • CSE discovers a sweet spot in enumeration

and speculation in parallel FSM.

  • CSE achieves almost ideal speedup across

different FSM and input benchmarks.

Sequential FSM Parallel FSM Enumerate State Sp Specul ulate te & Enumer merate te Converge State Set Speculate State

slide-82
SLIDE 82

CSE: Parallel Finite State Machines with Convergence Set Enumeration

Youwei Zhuo MICRO51 Fukuoka Japan 1-A Accelerators Oct 22, 2018 The Grand Ball Room-AB