Skip to content

Commit 143c531

Browse files
authored
Use onnx_ir as a dependency (#2324)
Take `onnx_ir` as a dependency and expose onnxscript.ir as an alias of `onnx_ir`.
1 parent 1620320 commit 143c531

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+99
-16220
lines changed

.github/workflows/main.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
- py311-torch-nightly
3232
- py311-onnx-weekly
3333
- py311-ort-nightly
34+
- py311-onnx-ir-git
3435
- py310
3536
include:
3637
- name: py312
@@ -51,6 +52,9 @@ jobs:
5152
- name: py311-ort-nightly
5253
python-version: "3.11"
5354
nox-tag: test-ort-nightly
55+
- name: py311-onnx-ir-git
56+
python-version: "3.11"
57+
nox-tag: test-onnx-ir-git
5458
runs-on: ${{ matrix.os }}
5559
steps:
5660
- uses: actions/checkout@v4

README.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ models using a subset of Python. ONNX Script is:
1717

1818
This repo also covers:
1919

20-
* **ONNX IR:** an in-memory IR that supports the full ONNX spec, designed
21-
for graph construction, analysis and transformation.
2220
* **ONNX Script Optimizer:** provides functionality to optimize an ONNX
2321
model by performing optimizations and clean-ups such as constant folding,
2422
dead code elimination, etc.
@@ -152,24 +150,6 @@ result = Hardmax(v)
152150

153151
More examples can be found in the [docs/examples](docs/examples) directory.
154152

155-
## ONNX IR
156-
157-
An in-memory IR that supports the full ONNX spec, designed for graph construction, analysis and transformation.
158-
159-
### Features
160-
161-
* **Full ONNX spec support:** all valid models representable by ONNX protobuf,
162-
and a subset of invalid models (so you can load and fix them).
163-
* **Low memory footprint:** mmap'ed external tensors; unified interface for
164-
ONNX TensorProto, Numpy arrays and PyTorch Tensors etc. No tensor size
165-
limitation. Zero copies.
166-
* **Straightforward access patterns:** Access value information and traverse the
167-
graph topology at ease.
168-
* **Robust mutation:** Create as many iterators as you like on the graph while mutating it.
169-
* **Speed:** Performant graph manipulation, serialization/deserialization to Protobuf.
170-
* **Pythonic and familiar APIs:** Classes define Pythonic apis and still map to
171-
ONNX protobuf concepts in an intuitive way.
172-
173153
## ONNX Script Tools
174154

175155
### ONNX Optimizer

docs/ir/getting_started.ipynb

Lines changed: 0 additions & 386 deletions
This file was deleted.

docs/ir/index.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,5 @@
11
# ONNX IR
22

3-
An in-memory IR that supports the full ONNX spec, designed for graph construction, analysis and transformation.
3+
ONNX IR is now an official ONNX project! Documentation has been migrated to [onnx.ai/ir-py/](https://onnx.ai/ir-py/).
44

5-
## Features ✨
6-
7-
- Full ONNX spec support: all valid models representable by ONNX protobuf, and a subset of invalid models (so you can load and fix them).
8-
- Low memory footprint: mmap'ed external tensors; unified interface for ONNX TensorProto, Numpy arrays and PyTorch Tensors etc. No tensor size limitation. Zero copies.
9-
- Straightforward access patterns: Access value information and traverse the graph topology at ease.
10-
- Robust mutation: Create as many iterators as you like on the graph while mutating it.
11-
- Speed: Performant graph manipulation, serialization/deserialization to Protobuf.
12-
- Pythonic and familiar APIs: Classes define Pythonic apis and still map to ONNX protobuf concepts in an intuitive way.
13-
- No protobuf dependency: The IR does not require protobuf once the model is converted to the IR representation, decoupling from the serialization format.
14-
15-
## Get started
16-
17-
```{toctree}
18-
:maxdepth: 1
19-
20-
getting_started
21-
tensors
22-
ir_api/index
23-
```
5+
You may continue to use `onnxscript.ir` unchanged for compatibility with older (<0.3) versions of ONNX Script.

docs/ir/ir_api/core.md

Lines changed: 0 additions & 65 deletions
This file was deleted.

docs/ir/ir_api/index.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/ir/ir_api/ir_convenience.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

docs/ir/ir_api/ir_external_data.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/ir/ir_api/ir_passes.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

docs/ir/ir_api/ir_passes_common.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/ir/ir_api/ir_tape.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs/ir/ir_api/ir_traversal.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)