Files
tinygrad/setup.py
qazal c704a77ca0 green dtypes ALU tests (#2617)
* dtypes alu test

* those types don't exist in torch

* floats

* more tests

* disable those

* a couple unary tests

* skip float16 tests in CI for GPU

* fix LLVM bool add True+True=1+1=2 which truncates to False in native LLVM

* remove hardcoded float for LLVM ALU fns

* less sensitive atol for fp32, 1e-10 is flaky and sometimes failed even if you revert the merge commit for non-fp32 math, nothing has changed in our kernels for fp32.

* return on overflows

* fix CUDA exp2

* compute results of op regardless of bounds in a python backend

* skip fp16 in GPU and CUDACPU

* fuzz a smaller range in the float_midcast_int32 test

I sampled this and we overflow ~70% of the time.
because numpy behaves differently on different devices for overflows and Metal seems to do the same, I'm opting to eliminate the non-determinism here

* remove CUDA exp2 overload it's already there now

---------

Co-authored-by: George Hotz <geohot@gmail.com>
2023-12-06 08:15:46 -08:00

58 lines
1.8 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()
setup(name='tinygrad',
version='0.8.0',
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.codegen', 'tinygrad.nn', 'tinygrad.renderer', 'tinygrad.runtime', 'tinygrad.shape', 'tinygrad.features'],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License"
],
install_requires=["numpy", "tqdm", "gpuctypes",
"pyobjc-framework-Metal; platform_system=='Darwin'",
"pyobjc-framework-libdispatch; platform_system=='Darwin'"],
python_requires='>=3.8',
extras_require={
'llvm': ["llvmlite"],
'arm': ["unicorn"],
'triton': ["triton-nightly>=2.1.0.dev20231014192330"],
'webgpu': ["wgpu>=v0.12.0"],
'linting': [
"pylint",
"mypy",
"typing-extensions",
"pre-commit",
"ruff",
"types-tqdm",
],
'testing': [
"torch",
"pillow",
"pytest",
"pytest-xdist",
"onnx==1.15.0",
"onnx2torch",
"opencv-python",
"tabulate",
"safetensors",
"transformers",
"sentencepiece",
"tiktoken",
"librosa",
"networkx",
"hypothesis",
]
},
include_package_data=True)