Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
c++ dataloader and built-in image/bbox
Browse files Browse the repository at this point in the history
  • Loading branch information
zhreshold committed Apr 17, 2020
1 parent f882de0 commit 44c53e0
Show file tree
Hide file tree
Showing 73 changed files with 7,843 additions and 338 deletions.
4 changes: 2 additions & 2 deletions cd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ MXNet aims to support a variety of frontends, e.g. Python, Java, Perl, R, etc. a

The CD process is driven by the [CD pipeline job](Jenkinsfile_cd_pipeline), which orchestrates the order in which the artifacts are delivered. For instance, first publish the libmxnet library before publishing the pip package. It does this by triggering the [release job](Jenkinsfile_release_job) with a specific set of parameters for each delivery channel. The release job executes the specific release pipeline for a delivery channel across all MXNet *variants*.

A variant is a specific environment or features for which MXNet is compiled. For instance CPU, GPU with CUDA v10.0, CUDA v9.0 with MKL-DNN support, etc.
A variant is a specific environment or features for which MXNet is compiled. For instance CPU, GPU with CUDA v10.0, CUDA v9.0 with MKL-DNN support, etc.

Currently, below variants are supported. All of these variants except native have MKL-DNN backend enabled.

Expand Down Expand Up @@ -120,7 +120,7 @@ The "first mile" of the CD process is posting the mxnet binaries to the [artifac

##### Timeout

We shouldn't set global timeouts for the pipelines. Rather, the `step` being executed should be rapped with a `timeout` function (as in the pipeline example above). The `max_time` is a global variable set at the [release job](Jenkinsfile_release_job) level.
We shouldn't set global timeouts for the pipelines. Rather, the `step` being executed should be rapped with a `timeout` function (as in the pipeline example above). The `max_time` is a global variable set at the [release job](Jenkinsfile_release_job) level.

##### Node of execution

Expand Down
7 changes: 3 additions & 4 deletions cd/utils/artifact_repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ An mxnet compiled library, or artifact for our purposes, is identified by the fo

**Commit Id**

Manually configured through the --git-sha argument.
Manually configured through the --git-sha argument.

If not set, derived by:

Expand All @@ -59,7 +59,7 @@ As long as the tool is being run from the MXNet code base, the runtime feature d

If it has been compiled with CUDA support, the output of /usr/local/cuda/bin/nvcc --version can be mined for the exact CUDA version (eg. 8.0, 9.0, etc.).

By knowing which features are enabled on the binary, and if necessary, which CUDA version is installed on the machine, the value for the variant argument can be calculated. Eg. if CUDA features are enabled, and nvcc reports cuda version 10, then the variant would be cu100. If neither MKL-DNN nor CUDA features are enabled, the variant would be native.
By knowing which features are enabled on the binary, and if necessary, which CUDA version is installed on the machine, the value for the variant argument can be calculated. Eg. if CUDA features are enabled, and nvcc reports cuda version 10, then the variant would be cu100. If neither MKL-DNN nor CUDA features are enabled, the variant would be native.

**Dependency Linking**

Expand All @@ -68,7 +68,7 @@ The library dependencies can be either statically or dynamically linked. This pr
### Uploading an Artifact

The user must specify the path to the libmxnet.so, any license files, and any dependencies. The latter two are optional.

Example:

`./artifact_repository.py --push --static --libmxnet /path/to/libmxnet.so --licenses path/to/license1.txt /path/to/other_licenses/*.txt --dependencies /path/to/dependencies/*.so`
Expand Down Expand Up @@ -102,4 +102,3 @@ dist
```

The libmxnet.meta file will include the characteristics of the artifact (ie. library type, variant, git commit id, etc.) in a “property” file format.

2 changes: 1 addition & 1 deletion ci/docker/Dockerfile.build.test.armv7
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ COPY install/ubuntu_adduser.sh /work/
RUN /work/ubuntu_adduser.sh

COPY runtime_functions.sh /work/
WORKDIR /work/mxnet
WORKDIR /work/mxnet
7 changes: 6 additions & 1 deletion ci/docker/Dockerfile.build.test.armv8
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ FROM arm64v8/ubuntu:20.04

WORKDIR /usr/local


WORKDIR /usr/local

COPY install/ubuntu_rat.sh /work/
RUN /work/ubuntu_rat.sh
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3 \
python3-pip \
Expand All @@ -38,4 +43,4 @@ COPY install/ubuntu_adduser.sh /work/
RUN /work/ubuntu_adduser.sh

COPY runtime_functions.sh /work/
WORKDIR /work/mxnet
WORKDIR /work/mxnet
4 changes: 1 addition & 3 deletions ci/docker/Dockerfile.build.ubuntu_rat
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

FROM ubuntu:16.04

WORKDIR /work/deps
WORKDIR /usr/local

COPY install/ubuntu_rat.sh /work/
RUN /work/ubuntu_rat.sh
Expand All @@ -31,6 +31,4 @@ COPY install/ubuntu_adduser.sh /work/
RUN /work/ubuntu_adduser.sh

COPY runtime_functions.sh /work/

WORKDIR /work/mxnet
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
43 changes: 43 additions & 0 deletions ci/docker/Dockerfile.publish.centos7_gpu_cu90
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# -*- mode: dockerfile -*-
# 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.

FROM nvidia/cuda:9.0-cudnn7-devel-centos7

WORKDIR /work/deps

COPY install/centos7_base.sh /work/
RUN /work/centos7_base.sh
COPY install/centos7_ccache.sh /work/
RUN /work/centos7_ccache.sh
COPY install/centos7_python.sh /work/
RUN /work/centos7_python.sh
COPY install/centos7_scala.sh /work/
RUN /work/centos7_scala.sh
ENV SHORT_CUDA_VERSION=9.0
ENV SHORT_NCCL_VERSION=2.4.8
COPY install/centos7_nccl.sh /work/
RUN /work/centos7_nccl.sh

ARG USER_ID=0
COPY install/centos7_adduser.sh /work/
RUN /work/centos7_adduser.sh

ENV PYTHONPATH=./python/
WORKDIR /work/mxnet

COPY runtime_functions.sh /work/
18 changes: 10 additions & 8 deletions ci/docker/Dockerfile.publish.test.ubuntu1604_cpu
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,22 @@

FROM ubuntu:16.04

WORKDIR /work/deps
WORKDIR /usr/local

COPY install/ubuntu_base.sh /work/
RUN /work/ubuntu_base.sh

COPY install/ubuntu_scala.sh /work/
RUN /work/ubuntu_scala.sh
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3 \
python3-pip \
python3-numpy \
python3-scipy \
python3-nose \
python3-nose-timer \
python3-requests \
&& rm -rf /var/lib/apt/lists/*

ARG USER_ID=0
ARG GROUP_ID=0
COPY install/ubuntu_adduser.sh /work/
RUN /work/ubuntu_adduser.sh

COPY runtime_functions.sh /work/

WORKDIR /work/mxnet
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
24 changes: 13 additions & 11 deletions ci/docker/Dockerfile.publish.test.ubuntu1604_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,20 @@ FROM nvidia/cuda:9.2-cudnn7-devel-ubuntu16.04

WORKDIR /work/deps

COPY install/ubuntu_base.sh /work/
RUN /work/ubuntu_base.sh

COPY install/ubuntu_scala.sh /work/
RUN /work/ubuntu_scala.sh
COPY install/centos7_base.sh /work/
RUN /work/centos7_base.sh
COPY install/centos7_ccache.sh /work/
RUN /work/centos7_ccache.sh
COPY install/centos7_python.sh /work/
RUN /work/centos7_python.sh
COPY install/centos7_scala.sh /work/
RUN /work/centos7_scala.sh

ARG USER_ID=0
ARG GROUP_ID=0
COPY install/ubuntu_adduser.sh /work/
RUN /work/ubuntu_adduser.sh

COPY runtime_functions.sh /work/
COPY install/centos7_adduser.sh /work/
RUN /work/centos7_adduser.sh

ENV PYTHONPATH=./python/
WORKDIR /work/mxnet
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib

COPY runtime_functions.sh /work/
11 changes: 5 additions & 6 deletions ci/docker/Dockerfile.publish.test.ubuntu1804_cpu
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ COPY install/ubuntu_scala.sh /work/
RUN /work/ubuntu_scala.sh

ARG USER_ID=0
ARG GROUP_ID=0
COPY install/ubuntu_adduser.sh /work/
RUN /work/ubuntu_adduser.sh

COPY runtime_functions.sh /work/
COPY install/centos7_adduser.sh /work/
RUN /work/centos7_adduser.sh

ENV PYTHONPATH=./python/
WORKDIR /work/mxnet
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib

COPY runtime_functions.sh /work/
3 changes: 0 additions & 3 deletions ci/docker/install/ubuntu_julia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
# specific language governing permissions and limitations
# under the License.

# build and install are separated so changes to build don't invalidate
# the whole docker cache for the image

set -ex

function install_julia() {
Expand Down
5 changes: 3 additions & 2 deletions ci/docker/install/ubuntu_runas_sudo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
# specific language governing permissions and limitations
# under the License.

# build and install are separated so changes to build don't invalidate
# the whole docker cache for the image
# Install Thrust 1.9.8 to be shipped with Cuda 11.
# Fixes https://github.com/thrust/thrust/issues/1072 for Clang 10
# This file can be deleted when using Cuda 11 on CI

set -ex

Expand Down
9 changes: 5 additions & 4 deletions ci/docker/install/ubuntu_tutorials.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env bash

# 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
Expand All @@ -17,8 +15,11 @@
# specific language governing permissions and limitations
# under the License.

# build and install are separated so changes to build don't invalidate
# the whole docker cache for the image
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR "armv7l")
set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
set(CMAKE_FIND_ROOT_PATH "/usr/arm-linux-gnueabihf" "/usr/local/arm-linux-gnueabihf")

set -ex
apt-get update || true
Expand Down
36 changes: 36 additions & 0 deletions config/distribution/linux_cu90.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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.

set(CMAKE_BUILD_TYPE "Distribution" CACHE STRING "Build type")
set(CFLAGS "-mno-avx" CACHE STRING "CFLAGS")
set(CXXFLAGS "-mno-avx" CACHE STRING "CXXFLAGS")

set(USE_CUDA ON CACHE BOOL "Build with CUDA support")
set(USE_CUDNN ON CACHE BOOL "Build with CUDNN support")
set(USE_NCCL ON CACHE BOOL "Build with NCCL support")
set(USE_OPENCV ON CACHE BOOL "Build with OpenCV support")
set(USE_OPENMP ON CACHE BOOL "Build with Openmp support")
set(USE_MKL_IF_AVAILABLE OFF CACHE BOOL "Use Intel MKL if found")
set(USE_MKLDNN ON CACHE BOOL "Build with MKL-DNN support")
set(USE_LAPACK ON CACHE BOOL "Build with lapack support")
set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.")
set(USE_SSE ON CACHE BOOL "Build with x86 SSE instruction support")
set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support")
set(USE_LIBJPEG_TURBO ON CACHE BOOL "Build with libjpeg-turbo")

set(CUDACXX "/usr/local/cuda-9.0/bin/nvcc" CACHE STRING "Cuda compiler")
set(MXNET_CUDA_ARCH "3.0;5.0;6.0;7.0;7.2" CACHE STRING "Cuda architectures")
36 changes: 36 additions & 0 deletions config/distribution/linux_cu91.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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.

set(CMAKE_BUILD_TYPE "Distribution" CACHE STRING "Build type")
set(CFLAGS "-mno-avx" CACHE STRING "CFLAGS")
set(CXXFLAGS "-mno-avx" CACHE STRING "CXXFLAGS")

set(USE_CUDA ON CACHE BOOL "Build with CUDA support")
set(USE_CUDNN ON CACHE BOOL "Build with CUDNN support")
set(USE_NCCL ON CACHE BOOL "Build with NCCL support")
set(USE_OPENCV ON CACHE BOOL "Build with OpenCV support")
set(USE_OPENMP ON CACHE BOOL "Build with Openmp support")
set(USE_MKL_IF_AVAILABLE OFF CACHE BOOL "Use Intel MKL if found")
set(USE_MKLDNN ON CACHE BOOL "Build with MKL-DNN support")
set(USE_LAPACK ON CACHE BOOL "Build with lapack support")
set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.")
set(USE_SSE ON CACHE BOOL "Build with x86 SSE instruction support")
set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support")
set(USE_LIBJPEG_TURBO ON CACHE BOOL "Build with libjpeg-turbo")

set(CUDACXX "/usr/local/cuda-9.1/bin/nvcc" CACHE STRING "Cuda compiler")
set(MXNET_CUDA_ARCH "3.0;5.0;6.0;7.0;7.2" CACHE STRING "Cuda architectures")
Empty file modified contrib/clojure-package/examples/rnn/get_data.sh
100755 → 100644
Empty file.
Loading

0 comments on commit 44c53e0

Please sign in to comment.