Merge pull request #42400 from freedomtan:make_nnapi_accelerator_name_work
PiperOrigin-RevId: 327127418 Change-Id: I8e9810c3c2b0d390a1ad520ca1e3574961394e26
This commit is contained in:
commit
33e968d542
@ -31,8 +31,10 @@ void InitKernelTest(int* argc, char** argv) {
|
||||
// In Android Q, the NNAPI delegate avoids delegation if the only device
|
||||
// is the reference CPU. However, for testing purposes, we still want
|
||||
// delegation coverage, so force use of this reference path.
|
||||
delegate_providers->MutableParams()->Set<std::string>(
|
||||
"nnapi_accelerator_name", "nnapi-reference");
|
||||
auto* params = delegate_providers->MutableParams();
|
||||
if (!params->HasValueSet<std::string>("nnapi_accelerator_name")) {
|
||||
params->Set<std::string>("nnapi_accelerator_name", "nnapi-reference");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user