---
title: linkGraphs
framework: ML Compute
role: symbol
role_heading: Type Property
platforms: [iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+, tvOS 14.0+]
path: mlcompute/mlcgraphcompilationoptions/linkgraphs
---

# linkGraphs

The option to link graphs during graph compilation.

## Declaration

```swift
static var linkGraphs: MLCGraphCompilationOptions { get }
```

## Discussion

Discussion Include this option when you link together one or more sub-graphs when executing the forward, gradient, and optimizer update. For example, if the full computation graph includes a layer that the framework doesn’t support, you’ll need to create multiple sub-graphs and link them together using linkWithGraphs. When doing so, include this option when you call compileWithOptions for graphs you want to link together.

## See Also

### Creating Graph Compilation Options

- [init(rawValue:)](mlcompute/mlcgraphcompilationoptions/init(rawvalue:).md)
- [debugLayers](mlcompute/mlcgraphcompilationoptions/debuglayers.md)
- [disableLayerFusion](mlcompute/mlcgraphcompilationoptions/disablelayerfusion.md)
- [computeAllGradients](mlcompute/mlcgraphcompilationoptions/computeallgradients.md)
