Files
tinygrad/setup.py
geohotstan f0b24d230c add test_onnx_ops.py (#8569)
* boom

* fix webgpu

* use exact variable names in test so that AI can read easier

* add tag for specific test name like test a specific dtype

* fix ruff

* astype everything

* dtype in array creation

* just arange

* is 67% considered fixed?

* move test up

* small cleanups

* share function

* add qgemm as well

* add qgemm too

* make sure qgemm comes out as int

* take out qgemm for now

* fixed test

* add correct qgemm

* addressing feedback here too, early naive fix for now

* simplify bias and c to be minimalistic enough to test correctness

* refactored qlinearops

* maybe these asserts aren't the best..

* fix test

* updated tests to cover new ops

* try to add to CI

* move test_onnx_ops into testextra/

* more attention tests

* qlinear_add atol=1

* attention still not fullllllly correct

* it is what it is

---------

Co-authored-by: chenyu <chenyu@fastmail.com>
2025-02-24 16:15:22 -05:00

88 lines
2.6 KiB
Python

#!/usr/bin/env python3
from pathlib import Path
from setuptools import setup
directory = Path(__file__).resolve().parent
with open(directory / 'README.md', encoding='utf-8') as f:
long_description = f.read()
testing_minimal = [
"numpy",
"torch",
"pytest",
"pytest-xdist",
"hypothesis",
]
setup(name='tinygrad',
version='0.10.2',
description='You like pytorch? You like micrograd? You love tinygrad! <3',
author='George Hotz',
license='MIT',
long_description=long_description,
long_description_content_type='text/markdown',
packages = ['tinygrad', 'tinygrad.runtime.autogen', 'tinygrad.runtime.autogen.am', 'tinygrad.codegen', 'tinygrad.nn',
'tinygrad.renderer', 'tinygrad.engine', 'tinygrad.viz', 'tinygrad.runtime', 'tinygrad.runtime.support',
'tinygrad.runtime.support.am', 'tinygrad.runtime.graph', 'tinygrad.shape'],
package_data = {'tinygrad': ['py.typed'], 'tinygrad.viz': ['index.html', 'perfetto.html', 'assets/**/*', 'lib/**/*']},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License"
],
install_requires=[],
python_requires='>=3.10',
extras_require={
'arm': ["unicorn"],
'triton': ["triton-nightly>=2.1.0.dev20231014192330"],
'linting': [
"pylint",
"mypy==1.13.0",
"typing-extensions",
"pre-commit",
"ruff",
"types-tqdm",
],
#'mlperf': ["mlperf-logging @ git+https://github.com/mlperf/logging.git@4.1.0-rc3"],
'testing_minimal': testing_minimal,
'testing_unit': testing_minimal + [
"tqdm",
"safetensors",
"tabulate" # for sz.py
],
'testing': testing_minimal + [
"pillow",
"onnx==1.16.0",
"onnx2torch",
"onnxruntime",
"opencv-python",
"tabulate",
"tqdm",
"safetensors",
"transformers",
"sentencepiece",
"tiktoken",
"blobfile",
"librosa",
"networkx",
"nibabel",
"bottle",
"ggml-python",
"capstone"
],
'docs': [
"mkdocs",
"mkdocs-material",
"mkdocstrings[python]",
"markdown-callouts",
"markdown-exec[ansi]",
"black",
"numpy",
],
'testing_tf': [
"tensorflow==2.15.1",
"tensorflow_addons",
],
},
include_package_data=True)