<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BNNSGraphContextEnableNanAndInfChecks(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@BNNSGraphContextEnableNanAndInfChecks"
  },
  "title" : "BNNSGraphContextEnableNanAndInfChecks(_:_:)"
}
-->

# BNNSGraphContextEnableNanAndInfChecks(_:_:)

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

```
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

Don’t enable this option for production code.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)