Commit f51e72f2 authored by David Gross's avatar David Gross
Browse files

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
parent 5d40f5eb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment