mindspore.dataset.config.set_auto_offload

View Source On Gitee
mindspore.dataset.config.set_auto_offload(offload)

Set the automatic offload flag of the dataset. If set_auto_offload is True, automatically offload as many dataset operations from the CPU to the Device (GPU or Ascend).

Parameters

offload (bool) – Whether to use the automatic offload feature.

Raises

TypeError – If offload is not a boolean data type.

Examples

>>> # Enable automatic offload feature
>>> import mindspore.dataset as ds
>>> ds.config.set_auto_offload(True)