Skip to content
Snippets Groups Projects
Commit 626da37e authored by Riccardo De Maria's avatar Riccardo De Maria
Browse files

Merge branch 'hpc_python_felix' into 'master'

Felix Additions for Pythons HPC Packages

See merge request !18
parents f775987a 45997a4c
No related branches found
No related tags found
1 merge request!18Felix Additions for Pythons HPC Packages
Pipeline #4907719 passed
Python - high performance computing Python - high performance computing
====================================== ======================================
Packages to run computations from Python faster than bare Python. Below is a list of Python packages to run computations faster than bare Python.
Based on Python array types
---------------------------- Packages Based on Python Array Types
------------------------------------
- [numpy](https://numpy.org/): N-dimensional arrays with comprehensive mathematical functions, random number generators, linear algebra routines, Fourier transforms
- [awkward](https://awkward-array.org/doc/main/): Awkward Array is a library for nested, variable-sized data, including arbitrary-length lists, records, mixed types, and missing data, using NumPy-like idioms. It can offload computation on GPU. - [Numpy](https://numpy.org/): Numpy is the fundamental package for scientific computing with Python. It provides N-dimensional arrays with comprehensive vectorized operations: mathematical functions, random number generators, linear algebra routines, Fourier transforms writen in low-level C code.
- [dask](https://docs.dask.org/en/stable/): Dask is a flexible library for parallel computing in Python. - [Awkward Array](https://awkward-array.org/doc/main/): Awkward Array is a library for nested, variable-sized data, including arbitrary-length lists, records, mixed types, and missing data, using NumPy-like idioms. It can offload computation on GPU.
- [jax](https://github.com/google/jax): JAX uses XLA to compile and run your NumPy programs on GPUs and TPUs. With its updated version of Autograd, JAX can automatically differentiate native Python and NumPy functions. - [Dask](https://docs.dask.org/en/stable/): Dask is a flexible library for parallel computing in Python. It provides dynamic task scheduling and out-of-memory big data collections.
- [pytorch](https://pytorch.org/): Machine learning framework;The torch package contains data structures for multi-dimensional tensors and defines mathematical operations over these tensors. Additionally, it provides many utilities for efficient serializing of Tensors and arbitrary types, and other useful utilities. - [JAX](https://github.com/google/jax): JAX uses an improved Autograd implementation in combination with XLA to compile and run your Python/NumPy programs on CPUs, GPUs and TPUs. It enables composable function transformations and can differentiate through loops, branches, recursion, closures, and it can take derivatives of derivatives of derivatives.
- [tensorflow](https://www.tensorflow.org): TensorFlow is an end-to-end platform for machine learning. It supports the following: Multidimensional-array based numeric computation (similar to NumPy.), GPU and distributed processing, Automatic differentiation. - [PyTorch](https://pytorch.org/): PyTorch is a tensor computation (like NumPy) library with strong GPU acceleration that enables building deep neural networks on a tape-based autograd system. It includes data structures for multi-dimensional tensors and defines mathematical operations over these tensors, as well as utilities for efficient serializing of Tensors and arbitrary types, efficient compiling of ML models, and other useful utilities.
- [cupy](https://cupy.dev/): CuPy is an open-source array library for GPU-accelerated computing with Python. CuPy's interface is highly compatible with NumPy and SciPy. You can easily make a custom CUDA kernel if you want to make your code run faster, requiring only a small code snippet of C++. - [TensorFlow](https://www.tensorflow.org): TensorFlow is an end-to-end platform for machine learning based on GPU-accelerated tensor computations.It has a comprehensive, flexible ecosystem of tools, libraries, and community resources that lets researchers push the state-of-the-art in ML and developers easily build and deploy ML-powered applications. It supports the following: Multidimensional-array based numeric computation (similar to NumPy.), GPU and distributed processing, automatic differentiation and more.
- [CuPy](https://cupy.dev/): CuPy is a NumPy/SciPy-compatible array library for GPU-accelerated computing with Python. It acts as a drop-in replacement to run existing NumPy/SciPy code on NVIDIA CUDA or AMD ROCm platforms.. It is essentially NumPy & SciPy for GPU. You can also easily make a custom CUDA kernel if you want to make your code run faster, requiring only a small code snippet of C++.
Based on Just-in-time compilation of Python code
--------------------------------------------------
- [numba](https://numba.pydata.org/): Numba is an open source JIT compiler that translates a subset of Python and NumPy code into fast machine code. Packages for Fast DataFrame-Type Computations
- [thaici](https://www.taichi-lang.org/): Taichi translates the compute-intensive Python code into fast machine code at runtime with a just-in-time compiler, accelerating your Python code. ---------------------------------------------
- [Polars](https://www.pola.rs/): Polars is a lightweight, fast multi-threaded, hybrid-streaming DataFrame library written in Rust using the Apache Arrow columnar format. It enables fast out-of-memory operations, lazy/eager execution, query optimization and more.
Compile optimized Python modules from Python code - [cuDF](https://docs.rapids.ai/api/cudf/stable/): cuDF is a Python GPU DataFrame library built on the Apache Arrow columnar memory format with a pandas-like API.
---------------------------------------------------- - [Vaex](https://vaex.io/docs/index.html): Vaex is a highly-performant library for lazy out-of-core DataFrames, to visualize and explore big tabular datasets. It can apply operations on an N-dimensional grid up to a billion ($10^9$) objects/rows per second and provides a set of sub-packages for various applications (visualisation, jupyter integration, data formats support, machine learning etc.)
- [cython](https://cython.org/): Cython is an optimising static compiler for both the Python programming language and the extended Cython programming language. - [PySpark](https://spark.apache.org/docs/latest/api/python/): PySpark is an interface for Apache Spark in Python, with support for most of Spark’s features such as Spark SQL, DataFrame, Streaming, MLlib (Machine Learning) and Spark Core.
- [pythran](https://pythran.readthedocs.io/en/latest/): Pythran is an ahead of time compiler for a subset of the Python language, with a focus on scientific computing. It takes a Python module annotated with a few interface descriptions and turns it into a native Python module with the same interface, but (hopefully) faster. It is meant to efficiently compile scientific programs, and takes advantage of multi-cores and SIMD instruction units. - [Modin](https://modin.readthedocs.io/en/stable/): Modin is a drop-in replacement for `pandas` to instantly speed up your workflows by scaling pandas so it uses all of your cores. It is most likely the slowest barrier to entry for performance improvements on DataFrame operations: changing the import line is enough.
- [mypyc](https://mypyc.readthedocs.io/en/latest/): Mypyc compiles Python modules to C extensions. It uses standard Python type hints to generate fast code.
- [nuitka](https://nuitka.net/): Nuitka is the optimizing Python compiler written in Python that creates executables that run without an need for a separate installer. Data files can both be included or put alongside.
- [codon](https://github.com/exaloop/codon): Codon is a high-performance Python compiler that compiles Python code to native machine code without any runtime overhead. Packages Based on Just-in-time Compilation of Python Code
---------------------------------------------------------
Based on just-in-time compilation of C/C++ code - [Numba](https://numba.pydata.org/): Numba is an open source JIT compiler that translates a subset of Python and NumPy code into fast machine code. It is designed to be used with NumPy arrays and functions and enables automatic threading, SIMD vectorization and GPU acceleration (CUDA only).
-------------------------------------------------- - [Taichi](https://www.taichi-lang.org/): Taichi is an open-source, imperative, parallel programming language for high-performance numerical computation embedded in Python. It uses just-in-time (JIT) compiler frameworks to offload the compute-intensive Python code to the native GPU or CPU instructions. Taichi can seamlessly interoperate with popular Python frameworks, such as NumPy, PyTorch, matplotlib, and pillow.
- [pyopencl](https://documen.tician.de/pyopencl): PyOpenCL gives you easy, Pythonic access to the OpenCL parallel computation API. It can build OpenCL kernels and buffers. It support a numpy-like array type.
- [pycuda](https://documen.tician.de/pycuda/): PyCUDA gives you easy, Pythonic access to Nvidia’s CUDA parallel computation API. It can build CUDA kernels and buffers. It support a numpy-like array type.
Packages Based on Just-in-Time Compilation of Low-Level Code
-------------------------------------------------------
- [PyOpenCL](https://documen.tician.de/pyopencl): PyOpenCL gives you easy, Pythonic access to the OpenCL parallel computation API. It can build OpenCL kernels and buffers, with support for a numpy-like array type.
- [PyCUDA](https://documen.tician.de/pycuda/): PyCUDA gives you easy, Pythonic access to Nvidia’s CUDA parallel computation API. It can build CUDA kernels and buffers, with support for a numpy-like array type.
- [cppyy](https://cppyy.readthedocs.io/en/latest/): cppyy is an automatic, run-time, Python-C++ bindings generator, for calling C++ from Python and Python from C++. Run-time generation enables detailed specialization for higher performance, lazy loading for reduced memory use in large scale projects, Python-side cross-inheritance and callbacks for working with C++ frameworks, run-time template instantiation, automatic object downcasting, exception mapping, and interactive exploration of C++ libraries. cppyy delivers this without any language extensions, intermediate languages, or the need for boiler-plate hand-written code. - [cppyy](https://cppyy.readthedocs.io/en/latest/): cppyy is an automatic, run-time, Python-C++ bindings generator, for calling C++ from Python and Python from C++. Run-time generation enables detailed specialization for higher performance, lazy loading for reduced memory use in large scale projects, Python-side cross-inheritance and callbacks for working with C++ frameworks, run-time template instantiation, automatic object downcasting, exception mapping, and interactive exploration of C++ libraries. cppyy delivers this without any language extensions, intermediate languages, or the need for boiler-plate hand-written code.
- [xobjects](https://github.com/xsuite/xobjects/): Provide in-memory serialization of strucured type with C-API generation and compiles at run-time C code using cffi, cupy, pyopencl under the same API. - [xobjects](https://github.com/xsuite/xobjects/): Provide in-memory serialization of strucured type with C-API generation and compiles at run-time C code using cffi, cupy, pyopencl under the same API.
Compile optimized Python modules using C/C++ code
---------------------------------------------------- Packages to Compile Python Modules Into Optimized Code
------------------------------------------------------
- [Cython](https://cython.org/): Cython is an optimising static compiler for both the Python programming language and the extended Cython programming language. It makes writing C extensions for Python as easy as Python itself.
- [Pythran](https://pythran.readthedocs.io/en/latest/): Pythran is an ahead of time compiler for a subset of the Python language, with a focus on scientific computing. It takes a Python module annotated with a few interface descriptions and turns it into a native Python module with the same interface, but (hopefully) faster. It is meant to efficiently compile scientific programs, and takes advantage of multi-cores and SIMD instruction units.
- [Mypyc](https://mypyc.readthedocs.io/en/latest/): Mypyc compiles Python modules to C extensions. It uses standard Python type hints to generate fast code.
- [Nuitka](https://nuitka.net/): Nuitka is the optimizing Python compiler written in Python that creates executables that run without an need for a separate installer. Data files can both be included or put alongside.
- [Codon](https://github.com/exaloop/codon): Codon is a high-performance Python compiler that compiles Python code to native machine code without any runtime overhead.
Packages to Bind Low-Level Code Modules to Python
-------------------------------------------------
- [cffi](https://cffi.readthedocs.io/en/latest/): C Foreign Function Interface for Python. Interact with almost any C code from Python, based on C-like declarations that you can often copy-paste from header files or documentation. - [cffi](https://cffi.readthedocs.io/en/latest/): C Foreign Function Interface for Python. Interact with almost any C code from Python, based on C-like declarations that you can often copy-paste from header files or documentation.
- [pybind11](https://github.com/pybind/pybind11):pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code. - [Pybind11](https://github.com/pybind/pybind11):pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code.
- [nanobind](https://github.com/wjakob/nanobind): nanobind is a small binding library that exposes C++ types in Python and vice versa. It is reminiscent of Boost.Python and pybind11 and uses near-identical syntax. In contrast to these existing tools, nanobind is more efficient: bindings compile in a shorter amount of time, producing smaller binaries with better runtime performance. - [Nanobind](https://github.com/wjakob/nanobind): nanobind is a small binding library that exposes C++ types in Python and vice versa. It is reminiscent of Boost.Python and pybind11 and uses near-identical syntax. In contrast to these existing tools, nanobind is more efficient: bindings compile in a shorter amount of time, producing smaller binaries with better runtime performance.
- [maturin](https://github.com/PyO3/maturin): maturin is a tool for building and publishing Rust-based Python packages with minimal configuration. It uses [PyO3](https://github.com/PyO3/pyo3) to create bindings from Python to Rust code.
- [Nimporter](https://github.com/Pebaz/Nimporter): Nimporter is a package to compile Nim extensions for Python on import automatically. It uses [nimpy](https://github.com/yglukhov/nimpy) to compile Nim modules on the fly, allowing to simply import Nim source code files as if they were Python modules, and use them seamlessly with Python code. Nim compiles fast and reaches C-level speeds.
\ No newline at end of file
...@@ -82,7 +82,7 @@ nav: ...@@ -82,7 +82,7 @@ nav:
SSH tunnel: guides/sshtunnel.md SSH tunnel: guides/sshtunnel.md
Configure Vim for Python development: guides/vim_autocomplete.md Configure Vim for Python development: guides/vim_autocomplete.md
Apple Silicon Machines: guides/apple_silicon.md Apple Silicon Machines: guides/apple_silicon.md
Python package for HPC: guides/hpc_python.md Python Packages for HPC: guides/hpc_python.md
- 'Meetings': meetings.md - 'Meetings': meetings.md
- 'Mattermost': https://mattermost.web.cern.ch/abpcomputing/channels/town-square - 'Mattermost': https://mattermost.web.cern.ch/abpcomputing/channels/town-square
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment