<jupyter_start><jupyter_text>Optimised symbolic finite difference computation with Devito Welcome to the interactive hands-on tutorial for [Devito](http://www.devitoproject.org). Devito is a domain-specific language (DSL) and code generation framework for the design of highly optimised finite difference kernels, and was primarily designed for use in seismic inversion methods. Devito utilises SymPy to allow the definition of matrix-free finite difference operators from high-level symbolic equations and generates optimised and automatically tuned code specific to a given target architecture.This hands-on tutorial is intended to give you an initial flavour of the Devito framework and the power of symbolic computation. We will demonstrate how quickly explicit finite difference operators can be created from only a few lines of Python code, and how we can use them to implement complex imaging algorithms in very little time (literally!).   Installation and setupIf you're seeing this on the projector, navigate to the following url to access the Azure notebooks project: TODO Add URLOnce here, clone the project to create your personal copy. Next, click on TODO to start the notebook container. Now you should see a set of Jupyter notebooks, inlcuding this one called ```00_index.ipynb```. Open your copy of this notebook and proceed further.<jupyter_code>!pip install -y -r requirements.txt<jupyter_output><empty_output><jupyter_text>Once the above setup has finished, we should run a quick sanity check that we have everything that we need. The following cell should simply complete without any errors.<jupyter_code>from devito import *
from examples.seismic import Model<jupyter_output><empty_output><jupyter_text>For one section of this tutorial we will have a quick look at the stencil compiler YASK. To verify YASK works smoothly you can run:<jupyter_code>import yask<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.041884816753926704, 'fraction_numerical': 0.0010471204188481676, 'mean_word_length': 5.705263157894737, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '396874', 'license': 'MIT', 'n_tokens_mistral': 466, 'n_tokens_neox': 444, 'n_words': 256, 'path': '.ipynb_checkpoints/00_index-checkpoint.ipynb', 'repo_name': 'navjotk/devitoworkshop', 'size': '1910'}