11
COLD TM : High Performance with Scilab Boosting your workflow – Boosting your Performances Béatrice Creusillet & Thomas Izard ScilabTec 2015, Paris

ScilabTEC 2015 - Silkan

Embed Size (px)

Citation preview

Page 1: ScilabTEC 2015 - Silkan

COLDTM: High Performance with Scilab Boosting your workflow – Boosting your Performances

Béatrice  Creusillet  &  Thomas  Izard  ScilabTec  2015,  Paris  

Page 2: ScilabTEC 2015 - Silkan

2 - ScilabTec 2015

Development  workflow  

Page 3: ScilabTEC 2015 - Silkan

3 - ScilabTec 2015

Development  workflow  

Page 4: ScilabTEC 2015 - Silkan

4 - ScilabTec 2015

Development  workflow  

Page 5: ScilabTEC 2015 - Silkan

5 - ScilabTec 2015

From  code  to  binaries  or  libraries  

Page 6: ScilabTEC 2015 - Silkan

6 - ScilabTec 2015

▶  CFD  applicaAon  based  on  LaDce  Boltzmann  method1  ▶  IniAalizaAon  step:  cfd_init.sce  ▶  Time  loop:  

–  computaAon  kernel:  cfd_iteraAon.sce  –  visualizaAon  –  10000  cycles            (400000  originally)  

         

1  From  wiki.palabos.org/numerics:codes  Copyright  ©  2006-­‐2008  by  Jonas  LaW  

A  prac7cal  case  

Page 7: ScilabTEC 2015 - Silkan

7 - ScilabTec 2015

Performances  

 Scilab  

Scilab  +  

COLD  (kernel)  

Scilab  +  

COLD  (main  script)  

 COLD    

(executable)  

average  kernel  duraAon  

390  ms   24  ms   12  ms   12  ms  

total  Ame  for  10000  cycles  

1  h   3  min  39  s   1  min  56  s   1  min  52  s  

speed-­‐up   x  16   x  31   x  32  

Experimental  condiAons:  •  Intel  Core  i7-­‐3770  @  3.40GHz,  16Go,  Ubuntu  14.04  •  Scilab  5.5.2,  COLD  2.1,  gcc  4.8.2  

Page 8: ScilabTEC 2015 - Silkan

8 - ScilabTec 2015

Some  more  performances…  

▶  Series  of  benchmarks  from  an  industrial  partner  (Richelieu  Project)  ▶  Raw  code,  no  calls  to  Scilab  library  funcAons  or  vector  operaAons  

Scilab  5.4.1   COLDTM  1.6.3   Speed-­‐up  

Mat_mul  (100)  Mat_vec_mul  (1000)  Mat_mul2  (100)  

2.38  s  2.13  s  2.08  s  

0.0011  s  0.0016  s  0.0016  s  

x2000  x1300  x1300  

Mymesh  Skyline  Matrice  

0.64  s  14.55  s  11.96  s  

0.0014  s  0.035  s  0.054  s  

x450  x400  x200  

Mymesh    triangular  mesh  generaAon  Skyline            morse  matrix  indexing  building  Matrice  morse  matrix  building  

Page 9: ScilabTEC 2015 - Silkan

9 - ScilabTec 2015

COLD:  a  Scilab-­‐to-­‐C++  compiler  

Inputs  ▶  Scripts  and/or  funcAons  ▶  Large  subset  of  language  basics  

–  scalar  types  (int,  real,  complex),  N-­‐D  arrays,  sparse  matrices,  structures  –  all  control  flow  structures  –  user  funcAons…  

▶  Large  subset  of  Scilab  funcAons  (>  200)    

Outputs  ▶  C++11  high-­‐performance  code  ▶  Standalone  executables  from  scripts  ▶  Scilab  libraries  ▶  Libraries  with  specific  interfaces  (for  integraAon  in  user  libraries)  ▶  Human-­‐readable  or  obfuscated  code    

Page 10: ScilabTEC 2015 - Silkan

10 - ScilabTec 2015

COLD:  specific  features  

High-­‐performance  C++  code  ▶  Strong  type  inference  mechanism:  no  dynamic  run-­‐Ame  overhead  ▶  CompilaAon  opAmizaAons  ▶  MathemaAcal  opAmizaAons  ▶  ParallelizaAon  ▶  Extends  input  data-­‐size  /  parameter  values  coverage  

User  friendliness  ▶  Windows  /  Linux  ▶  Compliance  analysis  to  detect  unsupported  features  and  opAmizaAon  

obstacles  ▶  Fast  compilaAon  (5000  lines  of  Scilab:  <  0.5s  to  generate  C++  code)  

Page 11: ScilabTEC 2015 - Silkan

11 - ScilabTec 2015

COLDTM  …  

…  generates  high-­‐performance  code  from  Scilab  codes  …  ▶  stand-­‐alone  applica7ons  ▶  op7mized  libraries,  re-­‐usable  from  Scilab  environment    

…  offers  …  ▶  reducAon  of  Ame-­‐to-­‐demo  or  Ame-­‐to-­‐product  ▶  code  obfuscaAon,  intellectual  property  protec7on  

…  evolves  con?nuously  and  benefits  from  …  ▶  industrial  partnerships  (real  use-­‐cases)  ▶  collaboraAve  research  projects  (FUI  Richelieu,  FUI  Similan,  ITEA2  Mach)    

…  is  a  scalable  product  …  ▶  on-­‐demand  customiza7on  for  specific  needs  

 

Contact  us  on  cold-­‐[email protected]