Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ jobs:
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with ruff
run: |
# stop the build if there are Python syntax errors or undefined names
ruff check . --output-format=github --select=E9,F63,F7,F82 --target-version=py37
# default set of ruff rules with GitHub Annotations
ruff check . --output-format=github --target-version=py37 --exclude=docs/ --exclude=paper/
ruff check --output-format=github --target-version=py310 --exclude=docs/ --exclude=paper/
- name: Check formatting with black
run: |
black --check nir/ tests/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Using NIR is typically a part of your favorite framework's workflow, but follows
# Define a model
my_model = ...
# Save the model (source platform)
nir.write("my_graph.nir", my_model)
nir.write("my_graph.nir", my_model)
# Load the model (target platform)
imported_graph = nir.read("my_graph.nir")
```
Expand Down
5 changes: 1 addition & 4 deletions docs/source/api_design.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ That would look like this: `edges = [("my_node", "my_node")]`.
In sum, a rudimentary, self-cyclic graph can be described in NIR as follows:

```python
NIRGraph(
nodes = {"my_node": MyNIRNode(np.array([...]))},
edges = [("my_node", "my_node")]
)
NIRGraph(nodes={"my_node": MyNIRNode(np.array([...]))}, edges=[("my_node", "my_node")])
```

## Input and output types
Expand Down
2 changes: 2 additions & 0 deletions docs/source/examples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Note that this requires you to provide a NIR model, so you need to find a way to
The `nir.write` function takes two arguments: the file path and the model to write.
```python
import nir

my_nir_graph = ...
nir.write("my_graph.nir", my_model)
```
Expand All @@ -27,6 +28,7 @@ To read a model from a file, use the `nir.read` function.
This function takes a single argument: the file path.
```python
import nir

imported_graph = nir.read("my_graph.nir")
```

Expand Down
262 changes: 133 additions & 129 deletions docs/source/examples/lava/lava_to_nir.py

Large diffs are not rendered by default.

Loading
Loading