提交 4943f2aa 编写于 作者: L Liangliang He

Add opencl stubs

上级 8c00b57e
......@@ -39,6 +39,14 @@ new_http_archive(
build_file = "mace/third_party/ncnn.BUILD",
)
new_http_archive(
name = "opencl_headers",
urls = ["http://v9.git.n.xiaomi.com/deep-learning/OpenCL-Headers/repository/archive.zip?ref=master"],
strip_prefix = "OpenCL-Headers-master-f039db6764d52388658ef15c30b2237bbda49803",
sha256 = "439dbdb4e7a02a218dd90d82170c9f7671487cd0e626a20e136690a91f173ad2",
build_file = "mace/third_party/opencl-headers.BUILD",
)
# Set up Android NDK
android_ndk_repository(
name = "androidndk",
......
......@@ -9,6 +9,17 @@ licenses(["notice"]) # Apache 2.0
load("//mace:mace.bzl", "if_android")
cc_library(
name = "opencl_runtime",
srcs = glob([
"platform/opencl/*.hpp",
]),
copts = ["-std=c++11"],
deps = [
"@opencl_headers//:opencl20_headers",
],
)
cc_library(
name = "core",
srcs = glob([
......
此差异已折叠。
此差异已折叠。
cc_inc_library(
name = "opencl10_headers",
hdrs = glob([
"opencl10/CL/*.h",
]),
prefix = "opencl10",
visibility = ["//visibility:public"],
)
cc_inc_library(
name = "opencl11_headers",
hdrs = glob([
"opencl11/CL/*.h",
]),
prefix = "opencli11",
visibility = ["//visibility:public"],
)
cc_inc_library(
name = "opencl12_headers",
hdrs = glob([
"opencl12/CL/*.h",
]),
prefix = "opencl12",
visibility = ["//visibility:public"],
)
cc_inc_library(
name = "opencl20_headers",
hdrs = glob([
"opencl20/CL/*.h",
]),
prefix = "opencl20",
visibility = ["//visibility:public"],
)
cc_inc_library(
name = "opencl21_headers",
hdrs = glob([
"opencl21/CL/*.h",
]),
prefix = "opencl21",
visibility = ["//visibility:public"],
)
cc_inc_library(
name = "opencl22_headers",
hdrs = glob([
"opencl22/CL/*.h",
]),
prefix = "opencl22",
visibility = ["//visibility:public"],
)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册