SlideShare uma empresa Scribd logo
1 de 29
Baixar para ler offline
Pythran: Static Compilation of
Parallel Scientific Kernels
a.k.a. Python/Numpy compiler for the
mass
Proudly made in Namek by &serge-sans-paille pbrunet
/us
Serge « sans paille » Guelton
$ w h o a m i
s g u e l t o n
R&D engineer at on compilation for security
Associate researcher at Télécom Bretagne
QuarksLab
Pierrick Brunet
$ w h o a m i
p b r u n e t
R&D engineer at on parallelismINRIAlpes/MOAIS
Pythran in a snake shell
A Numpy-centric Python-to-C++ translator
A Python code optimizer
A Pythonic C++ library
Core concepts
Focus on high-level constructs
Generate clean high level code
Optimize Python code before generated code
Vectorization and Paralllelism
Test, test, test
Bench, bench, bench
Ask StackOverflow
when you're looking for test cases
http://stackoverflow.com/[...]numba-or-cython-acceleration-in-
reaction-diffusion-algorithm
i m p o r t n u m p y a s n p
d e f G r a y S c o t t ( c o u n t s , D u , D v , F , k ) :
n = 3 0 0
U = n p . z e r o s ( ( n + 2 , n + 2 ) , d t y p e = n p . f l o a t 3 2 )
V = n p . z e r o s ( ( n + 2 , n + 2 ) , d t y p e = n p . f l o a t 3 2 )
u , v = U [ 1 : - 1 , 1 : - 1 ] , V [ 1 : - 1 , 1 : - 1 ]
r = 2 0
u [ : ] = 1 . 0
U [ n / 2 - r : n / 2 + r , n / 2 - r : n / 2 + r ] = 0 . 5 0
V [ n / 2 - r : n / 2 + r , n / 2 - r : n / 2 + r ] = 0 . 2 5
u + = 0 . 1 5 * n p . r a n d o m . r a n d o m ( ( n , n ) )
v + = 0 . 1 5 * n p . r a n d o m . r a n d o m ( ( n , n ) )
f o r i i n r a n g e ( c o u n t s ) :
L u = ( U [ 0 : - 2 , 1 : - 1 ] +
U [ 1 : - 1 , 0 : - 2 ] - 4 * U [ 1 : - 1 , 1 : - 1 ] + U [ 1 : - 1 , 2 : ] +
U [ 2 : , 1 : - 1 ] )
L v = ( V [ 0 : - 2 , 1 : - 1 ] +
Thread Summary
OP
My code is slow with Cython and Numba
Best Answer
You need to make all loops explicit
Cython Version
c i m p o r t c y t h o n
i m p o r t n u m p y a s n p
c i m p o r t n u m p y a s n p
c p d e f c y t h o n G r a y S c o t t ( i n t c o u n t s , d o u b l e D u , d o u b l e D v , d o u b l e F , d o u b l e k ) :
c d e f i n t n = 3 0 0
c d e f n p . n d a r r a y U = n p . z e r o s ( ( n + 2 , n + 2 ) , d t y p e = n p . f l o a t _ )
c d e f n p . n d a r r a y V = n p . z e r o s ( ( n + 2 , n + 2 ) , d t y p e = n p . f l o a t _ )
c d e f n p . n d a r r a y u = U [ 1 : - 1 , 1 : - 1 ]
c d e f n p . n d a r r a y v = V [ 1 : - 1 , 1 : - 1 ]
c d e f i n t r = 2 0
u [ : ] = 1 . 0
U [ n / 2 - r : n / 2 + r , n / 2 - r : n / 2 + r ] = 0 . 5 0
V [ n / 2 - r : n / 2 + r , n / 2 - r : n / 2 + r ] = 0 . 2 5
u + = 0 . 1 5 * n p . r a n d o m . r a n d o m ( ( n , n ) )
v + = 0 . 1 5 * n p . r a n d o m . r a n d o m ( ( n , n ) )
c d e f n p . n d a r r a y L u = n p . z e r o s _ l i k e ( u )
c d e f n p . n d a r r a y L v = n p . z e r o s _ l i k e ( v )
c d e f i n t i , c , r 1 , c 1 , r 2 , c 2
c d e f d o u b l e u v v
Pythran version
Add this line to the original kernel:
# p y t h r a n e x p o r t G r a y S c o t t ( i n t , f l o a t , f l o a t , f l o a t , f l o a t )
Timings
$ p y t h o n - m t i m e i t - s ' f r o m g r a y s c o t t i m p o r t G r a y S c o t t ' ' G r a y S c o t t ( 4 0 , 0 . 1 6 , 0 . 0
1 0 l o o p s , b e s t o f 3 : 5 2 . 9 m s e c p e r l o o p
$ c y t h o n g r a y s c o t t . p y x
$ g c c g r a y s c o t t . c ` ` - s h a r e d - f P I C - o g r a y s c o t t . s o
$ p y t h o n - m t i m e i t - s ' f r o m g r a y s c o t t i m p o r t G r a y S c o t t ' ' G r a y S c o t t ( 4 0 , 0 . 1 6 , 0 . 0
1 0 l o o p s , b e s t o f 3 : 3 6 . 4 m s e c p e r l o o p
$ p y t h r a n g r a y s c o t t . p y - O 3 - m a r c h = n a t i v e
$ p y t h o n - m t i m e i t - s ' f r o m g r a y s c o t t i m p o r t G r a y S c o t t ' ' G r a y S c o t t ( 4 0 , 0 . 1 6 , 0 . 0
1 0 l o o p s , b e s t o f 3 : 2 0 . 3 m s e c p e r l o o p
p y t h o n - c o n f i g - - c f l a g s - - l i b s
Lessons learnt
Explicit is not always better than implicit
Many ``optimization hints'' can be deduced by the compiler
High level constructs carry valuable informations
I am not saying Cython is bad. Cython does a great job. It is just
pragmatic where Pythran is idealist
Compilation Challenges
u = U [ 1 : - 1 , 1 : - 1 ]
U [ n / 2 - r : n / 2 + r , n / 2 - r : n / 2 + r ] = 0 . 5 0
u + = 0 . 1 5 * n p . r a n d o m . r a n d o m ( ( n , n ) )
Array views
Value broadcasting
Temporary arrays creation
Extended slices composition
Numpy API calls
Optimization Opportunities
L u = ( U [ 0 : - 2 , 1 : - 1 ] + U [ 1 : - 1 , 0 : - 2 ]
- 4 * U [ 1 : - 1 , 1 : - 1 ] + U [ 1 : - 1 , 2 : ] + U [ 2 : , 1 : - 1 ] )
Many useless temporaries
Lucould be forward-substituted
SIMD instruction generation opportunities
Parallel loop opportunities
Pythran Usage
$ p y t h r a n - - h e l p
u s a g e : p y t h r a n [ - h ] [ - o O U T P U T _ F I L E ] [ - E ] [ - e ] [ - f f l a g ] [ - v ] [ - p p a s s ]
[ - m m a c h i n e ] [ - I i n c l u d e _ d i r ] [ - L l d f l a g s ]
[ - D m a c r o _ d e f i n i t i o n ] [ - O l e v e l ] [ - g ]
i n p u t _ f i l e
p y t h r a n : a p y t h o n t o C + + c o m p i l e r
p o s i t i o n a l a r g u m e n t s :
i n p u t _ f i l e t h e p y t h r a n m o d u l e t o c o m p i l e , e i t h e r a . p y o r a . c p p
f i l e
o p t i o n a l a r g u m e n t s :
- h , - - h e l p s h o w t h i s h e l p m e s s a g e a n d e x i t
- o O U T P U T _ F I L E p a t h t o g e n e r a t e d f i l e
- E o n l y r u n t h e t r a n s l a t o r , d o n o t c o m p i l e
- e s i m i l a r t o - E , b u t d o e s n o t g e n e r a t e p y t h o n g l u e
- f f l a g a n y c o m p i l e r s w i t c h r e l e v a n t t o t h e u n d e r l y i n g C + +
c o m p i l e r
- v b e v e r b o s e
- p p a s s a n y p y t h r a n o p t i m i z a t i o n t o a p p l y b e f o r e c o d e
g e n e r a t i o n
- m m a c h i n e a n y m a c h i n e f l a g r e l e v a n t t o t h e u n d e r l y i n g C + +
Sample Usage
$ p y t h r a n i n p u t . p y # g e n e r a t e s i n p u t . s o
$ p y t h r a n i n p u t . p y - E # g e n e r a t e s i n p u t . c p p
$ p y t h r a n i n p u t . p y - O 3 - f o p e n m p # p a r a l l e l !
$ p y t h r a n i n p u t . p y - m a r c h = n a t i v e - O f a s t # E s o d M u m i x a m !
Type Annotations
Only for exported functions
# p y t h r a n e x p o r t f o o 0 ( )
# p y t h r a n e x p o r t f o o 1 ( i n t )
# p y t h r a n e x p o r t f o o 2 ( f l o a t 3 2 [ ] [ ] )
# p y t h r a n e x p o r t f o o 2 ( f l o a t 6 4 [ ] [ ] )
# p y t h r a n e x p o r t f o o 2 ( i n t 8 [ ] [ ] [ ] )
# p y t h r a n e x p o r t f o o 3 ( ( i n t , f l o a t ) , i n t l i s t , s t r : s t r d i c t )
Pythran Compilation Flow
input.py
AST
IR
outout.py input.cpp
input.so
Optimization loop
import ast
gcc [...]
Front End
100% based on the astmodule
Supports
Several standard module (incl. partial Numpy)
Polymorphic functions
ndarray, list, tuple, dict, str, int, long, float
Named parameters, default arguments
Generators…
Does not Support
Non-implicitely typed code
Global variable
Most Python modules (no CPython mode!)
User-defined classes…
Middle End
Iteratively applies high level, Python-aware optimizations:
Interprocedural Constant Folding
For-Based-Loop Unrolling
Forward Substitution
Instruction Selection
Deforestation
Scalar Renaming
dead Code Elimination
Fun Facts: can evaluate pure functions at compile time ☺
Back Ends
Python Back End
Useful for debugging!
C++11 Back End
C++11 implementation of __builtin__ numpy
itertools…
Lazy evaluation through Expression Templates
Relies on OpenMP, nt2and boost::simdfor the
parallelization / vectorization
C++11: Typing
the W.T.F. slide
Pythran translates Python implicitly statically typed polymorphic
code into C++ meta-programs that are instanciated for the user-
given types, and specialize them for the target architecture
C++11: Parallelism
Implicit
Array operations and several numpy functions are written using
OpenMP and Boost.simd
Explicit
OpenMP 3 support, ported to Python
# o m p p a r a l l e l f o r r e d u c t i o n ( + : r )
f o r i , v i n e n u m e r a t e ( l ) :
r + = i * v
Benchmarks
A collection of high-level benchmarks
https://github.com/serge-sans-paille/numpy-benchmarks
Code gathered from StackOverflow + other compiler code base
Mostly high-level code
Generate results for CPython, PyPy, Numba, Parakeet, Hope
and Pythran
Most kernels are too high level for Numba and Hope…
Benchmarks
no parallelism, no vectorisation (, no fat)
(Num)Focus: growcut
From the Numba codebase!
# p y t h r a n e x p o r t g r o w c u t ( f l o a t [ ] [ ] [ ] , f l o a t [ ] [ ] [ ] , f l o a t [ ] [ ] [ ] , i n t )
i m p o r t m a t h
i m p o r t n u m p y a s n p
d e f w i n d o w _ f l o o r ( i d x , r a d i u s ) :
i f r a d i u s > i d x :
r e t u r n 0
e l s e :
r e t u r n i d x - r a d i u s
d e f w i n d o w _ c e i l ( i d x , c e i l , r a d i u s ) :
i f i d x + r a d i u s > c e i l :
r e t u r n c e i l
e l s e :
r e t u r n i d x + r a d i u s
d e f g r o w c u t ( i m a g e , s t a t e , s t a t e _ n e x t , w i n d o w _ r a d i u s ) :
c h a n g e s = 0
s q r t _ 3 = m a t h . s q r t ( 3 . 0 )
h e i g h t = i m a g e . s h a p e [ 0 ]
(Num)Focus: growcut
Academic Results
Pythran: Enabling Static Optimization of Scientific Python
Programs, S. Guelton, P. Brunet et al. in CSD, 2015
Exploring the Vectorization of Python Constructs Using
Pythran and Boost SIMD, S. Guelton, J. Falcou and P. Brunet,
in WPMVP, 2014
Compiling Python modules to native parallel modules using
Pythran and OpenMP Annotations, S. Guelton, P. Brunet
and M. Amini, in PyHPC, 2013
Pythran: Enabling Static Optimization of Scientific Python
Programs, S. Guelton, P. Brunet et al. in SciPy, 2013
Powered by Strong Engineering
Preprequisite for reproductible science
2773 test cases, incl. unit testing, doctest, Continuous
integration (thx !)
Peer-reviewed code
Python2.7 and C++11
Linux, OSX (almost okay), Windows (on going)
User and Developer doc:
Hosted on
Releases on PyPi: $ pip install pythran
: $ apt-get install pythran
Travis
http://pythonhosted.org/pythran/
https://github.com/serge-sans-paille/pythran
Custom Debian repo
We need more peons
Pythonic needs a serious cleanup
Typing module needs better error reporting
OSX support is partial and Windows support is on-going
numpy.randomand numpy.linalg
THE END
AUTHORS
Serge Guelton, Pierrick Brunet, Mehdi Amini, Adrien
Merlini, Alan Raynaud, Eliott Coyac…
INDUSTRIAL SUPPORT
, , →You←
CONTRIBUTE
#pythran on FreeNode, pythran@freelists.org, GitHub repo
Silkan NumScale

Mais conteúdo relacionado

Mais procurados

Ceh v8 labs module 12 hacking webservers
Ceh v8 labs module 12 hacking webserversCeh v8 labs module 12 hacking webservers
Ceh v8 labs module 12 hacking webserversMehrdad Jingoism
 
Ceh v8 labs module 18 buffer overflow
Ceh v8 labs module 18 buffer overflowCeh v8 labs module 18 buffer overflow
Ceh v8 labs module 18 buffer overflowMehrdad Jingoism
 
Testing Fuse Fabric with Pax Exam
Testing Fuse Fabric with Pax ExamTesting Fuse Fabric with Pax Exam
Testing Fuse Fabric with Pax ExamHenryk Konsek
 
Ceh v8 labs module 11 session hijacking
Ceh v8 labs module 11 session hijackingCeh v8 labs module 11 session hijacking
Ceh v8 labs module 11 session hijackingMehrdad Jingoism
 
Hoja de vida jogc
Hoja de vida jogcHoja de vida jogc
Hoja de vida jogcjogc62
 
File formats for Next Generation Sequencing
File formats for Next Generation SequencingFile formats for Next Generation Sequencing
File formats for Next Generation SequencingPierre Lindenbaum
 
"Mon make à moi", (tout sauf Galaxy)
"Mon make à moi", (tout sauf Galaxy)"Mon make à moi", (tout sauf Galaxy)
"Mon make à moi", (tout sauf Galaxy)Pierre Lindenbaum
 

Mais procurados (11)

ground water contamination
ground water contaminationground water contamination
ground water contamination
 
Ceh v8 labs module 12 hacking webservers
Ceh v8 labs module 12 hacking webserversCeh v8 labs module 12 hacking webservers
Ceh v8 labs module 12 hacking webservers
 
Ceh v8 labs module 18 buffer overflow
Ceh v8 labs module 18 buffer overflowCeh v8 labs module 18 buffer overflow
Ceh v8 labs module 18 buffer overflow
 
Testing Fuse Fabric with Pax Exam
Testing Fuse Fabric with Pax ExamTesting Fuse Fabric with Pax Exam
Testing Fuse Fabric with Pax Exam
 
Introduction to Linux
Introduction to LinuxIntroduction to Linux
Introduction to Linux
 
Ceh v8 labs module 11 session hijacking
Ceh v8 labs module 11 session hijackingCeh v8 labs module 11 session hijacking
Ceh v8 labs module 11 session hijacking
 
Hoja de vida jogc
Hoja de vida jogcHoja de vida jogc
Hoja de vida jogc
 
File formats for Next Generation Sequencing
File formats for Next Generation SequencingFile formats for Next Generation Sequencing
File formats for Next Generation Sequencing
 
"Mon make à moi", (tout sauf Galaxy)
"Mon make à moi", (tout sauf Galaxy)"Mon make à moi", (tout sauf Galaxy)
"Mon make à moi", (tout sauf Galaxy)
 
1
11
1
 
Graph Algebra
Graph AlgebraGraph Algebra
Graph Algebra
 

Destaque

H2O World - Munging, modeling, and pipelines using Python - Hank Roark
H2O World - Munging, modeling, and pipelines using Python - Hank RoarkH2O World - Munging, modeling, and pipelines using Python - Hank Roark
H2O World - Munging, modeling, and pipelines using Python - Hank RoarkSri Ambati
 
Administracion del personal
Administracion del personalAdministracion del personal
Administracion del personalguest459d30
 
Coalition pour la planification financière - Une question de confiance
Coalition pour la planification financière - Une question de confianceCoalition pour la planification financière - Une question de confiance
Coalition pour la planification financière - Une question de confianceFinancial Planning Standards Council
 
Escaleraespacial1.Pps
Escaleraespacial1.PpsEscaleraespacial1.Pps
Escaleraespacial1.Ppsguest819ca1
 
JOSE MANUEL DOMINGUEZ LAGE finanzermittlungen
JOSE MANUEL DOMINGUEZ LAGE finanzermittlungenJOSE MANUEL DOMINGUEZ LAGE finanzermittlungen
JOSE MANUEL DOMINGUEZ LAGE finanzermittlungenjosemanueldominguezlage
 
Sif007 Programaanalitico1
Sif007 Programaanalitico1Sif007 Programaanalitico1
Sif007 Programaanalitico1Alan007
 
Ponencia Juan Carlos Cubeiro en III Foro SSME ( Services Science Management &...
Ponencia Juan Carlos Cubeiro en III Foro SSME ( Services Science Management &...Ponencia Juan Carlos Cubeiro en III Foro SSME ( Services Science Management &...
Ponencia Juan Carlos Cubeiro en III Foro SSME ( Services Science Management &...Universidad Internacional Menendez Pelayo
 
Reflexionflores
ReflexionfloresReflexionflores
ReflexionfloresStrujen
 
Solamente Un Picaflor
Solamente Un PicaflorSolamente Un Picaflor
Solamente Un PicaflorStrujen
 
L'amour selon un ferrailleur
L'amour selon un ferrailleurL'amour selon un ferrailleur
L'amour selon un ferrailleurjacqualbertinija
 
Lligams Afectius Alt
Lligams Afectius AltLligams Afectius Alt
Lligams Afectius Altguestc7982f
 
Segundo Informe Obras 2
Segundo Informe Obras 2Segundo Informe Obras 2
Segundo Informe Obras 2guestfcca15
 
Filosofiaoriental
FilosofiaorientalFilosofiaoriental
FilosofiaorientalStrujen
 
Catalogue desbuquois visserie boulonnerie fournisseur
Catalogue desbuquois visserie boulonnerie fournisseurCatalogue desbuquois visserie boulonnerie fournisseur
Catalogue desbuquois visserie boulonnerie fournisseurDesbuquois
 

Destaque (20)

H2O World - Munging, modeling, and pipelines using Python - Hank Roark
H2O World - Munging, modeling, and pipelines using Python - Hank RoarkH2O World - Munging, modeling, and pipelines using Python - Hank Roark
H2O World - Munging, modeling, and pipelines using Python - Hank Roark
 
Administracion del personal
Administracion del personalAdministracion del personal
Administracion del personal
 
Carta Obispos
Carta ObisposCarta Obispos
Carta Obispos
 
Arte GÓtico (3eros Medios)
Arte GÓtico (3eros Medios)Arte GÓtico (3eros Medios)
Arte GÓtico (3eros Medios)
 
Yarebenja
YarebenjaYarebenja
Yarebenja
 
Coalition pour la planification financière - Une question de confiance
Coalition pour la planification financière - Une question de confianceCoalition pour la planification financière - Une question de confiance
Coalition pour la planification financière - Une question de confiance
 
Escaleraespacial1.Pps
Escaleraespacial1.PpsEscaleraespacial1.Pps
Escaleraespacial1.Pps
 
JOSE MANUEL DOMINGUEZ LAGE finanzermittlungen
JOSE MANUEL DOMINGUEZ LAGE finanzermittlungenJOSE MANUEL DOMINGUEZ LAGE finanzermittlungen
JOSE MANUEL DOMINGUEZ LAGE finanzermittlungen
 
Sif007 Programaanalitico1
Sif007 Programaanalitico1Sif007 Programaanalitico1
Sif007 Programaanalitico1
 
Ponencia Juan Carlos Cubeiro en III Foro SSME ( Services Science Management &...
Ponencia Juan Carlos Cubeiro en III Foro SSME ( Services Science Management &...Ponencia Juan Carlos Cubeiro en III Foro SSME ( Services Science Management &...
Ponencia Juan Carlos Cubeiro en III Foro SSME ( Services Science Management &...
 
Abrazo
AbrazoAbrazo
Abrazo
 
Reflexionflores
ReflexionfloresReflexionflores
Reflexionflores
 
Acetatos Unidad I
Acetatos Unidad IAcetatos Unidad I
Acetatos Unidad I
 
Solamente Un Picaflor
Solamente Un PicaflorSolamente Un Picaflor
Solamente Un Picaflor
 
L'amour selon un ferrailleur
L'amour selon un ferrailleurL'amour selon un ferrailleur
L'amour selon un ferrailleur
 
Lligams Afectius Alt
Lligams Afectius AltLligams Afectius Alt
Lligams Afectius Alt
 
Segundo Informe Obras 2
Segundo Informe Obras 2Segundo Informe Obras 2
Segundo Informe Obras 2
 
Filosofiaoriental
FilosofiaorientalFilosofiaoriental
Filosofiaoriental
 
03 07
03 0703 07
03 07
 
Catalogue desbuquois visserie boulonnerie fournisseur
Catalogue desbuquois visserie boulonnerie fournisseurCatalogue desbuquois visserie boulonnerie fournisseur
Catalogue desbuquois visserie boulonnerie fournisseur
 

Semelhante a PyData Paris 2015 - Track 3.2 Serge Guelton et Pierrick Brunet

Hardware Description Languages .pptx
Hardware Description Languages .pptxHardware Description Languages .pptx
Hardware Description Languages .pptxwafawafa52
 
Piotr Szotkowski about "Bits of ruby"
Piotr Szotkowski about "Bits of ruby"Piotr Szotkowski about "Bits of ruby"
Piotr Szotkowski about "Bits of ruby"Pivorak MeetUp
 
PyLadies Talk: Learn to love the command line!
PyLadies Talk: Learn to love the command line!PyLadies Talk: Learn to love the command line!
PyLadies Talk: Learn to love the command line!Blanca Mancilla
 
Breathe life into your designer!
Breathe life into your designer!Breathe life into your designer!
Breathe life into your designer!Cédric Brun
 
Introduction to Compiler Development
Introduction to Compiler DevelopmentIntroduction to Compiler Development
Introduction to Compiler DevelopmentLogan Chien
 
Code GPU with CUDA - Identifying performance limiters
Code GPU with CUDA - Identifying performance limitersCode GPU with CUDA - Identifying performance limiters
Code GPU with CUDA - Identifying performance limitersMarina Kolpakova
 
Y o u r N a m e L S P 2 0 0 - 3 2 0 ( c o u r s e I .docx
Y o u r  N a m e   L S P  2 0 0 - 3 2 0  ( c o u r s e  I .docxY o u r  N a m e   L S P  2 0 0 - 3 2 0  ( c o u r s e  I .docx
Y o u r N a m e L S P 2 0 0 - 3 2 0 ( c o u r s e I .docxherminaprocter
 
Y o u r N a m e L S P 2 0 0 - 3 2 0 ( c o u r s e I .docx
Y o u r  N a m e   L S P  2 0 0 - 3 2 0  ( c o u r s e  I .docxY o u r  N a m e   L S P  2 0 0 - 3 2 0  ( c o u r s e  I .docx
Y o u r N a m e L S P 2 0 0 - 3 2 0 ( c o u r s e I .docxodiliagilby
 
Charging by friction
Charging by frictionCharging by friction
Charging by frictionAnndevi
 
Spring scala - Sneaking Scala into your corporation
Spring scala  - Sneaking Scala into your corporationSpring scala  - Sneaking Scala into your corporation
Spring scala - Sneaking Scala into your corporationHenryk Konsek
 
From simple to more advanced: Lessons learned in 13 months with Tableau
From simple to more advanced: Lessons learned in 13 months with TableauFrom simple to more advanced: Lessons learned in 13 months with Tableau
From simple to more advanced: Lessons learned in 13 months with TableauSergii Khomenko
 
Modeling avengers – open source technology mix for saving the world
Modeling avengers – open source technology mix for saving the worldModeling avengers – open source technology mix for saving the world
Modeling avengers – open source technology mix for saving the worldCédric Brun
 
Using TypeScript at Dashlane
Using TypeScript at DashlaneUsing TypeScript at Dashlane
Using TypeScript at DashlaneDashlane
 
Running Puppet In Stand Alone Mode
Running Puppet In Stand Alone ModeRunning Puppet In Stand Alone Mode
Running Puppet In Stand Alone Modesarguru90
 
What every C++ programmer should know about modern compilers (w/o comments, A...
What every C++ programmer should know about modern compilers (w/o comments, A...What every C++ programmer should know about modern compilers (w/o comments, A...
What every C++ programmer should know about modern compilers (w/o comments, A...Sławomir Zborowski
 
Simple APIs and innovative documentation
Simple APIs and innovative documentationSimple APIs and innovative documentation
Simple APIs and innovative documentationPyDataParis
 
A CTF Hackers Toolbox
A CTF Hackers ToolboxA CTF Hackers Toolbox
A CTF Hackers ToolboxStefan
 
Writing (Meteor) Code With Style
Writing (Meteor) Code With StyleWriting (Meteor) Code With Style
Writing (Meteor) Code With StyleStephan Hochhaus
 
Customer_Testimonial_IFFCO.pdf
Customer_Testimonial_IFFCO.pdfCustomer_Testimonial_IFFCO.pdf
Customer_Testimonial_IFFCO.pdfPRASHANTJUNNARKAR
 

Semelhante a PyData Paris 2015 - Track 3.2 Serge Guelton et Pierrick Brunet (20)

Hardware Description Languages .pptx
Hardware Description Languages .pptxHardware Description Languages .pptx
Hardware Description Languages .pptx
 
Piotr Szotkowski about "Bits of ruby"
Piotr Szotkowski about "Bits of ruby"Piotr Szotkowski about "Bits of ruby"
Piotr Szotkowski about "Bits of ruby"
 
PyLadies Talk: Learn to love the command line!
PyLadies Talk: Learn to love the command line!PyLadies Talk: Learn to love the command line!
PyLadies Talk: Learn to love the command line!
 
Breathe life into your designer!
Breathe life into your designer!Breathe life into your designer!
Breathe life into your designer!
 
javapravticalfile.doc
javapravticalfile.docjavapravticalfile.doc
javapravticalfile.doc
 
Introduction to Compiler Development
Introduction to Compiler DevelopmentIntroduction to Compiler Development
Introduction to Compiler Development
 
Code GPU with CUDA - Identifying performance limiters
Code GPU with CUDA - Identifying performance limitersCode GPU with CUDA - Identifying performance limiters
Code GPU with CUDA - Identifying performance limiters
 
Y o u r N a m e L S P 2 0 0 - 3 2 0 ( c o u r s e I .docx
Y o u r  N a m e   L S P  2 0 0 - 3 2 0  ( c o u r s e  I .docxY o u r  N a m e   L S P  2 0 0 - 3 2 0  ( c o u r s e  I .docx
Y o u r N a m e L S P 2 0 0 - 3 2 0 ( c o u r s e I .docx
 
Y o u r N a m e L S P 2 0 0 - 3 2 0 ( c o u r s e I .docx
Y o u r  N a m e   L S P  2 0 0 - 3 2 0  ( c o u r s e  I .docxY o u r  N a m e   L S P  2 0 0 - 3 2 0  ( c o u r s e  I .docx
Y o u r N a m e L S P 2 0 0 - 3 2 0 ( c o u r s e I .docx
 
Charging by friction
Charging by frictionCharging by friction
Charging by friction
 
Spring scala - Sneaking Scala into your corporation
Spring scala  - Sneaking Scala into your corporationSpring scala  - Sneaking Scala into your corporation
Spring scala - Sneaking Scala into your corporation
 
From simple to more advanced: Lessons learned in 13 months with Tableau
From simple to more advanced: Lessons learned in 13 months with TableauFrom simple to more advanced: Lessons learned in 13 months with Tableau
From simple to more advanced: Lessons learned in 13 months with Tableau
 
Modeling avengers – open source technology mix for saving the world
Modeling avengers – open source technology mix for saving the worldModeling avengers – open source technology mix for saving the world
Modeling avengers – open source technology mix for saving the world
 
Using TypeScript at Dashlane
Using TypeScript at DashlaneUsing TypeScript at Dashlane
Using TypeScript at Dashlane
 
Running Puppet In Stand Alone Mode
Running Puppet In Stand Alone ModeRunning Puppet In Stand Alone Mode
Running Puppet In Stand Alone Mode
 
What every C++ programmer should know about modern compilers (w/o comments, A...
What every C++ programmer should know about modern compilers (w/o comments, A...What every C++ programmer should know about modern compilers (w/o comments, A...
What every C++ programmer should know about modern compilers (w/o comments, A...
 
Simple APIs and innovative documentation
Simple APIs and innovative documentationSimple APIs and innovative documentation
Simple APIs and innovative documentation
 
A CTF Hackers Toolbox
A CTF Hackers ToolboxA CTF Hackers Toolbox
A CTF Hackers Toolbox
 
Writing (Meteor) Code With Style
Writing (Meteor) Code With StyleWriting (Meteor) Code With Style
Writing (Meteor) Code With Style
 
Customer_Testimonial_IFFCO.pdf
Customer_Testimonial_IFFCO.pdfCustomer_Testimonial_IFFCO.pdf
Customer_Testimonial_IFFCO.pdf
 

Mais de Pôle Systematic Paris-Region

OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...
OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...
OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...Pôle Systematic Paris-Region
 
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...Pôle Systematic Paris-Region
 
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...Pôle Systematic Paris-Region
 
OSIS19_Cloud : Performance and power management in virtualized data centers, ...
OSIS19_Cloud : Performance and power management in virtualized data centers, ...OSIS19_Cloud : Performance and power management in virtualized data centers, ...
OSIS19_Cloud : Performance and power management in virtualized data centers, ...Pôle Systematic Paris-Region
 
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...Pôle Systematic Paris-Region
 
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...Pôle Systematic Paris-Region
 
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...Pôle Systematic Paris-Region
 
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick MoyOsis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick MoyPôle Systematic Paris-Region
 
Osis18_Cloud : Virtualisation efficace d’architectures NUMA
Osis18_Cloud : Virtualisation efficace d’architectures NUMAOsis18_Cloud : Virtualisation efficace d’architectures NUMA
Osis18_Cloud : Virtualisation efficace d’architectures NUMAPôle Systematic Paris-Region
 
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur BittorrentOsis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur BittorrentPôle Systematic Paris-Region
 
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...Pôle Systematic Paris-Region
 
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riot
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riotOSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riot
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riotPôle Systematic Paris-Region
 
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...Pôle Systematic Paris-Region
 
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...Pôle Systematic Paris-Region
 
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...Pôle Systematic Paris-Region
 
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)Pôle Systematic Paris-Region
 
PyParis 2017 / Un mooc python, by thierry parmentelat
PyParis 2017 / Un mooc python, by thierry parmentelatPyParis 2017 / Un mooc python, by thierry parmentelat
PyParis 2017 / Un mooc python, by thierry parmentelatPôle Systematic Paris-Region
 

Mais de Pôle Systematic Paris-Region (20)

OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...
OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...
OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...
 
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...
 
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
 
OSIS19_Cloud : Performance and power management in virtualized data centers, ...
OSIS19_Cloud : Performance and power management in virtualized data centers, ...OSIS19_Cloud : Performance and power management in virtualized data centers, ...
OSIS19_Cloud : Performance and power management in virtualized data centers, ...
 
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
 
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...
 
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...
 
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick MoyOsis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
 
Osis18_Cloud : Pas de commun sans communauté ?
Osis18_Cloud : Pas de commun sans communauté ?Osis18_Cloud : Pas de commun sans communauté ?
Osis18_Cloud : Pas de commun sans communauté ?
 
Osis18_Cloud : Projet Wolphin
Osis18_Cloud : Projet Wolphin Osis18_Cloud : Projet Wolphin
Osis18_Cloud : Projet Wolphin
 
Osis18_Cloud : Virtualisation efficace d’architectures NUMA
Osis18_Cloud : Virtualisation efficace d’architectures NUMAOsis18_Cloud : Virtualisation efficace d’architectures NUMA
Osis18_Cloud : Virtualisation efficace d’architectures NUMA
 
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur BittorrentOsis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
 
Osis18_Cloud : Software-heritage
Osis18_Cloud : Software-heritageOsis18_Cloud : Software-heritage
Osis18_Cloud : Software-heritage
 
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
 
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riot
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riotOSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riot
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riot
 
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...
 
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...
 
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...
 
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
 
PyParis 2017 / Un mooc python, by thierry parmentelat
PyParis 2017 / Un mooc python, by thierry parmentelatPyParis 2017 / Un mooc python, by thierry parmentelat
PyParis 2017 / Un mooc python, by thierry parmentelat
 

Último

Role of Consumer Insights in business transformation
Role of Consumer Insights in business transformationRole of Consumer Insights in business transformation
Role of Consumer Insights in business transformationAnnie Melnic
 
IBEF report on the Insurance market in India
IBEF report on the Insurance market in IndiaIBEF report on the Insurance market in India
IBEF report on the Insurance market in IndiaManalVerma4
 
DATA ANALYSIS using various data sets like shoping data set etc
DATA ANALYSIS using various data sets like shoping data set etcDATA ANALYSIS using various data sets like shoping data set etc
DATA ANALYSIS using various data sets like shoping data set etclalithasri22
 
Decision Making Under Uncertainty - Is It Better Off Joining a Partnership or...
Decision Making Under Uncertainty - Is It Better Off Joining a Partnership or...Decision Making Under Uncertainty - Is It Better Off Joining a Partnership or...
Decision Making Under Uncertainty - Is It Better Off Joining a Partnership or...ThinkInnovation
 
Bank Loan Approval Analysis: A Comprehensive Data Analysis Project
Bank Loan Approval Analysis: A Comprehensive Data Analysis ProjectBank Loan Approval Analysis: A Comprehensive Data Analysis Project
Bank Loan Approval Analysis: A Comprehensive Data Analysis ProjectBoston Institute of Analytics
 
Statistics For Management by Richard I. Levin 8ed.pdf
Statistics For Management by Richard I. Levin 8ed.pdfStatistics For Management by Richard I. Levin 8ed.pdf
Statistics For Management by Richard I. Levin 8ed.pdfnikeshsingh56
 
Presentation of project of business person who are success
Presentation of project of business person who are successPresentation of project of business person who are success
Presentation of project of business person who are successPratikSingh115843
 
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...Boston Institute of Analytics
 
6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...
6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...
6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...Dr Arash Najmaei ( Phd., MBA, BSc)
 
Predictive Analysis - Using Insight-informed Data to Plan Inventory in Next 6...
Predictive Analysis - Using Insight-informed Data to Plan Inventory in Next 6...Predictive Analysis - Using Insight-informed Data to Plan Inventory in Next 6...
Predictive Analysis - Using Insight-informed Data to Plan Inventory in Next 6...ThinkInnovation
 
Digital Indonesia Report 2024 by We Are Social .pdf
Digital Indonesia Report 2024 by We Are Social .pdfDigital Indonesia Report 2024 by We Are Social .pdf
Digital Indonesia Report 2024 by We Are Social .pdfNicoChristianSunaryo
 
why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...
why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...
why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...Jack Cole
 
Decoding Movie Sentiments: Analyzing Reviews with Data Analysis model
Decoding Movie Sentiments: Analyzing Reviews with Data Analysis modelDecoding Movie Sentiments: Analyzing Reviews with Data Analysis model
Decoding Movie Sentiments: Analyzing Reviews with Data Analysis modelBoston Institute of Analytics
 

Último (16)

2023 Survey Shows Dip in High School E-Cigarette Use
2023 Survey Shows Dip in High School E-Cigarette Use2023 Survey Shows Dip in High School E-Cigarette Use
2023 Survey Shows Dip in High School E-Cigarette Use
 
Role of Consumer Insights in business transformation
Role of Consumer Insights in business transformationRole of Consumer Insights in business transformation
Role of Consumer Insights in business transformation
 
Insurance Churn Prediction Data Analysis Project
Insurance Churn Prediction Data Analysis ProjectInsurance Churn Prediction Data Analysis Project
Insurance Churn Prediction Data Analysis Project
 
IBEF report on the Insurance market in India
IBEF report on the Insurance market in IndiaIBEF report on the Insurance market in India
IBEF report on the Insurance market in India
 
DATA ANALYSIS using various data sets like shoping data set etc
DATA ANALYSIS using various data sets like shoping data set etcDATA ANALYSIS using various data sets like shoping data set etc
DATA ANALYSIS using various data sets like shoping data set etc
 
Decision Making Under Uncertainty - Is It Better Off Joining a Partnership or...
Decision Making Under Uncertainty - Is It Better Off Joining a Partnership or...Decision Making Under Uncertainty - Is It Better Off Joining a Partnership or...
Decision Making Under Uncertainty - Is It Better Off Joining a Partnership or...
 
Bank Loan Approval Analysis: A Comprehensive Data Analysis Project
Bank Loan Approval Analysis: A Comprehensive Data Analysis ProjectBank Loan Approval Analysis: A Comprehensive Data Analysis Project
Bank Loan Approval Analysis: A Comprehensive Data Analysis Project
 
Statistics For Management by Richard I. Levin 8ed.pdf
Statistics For Management by Richard I. Levin 8ed.pdfStatistics For Management by Richard I. Levin 8ed.pdf
Statistics For Management by Richard I. Levin 8ed.pdf
 
Presentation of project of business person who are success
Presentation of project of business person who are successPresentation of project of business person who are success
Presentation of project of business person who are success
 
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
 
6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...
6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...
6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...
 
Predictive Analysis - Using Insight-informed Data to Plan Inventory in Next 6...
Predictive Analysis - Using Insight-informed Data to Plan Inventory in Next 6...Predictive Analysis - Using Insight-informed Data to Plan Inventory in Next 6...
Predictive Analysis - Using Insight-informed Data to Plan Inventory in Next 6...
 
Digital Indonesia Report 2024 by We Are Social .pdf
Digital Indonesia Report 2024 by We Are Social .pdfDigital Indonesia Report 2024 by We Are Social .pdf
Digital Indonesia Report 2024 by We Are Social .pdf
 
why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...
why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...
why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...
 
Decoding Movie Sentiments: Analyzing Reviews with Data Analysis model
Decoding Movie Sentiments: Analyzing Reviews with Data Analysis modelDecoding Movie Sentiments: Analyzing Reviews with Data Analysis model
Decoding Movie Sentiments: Analyzing Reviews with Data Analysis model
 
Data Analysis Project: Stroke Prediction
Data Analysis Project: Stroke PredictionData Analysis Project: Stroke Prediction
Data Analysis Project: Stroke Prediction
 

PyData Paris 2015 - Track 3.2 Serge Guelton et Pierrick Brunet

  • 1. Pythran: Static Compilation of Parallel Scientific Kernels a.k.a. Python/Numpy compiler for the mass Proudly made in Namek by &serge-sans-paille pbrunet
  • 2. /us Serge « sans paille » Guelton $ w h o a m i s g u e l t o n R&D engineer at on compilation for security Associate researcher at Télécom Bretagne QuarksLab Pierrick Brunet $ w h o a m i p b r u n e t R&D engineer at on parallelismINRIAlpes/MOAIS
  • 3. Pythran in a snake shell A Numpy-centric Python-to-C++ translator A Python code optimizer A Pythonic C++ library
  • 4. Core concepts Focus on high-level constructs Generate clean high level code Optimize Python code before generated code Vectorization and Paralllelism Test, test, test Bench, bench, bench
  • 5. Ask StackOverflow when you're looking for test cases http://stackoverflow.com/[...]numba-or-cython-acceleration-in- reaction-diffusion-algorithm i m p o r t n u m p y a s n p d e f G r a y S c o t t ( c o u n t s , D u , D v , F , k ) : n = 3 0 0 U = n p . z e r o s ( ( n + 2 , n + 2 ) , d t y p e = n p . f l o a t 3 2 ) V = n p . z e r o s ( ( n + 2 , n + 2 ) , d t y p e = n p . f l o a t 3 2 ) u , v = U [ 1 : - 1 , 1 : - 1 ] , V [ 1 : - 1 , 1 : - 1 ] r = 2 0 u [ : ] = 1 . 0 U [ n / 2 - r : n / 2 + r , n / 2 - r : n / 2 + r ] = 0 . 5 0 V [ n / 2 - r : n / 2 + r , n / 2 - r : n / 2 + r ] = 0 . 2 5 u + = 0 . 1 5 * n p . r a n d o m . r a n d o m ( ( n , n ) ) v + = 0 . 1 5 * n p . r a n d o m . r a n d o m ( ( n , n ) ) f o r i i n r a n g e ( c o u n t s ) : L u = ( U [ 0 : - 2 , 1 : - 1 ] + U [ 1 : - 1 , 0 : - 2 ] - 4 * U [ 1 : - 1 , 1 : - 1 ] + U [ 1 : - 1 , 2 : ] + U [ 2 : , 1 : - 1 ] ) L v = ( V [ 0 : - 2 , 1 : - 1 ] +
  • 6. Thread Summary OP My code is slow with Cython and Numba Best Answer You need to make all loops explicit
  • 7. Cython Version c i m p o r t c y t h o n i m p o r t n u m p y a s n p c i m p o r t n u m p y a s n p c p d e f c y t h o n G r a y S c o t t ( i n t c o u n t s , d o u b l e D u , d o u b l e D v , d o u b l e F , d o u b l e k ) : c d e f i n t n = 3 0 0 c d e f n p . n d a r r a y U = n p . z e r o s ( ( n + 2 , n + 2 ) , d t y p e = n p . f l o a t _ ) c d e f n p . n d a r r a y V = n p . z e r o s ( ( n + 2 , n + 2 ) , d t y p e = n p . f l o a t _ ) c d e f n p . n d a r r a y u = U [ 1 : - 1 , 1 : - 1 ] c d e f n p . n d a r r a y v = V [ 1 : - 1 , 1 : - 1 ] c d e f i n t r = 2 0 u [ : ] = 1 . 0 U [ n / 2 - r : n / 2 + r , n / 2 - r : n / 2 + r ] = 0 . 5 0 V [ n / 2 - r : n / 2 + r , n / 2 - r : n / 2 + r ] = 0 . 2 5 u + = 0 . 1 5 * n p . r a n d o m . r a n d o m ( ( n , n ) ) v + = 0 . 1 5 * n p . r a n d o m . r a n d o m ( ( n , n ) ) c d e f n p . n d a r r a y L u = n p . z e r o s _ l i k e ( u ) c d e f n p . n d a r r a y L v = n p . z e r o s _ l i k e ( v ) c d e f i n t i , c , r 1 , c 1 , r 2 , c 2 c d e f d o u b l e u v v
  • 8. Pythran version Add this line to the original kernel: # p y t h r a n e x p o r t G r a y S c o t t ( i n t , f l o a t , f l o a t , f l o a t , f l o a t ) Timings $ p y t h o n - m t i m e i t - s ' f r o m g r a y s c o t t i m p o r t G r a y S c o t t ' ' G r a y S c o t t ( 4 0 , 0 . 1 6 , 0 . 0 1 0 l o o p s , b e s t o f 3 : 5 2 . 9 m s e c p e r l o o p $ c y t h o n g r a y s c o t t . p y x $ g c c g r a y s c o t t . c ` ` - s h a r e d - f P I C - o g r a y s c o t t . s o $ p y t h o n - m t i m e i t - s ' f r o m g r a y s c o t t i m p o r t G r a y S c o t t ' ' G r a y S c o t t ( 4 0 , 0 . 1 6 , 0 . 0 1 0 l o o p s , b e s t o f 3 : 3 6 . 4 m s e c p e r l o o p $ p y t h r a n g r a y s c o t t . p y - O 3 - m a r c h = n a t i v e $ p y t h o n - m t i m e i t - s ' f r o m g r a y s c o t t i m p o r t G r a y S c o t t ' ' G r a y S c o t t ( 4 0 , 0 . 1 6 , 0 . 0 1 0 l o o p s , b e s t o f 3 : 2 0 . 3 m s e c p e r l o o p p y t h o n - c o n f i g - - c f l a g s - - l i b s
  • 9. Lessons learnt Explicit is not always better than implicit Many ``optimization hints'' can be deduced by the compiler High level constructs carry valuable informations I am not saying Cython is bad. Cython does a great job. It is just pragmatic where Pythran is idealist
  • 10. Compilation Challenges u = U [ 1 : - 1 , 1 : - 1 ] U [ n / 2 - r : n / 2 + r , n / 2 - r : n / 2 + r ] = 0 . 5 0 u + = 0 . 1 5 * n p . r a n d o m . r a n d o m ( ( n , n ) ) Array views Value broadcasting Temporary arrays creation Extended slices composition Numpy API calls
  • 11. Optimization Opportunities L u = ( U [ 0 : - 2 , 1 : - 1 ] + U [ 1 : - 1 , 0 : - 2 ] - 4 * U [ 1 : - 1 , 1 : - 1 ] + U [ 1 : - 1 , 2 : ] + U [ 2 : , 1 : - 1 ] ) Many useless temporaries Lucould be forward-substituted SIMD instruction generation opportunities Parallel loop opportunities
  • 12. Pythran Usage $ p y t h r a n - - h e l p u s a g e : p y t h r a n [ - h ] [ - o O U T P U T _ F I L E ] [ - E ] [ - e ] [ - f f l a g ] [ - v ] [ - p p a s s ] [ - m m a c h i n e ] [ - I i n c l u d e _ d i r ] [ - L l d f l a g s ] [ - D m a c r o _ d e f i n i t i o n ] [ - O l e v e l ] [ - g ] i n p u t _ f i l e p y t h r a n : a p y t h o n t o C + + c o m p i l e r p o s i t i o n a l a r g u m e n t s : i n p u t _ f i l e t h e p y t h r a n m o d u l e t o c o m p i l e , e i t h e r a . p y o r a . c p p f i l e o p t i o n a l a r g u m e n t s : - h , - - h e l p s h o w t h i s h e l p m e s s a g e a n d e x i t - o O U T P U T _ F I L E p a t h t o g e n e r a t e d f i l e - E o n l y r u n t h e t r a n s l a t o r , d o n o t c o m p i l e - e s i m i l a r t o - E , b u t d o e s n o t g e n e r a t e p y t h o n g l u e - f f l a g a n y c o m p i l e r s w i t c h r e l e v a n t t o t h e u n d e r l y i n g C + + c o m p i l e r - v b e v e r b o s e - p p a s s a n y p y t h r a n o p t i m i z a t i o n t o a p p l y b e f o r e c o d e g e n e r a t i o n - m m a c h i n e a n y m a c h i n e f l a g r e l e v a n t t o t h e u n d e r l y i n g C + +
  • 13. Sample Usage $ p y t h r a n i n p u t . p y # g e n e r a t e s i n p u t . s o $ p y t h r a n i n p u t . p y - E # g e n e r a t e s i n p u t . c p p $ p y t h r a n i n p u t . p y - O 3 - f o p e n m p # p a r a l l e l ! $ p y t h r a n i n p u t . p y - m a r c h = n a t i v e - O f a s t # E s o d M u m i x a m !
  • 14. Type Annotations Only for exported functions # p y t h r a n e x p o r t f o o 0 ( ) # p y t h r a n e x p o r t f o o 1 ( i n t ) # p y t h r a n e x p o r t f o o 2 ( f l o a t 3 2 [ ] [ ] ) # p y t h r a n e x p o r t f o o 2 ( f l o a t 6 4 [ ] [ ] ) # p y t h r a n e x p o r t f o o 2 ( i n t 8 [ ] [ ] [ ] ) # p y t h r a n e x p o r t f o o 3 ( ( i n t , f l o a t ) , i n t l i s t , s t r : s t r d i c t )
  • 15. Pythran Compilation Flow input.py AST IR outout.py input.cpp input.so Optimization loop import ast gcc [...]
  • 16. Front End 100% based on the astmodule Supports Several standard module (incl. partial Numpy) Polymorphic functions ndarray, list, tuple, dict, str, int, long, float Named parameters, default arguments Generators… Does not Support Non-implicitely typed code Global variable Most Python modules (no CPython mode!) User-defined classes…
  • 17. Middle End Iteratively applies high level, Python-aware optimizations: Interprocedural Constant Folding For-Based-Loop Unrolling Forward Substitution Instruction Selection Deforestation Scalar Renaming dead Code Elimination Fun Facts: can evaluate pure functions at compile time ☺
  • 18. Back Ends Python Back End Useful for debugging! C++11 Back End C++11 implementation of __builtin__ numpy itertools… Lazy evaluation through Expression Templates Relies on OpenMP, nt2and boost::simdfor the parallelization / vectorization
  • 19. C++11: Typing the W.T.F. slide Pythran translates Python implicitly statically typed polymorphic code into C++ meta-programs that are instanciated for the user- given types, and specialize them for the target architecture
  • 20. C++11: Parallelism Implicit Array operations and several numpy functions are written using OpenMP and Boost.simd Explicit OpenMP 3 support, ported to Python # o m p p a r a l l e l f o r r e d u c t i o n ( + : r ) f o r i , v i n e n u m e r a t e ( l ) : r + = i * v
  • 21. Benchmarks A collection of high-level benchmarks https://github.com/serge-sans-paille/numpy-benchmarks Code gathered from StackOverflow + other compiler code base Mostly high-level code Generate results for CPython, PyPy, Numba, Parakeet, Hope and Pythran Most kernels are too high level for Numba and Hope…
  • 22. Benchmarks no parallelism, no vectorisation (, no fat)
  • 23.
  • 24. (Num)Focus: growcut From the Numba codebase! # p y t h r a n e x p o r t g r o w c u t ( f l o a t [ ] [ ] [ ] , f l o a t [ ] [ ] [ ] , f l o a t [ ] [ ] [ ] , i n t ) i m p o r t m a t h i m p o r t n u m p y a s n p d e f w i n d o w _ f l o o r ( i d x , r a d i u s ) : i f r a d i u s > i d x : r e t u r n 0 e l s e : r e t u r n i d x - r a d i u s d e f w i n d o w _ c e i l ( i d x , c e i l , r a d i u s ) : i f i d x + r a d i u s > c e i l : r e t u r n c e i l e l s e : r e t u r n i d x + r a d i u s d e f g r o w c u t ( i m a g e , s t a t e , s t a t e _ n e x t , w i n d o w _ r a d i u s ) : c h a n g e s = 0 s q r t _ 3 = m a t h . s q r t ( 3 . 0 ) h e i g h t = i m a g e . s h a p e [ 0 ]
  • 26. Academic Results Pythran: Enabling Static Optimization of Scientific Python Programs, S. Guelton, P. Brunet et al. in CSD, 2015 Exploring the Vectorization of Python Constructs Using Pythran and Boost SIMD, S. Guelton, J. Falcou and P. Brunet, in WPMVP, 2014 Compiling Python modules to native parallel modules using Pythran and OpenMP Annotations, S. Guelton, P. Brunet and M. Amini, in PyHPC, 2013 Pythran: Enabling Static Optimization of Scientific Python Programs, S. Guelton, P. Brunet et al. in SciPy, 2013
  • 27. Powered by Strong Engineering Preprequisite for reproductible science 2773 test cases, incl. unit testing, doctest, Continuous integration (thx !) Peer-reviewed code Python2.7 and C++11 Linux, OSX (almost okay), Windows (on going) User and Developer doc: Hosted on Releases on PyPi: $ pip install pythran : $ apt-get install pythran Travis http://pythonhosted.org/pythran/ https://github.com/serge-sans-paille/pythran Custom Debian repo
  • 28. We need more peons Pythonic needs a serious cleanup Typing module needs better error reporting OSX support is partial and Windows support is on-going numpy.randomand numpy.linalg
  • 29. THE END AUTHORS Serge Guelton, Pierrick Brunet, Mehdi Amini, Adrien Merlini, Alan Raynaud, Eliott Coyac… INDUSTRIAL SUPPORT , , →You← CONTRIBUTE #pythran on FreeNode, pythran@freelists.org, GitHub repo Silkan NumScale