sequencel gets rid of decades of programming baggage
TRANSCRIPT
Why is SequenceL Needed?
”The way the processor industry is going is to add more and more cores, but nobody knows how to program those things. I mean, two, yeah; four, not really; eight, forget it.” – Steve Jobs
© 2016 Texas Multicore Technologies, Inc.
All Rights Reserved 1
We now have servers with 100’s of cores 1000’s cores.
Plus new types of accelerators (GPU, Phi, FPGA, etc.)
This shift affects every software company, enterprise,
and government agency that develops software
It’s Time to Change the Game (Again)
2
Wiring Machine Code Wiring
Machine Code Machine Code
Assembly Language Netlist
Netlist
1954 1957 1980
Machine Code
HLL + Compiler
(Fortran, COBOL,
PL/I, Lisp, C,…)
Machine Code
Object Oriented
(SmallTalk, C++,
Java, C#,)
1949 1949
© 2016 Texas Multicore Technologies, Inc.
All Rights Reserved
37 years?!
It’s Time to Change the Game (Again)
3
Wiring Machine Code Wiring
Machine Code Machine Code
Assembly Language Netlist
Netlist
1954 1957 1980
Machine Code
HLL + Compiler
(Fortran, COBOL,
PL/I, Lisp, C,…)
Machine Code
Object Oriented
(SmallTalk, C++,
Java, C#,)
1949 1949
2004: Multicore
© 2016 Texas Multicore Technologies, Inc.
All Rights Reserved
37 years?!
It’s Time to Change the Game (Again)
4
Wiring Machine Code Wiring
Machine Code Machine Code
Assembly Language Netlist
Netlist
1954 1957 1980
Machine Code
HLL + Compiler
(Fortran, COBOL,
PL/I, Lisp, C,…)
Machine Code
Object Oriented
(SmallTalk, C++,
Java, C#,)
1949 1949 2014
Machine Code
Object Oriented
C++
Functional,
Auto-
Parallelizing Parallel C++
Functional, Auto-
Parallelizing
2004: Multicore
© 2016 Texas Multicore Technologies, Inc.
All Rights Reserved
SequenceL Gets Rid of Decades of Programming Baggage!
With SequenceL, the programming paradigm no longer mimics old single step CPU hardware
The SequenceL compiler is free to decide which instructions can be executed in parallel without
adding unexpected race conditions
─ Compilers for most other languages are unable to do this due to the possibilities of side-effects and
reassignment of variable values
Parallel C++ output provides a clean starting point for C/C++ compilers to do more optimizations
© 2016 Texas Multicore Technologies, Inc.
All Rights Reserved 5
SequenceL Gets Rid of Decades of Programming Baggage!
With SequenceL, the programming paradigm no longer mimics old single step CPU hardware
The SequenceL compiler is free to decide which instructions can be executed in parallel without
adding unexpected race conditions
─ Compilers for most other languages are unable to do this due to the possibilities of side-effects and
reassignment of variable values
Parallel C++ output provides a clean starting point for C/C++ compilers to do more optimizations
© 2016 Texas Multicore Technologies, Inc.
All Rights Reserved 6
Application optimizations
for specific h/w platforms • Caching tricks
• Different SIMD widths
• Core counts
Explicit Memory Management • Allocating and freeing memory
• Pointers
Language workarounds • Locks
• Semaphores
• Critical sections
• Atomic operations
Explicit Thread Management • Determining where to parallelize a
program
• Creating/deleting threads
• Parallel extensions: OpenMP/TBB
No more:
High-Abstraction, High Performance
Most common programming languages are imperative
─ Detailed sequence of commands for carrying out the computation;
i.e.- tell the computer both “what” to do and “how” to do it
─ Inherently serial, designed for old single step CPU hardware
─ Some add explicit “directives” to manually enable low-level parallelism
─ e.g.- C, C++, C#, Fortran, Java, Python
SequenceL is declarative & functional – higher abstraction
─ Describe the desired output in terms of the input, as functions;
i.e.- tell the computer only “what” to do, so no thinking about parallel
─ Designed by math people for math and science people
─ Since SequenceL does not attempt to mimic hardware execution, it can easily be moved
to different types of architectures
Analogous to SQL database language (also declarative but not Turing complete)
─ Before SQL, programmers wrote their own low-level database procedures
─ Error-prone, difficult to read/write, and does not perform as well as using Oracle or DB2
7 © 2016 Texas Multicore Technologies, Inc.
All Rights Reserved
TMT Does the Hard Work So You Don’t Have To
Immutable data structures at SequenceL level aid performance ─ Re-assignment and memory re-use happens at lower level
─ Lets automatic parallelization happen
─ C++ compilers are limited in their automatic parallelization & vectorization due to re-assignment; the language itself stops optimization
High abstraction allows for runtime to control memory layout, alignment, and access patterns
─ Runtime can create predictable access patterns and automatic optimization for caches WITHOUT polluting the original algorithm and WITHOUT binding to a specific processor
─ Where other compilers only achieve vectorization, SequenceL achieves both vectorization and caching optimizations
High level language allows for optimizations that are not possible with low level language ─ E.g.- parallel edge cases, fusing parallel operations
© 2016 Texas Multicore Technologies, Inc.
All Rights Reserved 8