diff --git a/dali/pipeline/operator/builtin/input_operator.cc b/dali/pipeline/operator/builtin/input_operator.cc index 67e2d19692..3f9b11eea6 100644 --- a/dali/pipeline/operator/builtin/input_operator.cc +++ b/dali/pipeline/operator/builtin/input_operator.cc @@ -23,7 +23,8 @@ A base for any operator that forwards in-memory data to DALI pipeline.)doc") .NumInput(0) .NumOutput(0) .AddOptionalArg("blocking", R"code( -If ``True``, this operator will block until the data is available (e.g. by calling ``feed_input``). +**Advanced** If ``True``, this operator will block until the data is available +(e.g. by calling ``feed_input``). If ``False``, the operator will raise an error, if the data is not available. )code", false) .AddOptionalArg("no_copy", R"code( diff --git a/dali/python/nvidia/dali/external_source.py b/dali/python/nvidia/dali/external_source.py index 7ce053ff0f..dead6f1321 100644 --- a/dali/python/nvidia/dali/external_source.py +++ b/dali/python/nvidia/dali/external_source.py @@ -460,6 +460,11 @@ class ExternalSource: .. note:: This is applicable only when copying data to and from GPU memory. + `blocking`: bool, optional + **Advanced** If True, this operator will block until the data is available + (e.g. by calling ``feed_input``). If False, the operator will raise an error, + if the data is not available. + `no_copy` : bool, optional Determines whether DALI should copy the buffer when feed_input is called. @@ -997,6 +1002,7 @@ def external_source( ndim=None, cuda_stream=None, use_copy_kernel=None, + blocking=None, batch=True, repeat_last=False, **kwargs, @@ -1068,6 +1074,7 @@ def _external_source( ) return op(name=name) + kwargs["blocking"] = blocking # Wrapper around external_source to switch between standard and debug mode. current_pipeline = _PipelineDebug.current() if getattr(current_pipeline, "_debug_on", False):