Commit graph

6,397 commits

Author SHA1 Message Date
chenyu
ea2efbf508
Add Opt(op=OptOps.LOCAL, axis=6, amt=2) to actions (#7147)
* Add Opt(op=OptOps.LOCAL, axis=6, amt=2) to actions

it's missing if we rebuild all kernels, not just the first 2k.

```
PYTHONPATH="." GPU=1 python3 extra/optimization/get_action_space.py
 29%|█████████████████████████████████████▋                                                                                            | 3682/12701 [01:42<04:11, 35.83it/s]Traceback (most recent call last):
  File "/Users/chenyu/code/tinygrad/extra/optimization/get_action_space.py", line 27, in <module>
    test_rebuild(lin)
  File "/Users/chenyu/code/tinygrad/extra/optimization/get_action_space.py", line 11, in test_rebuild
    assert o in actions, f"{o} is not in actions"
           ^^^^^^^^^^^^
AssertionError: Opt(op=OptOps.LOCAL, axis=6, amt=2) is not in actions
```

* break
2024-10-18 09:03:24 -04:00
qazal
4cf7cca91a
delete fuzz_schedule [pr] (#7144) 2024-10-18 15:09:39 +03:00
Bhavya Gada
b7b2017cb9
only ignore warnings not errors (#7146) 2024-10-18 07:41:11 -04:00
ignaciosica
8bcdd7c97d
Refactor AMD pm rules to remove handwritten bf16 bool alus (#7136)
* refactor pm rules

- remove unused handwritten methods
- refactor amd pm rules to fix bug with bool alu

* add bf16 bool alu tests

* add bf16 tests

* hotfix: make atol consistent
2024-10-18 09:00:46 +08:00
Bhavya Gada
534597e753
fix all test warnings (#7024)
* fix pytorch warning in nn.conv2d for same padding

* fix future warning in torch load

* fix overflow warning in tensor list test: https://github.com/numpy/numpy/issues/23606#issuecomment-1512752172

* fix floating point warnings in dtype tests using docs https://numpy.org/doc/stable/reference/generated/numpy.errstate.html and a neat solution https://stackoverflow.com/questions/53634965/change-np-seterr-behavior-inside-a-function-only

* put err state in one place; comment taken care of by function hover

* enter np errstate context manager on test setup

* put decorator on class
2024-10-18 08:56:40 +08:00
chenyu
0cd4b93441
remove CStyleLanguage from test_uop_symbolic (#7142) 2024-10-17 19:39:34 -04:00
chenyu
72ed66205d
enable test_resnet_half (#7141)
already worked so just fixed the test
2024-10-17 19:02:20 -04:00
nimlgen
211d9753f8
nv more lc checks (#7139)
* nv more lc checks

* revert

* linter
2024-10-18 00:21:53 +03:00
chenyu
12ff52b88b
test_failure_52 fails on real METAL (#7138) 2024-10-17 15:37:28 -04:00
chenyu
84e98900e8
test linearizer failure 53 (#7137)
variable scope issue caused compile error
2024-10-17 15:23:43 -04:00
qazal
a64e5d0430
graph rewrite all metaops (#7134) 2024-10-17 18:49:20 +03:00
nimlgen
45db7d9045
fuzz qcom vs opencl (#7130)
* fuzz qcom vs opencl

* fix nv

* bettre?

* typo

* open both devs
2024-10-17 18:49:08 +03:00
qazal
188eef959d
early rewrite UOps.CONTIGUOUS (#7132)
* early rewrite UOps.CONTIGUOUS

* add metaops too

* just the contig diff
2024-10-17 18:35:19 +03:00
chenyu
287a198c4f
increase test_strongly_connected_DAG threshold (#7131)
flaky
2024-10-17 11:08:50 -04:00
George Hotz
c23ef7e2f8
real_remove_const (#7128) 2024-10-17 21:58:41 +08:00
qazal
2087abc999
get membufs with dedup [pr] (#7127) 2024-10-17 16:06:06 +03:00
George Hotz
be9a433a60
fix a bug in flops counting + touchups [pr] (#7126) 2024-10-17 21:02:11 +08:00
qazal
a2eefa6f97
move assign st override to upat (#7122)
* move assign st override to upat

* merge view
2024-10-17 13:33:37 +03:00
George Hotz
ded1b38b84
minor dtype cleanup [pr] (#7124)
* minor dtype cleanup [pr]

* use ptr() function
2024-10-17 17:41:23 +08:00
George Hotz
0b2621f63f
improve render_dtype [pr] (#7117)
* improve render_dtype [pr]

* don't deref in index
2024-10-17 14:50:40 +08:00
George Hotz
ca0dca35f7
move ptx renderer [pr] (#7118) 2024-10-17 14:50:32 +08:00
George Hotz
d990a16326
fix tests to use render (#7116) 2024-10-17 14:35:22 +08:00
George Hotz
9f4ca88218 hotfix: relax target pct for beautiful_mnist 2024-10-17 12:36:07 +08:00
chenyu
51cd0e7c0d
idx_given_valid -> uop_given_valid [pr] (#7110)
will reuse this to simplify valid independent of idx
2024-10-16 18:16:36 -04:00
chenyu
842fe444df
test case for valid only simplification (#7108) 2024-10-16 16:40:46 -04:00
chenyu
9d109c5382
remove outdated symbolic comments (#7105) 2024-10-16 14:51:59 -04:00
Francis Lata
90eff347e2
tinytqdm write support (#6359)
* add write support

* add test

* update test case to compare write outputs

* assert final write output

* flush when using write

* update write logic

* Revert "update write logic"

This reverts commit 5e0e611b46.

---------

Co-authored-by: chenyu <chenyu@fastmail.com>
2024-10-16 14:51:41 -04:00
nimlgen
d1094fce5e
amd reports on hang (#7101) 2024-10-16 21:32:44 +03:00
nimlgen
39ab67e9ef
beam capture and replay in fuzz (#7099)
* beam capture and reply in fuzz

* clean a bit
2024-10-16 20:26:58 +03:00
George Hotz
eac58eaaba
no SIGALRM on windows [pr] (#7104) 2024-10-17 00:21:04 +08:00
qazal
9d5342976e
skip TestSetitem.test_setitem_inplace_operator (#7103) 2024-10-16 18:59:08 +03:00
nimlgen
83e7dbd89e
nv fix reallocation local memory when oom (#7098) 2024-10-16 18:17:50 +03:00
George Hotz
cd61e81f55
beautiful mnist works on windows (#7100)
* beautiful mnist works on windows [pr]

* add comment for that (no pr)
2024-10-16 23:00:05 +08:00
qazal
fc306ba89d
simple to_uop [pr] (#7096)
* simple to_uop [pr]

* fix metadata
2024-10-16 15:52:11 +03:00
qazal
568a4b5d92
viz touchups [pr] (#7095)
* viz touchups [pr]

* check if port busy

* url
2024-10-16 15:14:47 +03:00
qazal
6172b42140
all views are UOps.VIEW [pr] (#7090)
* all views are UOps.VIEW

* is it you

* don't recreate st uop [pr]

* first rewrite all elementwise
2024-10-16 13:46:33 +03:00
qazal
6acda43a2c
test a rewrite of permuted reduce [pr] (#7093)
* test a rewrite of permuted reduce [pr]

* addd rewrite tracker

* expected

* passes
2024-10-16 12:49:54 +03:00
qazal
56fbd408a1
viz print the sink tree as it's rewritten [pr] (#7094) 2024-10-16 11:38:27 +03:00
qazal
aadc95c2b0
don't recreate st uop [pr] (#7092) 2024-10-16 08:43:19 +03:00
qazal
9c9c241e58
track et in viz [pr] (#7088) 2024-10-16 07:53:08 +03:00
qazal
40f33c110b
big graph var_vals as rewrite context (#7007)
* var_vals as rewrite context

* no default arg

* add st var_vals

* delete some stuff

* add the rewrite rule again

* extra

* this whole part is preschedule

* test with a second context

* redo

* i always forget tensor variable
2024-10-16 07:31:44 +03:00
qazal
390171d686
delete SAVE_SCHEDULE=1 [pr] (#7087) 2024-10-16 07:13:20 +03:00
George Hotz
3169cb386d
remove graph [pr] (#7085) 2024-10-16 11:40:07 +08:00
qazal
53586eac56
late assert post permuted assign [pr] (#7084)
* late assert post permuted assign [pr]

* a lil earlier
2024-10-16 06:26:04 +03:00
George Hotz
023b77cc6e
move MultiGraphRunner logic to GraphRunner [pr] (#7083)
* move MultiGraphRunner logic to GraphRunner [pr]

* _access_resources
2024-10-16 11:04:30 +08:00
qazal
207fbc4bc7
cleanup view on reduce [pr] (#7081) 2024-10-16 05:22:52 +03:00
qazal
067b35e915
add UOp.r [pr] (#7080) 2024-10-16 05:06:02 +03:00
George Hotz
26df50cf43
move memory_planner to memory.py [pr] (#7079) 2024-10-16 10:04:35 +08:00
qazal
bddba5897a
generic elementwise view rewrite rule + merge_views (#7078)
* generic elementwise view rewrite rule + merge_views [pr]

* no pr, views merge
2024-10-16 04:36:21 +03:00
qazal
fb29de6cc3
split schedule to view_left and view_right [pr] (#7077)
* split schedule to view_left and view_right [pr]

* move valid
2024-10-16 03:39:38 +03:00