MCPcopy Create free account
hub / github.com/pytorch/pytorch / _enqueue

Method _enqueue

caffe2/python/data_workers.py:341–357  ·  view source on GitHub ↗

Enqueue the correctly sized batch arrays to Caffe2's queue.

(self, blob_name, queue, data_arr)

Source from the content-addressed store, hash-verified

339 )
340
341 def _enqueue(self, blob_name, queue, data_arr):
342 '''
343 Enqueue the correctly sized batch arrays to Caffe2's queue.
344 '''
345 workspace.FeedBlob(
346 self._scratch_blob[blob_name],
347 data_arr,
348 device_option=self._device_option
349 )
350
351 op = core.CreateOperator(
352 "SafeEnqueueBlobs",
353 [queue, self._scratch_blob[blob_name]],
354 [self._scratch_blob[blob_name], self._scratch_status[blob_name]],
355 device_option=self._device_option
356 )
357 workspace.RunOperatorOnce(op)
358
359 def _create_caffe2_queues(self, net):
360 '''

Callers 2

_enqueue_batch_directMethod · 0.95
_enqueue_batchMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected