Dala.ML.EMLX (dala v0.1.0)

Copy Markdown View Source

Public API for CoreML/EMLX operations.

This module provides CoreML/EMLX functionality. On platforms where the native NIF (Dala.Ml.Emlx) is available, calls are delegated there. Otherwise, safe fallbacks are returned.

Summary

Functions

Check if EMLX is available.

Get the default device for EMLX.

Check if running on iOS device.

Check if running on iOS simulator.

Get platform configuration.

Setup CoreML.

Functions

available?()

@spec available?() :: boolean()

Check if EMLX is available.

default_device()

@spec default_device() :: atom()

Get the default device for EMLX.

ios_device?()

@spec ios_device?() :: boolean()

Check if running on iOS device.

ios_simulator?()

@spec ios_simulator?() :: boolean()

Check if running on iOS simulator.

platform_config()

@spec platform_config() :: %{jit_enabled: boolean(), device: atom()}

Get platform configuration.

setup()

@spec setup() :: :ok | {:ok, map()} | {:error, term()}

Setup CoreML.