---
title: "cumulativeSum(axis:)"
framework: accelerate
role: symbol
role_heading: Instance Method
path: "accelerate/bnnsgraph/builder/tensor/cumulativesum(axis:)"
---

# cumulativeSum(axis:)

Adds a cumulative sum operation to the the graph.

## Declaration

```swift
func cumulativeSum(axis: Int) -> BNNSGraph.Builder.Tensor<T>
```

## Parameters

- `axis`: The axis over which the operation performs the cumulative sum.
