---
title: intermediatesHeapSize
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtl4machinelearningpipelinestate/intermediatesheapsize
---

# intermediatesHeapSize

Obtain the size of the heap, in bytes, this pipeline requires during the execution.

## Declaration

```swift
var intermediatesHeapSize: Int { get }
```

## Discussion

Discussion Use this value to allocate a MTLHeap instance of sufficient size that you can then provide to dispatchNetwork(intermediatesHeap:). Metal uses this heap to store intermediate data as it executes the pipeline. It is your responsibility to provide a heap at least as large as this property requests.
