ailiaSetMemoryMode method
- Pointer<
AILIANetwork> net, - int mode
Set the memory usage policy for inference
Parameters:
net: A network instance pointermode: Memory mode (Multiple specifications possible with logical sum) AILIA_MEMORY_XXX (Default : AILIA_MEMORY_REDUCE_CONSTANT )
Returns:
If this function is successful, it returns AILIA_STATUS_SUCCESS , or an error code otherwise.
Change the memory usage policy. If a value other than AILIA_MEMORY_NO_OPTIMIZATION is specified, the intermediate buffer secured during inference will be released, so the memory usage during inference can be reduced. Must be specified immediately after ailiaCreate() . It cannot be changed after calling ailiaOpen. If you specify to release the intermediate buffer, calling ailiaGetBlobData() for the corresponding blob will return an AILIA_STATUS_DATA_HIDDEN error.
Implementation
int ailiaSetMemoryMode(
ffi.Pointer<AILIANetwork> net,
int mode,
) {
return _ailiaSetMemoryMode(
net,
mode,
);
}