MCPcopy Index your code
hub / github.com/tinygrad/tinygrad / enqueue_batch

Function enqueue_batch

examples/mlperf/dataloader.py:90–100  ·  view source on GitHub ↗
(num)

Source from the content-addressed store, hash-verified

88 gen = iter(_gen())
89
90 def enqueue_batch(num):
91 for idx in range(num*batch_size, (num+1)*batch_size):
92 fidx = next(gen)
93 if fidx != -1:
94 fn = files[fidx]
95 q_in.put((idx, fn, val))
96 Y[idx] = cir[fn.split("/")[-2]]
97 else:
98 # padding
99 q_in.put((idx, None, val))
100 Y[idx] = -1
101
102 shutdown = False
103 class Cookie:

Callers 3

__del__Method · 0.85
batch_load_resnetFunction · 0.85
batch_load_unet3dFunction · 0.85

Calls 2

putMethod · 0.80
splitMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…