| 252 | } |
| 253 | |
| 254 | void Interpreter::SetAllowFp16PrecisionForFp32(bool allow) { |
| 255 | for (auto& subgraph : subgraphs_) { |
| 256 | subgraph->context()->allow_fp32_relax_to_fp16 = allow; |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | // TODO(b/121264966): Subgraphs added after cancellation is set will not get the |
| 261 | // cancellation function added to their context. |