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 <sjindel@google.com>
This commit is contained in:
Ari Aye 2019-08-01 23:05:45 +00:00
parent 622ec5099f
commit 650f32c1b0
2 changed files with 19 additions and 4 deletions

2
DEPS
View file

@ -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",

View file

@ -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",
]
}
}