clear_cached_mem_on_dev#
- ivy.clear_cached_mem_on_dev(device, /)[source]#
Clear memory cache on target device.
- Parameters:
device (
Union
[Device
,NativeDevice
]) – The device string to convert to native device handle or native device handle.- Return type:
None
Examples
>>> import torch >>> ivy.set_backend("torch") >>> device = torch.device("cuda") >>> ivy.clear_cached_mem_on_dev(device)