Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
Mace
提交
aeb60d27
Mace
项目概览
慢慢CG
/
Mace
与 Fork 源项目一致
Fork自
Xiaomi / Mace
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Mace
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
aeb60d27
编写于
3月 14, 2018
作者:
L
Liangliang He
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update opencl c++ header wrapper inclusion
上级
65c34b78
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
51 addition
and
9555 deletion
+51
-9555
WORKSPACE
WORKSPACE
+33
-25
mace/core/BUILD
mace/core/BUILD
+1
-2
mace/core/runtime/opencl/cl2.hpp
mace/core/runtime/opencl/cl2.hpp
+0
-9526
mace/core/runtime/opencl/cl2_header.h
mace/core/runtime/opencl/cl2_header.h
+1
-1
mace/core/runtime/opencl/opencl_allocator.cc
mace/core/runtime/opencl/opencl_allocator.cc
+1
-1
mace/third_party/opencl-clhpp.BUILD
mace/third_party/opencl-clhpp.BUILD
+15
-0
未找到文件。
WORKSPACE
浏览文件 @
aeb60d27
...
@@ -5,71 +5,79 @@ workspace(name = "mace")
...
@@ -5,71 +5,79 @@ workspace(name = "mace")
# This statement defines the @com_google_protobuf repo.
# This statement defines the @com_google_protobuf repo.
http_archive
(
http_archive
(
name
=
"com_google_protobuf"
,
name
=
"com_google_protobuf"
,
urls
=
[
"http://v9.git.n.xiaomi.com/deep-computing/protobuf/repository/archive.zip?ref=c7457ef65a7a8584b1e3bd396c401ccf8e275ffa"
],
strip_prefix
=
"protobuf-c7457ef65a7a8584b1e3bd396c401ccf8e275ffa-c7457ef65a7a8584b1e3bd396c401ccf8e275ffa"
,
sha256
=
"0a54cae83b77f4b54b7db4eaebadd81fbe91655e84a1ef3f6d29116d75f3a45f"
,
sha256
=
"0a54cae83b77f4b54b7db4eaebadd81fbe91655e84a1ef3f6d29116d75f3a45f"
,
strip_prefix
=
"protobuf-c7457ef65a7a8584b1e3bd396c401ccf8e275ffa-c7457ef65a7a8584b1e3bd396c401ccf8e275ffa"
,
urls
=
[
"http://v9.git.n.xiaomi.com/deep-computing/protobuf/repository/archive.zip?ref=c7457ef65a7a8584b1e3bd396c401ccf8e275ffa"
],
)
)
# cc_proto_library rules implicitly depend on @com_google_protobuf_cc//:cc_toolchain,
# cc_proto_library rules implicitly depend on @com_google_protobuf_cc//:cc_toolchain,
# which is the C++ proto runtime (base classes and common utilities).
# which is the C++ proto runtime (base classes and common utilities).
http_archive
(
http_archive
(
name
=
"com_google_protobuf_cc"
,
name
=
"com_google_protobuf_cc"
,
urls
=
[
"http://v9.git.n.xiaomi.com/deep-computing/protobuf/repository/archive.zip?ref=c7457ef65a7a8584b1e3bd396c401ccf8e275ffa"
],
strip_prefix
=
"protobuf-c7457ef65a7a8584b1e3bd396c401ccf8e275ffa-c7457ef65a7a8584b1e3bd396c401ccf8e275ffa"
,
sha256
=
"0a54cae83b77f4b54b7db4eaebadd81fbe91655e84a1ef3f6d29116d75f3a45f"
,
sha256
=
"0a54cae83b77f4b54b7db4eaebadd81fbe91655e84a1ef3f6d29116d75f3a45f"
,
strip_prefix
=
"protobuf-c7457ef65a7a8584b1e3bd396c401ccf8e275ffa-c7457ef65a7a8584b1e3bd396c401ccf8e275ffa"
,
urls
=
[
"http://v9.git.n.xiaomi.com/deep-computing/protobuf/repository/archive.zip?ref=c7457ef65a7a8584b1e3bd396c401ccf8e275ffa"
],
)
)
new_http_archive
(
new_http_archive
(
name
=
"gtest"
,
name
=
"gtest"
,
url
=
"http://v9.git.n.xiaomi.com/deep-computing/googletest/repository/archive.zip?ref=release-1.8.0"
,
strip_prefix
=
"googletest-release-1.8.0-ec44c6c1675c25b9827aacd08c02433cccde7780"
,
sha256
=
"a0b43a0a43cda0cc401a46d75519d961ef27f6674d4126366e47d9c946c4bbcd"
,
build_file
=
"mace/third_party/gtest.BUILD"
,
build_file
=
"mace/third_party/gtest.BUILD"
,
sha256
=
"a0b43a0a43cda0cc401a46d75519d961ef27f6674d4126366e47d9c946c4bbcd"
,
strip_prefix
=
"googletest-release-1.8.0-ec44c6c1675c25b9827aacd08c02433cccde7780"
,
url
=
"http://v9.git.n.xiaomi.com/deep-computing/googletest/repository/archive.zip?ref=release-1.8.0"
,
)
)
new_http_archive
(
new_http_archive
(
name
=
"six_archive"
,
name
=
"six_archive"
,
build_file
=
"mace/third_party/six.BUILD"
,
sha256
=
"105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a"
,
strip_prefix
=
"six-1.10.0"
,
urls
=
[
urls
=
[
"http://mirror.bazel.build/pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz"
,
"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"
,
"https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz"
,
],
],
sha256
=
"105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a"
,
strip_prefix
=
"six-1.10.0"
,
build_file
=
"mace/third_party/six.BUILD"
,
)
)
bind
(
bind
(
name
=
"six"
,
name
=
"six"
,
actual
=
"@six_archive//:six"
,
actual
=
"@six_archive//:six"
,
)
)
new_http_archive
(
new_http_archive
(
name
=
"opencl_headers"
,
name
=
"opencl_headers"
,
urls
=
[
"http://v9.git.n.xiaomi.com/deep-computing/OpenCL-Headers/repository/archive.zip?ref=master"
],
strip_prefix
=
"OpenCL-Headers-master-f039db6764d52388658ef15c30b2237bbda49803"
,
sha256
=
"439dbdb4e7a02a218dd90d82170c9f7671487cd0e626a20e136690a91f173ad2"
,
build_file
=
"mace/third_party/opencl-headers.BUILD"
,
build_file
=
"mace/third_party/opencl-headers.BUILD"
,
sha256
=
"439dbdb4e7a02a218dd90d82170c9f7671487cd0e626a20e136690a91f173ad2"
,
strip_prefix
=
"OpenCL-Headers-master-f039db6764d52388658ef15c30b2237bbda49803"
,
urls
=
[
"http://v9.git.n.xiaomi.com/deep-computing/OpenCL-Headers/repository/archive.zip?ref=master"
],
)
)
# Set up Android NDK
new_git_repository
(
android_ndk_repository
(
name
=
"opencl_clhpp"
,
name
=
"androidndk
"
,
build_file
=
"mace/third_party/opencl-clhpp.BUILD
"
,
# Android 5.0
commit
=
"4c6f7d56271727e37fb19a9b47649dd175df2b12"
,
api_level
=
21
remote
=
"https://github.com/KhronosGroup/OpenCL-CLHPP.git"
,
)
)
git_repository
(
git_repository
(
name
=
"com_github_gflags_gflags"
,
name
=
"com_github_gflags_gflags"
,
#tag = "v2.2.0",
#tag = "v2.2.0",
commit
=
"30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e"
,
# v2.2.0 + fix of include path
commit
=
"30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e"
,
# v2.2.0 + fix of include path
remote
=
"https://github.com/gflags/gflags.git"
remote
=
"https://github.com/gflags/gflags.git"
,
)
)
bind
(
bind
(
name
=
"gflags"
,
name
=
"gflags"
,
actual
=
"@com_github_gflags_gflags//:gflags"
,
actual
=
"@com_github_gflags_gflags//:gflags"
,
)
)
bind
(
bind
(
name
=
"gflags_nothreads"
,
name
=
"gflags_nothreads"
,
actual
=
"@com_github_gflags_gflags//:gflags_nothreads"
,
actual
=
"@com_github_gflags_gflags//:gflags_nothreads"
,
)
)
# Set up Android NDK
android_ndk_repository
(
name
=
"androidndk"
,
# Android 5.0
api_level
=
21
,
)
mace/core/BUILD
浏览文件 @
aeb60d27
...
@@ -37,7 +37,6 @@ cc_library(
...
@@ -37,7 +37,6 @@ cc_library(
]),
]),
hdrs
=
glob
([
hdrs
=
glob
([
"*.h"
,
"*.h"
,
"runtime/opencl/cl2.hpp"
,
"runtime/opencl/*.h"
,
"runtime/opencl/*.h"
,
"runtime/hexagon/*.h"
,
"runtime/hexagon/*.h"
,
]),
]),
...
@@ -61,10 +60,10 @@ cc_library(
...
@@ -61,10 +60,10 @@ cc_library(
cc_library
(
cc_library
(
name
=
"opencl_headers"
,
name
=
"opencl_headers"
,
hdrs
=
glob
([
hdrs
=
glob
([
"runtime/opencl/cl2.hpp"
,
"runtime/opencl/*.h"
,
"runtime/opencl/*.h"
,
]),
]),
deps
=
[
deps
=
[
"@opencl_clhpp//:opencl_clhpp"
,
"@opencl_headers//:opencl20_headers"
,
"@opencl_headers//:opencl20_headers"
,
],
],
)
)
...
...
mace/core/runtime/opencl/cl2.hpp
已删除
100644 → 0
浏览文件 @
65c34b78
此差异已折叠。
点击以展开。
mace/core/runtime/opencl/cl2_header.h
浏览文件 @
aeb60d27
...
@@ -9,6 +9,6 @@
...
@@ -9,6 +9,6 @@
#define CL_HPP_TARGET_OPENCL_VERSION 200
#define CL_HPP_TARGET_OPENCL_VERSION 200
#include "
mace/core/runtime/opencl
/cl2.hpp"
#include "
include/CL
/cl2.hpp"
#endif // MACE_CORE_RUNTIME_OPENCL_CL2_HEADER_H_
#endif // MACE_CORE_RUNTIME_OPENCL_CL2_HEADER_H_
mace/core/runtime/opencl/opencl_allocator.cc
浏览文件 @
aeb60d27
...
@@ -40,7 +40,7 @@ void *OpenCLAllocator::New(size_t nbytes) const {
...
@@ -40,7 +40,7 @@ void *OpenCLAllocator::New(size_t nbytes) const {
cl
::
Buffer
*
buffer
=
new
cl
::
Buffer
(
OpenCLRuntime
::
Global
()
->
context
(),
cl
::
Buffer
*
buffer
=
new
cl
::
Buffer
(
OpenCLRuntime
::
Global
()
->
context
(),
CL_MEM_READ_WRITE
|
CL_MEM_ALLOC_HOST_PTR
,
CL_MEM_READ_WRITE
|
CL_MEM_ALLOC_HOST_PTR
,
nbytes
,
nullptr
,
&
error
);
nbytes
,
nullptr
,
&
error
);
MACE_CHECK
(
error
==
CL_SUCCESS
);
MACE_CHECK
(
error
==
CL_SUCCESS
)
<<
"error code: "
<<
error
;
MACE_CHECK_NOTNULL
(
buffer
);
MACE_CHECK_NOTNULL
(
buffer
);
return
static_cast
<
void
*>
(
buffer
);
return
static_cast
<
void
*>
(
buffer
);
}
}
...
...
mace/third_party/opencl-clhpp.BUILD
0 → 100644
浏览文件 @
aeb60d27
genrule(
name = "gen_opencl_clhpp",
srcs = glob([
"*",
"**/*",
]),
outs = ["include/CL/cl.hpp", "include/CL/cl2.hpp"],
cmd = "workdir=$$(mktemp -d -t opencl-clhpp-build.XXXXXXXXXX); cp -aL $$(dirname $(location CMakeLists.txt))/* $$workdir; pushd $$workdir; mkdir build; pushd build; cmake ../ -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF; make generate_clhpp generate_cl2hpp; popd; popd; cp -a $$workdir/build/* $(@D); rm -rf $$workdir; echo installing to $(@D)",
)
cc_library(
name = "opencl_clhpp",
srcs = ["include/CL/cl.hpp", "include/CL/cl2.hpp"],
visibility = ["//visibility:public"],
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录