You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by ka...@apache.org on 2019/07/03 04:51:57 UTC
[incubator-singa] branch master updated: SINGA-467 Update the
version of singa-gpu (singa-cpu) package and fix travis build error
This is an automated email from the ASF dual-hosted git repository.
kaiping pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-singa.git
The following commit(s) were added to refs/heads/master by this push:
new 6d4a631 SINGA-467 Update the version of singa-gpu (singa-cpu) package and fix travis build error
new f5ddb14 Merge pull request #474 from nudles/master
6d4a631 is described below
commit 6d4a631828e14f441e667bcd1a7188e14c0712d7
Author: Wang Wei <wa...@gmail.com>
AuthorDate: Sat Jun 29 23:00:43 2019 +0800
SINGA-467 Update the version of singa-gpu (singa-cpu) package and fix travis build error
1. Debug travis error when building singa on osx.
I tried various configuration of the osx_image version.
The solution is a) osx_image: xcode8 (cmake will use the system cblas
instead of the one installed by conda build when using the default
osx image); b) download sdk10.9 manually and
let cmake use it
(https://docs.conda.io/projects/conda-build/en/latest/resources/compiler-tools.html).
otherwise, cmake will fail to compile simple test programs.
2. update singa-cpu and singa-gpu to depend on singa 2.0.0
3. fix the test section in meta.yaml to do test after conda building.
---
.travis.yml | 11 +----------
cmake/Thirdparty/FindCBLAS.cmake | 5 ++---
tool/conda/cpu/meta.yaml | 4 ++--
tool/conda/gpu/meta.yaml | 4 ++--
tool/conda/singa/build.sh | 8 +-------
tool/conda/singa/conda_build_config.yaml | 3 +++
tool/conda/singa/meta.yaml | 4 ++--
tool/travis/build.sh | 6 +++---
tool/travis/depends.sh | 3 +++
9 files changed, 19 insertions(+), 29 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 596a7b9..5863d9d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -15,27 +15,18 @@
# limitations under the License.
#
-# to use container for building
sudo: required
language: cpp
-
-
matrix:
include:
- os: osx
compiler: clang
+ # system cblas will be used by cmake for other xcode versions
osx_image: xcode8
- os: linux
dist: trusty
compiler: gcc
-#
-#addons:
-# apt:
-# packages:
-# - libopenblas-dev
-# - libprotobuf-dev
-# - protobuf-compiler
install:
- travis_wait bash -ex tool/travis/depends.sh
diff --git a/cmake/Thirdparty/FindCBLAS.cmake b/cmake/Thirdparty/FindCBLAS.cmake
index 76c9118..acc78e2 100644
--- a/cmake/Thirdparty/FindCBLAS.cmake
+++ b/cmake/Thirdparty/FindCBLAS.cmake
@@ -17,13 +17,12 @@
#
-FIND_PATH(CBLAS_INCLUDE_DIR NAMES cblas.h PATHS "$ENV{CBLAS_DIR}/include")
-FIND_LIBRARY(CBLAS_LIBRARIES NAMES openblas PATHS "$ENV{CBLAS_DIR}/lib")
+FIND_PATH(CBLAS_INCLUDE_DIR NAMES cblas.h PATHS "$ENV{CMAKE_INCLUDE_PATH}")
+FIND_LIBRARY(CBLAS_LIBRARIES NAMES openblas PATHS "$ENV{CMAKE_LIBRARY_PATH}")
INCLUDE(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CBLAS DEFAULT_MSG CBLAS_INCLUDE_DIR CBLAS_LIBRARIES)
IF(CBLAS_FOUND)
- # MESSAGE(STATUS "Found cblas at ${CBLAS_INCLUDE_DIR}")
MARK_AS_ADVANCED(CBLAS_INCLUDE_DIR CBLAS_LIBRARIES)
ENDIF()
diff --git a/tool/conda/cpu/meta.yaml b/tool/conda/cpu/meta.yaml
index 169dea8..77e9414 100644
--- a/tool/conda/cpu/meta.yaml
+++ b/tool/conda/cpu/meta.yaml
@@ -20,11 +20,11 @@
package:
name: singa-cpu
- version: 1.2.0
+ version: 2.0.0
requirements:
run:
- - singa 1.2.0 cpu
+ - singa 2.0.0 cpu
about:
home: http://singa.apache.org/
diff --git a/tool/conda/gpu/meta.yaml b/tool/conda/gpu/meta.yaml
index 57c5b21..f6424b8 100644
--- a/tool/conda/gpu/meta.yaml
+++ b/tool/conda/gpu/meta.yaml
@@ -19,11 +19,11 @@
package:
name: singa-gpu
- version: 1.2.0
+ version: 2.0.0
requirements:
run:
- - singa 1.2.0 cudnn7.3.1_cuda10.0
+ - singa 2.0.0 cudnn7.3.1_cuda10.0_py37
about:
home: http://singa.apache.org/
diff --git a/tool/conda/singa/build.sh b/tool/conda/singa/build.sh
index a486b56..1772bb6 100644
--- a/tool/conda/singa/build.sh
+++ b/tool/conda/singa/build.sh
@@ -24,11 +24,6 @@ export CMAKE_INCLUDE_PATH=$PREFIX/include:$CMAKE_INCLUDE_PATH
export CMAKE_LIBRARY_PATH=$PREFIX/lib:$CMAKE_LIBRARY_PATH
-
-# USE_PYTHON3=OFF
-# PY3K is set by conda
-# if [ "$PY3K" == "1" ]; then USE_PYTHON3=ON; fi
-
# if [ -z ${CUDA+x} ]; then
if [ -z "$CUDA" ]; then
USE_CUDA=OFF
@@ -36,10 +31,9 @@ else
USE_CUDA=ON
fi
-
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$PREFIX -DUSE_CUDA=$USE_CUDA \
- -DUSE_PYTHON3=ON -DUSE_MKLDNN=ON ..
+ -DUSE_PYTHON3=ON -DUSE_MKLDNN=ON -DCMAKE_OSX_SYSROOT=${CONDA_BUILD_SYSROOT} ..
make
make install
diff --git a/tool/conda/singa/conda_build_config.yaml b/tool/conda/singa/conda_build_config.yaml
index 3cce8f4..5c68cbc 100644
--- a/tool/conda/singa/conda_build_config.yaml
+++ b/tool/conda/singa/conda_build_config.yaml
@@ -21,6 +21,9 @@ c_compiler_version: # [linux]
- 5.4 # [linux]
cxx_compiler_version: # [linux]
- 5.4 # [linux]
+# https://docs.conda.io/projects/conda-build/en/latest/resources/compiler-tools.html#macos-sdk
+CONDA_BUILD_SYSROOT:
+ - "/tmp/MacOSX10.9.sdk" # [osx]
cudnn: # [linux]
- "7.3.1 cuda10.0_0" # [environ.get("CUDA")=="10.0"]
- "7.3.1 cuda9.0_0" # [environ.get("CUDA")=="9.0"]
diff --git a/tool/conda/singa/meta.yaml b/tool/conda/singa/meta.yaml
index bc5084f..efeb541 100644
--- a/tool/conda/singa/meta.yaml
+++ b/tool/conda/singa/meta.yaml
@@ -66,8 +66,8 @@ requirements:
test:
source_files:
- test/python/*.py
- test:
- - python run.py
+ commands:
+ - cd test/python && python run.py
about:
home: http://singa.apache.org/
diff --git a/tool/travis/build.sh b/tool/travis/build.sh
index f58d61c..12285c3 100644
--- a/tool/travis/build.sh
+++ b/tool/travis/build.sh
@@ -31,9 +31,9 @@ export CONDA_BLD_PATH=~/conda-bld-$suffix
mkdir $CONDA_BLD_PATH
conda build tool/conda/singa --python 3.6
-conda install --use-local singa
-cd test/python
-$HOME/miniconda/bin/python run.py
+# conda install --use-local singa
+# cd test/python
+# $HOME/miniconda/bin/python run.py
if [[ "$TRAVIS_SECURE_ENV_VARS" == "false" ]];
# install and run unittest
diff --git a/tool/travis/depends.sh b/tool/travis/depends.sh
index 7b0cac2..626108a 100644
--- a/tool/travis/depends.sh
+++ b/tool/travis/depends.sh
@@ -21,6 +21,9 @@ if [[ "$TRAVIS_OS_NAME" == "linux" ]];
then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
else
+ # https://docs.conda.io/projects/conda-build/en/latest/resources/compiler-tools.html#macos-sdk
+ wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.9.sdk.tar.xz
+ tar xf MacOSX10.9.sdk.tar.xz -C /tmp/
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
fi
bash miniconda.sh -b -p $HOME/miniconda