Skip to content

Commit 650f32c

Browse files
committed
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 <[email protected]>
1 parent 622ec50 commit 650f32c

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ vars = {
135135
"term_glyph_tag": "1.0.1",
136136
"test_reflective_loader_tag": "0.1.8",
137137
"test_tag": "test-v1.6.4",
138-
"tflite_native_rev": "b32366dae7446e0e7c29f407cc74717f44b00b30",
138+
"tflite_native_rev": "7f3748a2adf0e7c246813d0b206396312cbaa0db",
139139
"typed_data_tag": "1.1.6",
140140
"unittest_rev": "2b8375bc98bb9dc81c539c91aaea6adce12e1072",
141141
"usage_tag": "3.4.0",

sdk/BUILD.gn

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,8 @@ if (is_win) {
296296
}
297297

298298
if (target_cpu == "x64") {
299-
copy_tree_specs += [ {
299+
copy_tree_specs += [
300+
{
300301
target = "copy_language_model"
301302
visibility = [ ":create_common_sdk" ]
302303
deps = [
@@ -305,7 +306,18 @@ if (target_cpu == "x64") {
305306
source = "../pkg/analysis_server/language_model"
306307
dest = "$root_out_dir/dart-sdk/model"
307308
ignore_patterns = "{}"
308-
} ]
309+
},
310+
{
311+
target = "copy_libtensorflowlite_c"
312+
visibility = [ ":create_common_sdk" ]
313+
deps = [
314+
":copy_libraries",
315+
]
316+
source = "../third_party/pkg/tflite_native/lib/src/blobs"
317+
dest = "$root_out_dir/dart-sdk/bin/snapshots"
318+
ignore_patterns = "{}"
319+
}
320+
]
309321
}
310322

311323
# This generates targets for everything in copy_tree_specs. The targets have the
@@ -981,7 +993,10 @@ group("create_common_sdk") {
981993
public_deps += [ ":copy_7zip" ]
982994
}
983995
if (target_cpu == "x64") {
984-
public_deps += [ ":copy_language_model" ]
996+
public_deps += [
997+
":copy_language_model",
998+
":copy_libtensorflowlite_c",
999+
]
9851000
}
9861001
}
9871002

0 commit comments

Comments
 (0)