---
title: "init(compileFromPath:functionName:options:)"
framework: accelerate
role: symbol
role_heading: Initializer
path: "accelerate/bnnsgraph/context/init(compilefrompath:functionname:options:)-6ghot"
---

# init(compileFromPath:functionName:options:)

Synchronously returns a new context that wraps a graph object which represents the compiled .mlmodelc file.

## Declaration

```swift
init(compileFromPath path: String, functionName: String? = nil, options: BNNSGraph.CompileOptions = CompileOptions()) throws
```

## Parameters

- `path`: The path to the .mlmodelc program file.
- `functionName`: The name of a specific function to be compiled. Pass nil to specify that the function compiles all functions.
- `options`: The compilation options.

## Discussion

Discussion note: BNNSGraphCompileFromFile note: BNNSGraphContextMake
