singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [singa] chrishkchris commented on a change in pull request #761: C++ build with Github Actions
Date Mon, 13 Jul 2020 06:05:43 GMT

chrishkchris commented on a change in pull request #761:
URL: https://github.com/apache/singa/pull/761#discussion_r453451711



##########
File path: .github/workflows/macOS.yaml
##########
@@ -0,0 +1,44 @@
+#
+# 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.
+#
+
+name: macOS
+
+on:
+  push:
+  pull_request:
+    
+jobs:
+  build-macOS-cpu:
+    runs-on: macos-latest
+
+    steps:
+      - uses: actions/checkout@v1
+      - uses: actions/setup-python@v2
+        with:
+          python-version: '3.7' 
+      - name: install-build-dependencies  
+        run: brew install protobuf swig opencv glog lmdb numpy && pip3 install numpy
+      - name: configure        
+        run: mkdir build && cd build && cmake -DUSE_PYTHON3=YES ..

Review comment:
       the comment to the cmake flag is the same as above

##########
File path: .github/workflows/cpp.yaml
##########
@@ -0,0 +1,47 @@
+#
+# 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.
+#
+
+# This is a basic workflow to help you get started with Actions
+
+name: C++
+
+# Controls when the action will run. Triggers the workflow on push or pull request
+# events but only for the master branch
+on:
+  push:
+    branches:
+      - master
+      - dev
+  pull_request:
+    branches:
+      - master
+      - dev
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+  build-ubuntu-cpp:
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v1
+      - name: install-build-dependencies
+        run: sudo apt-get install -y libgoogle-glog-dev libprotobuf-dev protobuf-compiler
libncurses-dev libopenblas-dev gfortran libblas-dev liblapack-dev libatlas-base-dev swig libcurl3-dev
cmake dh-autoreconf  
+      - name: configure
+        run: mkdir build && cd build && cmake -DUSE_PYTHON=NO ..

Review comment:
       Since we are using DNNL as one of the C++ computational kernal (other example of comp
kernals are BLAS etc.)
   
   The cmake flag should include -DUSE_DNNL=ON
   
   FYI:
   
   1. This is the cmake command in conda version of SINGA
   https://github.com/apache/singa/blob/dev/tool/conda/singa/build.sh#L43
   ```
   cmake -DCMAKE_INSTALL_PREFIX=$PREFIX -DUSE_CUDA=$USE_CUDA \
   	-DUSE_PYTHON3=ON -DUSE_DNNL=ON -DUSE_DIST=$USE_DIST -DCMAKE_OSX_SYSROOT=${CONDA_BUILD_SYSROOT}
..
   ```
   
   
   2. This is the cmake command in docker version of SINGA
   https://github.com/apache/singa/blob/dev/tool/docker/devel/ubuntu/cpu/Dockerfile#L67
   `cmake -DENABLE_TEST=ON -DUSE_PYTHON3=ON -DUSE_DNNL=ON ..`
   
   You may consider refer to both versions on how to include the DNNL library
   
   Thanks!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message