From 36aac0036bb4d891ae033fb228bece2f589102bd Mon Sep 17 00:00:00 2001 From: JiCheng Date: Sat, 4 Mar 2023 23:31:49 +0800 Subject: [PATCH] Update onnxruntime/core/providers/nnapi/nnapi_builtin/nnapi_api_helper.cc Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com> --- .../core/providers/nnapi/nnapi_builtin/nnapi_api_helper.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/onnxruntime/core/providers/nnapi/nnapi_builtin/nnapi_api_helper.cc b/onnxruntime/core/providers/nnapi/nnapi_builtin/nnapi_api_helper.cc index b799fdcef1..26ba5b3d67 100644 --- a/onnxruntime/core/providers/nnapi/nnapi_builtin/nnapi_api_helper.cc +++ b/onnxruntime/core/providers/nnapi/nnapi_builtin/nnapi_api_helper.cc @@ -86,8 +86,7 @@ static int32_t GetDeviceFeatureLevelInternal(const ::NnApi* nnapi, const std::ve // we will always put CPU device at the end if cpu is enabled Status GetTargetDevices(const ::NnApi* nnapi, TargetDeviceOption target_device_option, std::vector& nnapi_target_devices, std::string& nnapi_target_devices_detail) { - // GetTargetDevices is only supported on API 29+ - // get runtime_feature_level + // GetTargetDevices is only supported when NNAPI runtime feature level >= ANEURALNETWORKS_FEATURE_LEVEL_3 if (GetNNAPIRuntimeFeatureLevel(nnapi) < ANEURALNETWORKS_FEATURE_LEVEL_3) return Status::OK();