nvidia.dali.fn.external_source — NVIDIA DALI (original) (raw)

nvidia.dali.fn.external_source(source=None, num_outputs=None, *, cycle=None, name=None, device='cpu', layout=None, dtype=None, ndim=None, cuda_stream=None, use_copy_kernel=None, blocking=None, batch=True, repeat_last=False, parallel=None, no_copy=None, prefetch_queue_depth=None, bytes_per_sample_hint=None, batch_info=None, **kwargs)#

Creates a data node which is populated with data from a Python source.

The data can be provided by the source function or iterable, or it can be provided bypipeline.feed_input(name, data, layout, cuda_stream).

In the case of the GPU input, it is the user responsibility to modify the provided GPU memory content only using provided stream (DALI schedules a copy on it and all work is properly queued). If no stream is provided feeding input blocks until the provided memory is copied to the internal buffer.

Parameters:

Keyword Arguments:

See also