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

nvidia.dali.fn.dl_tensor_python_function(*input, batch_processing=False, bytes_per_sample_hint=[0], function, num_outputs=1, output_layouts=None, preserve=False, synchronize_stream=True, device=None, name=None)#

Executes a Python function that operates on DLPack tensors.

The function should not modify input tensors.

For the GPU operator, it is the user’s responsibility to synchronize the device code with DALI. To synchronize the device code with DALI, synchronize DALI’s work before the operator call with the synchronize_stream flag (enabled by default) and ensure that the scheduled device tasks are finished in the operator call. The GPU code can be executed on the CUDA stream used by DALI, which can be obtained by calling the current_dali_stream() function. In this case, the synchronize_stream flag can be set to False.

Warning

This operator is not compatible with TensorFlow integration.

This operator allows sequence inputs and supports volumetric data.

This operator will not be optimized out of the graph.

Supported backends

Parameters:

__input_[ 0..255 ] (TensorList , optional) – This function accepts up to 256 optional positional inputs

Keyword Arguments:

See also