---
title: "BNNSGraphContextSetStreamingAdvanceCount(_:_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/bnnsgraphcontextsetstreamingadvancecount(_:_:)"
---

# BNNSGraphContextSetStreamingAdvanceCount(_:_:)

Sets the streaming advancement amount for cases with dynamically shaped inputs.

## Declaration

```swift
func BNNSGraphContextSetStreamingAdvanceCount(_ context: bnns_graph_context_t, _ advance_count: Int) -> Int32
```

## Parameters

- `context`: The graph context.
- `advance_count`: An integer value that specifies the number of elements by which the function advances the internal state pointer.

## Discussion

Discussion BNNS can’t unambiguously determine the streaming advancement size for models you compile with the BNNSOption attribute StateMode=Streaming in an enabled state, where slice_update operations use an update parameter of dynamic shape. Call this function before calling BNNSGraphContextExecute(_:_:_:_:_:_:) to set the advancement size for each frame. This function advances the internal state pointer by advance_count elements in the streaming dimension before returning from BNNSGraphContextExecute(_:_:_:_:_:_:). note: The BNNS streaming APIs do not support models that require different advancement amounts for different states.

## See Also

### Specifying and querying a context’s properties

- [BNNSGraphContextSetArgumentType(_:_:)](accelerate/bnnsgraphcontextsetargumenttype(_:_:).md)
- [BNNSGraphArgumentType](accelerate/bnnsgraphargumenttype.md)
- [BNNSGraphContextSetDynamicShapes(_:_:_:_:)](accelerate/bnnsgraphcontextsetdynamicshapes(_:_:_:_:).md)
- [bnns_graph_shape_t](accelerate/bnns_graph_shape_t.md)
- [BNNSGraphContextSetBatchSize(_:_:_:)](accelerate/bnnsgraphcontextsetbatchsize(_:_:_:).md)
- [BNNSGraphContextEnableNanAndInfChecks(_:_:)](accelerate/bnnsgraphcontextenablenanandinfchecks(_:_:).md)
- [BNNSGraphContextGetWorkspaceSize(_:_:)](accelerate/bnnsgraphcontextgetworkspacesize(_:_:).md)
