<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BNNSGraphCompileOptionsSetOutputPath(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@BNNSGraphCompileOptionsSetOutputPath"
  },
  "title" : "BNNSGraphCompileOptionsSetOutputPath(_:_:)"
}
-->

# BNNSGraphCompileOptionsSetOutputPath(_:_:)

Sets the option for graph compilation to generate the graph object directly to the specified file.

```
func BNNSGraphCompileOptionsSetOutputPath(_ options: bnns_graph_compile_options_t, _ path: UnsafePointer<CChar>?)
```

## Parameters

`options`

The compilation options object.

`path`

The destination file path. Pass `nil` to reset to the default behavior of strictly in-memory graph generation.

## Discussion

Use this option to specify that the graph [`BNNSGraphCompileFromFile(_:_:_:)`](/documentation/Accelerate/BNNSGraphCompileFromFile(_:_:_:)) returns is a read-only memory-mapped file.

The option reduces the memory that compilation requires because BNNS doesn’t require the full set of graph weights to be memory resident.

The generated file has 0600 permissions (read and write by the user only).

Note that the [`BNNSGraphCompileOptionsSetOutputFD(_:_:)`](/documentation/Accelerate/BNNSGraphCompileOptionsSetOutputFD(_:_:)) function overrides this option.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)