---
title: "BNNSGraphContextEnableNanAndInfChecks(_:_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/bnnsgraphcontextenablenanandinfchecks(_:_:)"
---

# BNNSGraphContextEnableNanAndInfChecks(_:_:)

Specifies that the context checks intermediate tensors for NaNs and infinities.

## Declaration

```swift
func BNNSGraphContextEnableNanAndInfChecks(_ context: bnns_graph_context_t, _ enable_check_for_nans_inf: Bool)
```

## Parameters

- `context`: The graph context.
- `enable_check_for_nans_inf`: If true, specifies that the context checks intermediate tensors for NaNs and infinities.

## Discussion

Discussion Don’t enable this option for production code.

## See Also

### Specifying and querying a context’s properties

- [BNNSGraphContextSetStreamingAdvanceCount(_:_:)](accelerate/bnnsgraphcontextsetstreamingadvancecount(_:_:).md)
- [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)
- [BNNSGraphContextGetWorkspaceSize(_:_:)](accelerate/bnnsgraphcontextgetworkspacesize(_:_:).md)
- [BNNSGraphContextSetStreamingAdvanceCount(_:_:)](accelerate/bnnsgraphcontextsetstreamingadvancecount(_:_:).md)
