From bdb5ddede9237bcbf3ddf6ceeaa2d8d133f218c8 Mon Sep 17 00:00:00 2001 From: Efrainq07 Date: Tue, 2 Feb 2021 16:23:00 -0800 Subject: [PATCH] Added FlexFlow build test --- .circleci/config.yml | 79 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..19bbd0f9 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,79 @@ +version: 2.1 + +gpu: &gpu + environment: + CUDA_VERSION: "10.1" + machine: + image: ubuntu-1604-cuda-10.1:201909-23 + resource_class: gpu.large + + +jobs: + test_nvidia_smi: + <<: *gpu + steps: + - checkout + - run: nvidia-smi + flexflow_build_test: + <<: *gpu + steps: + - checkout + - run: + name: "Set Python Version" + command: | + wget -c https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh + mv Miniconda3-latest-Linux-x86_64.sh ~/Miniconda3-latest-Linux-x86_64.sh + chmod +x ~/Miniconda3-latest-Linux-x86_64.sh + sudo ~/Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda + rm ~/Miniconda3-latest-Linux-x86_64.sh + sudo /opt/conda/bin/conda upgrade --all + sudo /opt/conda/bin/conda install -y conda-build conda-verify + sudo /opt/conda/bin/conda clean -ya + sudo /opt/conda/bin/conda install -y cmake make pillow + sudo /opt/conda/bin/conda install -y -c conda-forge protobuf=3.9 numpy keras-preprocessing + - run: + name: Install dependencies + command: | + cd nccl + git submodule update --init --recursive + make -j src.build NVCC_GENCODE="-gencode=arch=compute_60,code=sm_60" + cd .. + - run: + name: Build FlexFlow + command: | + export FF_HOME=$PWD + export CUDNN_HOME=$CUDNN_ROOT_DIR + export LG_RT_DIR=$PWD/legion/runtime + export CUDA_ARCH="60,70" + export GPU_ARCH="60,70" + export CUDA_HOME=/usr/local/cuda-10.1 + export NCCL_HOME=$FF_HOME/nccl/build + export PATH=/opt/conda/bin:$PATH + sudo add-apt-repository ppa:deadsnakes/ppa + sudo apt-get update + export PYTHON_ROOT=/opt/conda/bin/python3 + export PYTHON_EXE=python3 + export PYTHON_VERSION_MAJOR=3 + cd .. + git clone https://github.com/StanfordLegion/gasnet.git + cd gasnet + sudo apt-get install mpich + export MPI_HOME=/usr/ + export GASNET=$PWD/release + export CONDUIT=mpi + make + cd .. + wget -c http://developer.download.nvidia.com/compute/redist/cudnn/v8.0.5/cudnn-10.1-linux-x64-v8.0.5.39.tgz + sudo tar -xzf cudnn-10.1-linux-x64-v8.0.5.39.tgz -C /usr/local + rm cudnn-10.1-linux-x64-v8.0.5.39.tgz + sudo ldconfig + export CPLUS_INCLUDE_PATH=/usr/include/mpi:$CPLUS_INCLUDE_PATH + cd project/python + make -j 8 + + +workflows: + nvidia: + jobs: + - test_nvidia_smi + - flexflow_build_test