mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-02-07 05:05:13 -05:00
11 lines
336 B
Python
11 lines
336 B
Python
import os
|
|
if "DEBUG" not in os.environ: os.environ["DEBUG"] = "2"
|
|
|
|
from tinygrad import Tensor, GlobalCounters
|
|
|
|
for N in [10_000_000, 100_000_000, 1_000_000_000]:
|
|
GlobalCounters.reset()
|
|
t = Tensor.rand(N)
|
|
t.realize()
|
|
print(f"N {N:>20_}, global_ops {GlobalCounters.global_ops:>20_}, global_mem {GlobalCounters.global_mem:>20_}")
|