Compiling Code for High-Performance Computing
Numpy and the compiled programs it depends on are extremely performant, if allowed to do their work; however, many performance issues in scientific Python code stem from high overhead between the Python interpreter and compiled scientific libraries during performance-critical calculations. In this unit, we look at how to reduce this overhead, how to compile both simple and complex algorithms into simple operations, and how to compile code for a variety of other processor types, including GPUs.
Sessions
Let the Compiler Help Us Compute: Practical Compiled Code for Neuroscience
In this notebook, we'll look at two powerful tools for compiling processing-heavy code in order to do more computational work outside of Python's runtime: Numexpr and Numba
Working with the GPU in Python: Practical CuPy
In this notebook, we learn how to use **CuPy**, a NumPy-compatible GPU array library, to do operations on the GPU, avoiding common performance traps along the way.