From bcc066e733c0e5be2a5e83eab7f14525ad43579a Mon Sep 17 00:00:00 2001 From: Liangliang He Date: Thu, 3 May 2018 11:16:51 +0800 Subject: [PATCH] Add third party license --- WORKSPACE | 10 ++-- mace/core/BUILD | 3 +- mace/python/tools/BUILD | 4 +- mace/python/tools/caffe_converter_lib.py | 2 +- mace/third_party/caffe/BUILD | 20 ++++++++ mace/third_party/caffe/LICENSE | 44 ++++++++++++++++++ mace/{proto => third_party/caffe}/caffe.proto | 0 mace/third_party/gflags/COPYING.txt | 28 +++++++++++ mace/third_party/googletest/LICENSE | 28 +++++++++++ .../googletest.BUILD} | 4 ++ mace/third_party/half/LICENSE.txt | 21 +++++++++ mace/third_party/{ => half}/half.BUILD | 4 ++ mace/third_party/nnlib/BUILD | 15 ++++++ .../nnlib}/hexagon_nn.h | 6 +-- .../nnlib}/libhexagon_controller.so | Bin mace/third_party/nnlib/license.txt | 35 ++++++++++++++ .../hexagon => third_party/nnlib}/ops.h | 0 mace/third_party/opencl-clhpp/LICENSE.txt | 25 ++++++++++ .../{ => opencl-clhpp}/opencl-clhpp.BUILD | 4 ++ mace/third_party/opencl-headers/LICENSE | 25 ++++++++++ .../{ => opencl-headers}/opencl-headers.BUILD | 4 ++ mace/third_party/six/LICENSE | 18 +++++++ mace/third_party/{ => six}/six.BUILD | 2 +- mace/tools/git/gen_version_source.sh | 4 +- tools/sh_commands.py | 6 +-- 25 files changed, 294 insertions(+), 18 deletions(-) create mode 100644 mace/third_party/caffe/BUILD create mode 100644 mace/third_party/caffe/LICENSE rename mace/{proto => third_party/caffe}/caffe.proto (100%) create mode 100644 mace/third_party/gflags/COPYING.txt create mode 100644 mace/third_party/googletest/LICENSE rename mace/third_party/{gtest.BUILD => googletest/googletest.BUILD} (92%) create mode 100644 mace/third_party/half/LICENSE.txt rename mace/third_party/{ => half}/half.BUILD (70%) create mode 100644 mace/third_party/nnlib/BUILD rename mace/{core/runtime/hexagon => third_party/nnlib}/hexagon_nn.h (98%) rename mace/{core/runtime/hexagon => third_party/nnlib}/libhexagon_controller.so (100%) create mode 100644 mace/third_party/nnlib/license.txt rename mace/{core/runtime/hexagon => third_party/nnlib}/ops.h (100%) create mode 100644 mace/third_party/opencl-clhpp/LICENSE.txt rename mace/third_party/{ => opencl-clhpp}/opencl-clhpp.BUILD (92%) create mode 100644 mace/third_party/opencl-headers/LICENSE rename mace/third_party/{ => opencl-headers}/opencl-headers.BUILD (95%) create mode 100644 mace/third_party/six/LICENSE rename mace/third_party/{ => six}/six.BUILD (90%) diff --git a/WORKSPACE b/WORKSPACE index 1f22f327..3491c7b6 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -21,7 +21,7 @@ http_archive( new_http_archive( name = "gtest", - build_file = "mace/third_party/gtest.BUILD", + build_file = "mace/third_party/googletest/googletest.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", @@ -29,7 +29,7 @@ new_http_archive( new_http_archive( name = "six_archive", - build_file = "mace/third_party/six.BUILD", + build_file = "mace/third_party/six/six.BUILD", sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a", strip_prefix = "six-1.10.0", urls = [ @@ -45,7 +45,7 @@ bind( new_http_archive( name = "opencl_headers", - build_file = "mace/third_party/opencl-headers.BUILD", + build_file = "mace/third_party/opencl-headers/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"], @@ -53,14 +53,14 @@ new_http_archive( new_git_repository( name = "opencl_clhpp", - build_file = "mace/third_party/opencl-clhpp.BUILD", + build_file = "mace/third_party/opencl-clhpp/opencl-clhpp.BUILD", commit = "4c6f7d56271727e37fb19a9b47649dd175df2b12", remote = "http://v9.git.n.xiaomi.com/deep-computing/OpenCL-CLHPP-Mirror.git", ) new_git_repository( name = "half", - build_file = "mace/third_party/half.BUILD", + build_file = "mace/third_party/half/half.BUILD", commit = "87d7f25f7ba2c7d3b051f6c857031de0ecac5afd", remote = "http://v9.git.n.xiaomi.com/deep-computing/half.git", ) diff --git a/mace/core/BUILD b/mace/core/BUILD index 68af68fc..19b6ecc1 100644 --- a/mace/core/BUILD +++ b/mace/core/BUILD @@ -33,7 +33,6 @@ cc_library( ], )) + if_hexagon_enabled(glob([ "runtime/hexagon/*.cc", - "runtime/hexagon/libhexagon_controller.so", ])), hdrs = glob([ "*.h", @@ -62,6 +61,8 @@ cc_library( "//mace/utils:utils_prod", ]) + if_not_production_mode([ "//mace/utils:utils_dev", + ]) + if_hexagon_enabled([ + "//mace/third_party/nnlib:libhexagon", ]), ) diff --git a/mace/python/tools/BUILD b/mace/python/tools/BUILD index 08e7bca4..e39922e3 100644 --- a/mace/python/tools/BUILD +++ b/mace/python/tools/BUILD @@ -21,7 +21,7 @@ py_library( srcs_version = "PY2AND3", deps = [ ":memory_optimizer", - "//mace/proto:caffe_py", + "//mace/third_party/caffe:caffe_py", ], ) @@ -41,9 +41,9 @@ py_binary( srcs = ["converter.py"], srcs_version = "PY2AND3", deps = [ - ":tf_converter_lib", ":caffe_converter_lib", ":source_converter_lib", + ":tf_converter_lib", "@six_archive//:six", ], ) diff --git a/mace/python/tools/caffe_converter_lib.py b/mace/python/tools/caffe_converter_lib.py index f10b548a..c2bdcf30 100644 --- a/mace/python/tools/caffe_converter_lib.py +++ b/mace/python/tools/caffe_converter_lib.py @@ -13,7 +13,7 @@ # limitations under the License. from mace.proto import mace_pb2 -from mace.proto import caffe_pb2 +from mace.third_party.caffe import caffe_pb2 from mace.python.tools import memory_optimizer import google.protobuf.text_format import numpy as np diff --git a/mace/third_party/caffe/BUILD b/mace/third_party/caffe/BUILD new file mode 100644 index 00000000..e5bda5ee --- /dev/null +++ b/mace/third_party/caffe/BUILD @@ -0,0 +1,20 @@ +licenses(["notice"]) + +exports_files(["LICENSE"]) + +package( + default_visibility = ["//visibility:public"], +) + +licenses(["notice"]) # Apache 2.0 + +load("@com_google_protobuf//:protobuf.bzl", "py_proto_library") + +py_proto_library( + name = "caffe_py", + srcs = ["caffe.proto"], + default_runtime = "@com_google_protobuf//:protobuf_python", + protoc = "@com_google_protobuf//:protoc", + srcs_version = "PY2AND3", + deps = ["@com_google_protobuf//:protobuf_python"], +) diff --git a/mace/third_party/caffe/LICENSE b/mace/third_party/caffe/LICENSE new file mode 100644 index 00000000..0c99adc1 --- /dev/null +++ b/mace/third_party/caffe/LICENSE @@ -0,0 +1,44 @@ +COPYRIGHT + +All contributions by the University of California: +Copyright (c) 2014-2017 The Regents of the University of California (Regents) +All rights reserved. + +All other contributions: +Copyright (c) 2014-2017, the respective contributors +All rights reserved. + +Caffe uses a shared copyright model: each contributor holds copyright over +their contributions to Caffe. The project versioning records all such +contribution and copyright details. If a contributor wants to further mark +their specific copyright on a particular contribution, they should indicate +their copyright solely in the commit message of the change when it is +committed. + +LICENSE + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +CONTRIBUTION AGREEMENT + +By contributing to the BVLC/caffe repository through pull-request, comment, +or otherwise, the contributor releases their content to the +license and copyright terms herein. diff --git a/mace/proto/caffe.proto b/mace/third_party/caffe/caffe.proto similarity index 100% rename from mace/proto/caffe.proto rename to mace/third_party/caffe/caffe.proto diff --git a/mace/third_party/gflags/COPYING.txt b/mace/third_party/gflags/COPYING.txt new file mode 100644 index 00000000..d15b0c24 --- /dev/null +++ b/mace/third_party/gflags/COPYING.txt @@ -0,0 +1,28 @@ +Copyright (c) 2006, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/mace/third_party/googletest/LICENSE b/mace/third_party/googletest/LICENSE new file mode 100644 index 00000000..1941a11f --- /dev/null +++ b/mace/third_party/googletest/LICENSE @@ -0,0 +1,28 @@ +Copyright 2008, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/mace/third_party/gtest.BUILD b/mace/third_party/googletest/googletest.BUILD similarity index 92% rename from mace/third_party/gtest.BUILD rename to mace/third_party/googletest/googletest.BUILD index b1ae15a9..4612f3ba 100644 --- a/mace/third_party/gtest.BUILD +++ b/mace/third_party/googletest/googletest.BUILD @@ -1,3 +1,7 @@ +licenses(["notice"]) + +exports_files(["LICENSE"]) + cc_library( name = "gtest", srcs = [ diff --git a/mace/third_party/half/LICENSE.txt b/mace/third_party/half/LICENSE.txt new file mode 100644 index 00000000..9e4618bb --- /dev/null +++ b/mace/third_party/half/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2012-2017 Christian Rau + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/mace/third_party/half.BUILD b/mace/third_party/half/half.BUILD similarity index 70% rename from mace/third_party/half.BUILD rename to mace/third_party/half/half.BUILD index 6048911b..2b9144e8 100644 --- a/mace/third_party/half.BUILD +++ b/mace/third_party/half/half.BUILD @@ -1,3 +1,7 @@ +licenses(["notice"]) + +exports_files(["LICENSE.txt"]) + cc_library( name = "half", hdrs = glob([ diff --git a/mace/third_party/nnlib/BUILD b/mace/third_party/nnlib/BUILD new file mode 100644 index 00000000..4ac0be0e --- /dev/null +++ b/mace/third_party/nnlib/BUILD @@ -0,0 +1,15 @@ +# These files are generated fron nnlib project + +licenses(["notice"]) + +exports_files(["license.txt"]) + +cc_library( + name = "libhexagon", + srcs = ["libhexagon_controller.so"], + hdrs = [ + "hexagon_nn.h", + "ops.h", + ], + visibility = ["//visibility:public"], +) diff --git a/mace/core/runtime/hexagon/hexagon_nn.h b/mace/third_party/nnlib/hexagon_nn.h similarity index 98% rename from mace/core/runtime/hexagon/hexagon_nn.h rename to mace/third_party/nnlib/hexagon_nn.h index 7bb5bdef..e23915bc 100644 --- a/mace/core/runtime/hexagon/hexagon_nn.h +++ b/mace/third_party/nnlib/hexagon_nn.h @@ -33,8 +33,8 @@ * */ -#ifndef MACE_CORE_RUNTIME_HEXAGON_HEXAGON_NN_H_ -#define MACE_CORE_RUNTIME_HEXAGON_HEXAGON_NN_H_ +#ifndef MACE_THIRD_PARTY_NNLIB_HEXAGON_NN_H_ +#define MACE_THIRD_PARTY_NNLIB_HEXAGON_NN_H_ #ifndef __QAIC_HEADER #define __QAIC_HEADER(ff) ff #endif // __QAIC_HEADER @@ -221,4 +221,4 @@ __QAIC_HEADER_EXPORT int __QAIC_HEADER(hexagon_nn_execute_new)( #ifdef __cplusplus } #endif -#endif // MACE_CORE_RUNTIME_HEXAGON_HEXAGON_NN_H_ +#endif // MACE_THIRD_PARTY_NNLIB_HEXAGON_NN_H_ diff --git a/mace/core/runtime/hexagon/libhexagon_controller.so b/mace/third_party/nnlib/libhexagon_controller.so similarity index 100% rename from mace/core/runtime/hexagon/libhexagon_controller.so rename to mace/third_party/nnlib/libhexagon_controller.so diff --git a/mace/third_party/nnlib/license.txt b/mace/third_party/nnlib/license.txt new file mode 100644 index 00000000..d5c3aa96 --- /dev/null +++ b/mace/third_party/nnlib/license.txt @@ -0,0 +1,35 @@ + +/* + * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted (subject to the limitations in the + * disclaimer below) provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE + * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT + * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ diff --git a/mace/core/runtime/hexagon/ops.h b/mace/third_party/nnlib/ops.h similarity index 100% rename from mace/core/runtime/hexagon/ops.h rename to mace/third_party/nnlib/ops.h diff --git a/mace/third_party/opencl-clhpp/LICENSE.txt b/mace/third_party/opencl-clhpp/LICENSE.txt new file mode 100644 index 00000000..e022241b --- /dev/null +++ b/mace/third_party/opencl-clhpp/LICENSE.txt @@ -0,0 +1,25 @@ +Copyright (c) 2008-2015 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Materials. + +MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS +KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS +SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT + https://www.khronos.org/registry/ + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. diff --git a/mace/third_party/opencl-clhpp.BUILD b/mace/third_party/opencl-clhpp/opencl-clhpp.BUILD similarity index 92% rename from mace/third_party/opencl-clhpp.BUILD rename to mace/third_party/opencl-clhpp/opencl-clhpp.BUILD index 83737b3c..1b5f0052 100644 --- a/mace/third_party/opencl-clhpp.BUILD +++ b/mace/third_party/opencl-clhpp/opencl-clhpp.BUILD @@ -1,3 +1,7 @@ +licenses(["notice"]) + +exports_files(["LICENSE.txt"]) + genrule( name = "gen_opencl_clhpp", srcs = glob([ diff --git a/mace/third_party/opencl-headers/LICENSE b/mace/third_party/opencl-headers/LICENSE new file mode 100644 index 00000000..020ce65f --- /dev/null +++ b/mace/third_party/opencl-headers/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2008-2015 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Materials. + +MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS +KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS +SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT + https://www.khronos.org/registry/ + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. diff --git a/mace/third_party/opencl-headers.BUILD b/mace/third_party/opencl-headers/opencl-headers.BUILD similarity index 95% rename from mace/third_party/opencl-headers.BUILD rename to mace/third_party/opencl-headers/opencl-headers.BUILD index 117ef0f4..2ee34a60 100644 --- a/mace/third_party/opencl-headers.BUILD +++ b/mace/third_party/opencl-headers/opencl-headers.BUILD @@ -1,3 +1,7 @@ +licenses(["notice"]) + +exports_files(["LICENSE"]) + cc_library( name = "opencl10_headers", hdrs = glob([ diff --git a/mace/third_party/six/LICENSE b/mace/third_party/six/LICENSE new file mode 100644 index 00000000..e558f9d4 --- /dev/null +++ b/mace/third_party/six/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 2010-2015 Benjamin Peterson + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/mace/third_party/six.BUILD b/mace/third_party/six/six.BUILD similarity index 90% rename from mace/third_party/six.BUILD rename to mace/third_party/six/six.BUILD index a1b2f7b2..98cadbd0 100644 --- a/mace/third_party/six.BUILD +++ b/mace/third_party/six/six.BUILD @@ -2,7 +2,7 @@ # Six provides simple utilities for wrapping over differences between Python 2 # and Python 3. -licenses(["notice"]) # MIT +licenses(["notice"]) exports_files(["LICENSE"]) diff --git a/mace/tools/git/gen_version_source.sh b/mace/tools/git/gen_version_source.sh index ef9bbca4..a3ef4daf 100644 --- a/mace/tools/git/gen_version_source.sh +++ b/mace/tools/git/gen_version_source.sh @@ -22,7 +22,7 @@ fi DATE_STR=$(date +%Y%m%d) GIT_VERSION=$(git describe --long --tags) if [[ $? != 0 ]]; then - GIT_VERSION=unknown + GIT_VERSION=unknown-${DATE_STR} else GIT_VERSION=${GIT_VERSION}-${DATE_STR} fi @@ -45,6 +45,6 @@ cat < ${OUTPUT_FILENAME} // This is a generated file. DO NOT EDIT! namespace mace { - const char *MaceVersion() { return "${GIT_VERSION}"; } +const char *MaceVersion() { return "MACEVER-${GIT_VERSION}" + 8; } } // namespace mace EOF diff --git a/tools/sh_commands.py b/tools/sh_commands.py index 6f7dff93..b4027f66 100644 --- a/tools/sh_commands.py +++ b/tools/sh_commands.py @@ -621,7 +621,7 @@ def tuning_run(abi, if not embed_model_data: adb_push("%s/%s.data" % (model_output_dir, model_tag), phone_data_dir, serialno) - adb_push("mace/core/runtime/hexagon/libhexagon_controller.so", + adb_push("mace/third_party/nnlib/libhexagon_controller.so", phone_data_dir, serialno) stdout_buff = [] @@ -789,7 +789,7 @@ def merge_libs(target_soc, project_output_dir = "%s/%s" % (libmace_output_dir, project_name) model_header_dir = "%s/include/mace/public" % project_output_dir model_data_dir = "%s/data" % project_output_dir - hexagon_lib_file = "mace/core/runtime/hexagon/libhexagon_controller.so" + hexagon_lib_file = "mace/third_party/nnlib/libhexagon_controller.so" model_bin_dir = "%s/%s/" % (project_output_dir, abi) if not os.path.exists(model_bin_dir): @@ -1059,7 +1059,7 @@ def build_run_throughput_test(abi, adb_push("codegen/models/%s/%s.data" % dsp_model_tag, phone_data_dir, serialno) - adb_push("mace/core/runtime/hexagon/libhexagon_controller.so", + adb_push("mace/third_party/nnlib/libhexagon_controller.so", phone_data_dir, serialno) -- GitLab