Skip to content

Commit 0949220

Browse files
committed
doc
1 parent 5da1525 commit 0949220

33 files changed

+274
-14
lines changed

.github/workflows/ci.yml

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,56 @@ jobs:
5656
run: |
5757
pip install pytest
5858
export PYTHONPATH=.
59-
UNITTEST_GOING=1 pytest --durations=10 _unittests
59+
UNITTEST_GOING=1 pytest --durations=10 _unittests --ignore _unittests/ut_reference/test_backend_extended_reference_evaluator.py
60+
export PYTHONPATH=
61+
62+
jobs:
63+
run:
64+
name: backend-test ${{ matrix.os }}-${{ matrix.python }}
65+
runs-on: ${{ matrix.os }}
66+
strategy:
67+
matrix:
68+
os: [ubuntu-latest]
69+
python: ['3.12']
70+
71+
steps:
72+
- uses: actions/checkout@v3
73+
74+
- uses: actions/setup-python@v4
75+
with:
76+
python-version: ${{ matrix.python }}
77+
78+
- name: Install pytorch
79+
run: python -m pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
80+
81+
- name: Install transformers
82+
run: |
83+
git clone https://github.com/huggingface/transformers.git
84+
cd transformers
85+
pip install -e .
86+
cd ..
87+
88+
- name: Install requirements
89+
run: python -m pip install -r requirements.txt
90+
91+
- name: Install requirements dev
92+
run: python -m pip install -r requirements-dev.txt
93+
94+
- name: Cache pip
95+
uses: actions/cache@v4
96+
with:
97+
path: ~/.cache/pip
98+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
99+
restore-keys: |
100+
${{ runner.os }}-pip-
101+
${{ runner.os }}-
102+
103+
- name: pip freeze
104+
run: python -m pip freeze
105+
106+
- name: run tests
107+
run: |
108+
pip install pytest
109+
export PYTHONPATH=.
110+
UNITTEST_GOING=1 pytest --durations=10 _unittests/ut_reference/test_backend_extended_reference_evaluator.py
60111
export PYTHONPATH=

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
pip install pytest
6060
pip install pytest-cov
6161
export PYTHONPATH=.
62-
UNITTEST_GOING=1 pytest --cov=./onnx_diagnostic/ --cov-report=xml --durations=10 _unittests
62+
UNITTEST_GOING=1 pytest --cov=./onnx_diagnostic/ --cov-report=xml --durations=10 _unittests --ignore _unittests/ut_reference/test_backend_extended_reference_evaluator.py
6363
export PYTHONPATH=
6464
6565
- name: Upload coverage reports to Codecov

_doc/api/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ API of onnx_diagnostic
77
:maxdepth: 1
88
:caption: submodules
99

10+
reference/index
1011
torch_export_patches/index
1112
torch_models/index
1213

_doc/api/reference/evaluator.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
onnx_diagnostic.reference.evaluator
3+
===================================
4+
5+
.. automodule:: onnx_diagnostic.reference.evaluator
6+
:members:
7+
:no-undoc-members:
8+
:exclude-members: ExtendedReferenceEvaluator

_doc/api/reference/index.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
onnx_diagnostic.reference
2+
=========================
3+
4+
.. toctree::
5+
:maxdepth: 1
6+
:caption: submodules
7+
8+
ops/index
9+
10+
.. toctree::
11+
:maxdepth: 1
12+
:caption: modules
13+
14+
evaluator
15+
16+
ExtendedReferenceEvaluator
17+
++++++++++++++++++++++++++
18+
19+
.. autoclass:: onnx_diagnostic.reference.ExtendedReferenceEvaluator
20+
:members:
21+
22+
Other functions
23+
+++++++++++++++
24+
25+
.. automodule:: onnx_diagnostic.reference
26+
:members:
27+
:no-undoc-members:

_doc/api/reference/ops/index.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
onnx_diagnostic.reference.ops
3+
=============================
4+
5+
6+
7+
.. toctree::
8+
:maxdepth: 1
9+
:caption: modules
10+
11+
12+
op_add_add_mul_mul
13+
op_average_pool_grad
14+
op_cast_like
15+
op_complex
16+
op_concat
17+
op_constant_of_shape
18+
op_fused_matmul
19+
op_gather_grad
20+
op_memcpy_host
21+
op_mul_sigmoid
22+
op_negxplus1
23+
op_quick_gelu
24+
op_replace_zero
25+
op_rotary
26+
op_qlinear_average_pool
27+
op_qlinear_conv
28+
op_scatter_elements
29+
op_scatternd_of_shape
30+
op_simplified_layer_normalization
31+
op_skip_layer_normalization
32+
op_slice
33+
op_transpose_cast
34+
op_tri_matrix
35+
36+
37+
.. automodule:: onnx_diagnostic.reference.ops
38+
:members:
39+
:no-undoc-members:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
onnx_diagnostic.reference.ops.op_add_add_mul_mul
3+
================================================
4+
5+
.. automodule:: onnx_diagnostic.reference.ops.op_add_add_mul_mul
6+
:members:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
onnx_diagnostic.reference.ops.op_average_pool_grad
3+
==================================================
4+
5+
.. automodule:: onnx_diagnostic.reference.ops.op_average_pool_grad
6+
:members:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
onnx_diagnostic.reference.ops.op_cast_like
3+
==========================================
4+
5+
.. automodule:: onnx_diagnostic.reference.ops.op_cast_like
6+
:members:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
onnx_diagnostic.reference.ops.op_complex
3+
========================================
4+
5+
.. automodule:: onnx_diagnostic.reference.ops.op_complex
6+
:members:

0 commit comments

Comments
 (0)