From 650f32c1b090a5b987b30dd7737701445ef1ee6b Mon Sep 17 00:00:00 2001 From: Ari Aye Date: Thu, 1 Aug 2019 23:05:45 +0000 Subject: [PATCH] Update to tflite_native@0.2.0 This change also copies the platform-appropriate tflite shared object into $SDK/bin/snapshots so that tflite_native running inside the analysis server snapshot will be able to resolve it correctly. ariaye@ariaye1:~/sdk/sdk$ ./tools/build.py -a x64 -mrelease create_sdk ariaye@ariaye1:~/sdk/sdk$ ls out/DebugX64/dart-sdk/bin/snapshots/ analysis_server.dart.snapshot dart2js.dart.snapshot dartanalyzer.dart.snapshot dartdevc.dart.snapshot dartdoc.dart.snapshot dartfmt.dart.snapshot kernel-service.dart.snapshot kernel_worker.dart.snapshot libtensorflowlite_c-linux64.so libtensorflowlite_c-mac64.so libtensorflowlite_c-win64.dll pub.dart.snapshot resources Change-Id: I474a3b676f99feaa84dba9c7723dc867a7a01f52 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111669 Reviewed-by: Samir Jindel --- DEPS | 2 +- sdk/BUILD.gn | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/DEPS b/DEPS index a83491cc883..05448008678 100644 --- a/DEPS +++ b/DEPS @@ -135,7 +135,7 @@ vars = { "term_glyph_tag": "1.0.1", "test_reflective_loader_tag": "0.1.8", "test_tag": "test-v1.6.4", - "tflite_native_rev": "b32366dae7446e0e7c29f407cc74717f44b00b30", + "tflite_native_rev": "7f3748a2adf0e7c246813d0b206396312cbaa0db", "typed_data_tag": "1.1.6", "unittest_rev": "2b8375bc98bb9dc81c539c91aaea6adce12e1072", "usage_tag": "3.4.0", diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn index e6b7b768cdf..b689dd2c387 100644 --- a/sdk/BUILD.gn +++ b/sdk/BUILD.gn @@ -296,7 +296,8 @@ if (is_win) { } if (target_cpu == "x64") { - copy_tree_specs += [ { + copy_tree_specs += [ + { target = "copy_language_model" visibility = [ ":create_common_sdk" ] deps = [ @@ -305,7 +306,18 @@ if (target_cpu == "x64") { source = "../pkg/analysis_server/language_model" dest = "$root_out_dir/dart-sdk/model" ignore_patterns = "{}" - } ] + }, + { + target = "copy_libtensorflowlite_c" + visibility = [ ":create_common_sdk" ] + deps = [ + ":copy_libraries", + ] + source = "../third_party/pkg/tflite_native/lib/src/blobs" + dest = "$root_out_dir/dart-sdk/bin/snapshots" + ignore_patterns = "{}" + } + ] } # This generates targets for everything in copy_tree_specs. The targets have the @@ -981,7 +993,10 @@ group("create_common_sdk") { public_deps += [ ":copy_7zip" ] } if (target_cpu == "x64") { - public_deps += [ ":copy_language_model" ] + public_deps += [ + ":copy_language_model", + ":copy_libtensorflowlite_c", + ] } }