Files
tinygrad/extra/threefry.py
chenyu e614b7c696 docs: showcase remove mnist_gan and add conversation.py (#4757)
fixed both examples, and i think it's better to show conversation
2024-05-28 11:09:26 -04:00

10 lines
389 B
Python

import os
if "DEBUG" not in os.environ: os.environ["DEBUG"] = "2"
if "THREEFRY" not in os.environ: os.environ["THREEFRY"] = "1"
from tinygrad import Tensor, GlobalCounters
for N in [10_000_000, 100_000_000, 1_000_000_000]:
GlobalCounters.reset()
Tensor.rand(N).realize()
print(f"N {N:>20_}, global_ops {GlobalCounters.global_ops:>20_}, global_mem {GlobalCounters.global_mem:>20_}")