---
title: debugLayers
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/debuglayers
---

# debugLayers

The option to debug layers during graph compilation.

## Declaration

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

## Discussion

Discussion Include this option to disable various optimizations such as layer fusion, and ensure the framework synchronizes the resulting forward and gradients tensors host memory with device memory, for layers marked as debuggable.

## See Also

### Creating Graph Compilation Options

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