mindspore.dataset.config.set_auto_offload

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

Set the automatic offload flag of the dataset. If 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 of type bool.

Examples

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