tinygrad/examples
George Hotz 55d3a5def9
preallocate all realized buffers (#14823)
* preallocate all realized buffers

* contiguous

* work

* comment that out

* move to schedule

* better

* correct fix

* just buffer

* disk bufs

* fixes disk tensor stuff

* fix symbolic stuff

* fix multi

* 162 failures

* bugfixes

* don't check that anymore

* fix schedule tests

* mnist should be contiguious

* type and buffer

* fix tests

* shrink axis correction

* mypy fixes

* tests skips

* same 37 failures

* dedup

* no shrink in the graph

* 29 failures

* skips

* fix custom kernel

* fix training

* those optimizations aren't supported currently

* simpler

* more correct

* tests

* 14 failures

* works

* fix that test

* broken

* 11 failures

* only kernel counts left

* fixes

* all tests pass

* remove tensor_map

* op test

* 200 -> 230

* test fixes

* fixes

* revert test_tiny thing

* guard

* revert that

* test tiny passes

* no contigs there

* base realize back

* Revert "no contigs there"

This reverts commit c45bb9fcfd.

* revert that

* chop many assigns

* 12 failures

* fix tests

* tests

* apply after

* pre-commit

* remove old code

* delete that

* fix types

* remove extra contig

* fix dataloader

* torch fix

* disk fix

* update kernel fusion numbres

* runs on amd

* restore kernel count

* add that rule back

* that

* disable that

* wrong

* add the correct rule for that folding

* more tests

* guard c1.arg

* no newlines

* realize those

* split into a different file

* remove detach/contig back

* skip 2

* update that
2026-02-20 20:05:54 +08:00
..
conversation_data Whisper + LLAMA + VITS (#2332) 2023-12-02 15:03:46 -08:00
llm.c clean up unused imports in examples and update CI linting (#11024) 2025-06-30 08:21:27 -07:00
mlperf preallocate all realized buffers (#14823) 2026-02-20 20:05:54 +08:00
openpilot JIT_BATCH_SIZE=0 in compile3 (#13245) 2025-11-12 23:12:45 -05:00
other_mnist cleanup stale examples/extra (#13764) 2025-12-19 16:27:37 -04:00
tinychat Buffer.as_buffer -> Buffer.as_memoryview [pr] (#14535) 2026-02-04 11:31:11 -05:00
tools cleanup stale examples/extra (#13764) 2025-12-19 16:27:37 -04:00
vgg7_helpers leakyrelu to leaky_relu (#9270) 2025-02-26 13:22:08 -05:00
webgpu fix sd-example dtype for CLIP embeddings (#14397) 2026-01-28 09:07:19 -05:00
__init__.py failing llama test 2023-03-11 16:28:10 -08:00
anthropic_challenge.py rename all DEFINE_GLOBAL to PARAM (#14511) 2026-02-03 15:09:38 +08:00
audio_helpers.py Whisper audio helpers (mel filters in tinygrad) (#13478) 2026-01-20 10:50:02 -05:00
beautiful_cartpole.py remove Tensor.no_grad, it's meaningless now [pr] (#10556) 2025-05-28 22:20:02 -07:00
beautiful_cifar.py remove FUSE_ARANGE (#12511) 2025-10-08 04:54:07 -04:00
beautiful_mnist.py add SGD to beautiful_mnist (#13571) 2025-12-04 12:17:29 -05:00
beautiful_mnist_multigpu.py Fix mypy examples/beautiful_*.py (#6978) 2024-10-10 11:34:29 -04:00
benchmark_onnx.py move frontend dir to nn [pr] (#12470) 2025-10-07 10:42:22 +08:00
compile_efficientnet.py CLANG -> CPU (#9189) 2025-02-20 18:03:09 -05:00
compile_tensorflow.py move frontend dir to nn [pr] (#12470) 2025-10-07 10:42:22 +08:00
gpt2.py fix gpt2 with benchmark (#12736) 2025-10-16 09:55:20 -04:00
gradaccum_mnist.py update examples/gradaccum_mnist.py to use the JIT 2025-12-03 16:11:42 -08:00
hlb_cifar10.py delete uneven shard tests and mentions (#14867) 2026-02-18 14:10:33 -05:00
llama.py replace hardcoded GPU in llama debug msg (#12102) 2025-09-10 13:56:40 -04:00
llama3.py move tiktoken import in llama3 (#13316) 2025-11-17 14:09:37 -05:00
mamba.py added top k sampling to examples/mamba (#12061) 2025-09-14 15:27:34 -04:00
minrf.py remove Tensor.no_grad, it's meaningless now [pr] (#10556) 2025-05-28 22:20:02 -07:00
mixtral.py Subtract 1 from Variable upper bound (#10715) 2025-06-09 09:25:53 -07:00
mnist_gan.py leakyrelu to leaky_relu (#9270) 2025-02-26 13:22:08 -05:00
olmoe.py remove .float calls in olmoe (#11610) 2025-08-10 20:33:22 -04:00
qwq.py replace hardcoded GPU in llama debug msg (#12102) 2025-09-10 13:56:40 -04:00
sdv2.py fix: dead sdv2 download link (#13521) 2025-12-01 22:50:53 -08:00
sdxl.py don't validate output in sdxl with fakeweights (#12160) 2025-09-13 21:47:51 -04:00
sdxl_seed0.png fix failed threefry (#10646) 2025-06-05 17:17:42 -07:00
stable_diffusion.py move more tests to test/null, split some existing ones (#14512) 2026-02-03 20:20:20 +08:00
stable_diffusion_seed0.png default threefry (#6116) 2024-09-25 17:45:13 +08:00
stunning_mnist.py clean up unused imports in examples and update CI linting (#11024) 2025-06-30 08:21:27 -07:00
test_onnx_imagenet.py delete DONT_REALIZE_EXPAND and DONT_GROUP_REDUCES (#12744) 2025-10-16 14:11:33 -04:00
test_pkl_imagenet.py update variable names around jit [pr] (#14049) 2026-01-06 22:32:41 -05:00
torch_cuda_kernel.py clean up unused imports in examples and update CI linting (#11024) 2025-06-30 08:21:27 -07:00
train_resnet.py fix fromarray depreceation (#12512) 2025-10-08 09:13:26 -04:00
transformer.py fixing transformer training bug (#9877) 2025-04-13 19:34:20 -04:00
vgg7.py clean up unused imports in examples and update CI linting (#11024) 2025-06-30 08:21:27 -07:00
whisper.py Whisper audio helpers (mel filters in tinygrad) (#13478) 2026-01-20 10:50:02 -05:00
yolov3.py fix bugs at examples/yolov3.py (#11614) 2025-08-11 21:14:47 -04:00
yolov8-onnx.py move frontend dir to nn [pr] (#12470) 2025-10-07 10:42:22 +08:00
yolov8.py clean up unused imports in examples and update CI linting (#11024) 2025-06-30 08:21:27 -07:00