WORKSPACE 4.8 KB
Newer Older
李寅 已提交
1 2
workspace(name = "mace")

L
liuqi 已提交
3 4 5 6 7 8 9
# generate version and opencl kernel code.
load("//repository/git:git_configure.bzl", "git_version_repository")
load("//repository/opencl-kernel:opencl_kernel_configure.bzl", "encrypt_opencl_kernel_repository")

git_version_repository(name="local_version_config")
encrypt_opencl_kernel_repository(name="local_opencl_kernel_encrypt")

10 11 12
# proto_library rules implicitly depend on @com_google_protobuf//:protoc,
# which is the proto-compiler.
# This statement defines the @com_google_protobuf repo.
李寅 已提交
13
http_archive(
14
    name = "com_google_protobuf",
W
wuchenghui 已提交
15 16
    sha256 = "542703acadc3f690d998f4641e1b988f15ba57ebca05fdfb1cd9095bec007948",
    strip_prefix = "protobuf-3.4.0",
W
wuchenghui 已提交
17
    urls = [
W
wuchenghui 已提交
18
        "https://cnbj1.fds.api.xiaomi.com/mace/third-party/protobuf/protobuf-3.4.0.zip",
19
        "https://github.com/google/protobuf/archive/v3.4.0.zip",
W
wuchenghui 已提交
20
    ],
李寅 已提交
21 22
)

L
Liangliang He 已提交
23 24
new_http_archive(
    name = "gtest",
L
Liangliang He 已提交
25
    build_file = "third_party/googletest/googletest.BUILD",
W
wuchenghui 已提交
26 27 28 29
    sha256 = "f3ed3b58511efd272eb074a3a6d6fb79d7c2e6a0e374323d1e6bcbcc1ef141bf",
    strip_prefix = "googletest-release-1.8.0",
    urls = [
        "https://cnbj1.fds.api.xiaomi.com/mace/third-party/googletest/googletest-release-1.8.0.zip",
30
        "https://github.com/google/googletest/archive/release-1.8.0.zip",
W
wuchenghui 已提交
31 32 33 34 35
    ],
)

new_http_archive(
    name = "opencl_headers",
L
Liangliang He 已提交
36
    build_file = "third_party/opencl-headers/opencl-headers.BUILD",
37 38
    sha256 = "b2b813dd88a7c39eb396afc153070f8f262504a7f956505b2049e223cfc2229b",
    strip_prefix = "OpenCL-Headers-f039db6764d52388658ef15c30b2237bbda49803",
W
wuchenghui 已提交
39
    urls = [
40 41
        "https://cnbj1.fds.api.xiaomi.com/mace/third-party/OpenCL-Headers/f039db6764d52388658ef15c30b2237bbda49803.zip",
        "https://github.com/KhronosGroup/OpenCL-Headers/archive/f039db6764d52388658ef15c30b2237bbda49803.zip",
W
wuchenghui 已提交
42 43 44 45 46
    ],
)

new_http_archive(
    name = "opencl_clhpp",
L
Liangliang He 已提交
47
    build_file = "third_party/opencl-clhpp/opencl-clhpp.BUILD",
W
wuchenghui 已提交
48 49
    sha256 = "dab6f1834ec6e3843438cc0f97d63817902aadd04566418c1fcc7fb78987d4e7",
    strip_prefix = "OpenCL-CLHPP-4c6f7d56271727e37fb19a9b47649dd175df2b12",
W
wuchenghui 已提交
50
    urls = [
W
wuchenghui 已提交
51
        "https://cnbj1.fds.api.xiaomi.com/mace/third-party/OpenCL-CLHPP/OpenCL-CLHPP-4c6f7d56271727e37fb19a9b47649dd175df2b12.zip",
52
        "https://github.com/KhronosGroup/OpenCL-CLHPP/archive/4c6f7d56271727e37fb19a9b47649dd175df2b12.zip",
W
wuchenghui 已提交
53 54 55 56 57
    ],
)

new_http_archive(
    name = "half",
L
Liangliang He 已提交
58
    build_file = "third_party/half/half.BUILD",
W
wuchenghui 已提交
59 60
    sha256 = "0f514a1e877932b21dc5edc26a148ddc700b6af2facfed4c030ca72f74d0219e",
    strip_prefix = "half-code-356-trunk",
W
wuchenghui 已提交
61
    urls = [
W
wuchenghui 已提交
62
        "https://cnbj1.fds.api.xiaomi.com/mace/third-party/half/half-code-356-trunk.zip",
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
        "https://sourceforge.net/code-snapshots/svn/h/ha/half/code/half-code-356-trunk.zip",
    ],
)

new_http_archive(
    name = "eigen",
    build_file = "third_party/eigen3/eigen.BUILD",
    sha256 = "ca7beac153d4059c02c8fc59816c82d54ea47fe58365e8aded4082ded0b820c4",
    strip_prefix = "eigen-eigen-f3a22f35b044",
    urls = [
        "http://cnbj1.fds.api.xiaomi.com/mace/third-party/eigen/f3a22f35b044.tar.gz",
        "http://mirror.bazel.build/bitbucket.org/eigen/eigen/get/f3a22f35b044.tar.gz",
        "https://bitbucket.org/eigen/eigen/get/f3a22f35b044.tar.gz",
    ],
)

http_archive(
    name = "gemmlowp",
B
Bin Li 已提交
81 82
    sha256 = "4160b941d374d1a941776625405c22c32d8cb3d64c772ce8c1683efcd56cbc98",
    strip_prefix = "gemmlowp-master-cae29f7fd3ca6672012ade2894ca028461003fb4",
83
    urls = [
B
Bin Li 已提交
84
        "https://cnbj1.fds.api.xiaomi.com/mace/third-party/gemmlowp/gemmlowp-master-cae29f7fd3ca6672012ade2894ca028461003fb4.zip",
W
wuchenghui 已提交
85
    ],
L
Liangliang He 已提交
86 87
)

88
new_http_archive(
89
    name = "six_archive",
L
Liangliang He 已提交
90
    build_file = "third_party/six/six.BUILD",
91 92
    sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
    strip_prefix = "six-1.10.0",
93
    urls = [
W
wuchenghui 已提交
94
        "https://cnbj1.fds.api.xiaomi.com/mace/third-party/six/six-1.10.0.tar.gz",
95 96 97 98
        "http://mirror.bazel.build/pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz",
        "https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz",
    ],
)
99

100
bind(
101 102
    name = "six",
    actual = "@six_archive//:six",
103 104
)

W
wuchenghui 已提交
105 106
http_archive(
    # v2.2.0 + fix of include path
107
    name = "com_github_gflags_gflags",
W
wuchenghui 已提交
108 109 110 111
    sha256 = "16903f6bb63c00689eee3bf7fb4b8f242934f6c839ce3afc5690f71b712187f9",
    strip_prefix = "gflags-30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e",
    urls = [
        "https://cnbj1.fds.api.xiaomi.com/mace/third-party/gflags/gflags-30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e.zip",
112
        "https://github.com/gflags/gflags/archive/30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e.zip",
W
wuchenghui 已提交
113
    ],
Y
yejianwu 已提交
114 115 116
)

bind(
117
    name = "gflags",
Y
yejianwu 已提交
118 119 120 121
    actual = "@com_github_gflags_gflags//:gflags",
)

bind(
122
    name = "gflags_nothreads",
Y
yejianwu 已提交
123 124
    actual = "@com_github_gflags_gflags//:gflags_nothreads",
)
125 126 127 128 129 130 131

# Set up Android NDK
android_ndk_repository(
    name = "androidndk",
    # Android 5.0
    api_level = 21,
)