forked from mlcommons/mobile_app_open
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WORKSPACE
109 lines (86 loc) · 3.59 KB
/
WORKSPACE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
workspace(name = "mlperf_app")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
http_archive(
name = "bazel_skylib",
sha256 = "66ffd9315665bfaafc96b52278f57c7e2dd09f5ede279ea6d39b2be471e7e3aa",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz",
],
)
http_archive(
name = "rules_python",
sha256 = "5868e73107a8e85d8f323806e60cad7283f34b32163ea6ff1020cf27abef6036",
strip_prefix = "rules_python-0.25.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.25.0/rules_python-0.25.0.tar.gz",
)
load("//:platform.bzl", "tf_patch_finder")
tf_patch_finder(
name = "tf_patch_finder",
workspace_dir = __workspace_dir__,
)
load("@tf_patch_finder//:patch_win_arm64.bzl", "PATCH_FILE")
http_archive(
name = "org_tensorflow",
patch_args = ["-p1"],
patches = [
# Add patches for adding png in tflite evaluation code
"//:flutter/third_party/enable-png-in-tensorflow-lite-tools-evaluation.patch",
"//:flutter/third_party/png-with-number-of-channels-detected.patch",
"//:flutter/third_party/use_unsigned_char.patch",
# Fix tensorflow not being able to read image files on Windows
"//:flutter/third_party/tensorflow-fix-file-opening-mode-for-Windows.patch",
"//:flutter/third_party/tf-eigen.patch",
# NDK 25 support
"//patches:ndk_25_r14.diff",
] + PATCH_FILE,
sha256 = "ce357fd0728f0d1b0831d1653f475591662ec5bca736a94ff789e6b1944df19f",
strip_prefix = "tensorflow-2.14.0",
urls = [
"https://github.com/tensorflow/tensorflow/archive/v2.14.0.tar.gz",
],
)
load("@rules_python//python:repositories.bzl", "python_register_toolchains")
load(
"@org_tensorflow//tensorflow/tools/toolchains/python:python_repo.bzl",
"python_repository",
)
python_repository(name = "python_version_repo")
load("@python_version_repo//:py_version.bzl", "HERMETIC_PYTHON_VERSION")
python_register_toolchains(
name = "python",
ignore_root_user_error = True,
python_version = HERMETIC_PYTHON_VERSION,
)
# Initialize tensorflow workspace.
load("@org_tensorflow//tensorflow:workspace3.bzl", "tf_workspace3")
tf_workspace3()
load("@org_tensorflow//tensorflow:workspace2.bzl", "tf_workspace2")
tf_workspace2()
load("@org_tensorflow//tensorflow:workspace1.bzl", "tf_workspace1")
tf_workspace1()
load("@org_tensorflow//tensorflow:workspace0.bzl", "tf_workspace0")
tf_workspace0()
http_archive(
name = "neuron_delegate",
sha256 = "85c1b17acb34072baa12cf74011ff45aee9045a12603851b86ce85e3cef66747",
strip_prefix = "tflite-neuron-delegate-update_for_dujac",
urls = ["https://github.com/MediaTek-NeuroPilot/tflite-neuron-delegate/archive/refs/heads/update_for_dujac.zip"],
)
new_git_repository(
name = "org_mlperf_inference",
build_file = "@//flutter/android/third_party:loadgen.BUILD",
commit = "238d035ab41d7ddd390b35471af169ea641380f6",
patch_args = ["-p1"],
patch_cmds = ["python3 loadgen/version_generator.py loadgen/version_generated.cc loadgen"],
patches = [],
remote = "https://github.com/mlcommons/inference.git",
)
# This is required to pass SNPE SDK path from external environment to sources,
# without actually modifying files
load("//mobile_back_qti:variables.bzl", "snpe_version_loader")
snpe_version_loader(
name = "snpe_version_loader",
workspace_dir = __workspace_dir__,
)