All Projects → devitocodes → Devito

devitocodes / Devito

Licence: mit
Code generation framework for automated finite difference computation

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Devito

Home
Project Glimpse: Node Edition - Spend less time debugging and more time developing.
Stars: ✭ 260 (-8.77%)
Mutual labels:  performance
Stormpot
A fast object pool for the JVM
Stars: ✭ 267 (-6.32%)
Mutual labels:  performance
Database validations
Database validations for ActiveRecord
Stars: ✭ 274 (-3.86%)
Mutual labels:  performance
Fixed
high performance fixed decimal place math library for Go
Stars: ✭ 263 (-7.72%)
Mutual labels:  performance
Clang
Mirror kept for legacy. Moved to https://github.com/llvm/llvm-project
Stars: ✭ 2,880 (+910.53%)
Mutual labels:  performance
Webpack Lighthouse Plugin
A Webpack plugin for Lighthouse
Stars: ✭ 271 (-4.91%)
Mutual labels:  performance
Compilingtheory
My course design for compiler theory (Visualization).
Stars: ✭ 257 (-9.82%)
Mutual labels:  compilers
Performance Testing Framework
Framework allows to perform load testing with Apache Jmeter, view application/server metrics in real-time with Grafana, analyze errors cause with detailed traces for failed requests, compare different test runs in scripted dashboard and perform frontend performance testing with sitespeed.io+webpagetest
Stars: ✭ 275 (-3.51%)
Mutual labels:  performance
Ristretto
A high performance memory-bound Go cache
Stars: ✭ 3,584 (+1157.54%)
Mutual labels:  performance
String Theory
Identify and reduce memory used by duplicate .NET strings
Stars: ✭ 273 (-4.21%)
Mutual labels:  performance
Grav
Performance visualisation tools
Stars: ✭ 262 (-8.07%)
Mutual labels:  performance
Hyperhtml
A Fast & Light Virtual DOM Alternative
Stars: ✭ 2,872 (+907.72%)
Mutual labels:  performance
Fastexcel
Generate and read big Excel files quickly
Stars: ✭ 268 (-5.96%)
Mutual labels:  performance
Deepc
vendor independent deep learning library, compiler and inference framework microcomputers and micro-controllers
Stars: ✭ 260 (-8.77%)
Mutual labels:  performance
Rustc Perf
Website for graphing performance of rustc
Stars: ✭ 272 (-4.56%)
Mutual labels:  performance
Metered Rs
Fast, ergonomic metrics for Rust
Stars: ✭ 258 (-9.47%)
Mutual labels:  performance
Panko serializer
High Performance JSON Serialization for ActiveRecord & Ruby Objects
Stars: ✭ 266 (-6.67%)
Mutual labels:  performance
Wallace Cli
Pretty CSS analytics on the CLI
Stars: ✭ 281 (-1.4%)
Mutual labels:  performance
Shiba
Catch bad SQL queries before they cause problems in production
Stars: ✭ 277 (-2.81%)
Mutual labels:  performance
Next Super Performance
The case of partial hydration (with Next and Preact)
Stars: ✭ 272 (-4.56%)
Mutual labels:  performance

Devito: Fast Stencil Computation from Symbolic Specification

Build Status for the Core backend Build Status with MPI Build Status on GPU Code Coverage Slack Status asv PyPI version Binder

Devito is a Python package to implement optimized stencil computation (e.g., finite differences, image processing, machine learning) from high-level symbolic problem definitions. Devito builds on SymPy and employs automated code generation and just-in-time compilation to execute optimized computational kernels on several computer platforms, including CPUs, GPUs, and clusters thereof.

About Devito

Devito provides a functional language to implement sophisticated operators that can be made up of multiple stencil computations, boundary conditions, sparse operations (e.g., interpolation), and much more. A typical use case is explicit finite difference methods for approximating partial differential equations. For example, a 2D diffusion operator may be implemented with Devito as follows

>>> grid = Grid(shape=(10, 10))
>>> f = TimeFunction(name='f', grid=grid, space_order=2)
>>> eqn = Eq(f.dt, 0.5 * f.laplace)
>>> op = Operator(Eq(f.forward, solve(eqn, f.forward)))

An Operator generates low-level code from an ordered collection of Eq (the example above being for a single equation). This code may also be compiled and executed

>>> op(t=timesteps)

There is virtually no limit to the complexity of an Operator -- the Devito compiler will automatically analyze the input, detect and apply optimizations (including single- and multi-node parallelism), and eventually generate code with suitable loops and expressions.

Key features include:

  • A functional language to express finite difference operators.
  • Straightforward mechanisms to adjust the discretization.
  • Constructs to express sparse operators (e.g., interpolation), classic linear operators (e.g., convolutions), and tensor contractions.
  • Seamless support for boundary conditions and adjoint operators.
  • A flexible API to define custom stencils, sub-domains, sub-sampling, and staggered grids.
  • Generation of highly optimized parallel code (SIMD vectorization, CPU and GPU parallelism via OpenMP, multi-node parallelism via MPI, blocking, aggressive symbolic transformations for FLOP reduction, etc.).
  • Distributed NumPy arrays over multi-node (MPI) domain decompositions.
  • Inspection and customization of the generated code.
  • Autotuning framework to ease performance tuning.
  • Smooth integration with popular Python packages such as NumPy, SymPy, Dask, and SciPy, as well as machine learning frameworks such as TensorFlow and PyTorch.

Installation

The easiest way to try Devito is through Docker using the following commands:

# get the code
git clone https://github.com/devitocodes/devito.git
cd devito

# start a jupyter notebook server on port 8888
docker-compose up devito

After running the last command above, the terminal will display a URL such as https://127.0.0.1:8888/?token=XXX. Copy-paste this URL into a browser window to start a Jupyter notebook session where you can go through the tutorials provided with Devito or create your own notebooks.

See here for detailed installation instructions and other options. If you encounter a problem during installation, please see the installation issues we have seen in the past.

Resources

To learn how to use Devito, here is a good place to start, with lots of examples and tutorials.

The website also provides access to other information, including documentation and instructions for citing us.

Some FAQ are discussed here.

Performance

If you are interested in any of the following

  • Generation of parallel code (CPU, GPU, multi-node via MPI);
  • Performance tuning;
  • Benchmarking operators;

then you should take a look at this README.

You may also be interested in TheMatrix -- a cross-architecture benchmarking framework showing the performance of several production-grade seismic operators implemented with Devito. This is now our flagship project towards neat, open, and reproducible science.

Get in touch

If you're using Devito, we would like to hear from you. Whether you are facing issues or just trying it out, join the conversation.

Interactive jupyter notebooks

The tutorial jupyter notebook are available interactively at the public binder jupyterhub.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].