Skip to content

Commit

Permalink
merge main to v-yujiang/rdma and resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
yukirora committed Jul 16, 2021
2 parents 31779b7 + 419dea2 commit a56627a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
[submodule "third_party/perftest"]
path = third_party/perftest
url = https://github.com/linux-rdma/perftest.git
[submodule "third_party/nccl-tests"]
path = third_party/nccl-tests
url = https://github.com/NVIDIA/nccl-tests.git
13 changes: 1 addition & 12 deletions dockerfile/cuda11.1.1.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,7 @@ RUN cd /tmp && \
cd /tmp && \
rm -rf nccl

# TODO: move to gitmodules
RUN git clone -b v4.5-0.2 https://github.com/linux-rdma/perftest.git /usr/local/perftest && \
cd /usr/local/perftest && \
./autogen.sh && \
./configure CUDA_H_PATH=/usr/local/cuda/include/cuda.h && \
make -j && \
make install
RUN git clone https://github.com/nvidia/nccl-tests /usr/local/nccl-tests && \
cd /usr/local/nccl-tests && \
make MPI=1 MPI_HOME=/usr/local/mpi/ -j

ENV PATH="/usr/local/nccl-tests/build:${PATH}" \
ENV PATH="${PATH}" \
LD_LIBRARY_PATH="/usr/local/lib:${LD_LIBRARY_PATH}" \
SB_HOME="/opt/superbench" \
SB_MICRO_PATH="/opt/superbench"
Expand Down
25 changes: 19 additions & 6 deletions third_party/Makefile
Original file line number Diff line number Diff line change
@@ -1,38 +1,51 @@

# Copyright (c) Microsoft Corporation - All rights reserved
# Licensed under the MIT License


SB_MICRO_PATH ?= "/usr/local"
MPI_HOME_PATH ?= "/usr/local/mpi"

.PHONY: all cutlass bandwidthTest perftest
.PHONY: all cutlass bandwidthTest nccl_tests perftest

# Build all targets.
all: cutlass bandwidthTest perftest
all: cutlass bandwidthTest nccl_tests perftest

# Create $(SB_MICRO_PATH)/bin and $(SB_MICRO_PATH)/lib, no error if existing, make parent directories as needed.
sb_micro_path:
mkdir -p $(SB_MICRO_PATH)/bin
mkdir -p $(SB_MICRO_PATH)/lib

# Build cutlass.
cutlass:
ifneq (,$(wildcard cutlass/CMakeLists.txt))
cmake -DCMAKE_INSTALL_BINDIR=$(SB_MICRO_PATH)/bin -DCMAKE_INSTALL_LIBDIR=$(SB_MICRO_PATH)/lib -DCMAKE_BUILD_TYPE=Release \
-DCUTLASS_NVCC_ARCHS='70;80' -DCUTLASS_ENABLE_EXAMPLES=OFF -DCUTLASS_ENABLE_TESTS=OFF -S ./cutlass -B ./cutlass/build
cmake --build ./cutlass/build -j 8 --target install
endif

# Build cuda-samples/Samples/bandwidthTest.
# cuda-samples is released together with CUDA, they have the exact same version. Like v10.0, v11.1 and so on.
# The version we use is the released tag of cuda-samples which is consistent with the cuda version in the environment or docker.
# The Makefile of bandwidthTest does not have 'install' target, so need to copy bin to $(SB_MICRO_PATH)/bin/ and create $(SB_MICRO_PATH)/bin/ if not existing.
bandwidthTest: sb_micro_path
ifneq (,$(wildcard cuda-samples/Samples/bandwidthTest/Makefile))
cd cuda-samples && git checkout v$(shell nvcc --version | grep 'release' | awk '{print $$6}' | cut -c2- | cut -d '.' -f1-2)
if [ -d cuda-samples ]; then rm -rf cuda-samples; fi
git clone -b v$(shell nvcc --version | grep 'release' | awk '{print $$6}' | cut -c2- | cut -d '.' -f1-2) https://github.com/NVIDIA/cuda-samples.git ./cuda-samples
cd ./cuda-samples/Samples/bandwidthTest && make clean && make TARGET_ARCH=x86_64 SMS="70 75 80 86"
cp -v ./cuda-samples/Samples/bandwidthTest/bandwidthTest $(SB_MICRO_PATH)/bin/

# Build nccl-tests.
# The version we use is commit 44df0bf from master branch, since it didn't update release tag for long time.
nccl_tests: sb_micro_path
ifneq (,$(wildcard nccl-tests/Makefile))
cd ./nccl-tests && make MPI=1 MPI_HOME=$(MPI_HOME_PATH) -j
cp -v ./nccl-tests/build/* $(SB_MICRO_PATH)/bin/
endif

# Build perftest.
# The version we use is v4.5-0.2, which is the latest release tag of perftest
# The version we use is the tag v4.5-0.2.
perftest:
ifneq (,$(wildcard perftest/autogen.sh))
cd perftest && ./autogen.sh && ./configure CUDA_H_PATH=/usr/local/cuda/include/cuda.h --prefix=$(SB_MICRO_PATH) && make -j && make install
endif
endif

1 change: 1 addition & 0 deletions third_party/nccl-tests
Submodule nccl-tests added at 44df0b

0 comments on commit a56627a

Please sign in to comment.