Compilers and VMs for Programming Environments Used by - - PowerPoint PPT Presentation

compilers and vms for programming environments used by
SMART_READER_LITE
LIVE PREVIEW

Compilers and VMs for Programming Environments Used by - - PowerPoint PPT Presentation

Compilers and VMs for Programming Environments Used by Scien;sts Jos Nelson Amaral Univ. of Alberta (with input from Laurie Hendren and Rahul


slide-1
SLIDE 1

Compilers ¡and ¡VMs ¡for ¡Programming ¡ Environments ¡Used ¡by ¡Scien;sts ¡

José ¡Nelson ¡Amaral ¡– ¡Univ. ¡of ¡Alberta ¡ (with ¡input ¡from ¡Laurie ¡Hendren ¡and ¡ Rahul ¡Garg ¡– ¡McGill ¡Univ.) ¡

slide-2
SLIDE 2

Why ¡Python ¡in ¡Computa;onal ¡ Chemistry? ¡

  • Easy ¡integra;on ¡of ¡code ¡wriMen ¡in ¡C/C++; ¡
  • Composibility ¡(reuse) ¡

– New ¡students ¡quickly ¡get ¡results ¡ – Build ¡from ¡exis;ng ¡modules, ¡instead ¡of ¡building ¡ from ¡scratch ¡

  • Easy ¡to ¡learn ¡the ¡language ¡
  • Visualiza;on ¡(very ¡important) ¡
  • Drawbacks: ¡

– Performance ¡of ¡Python ¡modules ¡

slide-3
SLIDE 3

Comple;ng ¡the ¡Bridge ¡

Python/NumPy ¡ + ¡ ¡Annota;ons ¡ UnPython ¡ Compiler ¡ Restricted ¡ C++ ¡ ¡Syntax ¡ OpenMP ¡ CPU ¡ ¡Code ¡ OpenMP ¡ Compiler ¡ Jit4GPU ¡ Compiler ¡ AMD ¡CAL ¡ Code ¡ AMD ¡CAL ¡ Compiler ¡ Jit4OpenCL ¡ Compiler ¡ OpencL ¡ Code ¡ Nvidia ¡ OpenCL ¡ Compiler ¡ AMD ¡ OpenCL ¡ Compiler ¡

slide-4
SLIDE 4

Comple;ng ¡the ¡Bridge ¡

Python/NumPy ¡ + ¡ ¡Annota;ons ¡ UnPython ¡ Compiler ¡ Restricted ¡ C++ ¡ ¡Syntax ¡ OpenMP ¡ CPU ¡ ¡Code ¡ OpenMP ¡ Compiler ¡ Jit4GPU ¡ Compiler ¡ AMD ¡CAL ¡ Code ¡ AMD ¡CAL ¡ Compiler ¡ Jit4OpenCL ¡ Compiler ¡ OpencL ¡ Code ¡ Nvidia ¡ OpenCL ¡ Compiler ¡ AMD ¡ OpenCL ¡ Compiler ¡ MatLab ¡

? ¡ ? ¡

slide-5
SLIDE 5

What ¡we ¡have ¡

Python/NumPy ¡ + ¡ ¡Annota;ons ¡ MatLab ¡ UnPython ¡ Compiler ¡ Restricted ¡ C++ ¡ ¡Syntax ¡ OpenMP ¡ CPU ¡ ¡Code ¡ OpenMP ¡ Compiler ¡ Jit4GPU ¡ Compiler ¡ AMD ¡CAL ¡ Code ¡ AMD ¡CAL ¡ Compiler ¡ Jit4OpenCL ¡ Compiler ¡ OpencL ¡ Code ¡ Nvidia ¡ OpenCL ¡ Compiler ¡ AMD ¡ OpenCL ¡ Compiler ¡

? ¡ ? ¡

slide-6
SLIDE 6

What ¡we ¡want ¡

Python/NumPy ¡ + ¡ ¡Annota;ons ¡ MatLab ¡

Intermediate ¡ Represen-­‑ ¡ ta;on ¡

MatLab ¡ ¡ to ¡IR ¡ Python ¡ ¡ to ¡IR ¡ IR ¡to ¡ ¡ mul;core ¡ IR ¡to ¡ ¡ NVidia ¡ IR ¡to ¡ ¡ CELL ¡ IR ¡to ¡ ¡ AMD ¡

slide-7
SLIDE 7

Issues ¡with ¡MATLAB ¡

  • No ¡formal ¡specifica;on ¡and ¡no ¡official ¡

publicly-­‑available ¡implementa;on ¡

– McLab ¡group ¡is ¡crea;ng ¡on ¡a ¡best-­‑effort ¡ specifica;on; ¡

  • Designed ¡for ¡interpreta;on ¡not ¡for ¡efficient ¡

execu;on; ¡

  • Many ¡dynamic ¡features ¡

– But ¡many ¡of ¡those ¡are ¡not ¡needed ¡or ¡are ¡misused; ¡

slide-8
SLIDE 8

Goals ¡for ¡Hendren’s ¡group ¡

  • Create ¡a ¡modern ¡and ¡open ¡research ¡

framework ¡for ¡MATLAB: ¡

– Focus ¡on ¡dynamic ¡features ¡that ¡are ¡effec;vely ¡ used ¡ – Facilitate ¡crea;on ¡of ¡extensions ¡for ¡domain-­‑ specific ¡languages ¡ – Create ¡a ¡suitable ¡IR ¡ ¡

slide-9
SLIDE 9

Hendren’s ¡McLab ¡Vision: ¡ “start ¡with ¡the ¡languages ¡ that ¡scien;sts ¡are ¡using” ¡

slide-10
SLIDE 10

Challenges ¡

  • Type ¡inference ¡
  • Dynamic ¡features ¡
  • Loose ¡Language ¡specifica;ons ¡
  • Diverse, ¡complex, ¡and ¡evolving ¡hardware ¡

plaeorms ¡