enable_io_lazy_mode
- Option.enable_io_lazy_mode(enable=True)
Controls when input and output buffers used during inference are allocated on the host.
When enabled, input and output buffers are allocated only when they are accessed for the first time. This avoids allocating buffers for unused execution paths and reduces overall runtime memory usage. The first access to a buffer may incur additional allocation overhead.
- Parameters:
enable (bool, optional) --
Specifies when buffers used to store input and output data are allocated.
True(default): Allocate buffers on first access.False: Allocate all buffers during model initialization.
- Returns:
Returns the Option instance for method chaining.
- Return type: