Contents

BNNSGraphContextSetStreamingAdvanceCount(_:_:)

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

Declaration

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

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(_:_:_:_:_:_:).

See Also

Specifying and querying a context’s properties