Repository: incubator-singa Updated Branches: refs/heads/master 24a1be9aa -> f495ff360
Update LICENSE file and headers of source files. Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/198a0496 Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/198a0496 Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/198a0496 Branch: refs/heads/master Commit: 198a0496c1969a275ee5691f9fb47ad6f6c46353 Parents: 24a1be9 Author: Wei Wang <[email protected]> Authored: Sun Jan 10 22:24:39 2016 +0800 Committer: Wei Wang <[email protected]> Committed: Sun Jan 10 23:05:17 2016 +0800 ---------------------------------------------------------------------- LICENSE | 19 +++++--- Makefile.am | 21 --------- NOTICE | 11 +---- examples/rnnlm/create_data.cc | 42 +++-------------- include/singa/utils/blob.h | 32 +------------ include/singa/utils/cuda_utils.h | 77 -------------------------------- include/singa/utils/math_blob.h | 2 + src/utils/blob.cc | 30 +------------ src/utils/common.cc | 26 ----------- tool/python/singa/__init__.py | 22 +++++++++ tool/python/singa/utils/__init__.py | 22 +++++++++ 11 files changed, 70 insertions(+), 234 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/198a0496/LICENSE ---------------------------------------------------------------------- diff --git a/LICENSE b/LICENSE index 7e79eef..75001c1 100644 --- a/LICENSE +++ b/LICENSE @@ -206,16 +206,17 @@ subcomponents is subject to the terms and conditions of the following licenses. ============================================================================ -SINGA bundles the following under BSD 2-clause license: include/utils/blob.h, -src/utils/blob.cc, include/utils/common.h, src/utils/common.cc +SINGA bundles the following under BSD 2-clause license: include/singa/utils/blob.h, +src/utils/blob.cc, include/singa/utils/common.h, src/utils/common.cc, include/singa/utils/cuda_utils.h Copyright (c) 2014, 2015, The Regents of the University of California (Regents) +Copyright (c) 2014, the respective contributors https://github.com/BVLC/caffe/blob/master/LICENSE ===================================================================== -SINGA bundles the following under BSD 2-clause license: include/utils/tinydir.h +SINGA bundles the following under BSD 2-clause license: include/singa/utils/tinydir.h -Copyright (c) 2013, Cong Xu +Copyright (c) 2013, Cong Xu, Baudouin Feildel https://github.com/cxong/tinydir/blob/master/COPYING ===================================================================== @@ -231,7 +232,15 @@ Copyright 2008, Google Inc. https://code.google.com/p/googletest/source/browse/trunk/LICENSE ===================================================================== -SINGA bundles the following under New BSD license: tool/cppling.py +SINGA bundles the following under New BSD license: tool/cpplint.py Copyright (c) 2009 Google Inc. All rights reserved. https://github.com/google/styleguide/tree/gh-pages/cpplint + +===================================================================== +SINGA bundles the following under New BSD license: examples/rnnlm/create_data.cc + +Copyright (c) 2010-2012 Tomas Mikolov +Copyright (c) 2013 Cantab Research Ltd +All rights reserved. +http://www.fit.vutbr.cz/~imikolov/rnnlm/ http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/198a0496/Makefile.am ---------------------------------------------------------------------- diff --git a/Makefile.am b/Makefile.am index 7ae4537..a432dc8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,24 +1,3 @@ -#/************************************************************ -#* -#* Licensed to the Apache Software Foundation (ASF) under one -#* or more contributor license agreements. See the NOTICE file -#* distributed with this work for additional information -#* regarding copyright ownership. The ASF licenses this file -#* to you under the Apache License, Version 2.0 (the -#* "License"); you may not use this file except in compliance -#* with the License. You may obtain a copy of the License at -#* -#* http://www.apache.org/licenses/LICENSE-2.0 -#* -#* Unless required by applicable law or agreed to in writing, -#* software distributed under the License is distributed on an -#* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -#* KIND, either express or implied. See the License for the -#* specific language governing permissions and limitations -#* under the License. -#* -#*************************************************************/ - ACLOCAL_AMFLAGS = -I config AUTOMAKE_OPTIONS = foreign subdir-objects http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/198a0496/NOTICE ---------------------------------------------------------------------- diff --git a/NOTICE b/NOTICE index 24ef0a5..3b30c10 100644 --- a/NOTICE +++ b/NOTICE @@ -4,13 +4,4 @@ Copyright 2015 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). -Portions of this software were developed at the National University of -Singapore. - -This software contains codes from the other projects: Caffe (https://github.com/BVLC/caffe), tinydir -(https://github.com/cxong/tinydir), mshadow (https://github.com/dmlc/mshadow) and gtest -(https://code.google.com/p/googletest/). - -The software uses external libraries including czmq, glog, google protobuf, OpenCV and Openblas. - -The software also has optional dependencies for advanced features, including cuda, cudnn, libhdf3, HDFS, Apache Mesos. +Portions of this software were developed at the National University of Singapore. http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/198a0496/examples/rnnlm/create_data.cc ---------------------------------------------------------------------- diff --git a/examples/rnnlm/create_data.cc b/examples/rnnlm/create_data.cc index a5cd186..d1edbdb 100644 --- a/examples/rnnlm/create_data.cc +++ b/examples/rnnlm/create_data.cc @@ -1,38 +1,3 @@ -/* - * This file include code from rnnlmlib-0.4 whose licence is as follows: -Copyright (c) 2010-2012 Tomas Mikolov -Copyright (c) 2013 Cantab Research Ltd -All rights reserved. - -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. - -3. Neither name of copyright holders 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 REGENTS 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. -*/ - /************************************************************ * * Licensed to the Apache Software Foundation (ASF) under one @@ -53,6 +18,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * under the License. * *************************************************************/ +/* + * This file include code from rnnlmlib-0.4 under BSD new license. + * Copyright (c) 2010-2012 Tomas Mikolov + * Copyright (c) 2013 Cantab Research Ltd + * All rights reserved. + */ + // // This code creates DataShard for RNNLM dataset. http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/198a0496/include/singa/utils/blob.h ---------------------------------------------------------------------- diff --git a/include/singa/utils/blob.h b/include/singa/utils/blob.h index 256400e..3351cff 100644 --- a/include/singa/utils/blob.h +++ b/include/singa/utils/blob.h @@ -20,8 +20,7 @@ *************************************************************/ /** - * The code is adapted from that of Caffe whose license is attached. - * + * The code is adapted from that of Caffe which is under BSD 2 Clause License. * COPYRIGHT * All contributions by the University of California: * Copyright (c) 2014, The Regents of the University of California (Regents) @@ -29,35 +28,6 @@ * All other contributions: * Copyright (c) 2014, 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. - * */ #ifndef SINGA_UTILS_BLOB_H_ #define SINGA_UTILS_BLOB_H_ http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/198a0496/include/singa/utils/cuda_utils.h ---------------------------------------------------------------------- diff --git a/include/singa/utils/cuda_utils.h b/include/singa/utils/cuda_utils.h deleted file mode 100644 index 0b3e0a5..0000000 --- a/include/singa/utils/cuda_utils.h +++ /dev/null @@ -1,77 +0,0 @@ -/************************************************************ -* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -* -*************************************************************/ - -/** - * The code is adapted from that of Caffe whose license is attached. - * - * COPYRIGHT - * All contributions by the University of California: - * Copyright (c) 2014, The Regents of the University of California (Regents) - * All rights reserved. - * All other contributions: - * Copyright (c) 2014, 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. - * - */ -#ifndef SINGA_UTILS_CUDA_UTILS_H_ -#define SINGA_UTILS_CUDA_UTILS_H_ -#include <cublas_v2.h> -#include <cuda.h> -#include <cuda_runtime.h> -#include <curand.h> - -// CUDA: various checks for different function calls. -#define CUDA_CHECK(condition) \ - /* Code block avoids redefinition of cudaError_t error */ \ - do { \ - cudaError_t error = condition; \ - CHECK_EQ(error, cudaSuccess) << " " << cudaGetErrorString(error); \ - } while (0) - -#endif // SINGA_UTILS_CUDA_UTILS_H_ http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/198a0496/include/singa/utils/math_blob.h ---------------------------------------------------------------------- diff --git a/include/singa/utils/math_blob.h b/include/singa/utils/math_blob.h index e151c37..778824e 100644 --- a/include/singa/utils/math_blob.h +++ b/include/singa/utils/math_blob.h @@ -352,6 +352,8 @@ void Copy(const Blob<Dtype>& A, Blob<Dtype>* B) { #ifdef USE_GPU CUDA_CHECK(cudaMemcpy(static_cast<Dtype*>(B->mutable_gpu_data()), A.gpu_data(), sizeof(Dtype) * A.count(), cudaMemcpyDefault)); +#else + LOG(FATAL) << "Not implemented"; #endif } } http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/198a0496/src/utils/blob.cc ---------------------------------------------------------------------- diff --git a/src/utils/blob.cc b/src/utils/blob.cc index 91542e6..bfc36e6 100644 --- a/src/utils/blob.cc +++ b/src/utils/blob.cc @@ -20,7 +20,7 @@ *************************************************************/ /** - * The code is adapted from Caffe whose license is attached. + * The code is adapted from Caffe under BSD 2 Clause license. * * COPYRIGHT * All contributions by the University of California: @@ -29,34 +29,6 @@ * All other contributions: * Copyright (c) 2014, 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. */ #include "singa/utils/blob.h" http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/198a0496/src/utils/common.cc ---------------------------------------------------------------------- diff --git a/src/utils/common.cc b/src/utils/common.cc index eefdb5c..fe14dc4 100644 --- a/src/utils/common.cc +++ b/src/utils/common.cc @@ -20,10 +20,6 @@ *************************************************************/ /** - * The some functions in this file are adapted from Caffe whose license - * is attached. - * - * COPYRIGHT * All contributions by the University of California: * Copyright (c) 2014, The Regents of the University of California (Regents) * All rights reserved. @@ -36,28 +32,6 @@ * 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. */ #include "singa/utils/common.h" http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/198a0496/tool/python/singa/__init__.py ---------------------------------------------------------------------- diff --git a/tool/python/singa/__init__.py b/tool/python/singa/__init__.py index e69de29..55edef3 100644 --- a/tool/python/singa/__init__.py +++ b/tool/python/singa/__init__.py @@ -0,0 +1,22 @@ +/************************************************************ +* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +* +*************************************************************/ + + http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/198a0496/tool/python/singa/utils/__init__.py ---------------------------------------------------------------------- diff --git a/tool/python/singa/utils/__init__.py b/tool/python/singa/utils/__init__.py index e69de29..55edef3 100644 --- a/tool/python/singa/utils/__init__.py +++ b/tool/python/singa/utils/__init__.py @@ -0,0 +1,22 @@ +/************************************************************ +* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +* +*************************************************************/ + +
