开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
master
分支 (53)
master
test_354480970
test_354133661
test_352959034
test_352845960
test_348847397
test_345912777
test_345608604
test_345735031
test_344749096
test_343594049
test_332137391
test_343583920
test_344139369
test_342331827
test_340780189
test_340895825
test_330983265
test_318760064
test_315337430
master
分支 (53)
master
test_354480970
test_354133661
test_352959034
test_352845960
test_348847397
test_345912777
test_345608604
test_345735031
test_344749096
test_343594049
test_332137391
test_343583920
test_344139369
test_342331827
test_340780189
test_340895825
test_330983265
test_318760064
test_315337430
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (53)
master
test_354480970
test_354133661
test_352959034
test_352845960
test_348847397
test_345912777
test_345608604
test_345735031
test_344749096
test_343594049
test_332137391
test_343583920
test_344139369
test_342331827
test_340780189
test_340895825
test_330983265
test_318760064
test_315337430
XNNPACK
/
build_defs.bzl
XNNPACK
/
build_defs.bzl
build_defs.bzl 16.47 KB
一键复制 编辑 原始数据 按行查看 历史
Marat Dukhan 提交于 2020年12月11日 03:19 +08:00 . Remove PSIMD dependency
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 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438
"""Build definitions and rules for XNNPACK."""
load(":emscripten.bzl", "xnnpack_emscripten_benchmark_linkopts", "xnnpack_emscripten_deps", "xnnpack_emscripten_minimal_linkopts", "xnnpack_emscripten_test_linkopts")
def xnnpack_visibility():
"""Visibility of :XNNPACK target.
All other targets have private visibility, and can not have external
dependencies.
"""
return ["//visibility:public"]
def xnnpack_min_size_copts():
"""Compiler flags for size-optimized builds."""
return ["-Os"]
def xnnpack_gcc_std_copts():
"""GCC-like compiler flags to specify language standard for C sources."""
return ["-std=c99"]
def xnnpack_msvc_std_copts():
"""MSVC compiler flags to specify language standard for C sources."""
return ["/Drestrict="]
def xnnpack_std_cxxopts():
"""Compiler flags to specify language standard for C++ sources."""
return ["-std=gnu++11"]
def xnnpack_optional_ruy_copts():
"""Compiler flags to optionally enable Ruy benchmarks."""
return []
def xnnpack_optional_gemmlowp_copts():
"""Compiler flags to optionally enable Gemmlowp benchmarks."""
return []
def xnnpack_optional_tflite_copts():
"""Compiler flags to optionally enable TensorFlow Lite benchmarks."""
return []
def xnnpack_optional_armcl_copts():
"""Compiler flags to optionally enable ARM ComputeLibrary benchmarks."""
return []
def xnnpack_optional_dnnl_copts():
"""Compiler flags to optionally enable Intel DNNL benchmarks."""
return []
def xnnpack_optional_ruy_deps():
"""Optional Ruy dependencies."""
return []
def xnnpack_optional_gemmlowp_deps():
"""Optional Gemmlowp dependencies."""
return []
def xnnpack_optional_tflite_deps():
"""Optional TensorFlow Lite dependencies."""
return []
def xnnpack_optional_armcl_deps():
"""Optional ARM ComputeLibrary dependencies."""
return []
def xnnpack_optional_dnnl_deps():
"""Optional Intel DNNL dependencies."""
return []
def xnnpack_cc_library(
name,
srcs = [],
x86_srcs = [],
aarch32_srcs = [],
aarch64_srcs = [],
wasm_srcs = [],
wasmsimd_srcs = [],
copts = [],
gcc_copts = [],
msvc_copts = [],
mingw_copts = [],
msys_copts = [],
gcc_x86_copts = [],
msvc_x86_32_copts = [],
msvc_x86_64_copts = [],
apple_aarch32_copts = [],
aarch32_copts = [],
aarch64_copts = [],
wasm_copts = [],
wasmsimd_copts = [],
optimized_copts = ["-O2"],
hdrs = [],
defines = [],
includes = [],
deps = [],
visibility = []):
"""C/C++/assembly library with architecture-specific configuration.
Define a static library with architecture- and instruction-specific
source files and/or compiler flags.
Args:
name: The name of the library target to define.
srcs: The list of architecture-independent source files.
x86_srcs: The list of x86-specific source files.
aarch32_srcs: The list of AArch32-specific source files.
aarch64_srcs: The list of AArch64-specific source files.
wasm_srcs: The list of WebAssembly/MVP-specific source files.
wasmsimd_srcs: The list of WebAssembly/SIMD-specific source files.
copts: The list of compiler flags to use in all builds. -I flags for
include/ and src/ directories of XNNPACK are always prepended
before these user-specified flags.
gcc_copts: The list of compiler flags to use with GCC-like compilers.
msvc_copts: The list of compiler flags to use with MSVC compiler.
mingw_copts: The list of compiler flags to use with MinGW GCC compilers.
msys_copts: The list of compiler flags to use with MSYS (Cygwin) GCC
compilers.
gcc_x86_copts: The list of GCC-like compiler flags to use in x86 (32-bit
and 64-bit) builds.
msvc_x86_32_copts: The list of MSVC compiler flags to use in x86 (32-bit)
builds.
msvc_x86_64_copts: The list of MSVC compiler flags to use in x86 (64-bit)
builds.
apple_aarch32_copts: The list of compiler flags to use in AArch32 builds
with Apple Clang.
aarch32_copts: The list of compiler flags to use in AArch32 builds.
aarch64_copts: The list of compiler flags to use in AArch64 builds.
wasm_copts: The list of compiler flags to use in WebAssembly/MVP builds.
wasmsimd_copts: The list of compiler flags to use in WebAssembly/SIMD
builds.
optimized_copts: The list of compiler flags to use in optimized builds.
Defaults to -O2.
hdrs: The list of header files published by this library to be textually
included by sources in dependent rules.
defines: List of predefines macros to be added to the compile line.
includes: List of include dirs to be added to the compile line.
deps: The list of other libraries to be linked.
visibility: The list of packages that can depend on this target.
"""
native.cc_library(
name = name,
srcs = srcs + select({
":linux_k8": x86_srcs,
":linux_arm": aarch32_srcs,
":linux_armeabi": aarch32_srcs,
":linux_armhf": aarch32_srcs,
":linux_armv7a": aarch32_srcs,
":linux_aarch64": aarch64_srcs,
":macos_x86_64": x86_srcs,
":windows_x86_64_clang": x86_srcs,
":windows_x86_64_mingw": x86_srcs,
":windows_x86_64_msys": x86_srcs,
":windows_x86_64": x86_srcs,
":android_armv7": aarch32_srcs,
":android_arm64": aarch64_srcs,
":android_x86": x86_srcs,
":android_x86_64": x86_srcs,
":ios_armv7": aarch32_srcs,
":ios_arm64": aarch64_srcs,
":ios_arm64e": aarch64_srcs,
":ios_x86": x86_srcs,
":ios_x86_64": x86_srcs,
":watchos_armv7k": aarch32_srcs,
":watchos_arm64_32": aarch64_srcs,
":watchos_x86": x86_srcs,
":watchos_x86_64": x86_srcs,
":tvos_arm64": aarch64_srcs,
":tvos_x86_64": x86_srcs,
":emscripten_wasm": wasm_srcs,
":emscripten_wasmsimd": wasmsimd_srcs,
"//conditions:default": [],
}),
copts = [
"-Iinclude",
"-Isrc",
] + copts + select({
":linux_k8": gcc_x86_copts,
":linux_arm": aarch32_copts,
":linux_armeabi": aarch32_copts,
":linux_armhf": aarch32_copts,
":linux_armv7a": aarch32_copts,
":linux_aarch64": aarch64_copts,
":macos_x86_64": gcc_x86_copts,
":windows_x86_64_clang": ["/clang:" + opt for opt in gcc_x86_copts],
":windows_x86_64_mingw": mingw_copts + gcc_x86_copts,
":windows_x86_64_msys": msys_copts + gcc_x86_copts,
":windows_x86_64": msvc_x86_64_copts,
":android_armv7": aarch32_copts,
":android_arm64": aarch64_copts,
":android_x86": gcc_x86_copts,
":android_x86_64": gcc_x86_copts,
":ios_armv7": apple_aarch32_copts,
":ios_arm64": aarch64_copts,
":ios_arm64e": aarch64_copts,
":ios_x86": gcc_x86_copts,
":ios_x86_64": gcc_x86_copts,
":watchos_armv7k": apple_aarch32_copts,
":watchos_arm64_32": aarch64_copts,
":watchos_x86": gcc_x86_copts,
":watchos_x86_64": gcc_x86_copts,
":tvos_arm64": aarch64_copts,
":tvos_x86_64": gcc_x86_copts,
":emscripten_wasm": wasm_copts,
":emscripten_wasmsimd": wasmsimd_copts,
"//conditions:default": [],
}) + select({
":windows_x86_64_clang": ["/clang:" + opt for opt in gcc_copts],
":windows_x86_64_mingw": gcc_copts,
":windows_x86_64_msys": gcc_copts,
":windows_x86_64": msvc_copts,
"//conditions:default": gcc_copts,
}) + select({
":optimized_build": optimized_copts,
"//conditions:default": [],
}),
defines = defines,
deps = deps,
includes = ["include", "src"] + includes,
linkstatic = True,
linkopts = select({
":linux_k8": ["-lpthread"],
":linux_arm": ["-lpthread"],
":linux_armeabi": ["-lpthread"],
":linux_armhf": ["-lpthread"],
":linux_armv7a": ["-lpthread"],
":linux_aarch64": ["-lpthread"],
":android": ["-lm"],
"//conditions:default": [],
}),
textual_hdrs = hdrs,
visibility = visibility,
)
def xnnpack_aggregate_library(
name,
generic_deps = [],
x86_deps = [],
aarch32_deps = [],
aarch64_deps = [],
wasm_deps = [],
wasmsimd_deps = []):
"""Static library that aggregates architecture-specific dependencies.
Args:
name: The name of the library target to define.
generic_deps: The list of libraries to link on all architectures.
x86_deps: The list of libraries to link in x86 and x86-64 builds.
aarch32_deps: The list of libraries to link in AArch32 builds.
aarch64_deps: The list of libraries to link in AArch32 builds.
wasm_deps: The list of libraries to link in WebAssembly (MVP) builds.
wasmsimd_deps: The list of libraries to link in WebAssembly SIMD builds.
"""
native.cc_library(
name = name,
linkstatic = True,
deps = generic_deps + select({
":linux_k8": x86_deps,
":linux_arm": aarch32_deps,
":linux_armeabi": aarch32_deps,
":linux_armhf": aarch32_deps,
":linux_armv7a": aarch32_deps,
":linux_aarch64": aarch64_deps,
":macos_x86_64": x86_deps,
":windows_x86_64_clang": x86_deps,
":windows_x86_64_mingw": x86_deps,
":windows_x86_64_msys": x86_deps,
":windows_x86_64": x86_deps,
":android_armv7": aarch32_deps,
":android_arm64": aarch64_deps,
":android_x86": x86_deps,
":android_x86_64": x86_deps,
":ios_armv7": aarch32_deps,
":ios_arm64": aarch64_deps,
":ios_arm64e": aarch64_deps,
":ios_x86": x86_deps,
":ios_x86_64": x86_deps,
":watchos_armv7k": aarch32_deps,
":watchos_arm64_32": aarch64_deps,
":watchos_x86": x86_deps,
":watchos_x86_64": x86_deps,
":tvos_arm64": aarch64_deps,
":tvos_x86_64": x86_deps,
":emscripten_wasm": wasm_deps,
":emscripten_wasmsimd": wasmsimd_deps,
}),
)
def xnnpack_unit_test(name, srcs, copts = [], mingw_copts = [], msys_copts = [], deps = [], tags = [], automatic = True, timeout = "short"):
"""Unit test binary based on Google Test.
Args:
name: The name of the test target to define.
srcs: The list of source and header files.
copts: The list of additional compiler flags for the target. -I flags
for include/ and src/ directories of XNNPACK are always prepended
before these user-specified flags.
mingw_copts: The list of compiler flags to use with MinGW GCC compilers.
msys_copts: The list of compiler flags to use with MSYS (Cygwin) GCC compilers.
deps: The list of additional libraries to be linked. Google Test library
(with main() function) is always added as a dependency and does not
need to be explicitly specified.
tags: List of arbitrary text tags.
automatic: Whether to create the test or testable binary.
timeout: How long the test is expected to run before returning.
"""
if automatic:
native.cc_test(
name = name,
srcs = srcs,
copts = xnnpack_std_cxxopts() + [
"-Iinclude",
"-Isrc",
] + select({
":windows_x86_64_mingw": mingw_copts,
":windows_x86_64_msys": msys_copts,
"//conditions:default": [],
}) + select({
":windows_x86_64_clang": ["/clang:-Wno-unused-function"],
":windows_x86_64_mingw": ["-Wno-unused-function"],
":windows_x86_64_msys": ["-Wno-unused-function"],
":windows_x86_64": [],
"//conditions:default": ["-Wno-unused-function"],
}) + copts,
linkopts = select({
":emscripten": xnnpack_emscripten_test_linkopts(),
"//conditions:default": [],
}),
linkstatic = True,
deps = [
"@com_google_googletest//:gtest_main",
] + deps + select({
":emscripten": xnnpack_emscripten_deps(),
"//conditions:default": [],
}),
tags = tags,
timeout = timeout,
)
else:
native.cc_binary(
name = name,
srcs = srcs,
copts = xnnpack_std_cxxopts() + [
"-Iinclude",
"-Isrc",
] + select({
":windows_x86_64_mingw": mingw_copts,
":windows_x86_64_msys": msys_copts,
"//conditions:default": [],
}) + select({
":windows_x86_64_clang": ["/clang:-Wno-unused-function"],
":windows_x86_64_mingw": ["-Wno-unused-function"],
":windows_x86_64_msys": ["-Wno-unused-function"],
":windows_x86_64": [],
"//conditions:default": ["-Wno-unused-function"],
}) + copts,
linkopts = select({
":emscripten": xnnpack_emscripten_test_linkopts(),
"//conditions:default": [],
}),
linkstatic = True,
deps = [
"@com_google_googletest//:gtest_main",
] + deps + select({
":emscripten": xnnpack_emscripten_deps(),
"//conditions:default": [],
}),
testonly = True,
tags = tags,
)
def xnnpack_binary(name, srcs, copts = [], deps = []):
"""Minimal binary
Args:
name: The name of the binary target to define.
srcs: The list of source and header files.
copts: The list of additional compiler flags for the target. -I flags
for include/ and src/ directories of XNNPACK are always prepended
before these user-specified flags.
deps: The list of libraries to be linked.
"""
native.cc_binary(
name = name,
srcs = srcs,
copts = [
"-Iinclude",
"-Isrc",
] + copts,
linkopts = select({
":emscripten": xnnpack_emscripten_minimal_linkopts(),
"//conditions:default": [],
}),
linkstatic = True,
deps = deps,
)
def xnnpack_benchmark(name, srcs, copts = [], deps = [], tags = []):
"""Microbenchmark binary based on Google Benchmark
Args:
name: The name of the binary target to define.
srcs: The list of source and header files.
copts: The list of additional compiler flags for the target. -I flags
for include/ and src/ directories of XNNPACK are always prepended
before these user-specified flags.
deps: The list of additional libraries to be linked. Google Benchmark
library is always added as a dependency and does not need to be
explicitly specified.
"""
native.cc_binary(
name = name,
srcs = srcs,
copts = xnnpack_std_cxxopts() + [
"-Iinclude",
"-Isrc",
] + select({
":windows_x86_64_clang": ["/clang:-Wno-unused-function"],
":windows_x86_64_mingw": ["-Wno-unused-function"],
":windows_x86_64_msys": ["-Wno-unused-function"],
":windows_x86_64": [],
"//conditions:default": ["-Wno-unused-function"],
}) + copts,
linkopts = select({
":emscripten": xnnpack_emscripten_benchmark_linkopts(),
":windows_x86_64_mingw": ["-lshlwapi"],
":windows_x86_64_msys": ["-lshlwapi"],
"//conditions:default": [],
}),
linkstatic = True,
deps = [
"@com_google_benchmark//:benchmark",
] + deps + select({
":emscripten": xnnpack_emscripten_deps(),
"//conditions:default": [],
}),
tags = tags,
)
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

暂无描述
暂无标签
BSD-3-Clause
使用 BSD-3-Clause 开源许可协议
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/eeth/XNNPACK.git
git@gitee.com:eeth/XNNPACK.git
eeth
XNNPACK
XNNPACK
master
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /