mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-09 15:08:02 -05:00
onnx in tinygrad (#11675)
This commit is contained in:
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@@ -329,15 +329,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pip3 install --upgrade --force-reinstall ruff==0.11.0
|
pip3 install --upgrade --force-reinstall ruff==0.11.0
|
||||||
python3 -m ruff check .
|
python3 -m ruff check .
|
||||||
python3 -m ruff check extra/onnx.py
|
|
||||||
python3 -m ruff check examples/mlperf/ --ignore E501
|
python3 -m ruff check examples/mlperf/ --ignore E501
|
||||||
- name: Lint tinygrad with pylint
|
- name: Lint tinygrad with pylint
|
||||||
run: python -m pylint tinygrad/ extra/onnx.py
|
run: python -m pylint tinygrad/
|
||||||
- name: Run mypy
|
- name: Run mypy
|
||||||
run: |
|
run: |
|
||||||
python -m mypy --strict-equality --lineprecision-report .
|
python -m mypy --strict-equality --lineprecision-report .
|
||||||
cat lineprecision.txt
|
cat lineprecision.txt
|
||||||
python -m mypy --strict-equality extra/onnx.py
|
|
||||||
|
|
||||||
unittest:
|
unittest:
|
||||||
name: Unit Tests
|
name: Unit Tests
|
||||||
@@ -375,8 +373,8 @@ jobs:
|
|||||||
PYTHONPATH=. python extra/optimization/extract_dataset.py
|
PYTHONPATH=. python extra/optimization/extract_dataset.py
|
||||||
gzip -c /tmp/sops > extra/datasets/sops.gz
|
gzip -c /tmp/sops > extra/datasets/sops.gz
|
||||||
DEBUG=1 MIN_ASTS=1 PYTHONPATH=. python extra/optimization/get_action_space.py
|
DEBUG=1 MIN_ASTS=1 PYTHONPATH=. python extra/optimization/get_action_space.py
|
||||||
- name: Repo line count < 16000 lines
|
- name: Repo line count < 17000 lines
|
||||||
run: MAX_LINE_COUNT=16000 python sz.py
|
run: MAX_LINE_COUNT=17000 python sz.py
|
||||||
|
|
||||||
fuzzing:
|
fuzzing:
|
||||||
name: Fuzzing
|
name: Fuzzing
|
||||||
|
|||||||
1261
extra/onnx.py
1261
extra/onnx.py
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,6 @@
|
|||||||
from tinygrad import Tensor
|
from tinygrad import Tensor
|
||||||
from tinygrad.tensor import _to_np_dtype
|
from tinygrad.tensor import _to_np_dtype
|
||||||
from tinygrad.frontend.onnx import OnnxRunner
|
from tinygrad.frontend.onnx import OnnxRunner, OnnxValue
|
||||||
from extra.onnx import OnnxValue
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import onnxruntime as ort
|
import onnxruntime as ort
|
||||||
|
|
||||||
|
|||||||
3
test/external/external_test_onnx_runner.py
vendored
3
test/external/external_test_onnx_runner.py
vendored
@@ -3,8 +3,7 @@ import numpy as np
|
|||||||
from tinygrad import dtypes, Tensor
|
from tinygrad import dtypes, Tensor
|
||||||
from tinygrad.uop.ops import Ops
|
from tinygrad.uop.ops import Ops
|
||||||
from tinygrad.device import is_dtype_supported
|
from tinygrad.device import is_dtype_supported
|
||||||
from extra.onnx import OnnxDataType
|
from tinygrad.frontend.onnx import OnnxRunner, OnnxDataType
|
||||||
from tinygrad.frontend.onnx import OnnxRunner
|
|
||||||
from hypothesis import given, strategies as st
|
from hypothesis import given, strategies as st
|
||||||
|
|
||||||
# copied from test_const_folding.py
|
# copied from test_const_folding.py
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user