| 1075 | } |
| 1076 | |
| 1077 | void Subgraph::UseNNAPI(bool enable) { |
| 1078 | // Note that there is no way to disable the delegate once it modified the |
| 1079 | // graph. |
| 1080 | if (applied_nnapi_delegate_ && !enable) { |
| 1081 | ReportError("Attempting to disable NNAPI delegate after it's applied."); |
| 1082 | } else { |
| 1083 | should_apply_nnapi_delegate_ = enable; |
| 1084 | } |
| 1085 | } |
| 1086 | |
| 1087 | void Subgraph::SwitchToDelegateContext() { |
| 1088 | context_.GetNodeAndRegistration = GetNodeAndRegistration; |
no test coverage detected