the cnc programming model
play

the CnC Programming Model Nick Vrvilo, Two Sigma Investments - PowerPoint PPT Presentation

A Hands-on Introduction to the CnC Programming Model Nick Vrvilo, Two Sigma Investments nick.vrvilo@twosigma.com 9 th Annual Concurrent Collections Workshop Texas A&M University College Station, TX October 13, 2017 The CnC programming


  1. A Hands-on Introduction to the CnC Programming Model Nick Vrvilo, Two Sigma Investments nick.vrvilo@twosigma.com 9 th Annual Concurrent Collections Workshop Texas A&M University – College Station, TX October 13, 2017

  2. The CnC programming model • Programming model (not a language) • Graph coordination – Declare data items and computation steps – Similar computation/data instances grouped into collections • Data items use single assignment – A given item’s value cannot be updated • Step functions written in host language 2

  3. Simple CnC graph sketch “GET” Data A “PRESCRIBE” initializer Step X Step Y “PUT” Data B finalizer 3

  4. CnC input/output relations (“tag functions”) Data A ⟨ x-1 ⟩ Step Y Step X ⟨ x*2 ⟩ ⟨ x ⟩ Data B ⟨ x, 1..10 ⟩ 4

  5. Benefits of the CnC model • Collection relationships are declarative • Exposes implicit parallelism • Program structure follows naturally from the “whiteboard” design process 5

  6. Thanks to Kath Knobe for this LULESH sketch 6

  7. Thanks to Ellen Porter for this LULESH graph 7

  8. CnC-OCR workflow 1. Specify CnC graph • Currently in text form • Ideally provide a graphical tool 2. Run graph translator tool • Parses the textual graph specification • Provides step function skeleton (suggested code) • Generates makefile, scaffolding code 3. Implement step function bodies 4. Compile and run the application 8

  9. Hands-on example 3-point 1D stencil 9

  10. Stencil description • 3-point stencil over a vector of size N • a i,t  vector element at index i on timestep t 10

  11. Vector at t =0 1 0 0 0 0 0 0 0 0 0 1 11

  12. Tiling the vector 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 12

  13. Calculating values for t =1 t = 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 ¼ 1 ¼ 0 0 t = 1 13

  14. Time to code! 1. Install Intel CnC: https://icnc.github.io/ 2. Install the Habanero CnC Framework: https://github.com/habanero-rice/cnc-framework 3. Get CnC Framework dependencies ( just run the translator tool: ucnc_t ) 14

  15. t = 0 1 0 0 0 0 0 0 0 0 0 1 1 1 ¼ 0 0 0 0 0 0 0 ¼ t = 1 15

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend