GPU out-of-memory error with recovery suggestions.
Provides detailed information about memory failures including device info, memory stats, and actionable suggestions.
Examples
iex> error = %SnakeBridge.Error.OutOfMemoryError{
...> device: {:cuda, 0},
...> requested_mb: 8192,
...> available_mb: 2048,
...> message: "CUDA out of memory"
...> }
iex> Exception.message(error)
"GPU Out of Memory on CUDA:0..."
Summary
Functions
Creates an OutOfMemoryError error with default suggestions.
Types
@type device() :: :cpu | {:cuda, non_neg_integer()} | :mps | atom()
@type t() :: %SnakeBridge.Error.OutOfMemoryError{ __exception__: true, available_mb: non_neg_integer() | nil, device: device(), message: String.t(), python_traceback: String.t() | nil, requested_mb: non_neg_integer() | nil, suggestions: [String.t()], total_mb: non_neg_integer() | nil }