Skip to content

Commit

Permalink
Add code highlighting.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottslaughter committed Nov 20, 2024
1 parent 121985d commit 1c8c8b3
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions pygion.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,40 @@ Pygion is task-based framework for Python based on the [Legion]({{ "/" | relativ

For an overview of Pygion, the [original PAW-ATM paper]({{ "/pdfs/pygion2019.pdf" | relative_url }}).

{% highlight python %}
from pygion import task

@task
def main():
print("Hello, Legion!")
{% endhighlight %}

## Getting Started

Pygion lives in the main Legion repo under
[`bindings/python`](https://github.com/StanfordLegion/legion/tree/stable/bindings/python). To
get started with Pygion, build with Make in that directory:

```
{% highlight bash %}
git clone https://github.com/StanfordLegion/legion.git
cd legion/bindings/python
make LG_RT_DIR=$PWD/../../runtime -j4
```
{% endhighlight %}

Customize the `-j` flag parameter to control the number of threads used to build, depending on your machine.

## Building with CMake

If you prefer to use CMake, then build Legion at the top level `-DLegion_BUILD_BINDINGS=ON -DLegion_USE_Python=ON`:

```
{% highlight bash %}
git clone https://github.com/StanfordLegion/legion.git
cd legion
mkdir build
cd build
cmake .. -DLegion_BUILD_BINDINGS=ON -DLegion_USE_Python=ON -DCMAKE_INSTALL_PREFIX=$PWD/../install
make install -j4
```
{% endhighlight %}

## Examples

Expand Down

0 comments on commit 1c8c8b3

Please sign in to comment.