Files
dragonpilot/tinygrad_repo/extra/transfer_speed.py
Vehicle Researcher 6928314c89 openpilot v0.10.3 release
date: 2025-12-18T23:23:16
master commit: 154c2334110373950bac1c36fc6e943cb1208326
2025-12-18 23:23:21 -08:00

19 lines
315 B
Python

from tinygrad import Tensor, Device
#N = 1024
N = 32
t = Tensor.rand(N, N, N, device="CPU").realize()
d1 = Device.DEFAULT + ":1"
d2 = Device.DEFAULT + ":2"
d3 = Device.DEFAULT + ":3"
for i in range(3):
t.to_(d1)
t.realize()
# t.to_("CPU")
# t.realize()
t.to_(d2)
t.realize()
t.to_(d3)
t.realize()