Function CustomInitialize¶
- Defined in File custom.h
Function Documentation¶
-
int
CustomInitialize
(const char *serialized_model_config, int gpu_device_id, void **custom_context)¶ Initialize the custom shared library for a given model configuration and get the associated custom context.
- Return
- An error code. Zero indicates success, all other values indicate failure. Use CustomErrorString to get the error string for an error code.
- Parameters
serialized_model_config
: Serialized representation of the model configuration to use for initialization. This serialization is owned by the caller and so must be copied if a persistent copy of required by the shared library.gpu_device_id
: The GPU device ID to initialize for, or CUSTOM_NO_GPU_DEVICE if should initialize for CPU.custom_context
: Returns the opaque handle to the custom state associated with this initialization. Returns nullptr if no context associated with the initialization.