mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-22 08:43:58 +08:00
dd778596b7
date: 2025-03-15T21:10:51 master commit: fb7b9c0f9420d228f03362970ebcfb7237095cf3
19 lines
315 B
Python
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()
|