Compilation shouldn't fall back to CPU if there is an OEM_OPERATION.
While this isn't necessary for correctness (execution is allowed to fail for any reason, and our CPU Executor does fail gracefully in the presence of OEM_OPERATION), it's friendlier to fail compilation than to fail execution, and this behavior (after the fix) supports particular use cases (e.g., testing whether a particular model is supported on the hardware by attempting compilation, and selecting a different model if not). Note that this change only affects compilation fallback, not execution fallback: If a model containing OEM_OPERATION is successfully compiled but we fail during execution, we still attempt normal CPU fallback (per partition or for the entire model). We could fix this and abort the execution earlier, but that does not seem necessary. Bug: 111570125 Test: NeuralNetworksTest_static Change-Id: I21b2bdeb68529dc56c607f3c5dd4704f00859ba1
Loading
Please sign in to comment