---
title: "cumulativeMaximum(_:axisTensor:exclusive:reverse:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/cumulativemaximum(_:axistensor:exclusive:reverse:name:)"
---

# cumulativeMaximum(_:axisTensor:exclusive:reverse:name:)

Computes the cumulative maximum of the input tensor along the specified axis.

## Declaration

```swift
func cumulativeMaximum(_ tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, exclusive: Bool, reverse: Bool, name: String?) -> MPSGraphTensor
```

## Parameters

- `tensor`: The input tensor
- `axisTensor`: The tensor dimension where you compute the cumulative operation
- `exclusive`: If true, perform the exclusive cumulative operation, and the first element will be equal to the lowest value of the tensor data type
- `reverse`: If true, reverse the direction of the cumulative operation along the specified axis
- `name`: The name for the operation.

## Return Value

Return Value A valid MPSGraphTensor object
