CULZSS- -Bit: A Bit- -Vector Algorithm m for - - PowerPoint PPT Presentation

culzss bit a bit vector algorithm m for lossless
SMART_READER_LITE
LIVE PREVIEW

CULZSS- -Bit: A Bit- -Vector Algorithm m for - - PowerPoint PPT Presentation

CULZSS- -Bit: A Bit- -Vector Algorithm m for Lossless GPGPUs Data Comp mpression on Adnan Ozsoy School of Informa-cs and Compu-ng


slide-1
SLIDE 1

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡Lossless ¡ ¡ Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs ¡

Adnan ¡Ozsoy ¡ ¡ School ¡of ¡Informa-cs ¡and ¡Compu-ng ¡ Indiana ¡University, ¡Bloomington, ¡USA ¡ ¡ Hace>epe ¡University, ¡TURKEY ¡

1 ¡

slide-2
SLIDE 2

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

2 ¡

"If you were plowing a field, which would you rather use: Two strong oxen or 1024 chickens?" ¡ ¡ ¡ ¡Seymour Cray, Father of the Supercomputer

slide-3
SLIDE 3

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • Era ¡of ¡heterogeneous ¡compu-ng ¡
  • General ¡Purpose ¡Graphics ¡Processing ¡Units ¡(GPGPUs) ¡
  • CPU ¡/ ¡GPU ¡
  • World’s ¡fastest ¡supercomputers ¡
  • TITAN, ¡Tianhe-­‑1A, ¡Nebulae, ¡Tsubame ¡2.0, ¡…etc. ¡

3 ¡

slide-4
SLIDE 4

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • General ¡Purpose ¡Graphic ¡Processing ¡Units ¡in ¡HPC ¡
  • The ¡common ¡paralleliza-on ¡approach ¡applied ¡ ¡
  • Parallelize ¡the ¡best ¡known ¡sequen-al ¡algorithm ¡
  • Op-mize ¡for ¡GPUs. ¡ ¡
  • Problem: ¡ ¡
  • Solu-ons ¡only ¡limited ¡to ¡a ¡single ¡applica-on ¡
  • Directly ¡apply ¡CPU ¡solu-on ¡to ¡GPU ¡
  • Not ¡fully ¡u-lize ¡the ¡resources ¡on ¡a ¡GPU. ¡
  • GPU ¡has ¡different ¡architecture ¡than ¡CPU ¡

4 ¡

slide-5
SLIDE 5

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • Problem: ¡ ¡
  • Scaling ¡data ¡usage ¡in ¡applica-ons ¡with ¡BIG ¡data ¡
  • Reduce ¡storage ¡requirements ¡
  • Improve ¡data ¡communica-on ¡performance ¡
  • Data ¡compression ¡ ¡
  • Trade ¡off ¡in ¡increasing ¡running ¡-me ¡
  • GPGPUs ¡
  • Solu6on: ¡
  • CULZSS ¡-­‑ ¡Parallel ¡Streaming ¡Compression ¡on ¡GPGPUs ¡
  • Lempel-­‑Ziv-­‑Storer-­‑Szymanski ¡(LZSS) ¡Algorithm ¡
  • CULZSS-­‑Bit ¡– ¡Improvement ¡over ¡the ¡algorithm ¡ ¡

5 ¡

slide-6
SLIDE 6

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • Lempel-­‑Ziv-­‑Storer-­‑Szymanski ¡(LZSS) ¡Algorithm ¡
  • A ¡variant ¡of ¡LZ77 ¡ ¡ ¡
  • Dic-onary ¡encoding ¡ ¡
  • Sliding ¡history ¡buffer ¡
  • Uncoded ¡lookahead ¡buffer ¡
  • Visited ¡and ¡ ¡upcoming ¡data ¡
  • Finding ¡the ¡max ¡substring ¡match ¡

6 ¡

slide-7
SLIDE 7

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • LZSS ¡Algorithm ¡
  • 2 ¡stages ¡– ¡Matching ¡and ¡Encoding ¡
  • Example: ¡ ¡

7 ¡

slide-8
SLIDE 8

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • LZSS ¡Algorithm ¡

Finding ¡matching ¡informa-on ¡ a ¡b ¡c ¡a ¡b ¡d ¡a ¡a ¡b ¡d ¡a ¡b ¡c ¡d ¡d ¡– ¡a ¡b ¡c ¡d ¡e ¡... ¡

¡

8 ¡

slide-9
SLIDE 9

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • LZSS ¡Algorithm ¡

Finding ¡matching ¡informa-on ¡ a ¡b ¡c ¡a ¡b ¡d ¡a ¡a ¡b ¡d ¡a ¡b ¡c ¡d ¡d ¡– ¡a ¡b ¡c ¡d ¡e ¡.. ¡ 0 ¡1 ¡2 ¡3 ¡4 ¡5 ¡6 ¡7 ¡8 ¡9 ¡10 ¡… ¡ ¡ ¡ ¡ ¡ ¡4 ¡match ¡– ¡posi-on ¡10 ¡

9 ¡

slide-10
SLIDE 10

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • LZSS ¡Algorithm ¡

Encoding ¡informa-on ¡ a ¡b ¡c ¡a ¡b ¡d ¡a ¡a ¡b ¡d ¡a ¡b ¡c ¡d ¡d ¡– ¡a ¡b ¡c ¡d ¡e ¡.. ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡(4,10) ¡ ¡à ¡ ¡write ¡to ¡file ¡

b ¡d ¡a ¡a ¡b ¡d ¡a ¡b ¡c ¡d ¡d ¡a ¡b ¡c ¡d ¡– ¡e ¡.. ¡ ¡

10 ¡

slide-11
SLIDE 11

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • Observa-ons ¡on ¡Longest ¡Prefix ¡Match ¡

11 ¡

a ¡b ¡c ¡a ¡b ¡d ¡a ¡a ¡b ¡c... ¡ a ¡b ¡a ¡

Longest ¡Prefix ¡matching ¡

a ¡b ¡c ¡a ¡b ¡d ¡a ¡a ¡b ¡c... ¡

¡ ¡ a ¡ b ¡ c ¡ a ¡ b ¡ d ¡ a ¡ a ¡ b ¡ c ¡ a ¡ 1 ¡ 0 ¡ 0 ¡ 1 ¡ 0 ¡ 0 ¡ 1 ¡ 1 ¡ 0 ¡ 0 ¡ b ¡ 0 ¡ 1 ¡ 0 ¡ 0 ¡ 1 ¡ 0 ¡ 0 ¡ 0 ¡ 1 ¡ 0 ¡ a ¡ 1 ¡ 0 ¡ 0 ¡ 1 ¡ 0 ¡ 0 ¡ 1 ¡ 1 ¡ 0 ¡ 0 ¡

slide-12
SLIDE 12

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • Observa-ons ¡on ¡LPM ¡
  • Matching ¡informa-on ¡of ¡every ¡element ¡required ¡ ¡
  • Binary ¡matrix ¡

12 ¡

¡ ¡ a ¡ b ¡ c ¡ a ¡ b ¡ d ¡ a ¡ a ¡ b ¡ c ¡ a ¡ 1 ¡ 0 ¡ 0 ¡ 1 ¡ 0 ¡ 0 ¡ 1 ¡ 1 ¡ 0 ¡ 0 ¡ b ¡ 0 ¡ 1 ¡ 0 ¡ 0 ¡ 1 ¡ 0 ¡ 0 ¡ 0 ¡ 1 ¡ 0 ¡ a ¡ 1 ¡ 0 ¡ 0 ¡ 1 ¡ 0 ¡ 0 ¡ 1 ¡ 1 ¡ 0 ¡ 0 ¡

slide-13
SLIDE 13

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • Observa-ons ¡on ¡LPM ¡
  • Core ¡regular ¡problem ¡
  • Matching ¡informa-on ¡of ¡every ¡element ¡required ¡ ¡
  • Binary ¡matrix ¡
  • Bit ¡parallelism ¡
  • Bits ¡packed ¡into ¡a ¡word ¡
  • Using ¡bit ¡opera-ons ¡on ¡words ¡

¡

13 ¡

a ¡ ¡1001001.. ¡

Word ¡Size ¡

a ¡ ¡ ¡1001001.. ¡ ¡ ¡ ¡ ¡ ¡abcabda.. ¡

slide-14
SLIDE 14

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • Observa-ons ¡on ¡LPM ¡
  • Matching ¡informa-on ¡of ¡every ¡element ¡required ¡ ¡
  • Binary ¡matrix ¡
  • Bit ¡parallelism ¡
  • Pre-­‑compute ¡matching ¡data ¡for ¡given ¡query ¡string ¡
  • Alphabet-­‑strings ¡

14 ¡

¡ ¡ char ¡a ¡ char ¡b ¡ char ¡c ¡ char ¡d ¡ a ¡ 1 ¡ 0 ¡ 0 ¡ 0 ¡ b ¡ 0 ¡ 1 ¡ 0 ¡ 0 ¡ a ¡ 1 ¡ 0 ¡ 0 ¡ 0 ¡

slide-15
SLIDE 15

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • Bit ¡Vector ¡Approach ¡
  • Matching ¡informa-on ¡of ¡every ¡element ¡required ¡ ¡
  • Binary ¡matrix ¡
  • Bit ¡parallelism ¡
  • Pre-­‑compute ¡matching ¡data ¡for ¡given ¡query ¡string ¡
  • Alphabet-­‑strings ¡
  • Combining ¡all ¡of ¡these ¡à ¡Bit-­‑Vector ¡Approach ¡

15 ¡

slide-16
SLIDE 16

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • Bit ¡Vector ¡Approach ¡
  • Very ¡Suitable ¡GPGPU ¡ ¡
  • Less ¡code ¡divergence ¡
  • Reuse ¡of ¡data ¡– ¡fast ¡lookup ¡memory ¡

16 ¡

slide-17
SLIDE 17

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • Shij-­‑Or ¡Algorithm ¡(Exact ¡Matching) ¡

17 ¡

slide-18
SLIDE 18

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • Shij-­‑Or ¡

18 ¡

slide-19
SLIDE 19

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • Bit-­‑vector ¡Longest ¡Prefix ¡Match ¡

19 ¡

slide-20
SLIDE 20

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • Bit-­‑vector ¡Longest ¡Prefix ¡Match ¡

20 ¡

slide-21
SLIDE 21

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

21 ¡

Window ¡-­‑ ¡128 ¡chars ¡or ¡more ¡ 64 ¡chars ¡ 32 ¡threads ¡ Loop ¡

  • 1. Build ¡alpha ¡for ¡64 ¡chars ¡
  • 2. Limit ¡longest ¡match ¡size ¡to ¡32, ¡so ¡each ¡fit ¡into ¡one ¡alpha ¡word ¡
  • 3. Do ¡search ¡in ¡window ¡

64 ¡chars ¡ 32 ¡threads ¡ Window ¡-­‑ ¡128 ¡chars ¡or ¡more ¡

Lookahead ¡buffer ¡as ¡pa>ern ¡

slide-22
SLIDE 22

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

22 ¡

Window ¡-­‑ ¡128 ¡chars ¡or ¡more ¡ 64 ¡chars ¡ 32 ¡threads ¡ Loop ¡

  • 1. Build ¡alpha ¡for ¡64 ¡chars ¡
  • 2. Limit ¡longest ¡match ¡size ¡to ¡32, ¡so ¡each ¡fit ¡into ¡one ¡alpha ¡word ¡
  • 3. Do ¡search ¡in ¡window ¡

64 ¡chars ¡ 32 ¡threads ¡ Window ¡-­‑ ¡128 ¡chars ¡or ¡more ¡

slide-23
SLIDE 23

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • Bit-­‑vector ¡Compression ¡ ¡

23 ¡

slide-24
SLIDE 24

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

Evalua-on ¡

  • CUDA ¡capability ¡of ¡3.5 ¡
  • K20 ¡Kepler ¡architecture ¡GPUs ¡ ¡
  • 5GB ¡device ¡memory, ¡2496 ¡cores ¡
  • CULZSS ¡implementa-on ¡
  • Five ¡sets; ¡C ¡files, ¡State ¡Maps, ¡Dic-onary, ¡Tar ¡file, ¡Iperf ¡data ¡

¡

24 ¡

slide-25
SLIDE 25

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

25 ¡

25% ¡occupancy ¡ 38% ¡occupancy ¡ 56M ¡shared ¡ mem ¡conflicts ¡ 2300 ¡Mbps ¡ 0 ¡conflicts ¡ 1.3x ¡faster ¡ 2.33x ¡faster ¡ 40% ¡execu-on ¡

  • me ¡wasted ¡on ¡

divergent ¡code ¡

slide-26
SLIDE 26

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

  • Design ¡Choices ¡and ¡More ¡Experiments ¡
  • 33% ¡of ¡the ¡-me ¡goes ¡to ¡recalcula-ng ¡alphabet ¡strings ¡
  • Asynchronous ¡memory ¡copies ¡& ¡Concurrent ¡kernel ¡
  • Decompression ¡& ¡Compression ¡Ra-o ¡
  • Same ¡as ¡CULZSS ¡since ¡we ¡keep ¡the ¡same ¡buffer ¡sizes ¡

26 ¡

slide-27
SLIDE 27

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

Our ¡Approach: ¡ ¡

  • Iden-fy ¡the ¡rela-vely ¡regular ¡data ¡parallel ¡execu-ons ¡ ¡
  • Iden-fy ¡algorithms ¡that ¡lead ¡to ¡regular ¡execu-ons ¡
  • CPU-­‑GPU ¡heterogeneous ¡model ¡
  • Consider ¡both ¡CPU ¡and ¡GPU ¡capabili-es ¡
  • Re-­‑design ¡algorithms ¡
  • First ¡bit-­‑parallel ¡solu-on ¡for ¡lossless ¡data ¡compression ¡ ¡
  • Improved ¡performance ¡using ¡bit-­‑vector ¡approach ¡

27 ¡

slide-28
SLIDE 28

CULZSS-­‑

  • ­‑Bit: ¡

¡A ¡ ¡Bit-­‑

  • ­‑Vector ¡

¡Algorithm ¡ m ¡for ¡ ¡ ¡ ¡ Lossless ¡ ¡Data ¡ ¡Comp mpression ¡ ¡on ¡ ¡GPGPUs

28 ¡

Q ¡& ¡A ¡ ¡

¡ ¡ Thanks ¡to ¡

NVIDIA ¡Hardware ¡ ¡ Request ¡Program ¡ INDIANA ¡ UNIVERSITY ¡