Header: FIL.h
Namespace: fil
Module: DL_Common

Frees memory allocated for executing a models on a specific device.


void fil::FisFilter_DL_CleanDevice
	const ftl::Optional<fil::DeviceKind::Type>& inDeviceType,
	const int inDeviceIndex


Name Type Range Default Description
Input value inDeviceType const Optional<DeviceKind::Type>& NIL A type of a device selected for the cleanup. If not set, device depending on version (CPU/GPU) of installed Deep Learning add-on is selected.
Input value inDeviceIndex const int 0 - 0 An index of a device selected for the cleanup.


This filter frees memory allocated for executing models on specific device. It will not free memory allocated for models (mostly weights). Use this filter only if there is a risk of out-of-memory errors. Please note that calls to subsequent Deep Learning filter may execute much longer than usual.


In most cases, it is best to call this filter after processing exceptionally huge image or after finishing usage of specific model.