提交 58360e63 编写于 作者: 李寅

Merge branch 'update-repository-rule' into 'master'

Update repository rules.

See merge request !691
......@@ -11,9 +11,12 @@ def _git_version_conf_impl(repository_ctx):
ret = repository_ctx.execute(
["test", "-f", "%s/.git/logs/HEAD" % mace_root_path])
if ret.return_code == 0:
unused_var = repository_ctx.path(Label("//:.git/HEAD"))
ret = repository_ctx.execute(
["test", "-f", "%s/.git/refs/heads/master" % mace_root_path])
if ret.return_code == 0:
unused_var = repository_ctx.path(Label("//:.git/refs/heads/master"))
repository_ctx.execute([
......
......@@ -9,37 +9,42 @@ def _opencl_encrypt_kernel_impl(repository_ctx):
ret = repository_ctx.execute(
["test", "-f", "%s/.git/logs/HEAD" % mace_root_path])
if ret.return_code == 0:
unused_var = repository_ctx.path(Label("//:.git/HEAD"))
ret = repository_ctx.execute(
["test", "-f", "%s/.git/refs/heads/master" % mace_root_path])
if ret.return_code == 0:
unused_var = repository_ctx.path(Label("//:.git/refs/heads/master"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/activation.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/addn.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/batch_norm.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/bias_add.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/buffer_to_image.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/channel_shuffle.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/common.h"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/concat.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/conv_2d.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/conv_2d_1x1.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/conv_2d_3x3.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/deconv_2d.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/depth_to_space.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/depthwise_conv2d.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/eltwise.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/fully_connected.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/matmul.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/pad.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/pooling.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/reduce_mean.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/resize_bilinear.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/slice.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/softmax.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/space_to_batch.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/winograd_transform.cl"))
ret = repository_ctx.execute(
["test", "-f", "%s/mace/kernels/opencl/cl/common.h" % mace_root_path])
if ret.return_code == 0:
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/activation.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/addn.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/batch_norm.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/bias_add.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/buffer_to_image.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/channel_shuffle.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/common.h"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/concat.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/conv_2d.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/conv_2d_1x1.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/conv_2d_3x3.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/crop.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/deconv_2d.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/depth_to_space.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/depthwise_conv2d.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/eltwise.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/fully_connected.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/matmul.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/pad.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/pooling.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/reduce_mean.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/resize_bilinear.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/slice.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/softmax.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/space_to_batch.cl"))
unused_var = repository_ctx.path(Label("//:mace/kernels/opencl/cl/winograd_transform.cl"))
generated_files_path = repository_ctx.path("gen")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册