geohotstan
423d823c50
add GatherND and ScatterND to onnx ops ( #8241 )
...
* implemented
* this implementation is now correct
* this is fine I guess
* better variable names
* finally correct gathernd
* add a note
* eh just leave it at this for now
* teeny adjustment
2024-12-19 00:35:04 -05:00
George Hotz
6608ba316d
add size of the buffer to the ptr dtype ( #8322 )
2024-12-18 12:46:35 -08:00
George Hotz
52243b258c
move flops_mem to renderer [pr] ( #8320 )
2024-12-18 12:13:17 -08:00
George Hotz
8f95b578f6
use Estimates class [pr] ( #8319 )
...
* use Estimates class [pr]
* frozen dataclass
2024-12-18 10:19:32 -08:00
George Hotz
bd9c015b09
tests from grad uop path [pr] ( #8313 )
2024-12-18 09:25:05 -08:00
qazal
fddaeb6344
scheduler deduping spec and asserts [pr] ( #8307 )
...
Co-authored-by: George Hotz <72895+geohot@users.noreply.github.com >
2024-12-18 09:21:41 -08:00
qazal
69eb55a529
bugfix: dtype mismatch in TestAssign.test_double_assign_alt [pr] ( #8310 )
2024-12-18 22:29:07 +08:00
George Hotz
32df46cd73
test const pattern [pr] ( #8304 )
...
* test const pattern [pr]
* add model to test_tiny
2024-12-17 23:34:17 -08:00
Jyotirmaya Mahanta
45f2fb82d5
add failing tests for merge views ( #8306 )
...
* add failing tests for merge views
* assert is not none
* make linter happy
2024-12-18 01:27:38 -05:00
George Hotz
801e199196
change buffer to not be pointer [pr] ( #8302 )
2024-12-17 16:47:51 -08:00
qazal
673a76398a
fix viz with untracked graph_rewrite calls ( #8298 )
...
* fix viz with untracked graph_rewrite calls
* mark as green
2024-12-17 23:37:53 +02:00
qazal
5977a3d8a6
regression test viz failure when there's no tracked context ( #8297 )
...
* regression test viz failure when there's no tracked context
* test inner rewrite locations, keep notes
2024-12-17 23:23:27 +02:00
nimlgen
777d2aec05
metal profiler + cpu_profile ( #8291 )
...
* metal + cpu_profile
* gpt example
* linter + revert gpt2 for now
* a bit of readme
* linter
* unrelated
* tests
* linter
* b
2024-12-18 00:06:56 +03:00
nimlgen
af87e4b53c
viz profiler ( #8287 )
...
* only hcq
* fix get_metadata
* linter
* oops
* tiny
* linter
* time
* print pm
* hmm
* nits
2024-12-17 20:00:53 +03:00
George Hotz
0794af97db
consts do not realize
2024-12-17 08:53:53 -08:00
George Hotz
4764a4c172
Revert "TIP 3 - Tensor realization spec tests ( #8288 )" ( #8289 )
...
This reverts commit c0d4346b5a .
2024-12-17 08:36:11 -08:00
qazal
c0d4346b5a
TIP 3 - Tensor realization spec tests ( #8288 )
2024-12-18 00:04:50 +08:00
qazal
f16188b8c0
viz simplify tracked rewrites [pr] ( #8285 )
2024-12-17 23:18:08 +08:00
qazal
fd23738d9d
start viz better typing, unsupport bottom_up=True [pr] ( #8284 )
...
* start viz refactor
* delete bottom_up tracking
* more cleanup
* early continue
2024-12-17 19:52:30 +08:00
George Hotz
e3731766c9
add a test for UOp representation as Tensor [pr] ( #8278 )
2024-12-16 19:41:29 -08:00
chenyu
3195bd0d12
more test examples to merge views [pr] ( #8277 )
...
these have masks in self and masks in the merged views
2024-12-16 20:44:35 -05:00
chenyu
6e2e56c0ff
unit test for view add when self has a mask [pr] ( #8276 )
2024-12-16 20:07:35 -05:00
chenyu
2bb298f38d
add a missing unittest.main() [pr] ( #8274 )
2024-12-16 14:28:10 -05:00
chenyu
f05fd118a2
few minor code cleanups [pr] ( #8267 )
2024-12-15 23:44:51 -05:00
chenyu
9789a83064
hotfix DEBUG in speed_v_theoretical.py conv ( #8266 )
...
infinite loop with manual DEBUG set `DEBUG=2 python test/external/speed_v_theoretical.py -k conv`
```
File "/Users/chenyu/code/tinygrad/tinygrad/helpers.py", line 95, in __ge__
def __ge__(self, x): return self.value >= x
^^^^^^^^^^^^^^^
[Previous line repeated 4984 more times]
RecursionError: maximum recursion depth exceeded in comparison
```
2024-12-15 19:44:45 -05:00
uuuvn
da2245a458
Fix double => half cast on clang ( #8265 )
2024-12-15 11:24:05 -08:00
qazal
1d21651823
free toposort cache after it goes out of scope [pr] ( #8264 )
2024-12-15 19:50:42 +02:00
qazal
e1518f1e38
minimal failing test for UOp.toposort gc [pr] ( #8261 )
2024-12-15 19:30:56 +02:00
qazal
67e66ac1ab
hotfix: schedule_uop in process replay ( #8260 )
...
* hotfix: schedule_uop in process replay
* notes
2024-12-15 21:24:54 +08:00
qazal
d05e21cb69
replace lazy srcs with the new uop api [pr] ( #8255 )
...
* buf_uop_view function
* srcs shouldn't exist
* fix TestTensorMetadata
---------
Co-authored-by: George Hotz <geohot@gmail.com >
2024-12-15 17:09:54 +08:00
chenyu
4c1733440d
failed test case for stable sigmoid ( #8245 )
...
it should also work if implemented differently
2024-12-14 15:19:41 -05:00
chenyu
3eb952f537
fix some sigmoid extreme ( #8238 )
...
* fix some sigmoid extreme
quite brittle... the problem is it has 3 terms and mul might have bad order
* test_tanh_extreme
* just sigmoid gradient
2024-12-14 14:37:06 -05:00
George Hotz
bcd7ea60f0
hotfix: a few more grad tests
2024-12-13 21:03:02 -08:00
George Hotz
734f2c5344
compute gradient [pr] ( #8237 )
...
* compute gradient [pr]
* schedule_step_with_grads
* second deriv works
2024-12-13 20:46:01 -08:00
chenyu
0708a169dd
more comments and tests to reshape [pr] ( #8236 )
2024-12-13 23:21:51 -05:00
George Hotz
8396d90f91
non controversial changes from optim branch [pr] ( #8234 )
2024-12-13 19:24:16 -08:00
George Hotz
37fa38d272
Revert "switch beautiful_mnist to use new optimizer [pr] ( #8231 )" ( #8233 )
...
This reverts commit e9ee39df22 .
2024-12-13 19:07:09 -08:00
George Hotz
e9ee39df22
switch beautiful_mnist to use new optimizer [pr] ( #8231 )
...
* switch beautiful_mnist to use new optimizer [pr]
* fix abstractions3 + docs
* fix OptimizerGroup with schedule_step api
2024-12-13 18:27:16 -08:00
chenyu
e0956c518c
move some ifs from merge_dims to reshape [pr] ( #8229 )
...
the third return value is only used in reshape
2024-12-13 19:56:15 -05:00
George Hotz
e2f87ecf36
start work on new gradient ( #7838 )
...
* start work on new gradient
* more correct
* working tests
* more tests
* work
* add (faliing) gradient test
* add view and reduce gradient
* test_add works, many failing test_ops
* add max and reduce max
* add max and reduce max
* 129 failing
* 108 failed
* better view drawing
* 101 failed
* i got 99 failures
* 94 failures
* it's tons of terrible code, but only 50 tests fail
* only 19 failures
* same 19 but shorter
* minimal doesn't matter
* shorter
* lil simpler
* simpler
* simpler
* simpler
* 13 test failures
* nine tests fail
* all ops tests pass
* add contiguous gradient + fix sched tests
* faster by removing toposort calls
* missed one
* add jax to testing
2024-12-13 16:45:53 -08:00
chenyu
e371a23c45
more comments and tests to reshape [pr] ( #8228 )
2024-12-13 18:50:13 -05:00
George Hotz
6d83a96440
retry: use movement ops [pr] ( #8225 )
...
* Revert "Revert "use movement ops [pr] (#8222 )" (#8224 )"
This reverts commit da19c37f0a .
* fix cast before view
2024-12-13 15:14:26 -08:00
George Hotz
4679f9fb44
add detach to graph [pr] ( #8221 )
...
* add detach to graph [pr]
* accept failure
2024-12-13 14:21:32 -08:00
chenyu
62e19649c0
lower test_conv_3x3_256_32_32_256_256 ( #8226 )
...
tiny7 is slow
2024-12-13 17:15:53 -05:00
George Hotz
da19c37f0a
Revert "use movement ops [pr] ( #8222 )" ( #8224 )
...
This reverts commit 0d26c970ba .
2024-12-13 14:10:47 -08:00
George Hotz
0d26c970ba
use movement ops [pr] ( #8222 )
...
* use movement ops [pr]
* test indexing
2024-12-13 14:06:01 -08:00
chenyu
eb0e5a14fd
reorder and comments to reshape [pr] ( #8223 )
...
something feels wrong... contructing a counter example next
2024-12-13 17:02:27 -05:00
pkotzbach
c1b79c118f
add unit tests for to_dtype ( #8217 )
...
* add unit test for to_dtype
* add unit test for to_dtype
---------
Co-authored-by: pkotzbach <pawkotz@gmail.com >
2024-12-13 16:21:02 -05:00
George Hotz
dbe549e462
rename expand to unroll [pr] ( #8218 )
2024-12-13 11:41:52 -08:00
qazal
5864627abe
process replay filter warnings [pr] ( #8199 )
2024-12-13 17:43:43 +08:00