chenyu and GitHub
03943cd1a0
use more _uop for cleanup [PR] ( #16531 )
...
`t.uop if isinstance(t, Tensor) else t` -> `t._uop`
2026-06-07 17:41:36 -04:00
chenyu and GitHub
8a4203638a
make full with buffer=False deviceless ( #16483 )
...
affects arange and eye
2026-06-03 12:35:59 -04:00
chenyu and GitHub
945ed4f689
revert const unique changes ( #16395 )
2026-05-27 00:06:41 -04:00
chenyu and GitHub
0b88827482
remove CONST(UNIQUE) ( #16383 )
2026-05-26 14:45:22 -04:00
chenyu and GitHub
cdeb861828
invalids is empty [pr] ( #16353 )
2026-05-25 16:11:38 -04:00
chenyu and GitHub
5d5e02871f
remove Tensor.from_uop ( #16344 )
...
and no device for const in Tensor init
2026-05-24 18:53:09 -04:00
chenyu and GitHub
c1076ed56c
Tensor.device and UOp.device can be None ( #16255 )
2026-05-18 22:08:10 -04:00
chenyu and GitHub
218d6b8988
delete old UOp.size [pr] ( #15756 )
2026-04-15 23:21:00 -04:00
George Hotz and GitHub
ae7090b13b
print function timing with DEBUG=2 ( #15468 )
...
* add DEBUG=2 function timing
* remove those functions, they aren't useful
* fix spec
2026-03-25 19:07:32 +08:00
chenyu and GitHub
1abb6297f6
more Tensor(UOp) cleanups ( #15364 )
...
* more Tensor(UOp) cleanups
* function too
2026-03-19 03:34:30 -04:00
George Hotz and GitHub
6e196195d8
add test for flat llama ( #15327 )
...
* add test for flat llama
* simpler
* back to split w1/w3
* env
* still too much ram
* invalid
2026-03-18 15:16:33 +08:00
George Hotz and GitHub
6109117af1
anonymous buffers are Invalid ( #15336 )
...
* anonymous buffers are Invalid
* unique_const
* work
* remove invalid writes
* test_anonymous_buffers_in_function
2026-03-18 14:52:56 +08:00
George Hotz and GitHub
9d95321be3
set allow_implicit=False by default ( #15319 )
...
* set allow_implicit=False by default
* modernize beautiful mnist
2026-03-17 17:14:38 +08:00
George Hotz and GitHub
584ec75aa2
precompile backward ( #15311 )
...
* add precompile backward support
* cleanups
* fix
* compact grad
* split v not split
* simpler
* no NOOPT
2026-03-17 15:28:40 +08:00
George Hotz and GitHub
3ff03be413
call always has tuple ( #15297 )
...
* call always has tuple
* fix pre-commit and simplify
* update
* fix
* move that assert
* tuple
* fix multi
* cleanups
* fix merge
2026-03-17 10:58:46 +08:00
George Hotz and GitHub
476276f4b4
support grads on tuples ( #15287 )
...
* support grads on tuples
* simpler
* grad_fxn works
* cleanups
* unused
2026-03-16 17:39:34 +08:00
George Hotz and GitHub
2e1c81c23f
allow_implicit to disable implicit params ( #15291 )
...
* allow_implicit to disable implicit params
* get both Tensor and UOp
* no implicits in llm
2026-03-16 16:40:14 +08:00
chenyu and GitHub
a0d1444790
Tensor.assign is store+after [pr] ( #15288 )
...
* Tensor.assign is store+after [pr]
* put that back
2026-03-16 04:04:55 -04:00
George Hotz and GitHub
08662bc4ab
add TUPLE/GETTUPLE, simple tests pass ( #15286 )
...
* simple tuple stuff passes
* resolved
2026-03-16 15:06:02 +08:00
George Hotz and GitHub
fb43b415f9
fix symbolic shape call + chunked prefill ( #15149 )
...
* fix precompile for symbolic shape
* chunked prefill
* cleaner
* test that
2026-03-05 14:02:26 +08:00
George Hotz and GitHub
01ddb4c267
add precompile to call ( #15099 )
...
* add precompile to call
* put get back
* something
* after structure
* alt
* keep it call
* resolve call
* resolve linear call
* precompile works with llm
* revert rangeify
* color for debugging
* getenv PRECOMPILE
* clean up deco pattern
* fully recursive sink scheduling
* revert llama
* fix SPEC=2
2026-03-03 22:32:42 +08:00
George Hotz and GitHub
fe3ee8c27e
fix symbolic shapes in calls ( #15021 )
...
* fix symbolic shapes in calls
* fix after in the big graph
* real tests
2026-02-26 17:17:18 +08:00
George Hotz and GitHub
2655655a0c
call gradient creates a call ( #15020 )
...
* function creates a full subgraph
* tests
* fix var
* fix tests
* implict assign/contig
* move kv init
2026-02-26 14:15:29 +08:00
George Hotz and GitHub
0d35b67f2c
revert realize to only be buffers ( #15008 )
...
* revert realize to only be buffers
* fix that
* broken attention
* Revert "broken attention"
This reverts commit a23c3cd96c .
* and that
2026-02-25 22:43:06 +08:00
George Hotz and GitHub
68831cd852
add more tests to test_function ( #15003 )
...
* add more tests to test_function
* add function to llm
* function decorator on llm
* works
* symbolic fixups
* minimum change
* implicit inputs
* don't actually update llama yet
2026-02-25 18:42:06 +08:00
George Hotz and GitHub
e3fa9896b7
start function and add walk rewrite ( #14992 )
...
* start function and add walk rewrite
* work
* add function on feed_forward
* llm progress
* stuff
* none of that
2026-02-25 13:56:27 +08:00
George Hotz and GitHub
a6e496b195
remove Function class [pr] ( #8753 )
...
* remove Function class [pr]
* actually remove function
* fix docs
2025-01-26 18:58:02 +09:00
George Hotz and GitHub
1b4618e257
gradient cleanup ( #8750 )
...
* switch backward to use gradient [pr]
* set device correctly, dedup
* why does that fail?
* add noop cast
* simple backward
* fix beautiful_mnist
* touchups
* set in compute_gradient
* uop_count
* uop_count was wrong
* collections
* no note
* skip that test
* update sched kernel counts
* train mnist is 65
* fix metadata and gc
* fixes
* materialize_grads
* no pathlib stuff
* add contiguous_backward, fix bugs
* add some realize
* fix multi
* remove unused backward passes [pr]
* lower line count
2025-01-26 09:30:55 +09:00
George Hotz and GitHub
cb0978b377
add Ops.CONTIGUOUS_BACKWARD ( #8743 )
2025-01-25 07:28:43 +09:00
chenyu and GitHub
f3fdec940d
Tensor.mod ( #8458 )
...
it's a python style mod. possibily can be cleaner with a floor div
relaxed the vmin for MOD slightly for cstyle negatives mod, it's more correct and might fix other bugs
2024-12-31 11:31:42 -05:00
George Hotz and GitHub
82833f1b3c
a little more typing [pr] ( #8346 )
...
* a little more typing [pr]
* few more
2024-12-19 22:09:52 -08:00
George Hotz and GitHub
9c77e9f9b7
replace Tuple with tuple [pr] ( #8344 )
...
* replace Tuple with tuple [pr]
* replace List with list [pr]
* replace Dict with dict [pr]
* replace Set with set [pr]
2024-12-19 21:27:56 -08:00
chenyu and GitHub
b4bb8de7f4
remove Sigmoid from function.py [pr] ( #8318 )
2024-12-18 13:23:38 -05:00
George Hotz and GitHub
8a50868264
touchup function.py [pr] ( #8220 )
...
* touchup function.py [pr]
* remove ALLOWED_READ_IMAGE
* eh, keep it, just change it
2024-12-13 13:07:00 -08:00
George Hotz and GitHub
8a04a3a77a
rename LazyBuffer -> UOp [pr] ( #8169 )
...
* rename LazyBuffer -> UOp [pr]
* fix docs
2024-12-11 16:15:52 -08:00
chenyu and GitHub
39e0fc05f5
update function to not use gt/lt [pr] ( #8025 )
...
pr does not test this, but it's the same
2024-12-03 22:39:06 -05:00
qazal and GitHub
e84d089ef1
delete ReduceOps, only use REDUCE_AXIS ( #7667 )
2024-11-13 19:04:27 +08:00
George Hotz and GitHub
0c19b6298b
rename ops to have unique names ( #7522 )
2024-11-04 17:09:45 +08:00
George Hotz and GitHub
b647fa7514
rename MathTraits to maximum [pr] ( #7356 )
2024-10-29 16:43:04 +08:00
George Hotz and GitHub
3989bd2682
idiv + reciprocal [pr] ( #7354 )
...
* idiv + reciprocal
* remove upcast from div
* fix docs
2024-10-29 15:54:19 +08:00
chenyu and GitHub
13575f080a
remove bitcast backward in function.py ( #7031 )
...
bitcast cannot backward
2024-10-13 10:08:27 -04:00
chenyu and GitHub
23faeacb23
remove outdated comments ( #7018 )
2024-10-12 10:51:07 -04:00
George Hotz and GitHub
a71bb09ec3
remove symbolic file [pr] ( #7012 )
2024-10-12 18:44:44 +08:00
George Hotz and GitHub
f7f94cd62f
bitcast cleanup [pr] ( #6933 )
2024-10-07 19:16:16 +08:00
George Hotz and GitHub
4df5c7a4ef
move lazy to engine [pr] ( #6886 )
...
* move lazy to engine [pr]
* engine.lazy
2024-10-04 23:19:26 +08:00
George Hotz and GitHub
4b6732c4f6
safe changes for new symbolic [pr] ( #6864 )
2024-10-03 20:39:15 +08:00
George Hotz and GitHub
a28ed7ba4d
math trait [run_process_replay] ( #6364 )
...
* math trait [run_process_replay]
* const -> const_like
* Revert "const -> const_like"
This reverts commit 85727c83d3 .
* add MathTrait to LazyBuffer
* clean up function
* fixup the rest of function
* fix custom function
* mlb math trait
* fix that test
2024-09-05 16:19:17 +08:00
chenyu and GitHub
590c0922b6
Tensor.prod ( #6250 )
...
* Tensor.prod
a new reduce op!
* onnx ReduceProd
2024-08-23 10:06:32 -04:00
chenyu and GitHub
4d1b5781b5
remove UnaryOps.NEG from function.py ( #6187 )
...
* remove function.Neg
prep to remove UnaryOps.NEG
* replace all NEG in function.py
2024-08-19 17:39:15 -04:00
chenyu and GitHub
96d502d8b7
update function.Max backward ( #6190 )
...
instead of `(1-(x!=max))`, use `(x!=max)!=True`.
prep to remove Unary.NEG, also this can be instruction fused later more easily
2024-08-19 16:06:14 -04:00