Commit Graph

5595 Commits

Author SHA1 Message Date
chenyu
de773b593e remove redundant div gcd patterns [run_process_replay] (#6076)
covered by generic div_folding
2024-08-14 13:18:28 -04:00
samm393
2dc586ffe5 Shape change bitcast for more dtypes (#6047)
* bitcast & tests

* use to_dtype

* put disk tensor tests back

* tests

* bitmask

* no bitmask

---------

Co-authored-by: George Hotz <72895+geohot@users.noreply.github.com>
2024-08-14 10:03:34 -07:00
qazal
83a2543c74 spec for in order LOAD/STORE indexing (#6073)
* test_unaligns_idxs

* spec for in order LOAD/STORE indexing

* test UOps.SPECIAL

* check for supports_float4
2024-08-14 19:18:00 +03:00
chenyu
5048f9a4d5 test linearizer failure 49 (#6074)
with UOP_IS_SYMBOLIC=1, on METAL it breaks store fusion and have A+B and B+A being two different UOp
2024-08-14 11:29:10 -04:00
qazal
30035df5a4 add metal process replay back (#6068)
test this new one
2024-08-14 12:29:56 +03:00
wozeparrot
518c022c29 feat: tag 0.9.2 (#6067) v0.9.2 2024-08-13 16:15:36 -07:00
George Hotz
97c3563109 hotfix: clamp in docs 2024-08-13 16:06:30 -07:00
George Hotz
e039b2a920 add Tensor.clamp and fix bool loading (#6069) 2024-08-13 15:26:40 -07:00
chenyu
1782e4f64d use div folding to do lt folding (#6065) 2024-08-13 16:59:05 -04:00
chenyu
e3af273fa1 touchup cl_errors (#6058)
* touchup cl_errors

* update test
2024-08-13 13:06:59 -04:00
qazal
9145ad52ff revert UOps eq, this needs to be isolated in realize.py (#6063)
This reverts commit dccca7f227.
2024-08-13 18:02:34 +03:00
nimlgen
fa84e6ec48 init hcq args state (#6046)
* init hcq args state

* cleaner

* amd

* fillargs

* fixes

* myoy

* docs

* fix

* not needed

* spacing
2024-08-13 17:11:58 +03:00
qazal
9d2ea94fe9 temp: disable process replay on metal (#6062) 2024-08-13 16:31:55 +03:00
andredaprato
18192079a9 Apply transcendental rewrite rules only if required by backend (#6061)
* Apply transcendental folding for missing ops

* Remove comments

* Remove Final type
2024-08-12 22:38:45 -07:00
Tobias Fischer
6e3eb50fd1 added fix and reg tests (#6060) 2024-08-12 21:00:48 -04:00
chenyu
45bd667a78 rewrite pyint after first rewrite [run_process_replay] (#6059) 2024-08-12 19:18:13 -04:00
qazal
2ac80576e4 remove BufferOps from log_lazybuffer (#6057)
this is fine because lazy.py doesn't create BufferOps.
2024-08-13 02:06:47 +03:00
qazal
dccca7f227 test: uop and lazyop have the same compare (#6053)
* test: uop and lazyop have the same compare

* typings

* self.assert_equiv_uops -> assertEqual

* hash dtype

* test nop too

* TestPatternMatcher never used this compare anyway

* nop eq and ne tests
2024-08-13 00:33:19 +03:00
qazal
8c501272f3 proposal: MetaOps.EXT (#6054)
`MetaOps.CUSTOM, MetaOps.COPY, MetaOps.EMPTY, MetaOps.VIEW` don't fit into any of our existing UOps.

MetaOps.KERNEL and MetaOps.EXT can be the two paths in realize.py

after AST is UOp:
MetaOps.KERNEL -> UOps.SINK
MetaOps.EXT -> UOps.EXT
2024-08-13 00:29:29 +03:00
wozeparrot
059cf2a90d feat: autogen from kernel register offset headers (#6056) 2024-08-12 14:08:35 -07:00
chenyu
3f2d24a6ec test_failure_48 for wrong truncation in idx on NV (#6055)
also added `RAWAST` to print pre-modified AST in DEBUG=3
2024-08-12 16:17:42 -04:00
chenyu
6ed9711898 UOps pattern (x%c)+(x//c)*c = x (#6051)
pretty cool that this is very easy to write now
2024-08-12 14:58:48 -04:00
qazal
71c5901fc1 refactor ast arg and op [compare_schedule] (#6052) 2024-08-12 21:51:00 +03:00
wozeparrot
dc2617bffd feat: use more correct reg for local dims (#6048) 2024-08-12 11:15:37 -07:00
qazal
529832d223 refactor ast creation [compare_schedule] (#6050)
* refactor scheduler lazyop creation [compare_schedule]

* helpful prints

* this will become the default
2024-08-12 21:15:11 +03:00
nimlgen
8f787785d9 fix openpilot benchmark (#6049) 2024-08-12 21:12:32 +03:00
ignaciosica
777d6b3349 Fix compile error for max with inline const (#5840) 2024-08-12 23:40:39 +08:00
nimlgen
e9024c691f metal raise when command queue is not created (#6044)
* metal raise when command queue is not created

* dont do that
2024-08-12 18:30:37 +03:00
ignaciosica
164ca5632e split tensor core tests (#6041) 2024-08-12 09:42:02 -04:00
chenyu
7ce716b3a0 bigint -> pyint [run_process_replay] (#6040)
it's a python int. priority should be  higher than bool, but we are not using it in type promo now.
2024-08-12 09:12:23 -04:00
qazal
059dd35985 minor UOps.RANGE ordering cleanup [run_process_replay] (#6039)
* range srcs has an extra phi filter

* inline comments _tend_ to be harder to read
2024-08-12 15:33:26 +03:00
Timmy
a00994b423 Lowerer Multireduce Uopgraph (#6007)
* uopgraph changes

* fixing for non-reducing ranges

* multireduce tests

* linters

* linters

* removing comments

* removing arg[1]

* linters

* prettier

* linters

* more linters

* use any instead of intersection
2024-08-12 15:16:07 +03:00
qazal
bb653fa0a5 use dict for UOp parents (#6036) 2024-08-12 15:06:45 +03:00
qazal
7d1f118731 use assertIs in test_schedule (#6035)
* use self.assertIs in test_schedule

* test_lazybuffer
2024-08-11 19:19:18 +03:00
qazal
b918e3c255 cache assert_equiv_uops (#6033) 2024-08-11 12:17:05 +03:00
George Hotz
8d108f65a4 add cast to TC=2 (#6032) 2024-08-10 18:47:12 -07:00
George Hotz
14b613e281 add STEPS to beautiful_mnist 2024-08-10 15:23:44 -07:00
George Hotz
1b3443902c don't use tgmath with clang (#6029)
* don't use tgmath with clang

* fix tests

* nostdlib for clang

* needs ffreestanding on OSX
2024-08-10 13:58:19 -07:00
gswangg
e05a1d6113 string -> fstring (#6028) 2024-08-10 13:28:31 -07:00
chenyu
5820940d98 more relax rtol for test_arange_fuse_grouped_children (#6027)
one more https://github.com/chenyuxyz/tinygrad/actions/runs/10334072657/job/28607120462
2024-08-10 16:10:03 -04:00
chenyu
d82370f6ef docs: fix broken links and update is_floating_point (#6023)
* docs: fix broken links and update is_floating_point

broken links would only show as INFO and not an error.

* make doc andhors warn
2024-08-10 15:58:48 -04:00
gswangg
d58ae17771 Cleanup cstlye render_const [run_process_replay] (#6024)
* simplify render_const since CONST is always scalar

* assert dtype is scalar in render_const
2024-08-10 12:58:02 -07:00
chenyu
10374a2741 relax rtol for test_arange_fuse_grouped_children (#6026)
flaky https://github.com/tinygrad/tinygrad/actions/runs/10333939631/job/28606831006?pr=6023
2024-08-10 15:49:11 -04:00
George Hotz
cf7d3c1eb8 fix tests locally on metal (#6025)
* remove contiguous child, it was breaking tests locally

* hmm, it's still needed

* include NOOPT in method cache key
2024-08-10 12:36:22 -07:00
chenyu
e6c7c3e499 update pylint path to check indent/space for all (#6022)
also fixed many errors. it was not checking nested dirs. exclude autogen for now.

can we use ruff for this?
2024-08-10 14:41:09 -04:00
George Hotz
cfb04c67d1 run unit tests separate from others (and only once) (#6020)
* run unit tests separate from others

* ignore unit tests elsewhere
2024-08-10 11:17:56 -07:00
George Hotz
8302dd6ea4 remove noqa: E501 from transcendental 2024-08-10 10:30:05 -07:00
chenyu
350276e947 simpler device_from_env [run_process_replay] (#6015)
* simpler device_from_env [run_process_replay]

fixed type ignore too

* combine
2024-08-10 13:17:46 -04:00
uuuvn
ee3b015407 ELF loader strtab fix and tests (#6011)
* ELF loader strtab fix and tests

* ruff

* typos

* only one test
2024-08-10 10:13:16 -07:00
Jun Zhang
54e176fb4f Ignore non-computational backends when overwriting the default (#5770) 2024-08-10 09:23:29 -07:00