2021-01-11 18:16:03 +08:00
|
|
|
package(
|
|
|
|
|
default_visibility = ["//visibility:public"],
|
|
|
|
|
features = ["-parse_headers"],
|
|
|
|
|
)
|
|
|
|
|
|
2021-03-01 14:50:43 +08:00
|
|
|
cc_library(
|
|
|
|
|
name = "nbg_parser",
|
|
|
|
|
includes = [
|
|
|
|
|
"include"
|
|
|
|
|
],
|
|
|
|
|
hdrs =
|
|
|
|
|
glob(["include/tim/utils/nbg_parser/*.h"])
|
|
|
|
|
,
|
|
|
|
|
srcs =
|
|
|
|
|
glob(["src/tim/utils/nbg_parser/*.c"])
|
|
|
|
|
,
|
|
|
|
|
linkstatic = True,
|
|
|
|
|
strip_include_prefix = "include"
|
|
|
|
|
)
|
|
|
|
|
|
2021-01-11 18:16:03 +08:00
|
|
|
cc_library(
|
|
|
|
|
name = "tim-vx_interface",
|
2021-10-12 13:47:10 +08:00
|
|
|
copts = ["-std=c++14", "-Werror", "-fvisibility=default", "-pthread"],
|
2021-01-11 18:16:03 +08:00
|
|
|
includes = [
|
|
|
|
|
"include",
|
|
|
|
|
"src/tim/vx",
|
|
|
|
|
],
|
|
|
|
|
hdrs = [
|
|
|
|
|
"include/tim/vx/context.h",
|
|
|
|
|
"include/tim/vx/graph.h",
|
|
|
|
|
"include/tim/vx/operation.h",
|
|
|
|
|
"include/tim/vx/tensor.h",
|
|
|
|
|
"include/tim/vx/types.h",
|
2021-05-11 09:46:46 +08:00
|
|
|
"include/tim/transform/layout_inference.h"
|
2021-01-11 18:16:03 +08:00
|
|
|
] + glob([
|
|
|
|
|
"include/tim/vx/ops/*.h"
|
|
|
|
|
]),
|
|
|
|
|
srcs = [
|
|
|
|
|
"src/tim/vx/context_private.h",
|
|
|
|
|
"src/tim/vx/context.cc",
|
|
|
|
|
"src/tim/vx/graph_private.h",
|
|
|
|
|
"src/tim/vx/graph.cc",
|
|
|
|
|
"src/tim/vx/operation.cc",
|
|
|
|
|
"src/tim/vx/operation_private.h",
|
|
|
|
|
"src/tim/vx/tensor.cc",
|
|
|
|
|
"src/tim/vx/tensor_private.h",
|
|
|
|
|
"src/tim/vx/type_utils.h",
|
|
|
|
|
"src/tim/vx/type_utils.cc",
|
2021-05-11 09:46:46 +08:00
|
|
|
"src/tim/transform/layout_inference.cc",
|
|
|
|
|
"src/tim/transform/permute_vector.h",
|
|
|
|
|
"src/tim/transform/layout_infer_context.h",
|
2021-01-11 18:16:03 +08:00
|
|
|
] + glob([
|
2021-06-01 18:56:39 +08:00
|
|
|
"src/tim/vx/ops/*.cc",
|
|
|
|
|
"src/tim/vx/ops/*.h"
|
2021-05-11 02:21:22 +08:00
|
|
|
], exclude = ["src/tim/vx/ops/*_test.cc"]
|
|
|
|
|
) + glob(["src/tim/transform/ops/*.*"]),
|
2021-01-11 18:16:03 +08:00
|
|
|
deps = [
|
|
|
|
|
"//src/tim/vx/internal:ovxlibimpl",
|
|
|
|
|
],
|
|
|
|
|
linkstatic = True,
|
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
|
name = "libtim-vx.so",
|
|
|
|
|
linkshared = True,
|
|
|
|
|
linkstatic = False,
|
|
|
|
|
deps = [
|
|
|
|
|
"tim-vx_interface",
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
|
2021-05-14 17:04:55 +08:00
|
|
|
cc_library(
|
|
|
|
|
name = "tim-lite_interface",
|
|
|
|
|
copts = ["-std=c++14", "-Werror", "-fvisibility=default"],
|
|
|
|
|
includes = [
|
|
|
|
|
"include",
|
|
|
|
|
"src/tim/lite",
|
|
|
|
|
],
|
|
|
|
|
hdrs = [
|
|
|
|
|
"include/tim/lite/execution.h",
|
|
|
|
|
"include/tim/lite/handle.h",
|
|
|
|
|
],
|
|
|
|
|
srcs = [
|
|
|
|
|
"src/tim/lite/execution_private.h",
|
|
|
|
|
"src/tim/lite/execution.cc",
|
|
|
|
|
"src/tim/lite/handle_private.h",
|
|
|
|
|
"src/tim/lite/handle.cc",
|
|
|
|
|
],
|
|
|
|
|
deps = [
|
2021-05-14 18:31:08 +08:00
|
|
|
"//prebuilt-sdk:VIP_LITE_LIB",
|
2021-05-14 17:04:55 +08:00
|
|
|
],
|
|
|
|
|
linkstatic = True,
|
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
|
name = "libtim-lite.so",
|
|
|
|
|
linkshared = True,
|
|
|
|
|
linkstatic = False,
|
|
|
|
|
deps = [
|
|
|
|
|
"tim-lite_interface",
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
2021-02-19 17:53:24 +08:00
|
|
|
##############################################################################
|
|
|
|
|
# unit test
|
|
|
|
|
##############################################################################
|
|
|
|
|
cc_test (
|
|
|
|
|
name = "unit_test",
|
|
|
|
|
copts = ["-std=c++14", "-Werror"],
|
2021-06-01 18:56:39 +08:00
|
|
|
srcs = [
|
|
|
|
|
"src/tim/vx/test_utils.h",
|
|
|
|
|
] + glob(["src/tim/**/*_test.cc"]),
|
2021-02-19 17:53:24 +08:00
|
|
|
deps = [
|
|
|
|
|
"@gtest//:gtest",
|
|
|
|
|
"@gtest//:gtest_main",
|
|
|
|
|
":tim-vx_interface",
|
|
|
|
|
]
|
|
|
|
|
)
|