Contents

init(contentsOf:options:)

Creates an Aimodel from a .aimodelor .aimodelc file.

Declaration

init(contentsOf modelURL: URL, options: SpecializationOptions = .default) async throws

Parameters

  • modelURL:

    The URL of a .aimodel or .aimodelc file.

  • options:

    Options for the specialization process.

Mentioned in

Discussion

This initializer specializes the model if needed, caching the result for future calls.

Specializing the model can take a significant amount of time depending on model size and the compute unit types it targets. This initializer always uses the default cache.

See Also

Creating a model