Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cmake and build issues #360

Merged
merged 4 commits into from
Jun 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 8 additions & 9 deletions dockerfile/cuda11.1.1.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,23 +103,22 @@ RUN cd /tmp && \

# Install Intel MLC
RUN cd /tmp && \
mkdir -p mlc && \
cd mlc && \
wget --user-agent="Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0" https://www.intel.com/content/dam/develop/external/us/en/documents/mlc_v3.9a.tgz && \
tar xvf mlc_v3.9a.tgz && \
curl https://www.intel.com/content/dam/develop/external/us/en/documents/mlc_v3.9a.tgz -o mlc.tgz && \
tar xzvf mlc.tgz Linux/mlc && \
cp ./Linux/mlc /usr/local/bin/ && \
cd /tmp && \
rm -rf mlc
rm -rf ./Linux mlc.tgz

ENV PATH="${PATH}" \
LD_LIBRARY_PATH="/usr/local/lib:${LD_LIBRARY_PATH}" \
SB_HOME="/opt/superbench" \
SB_MICRO_PATH="/opt/superbench"
SB_HOME=/opt/superbench \
SB_MICRO_PATH=/opt/superbench \
ANSIBLE_DEPRECATION_WARNINGS=FALSE \
ANSIBLE_COLLECTIONS_PATH=/usr/share/ansible/collections

WORKDIR ${SB_HOME}

ADD third_party third_party
RUN make -j ${NUM_MAKE_JOBS} -C third_party cuda
RUN make -C third_party cuda

ADD . .
RUN python3 -m pip install .[nvidia,torch,ort] && \
Expand Down
18 changes: 9 additions & 9 deletions dockerfile/rocm4.0-pytorch1.7.0.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN wget -qO - http://repo.radeon.com/rocm/rocm.gpg.key | APT_KEY_DONT_WARN_ON_D
git \
jq \
libaio-dev \
libboost-program-options-dev \
libcap2 \
libnuma-dev \
libpci-dev \
Expand Down Expand Up @@ -92,23 +93,22 @@ RUN cd /opt && \

# Install Intel MLC
RUN cd /tmp && \
mkdir -p mlc && \
cd mlc && \
wget --user-agent="Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0" https://www.intel.com/content/dam/develop/external/us/en/documents/mlc_v3.9a.tgz && \
tar xvf mlc_v3.9a.tgz && \
curl https://www.intel.com/content/dam/develop/external/us/en/documents/mlc_v3.9a.tgz -o mlc.tgz && \
tar xzvf mlc.tgz Linux/mlc && \
cp ./Linux/mlc /usr/local/bin/ && \
cd /tmp && \
rm -rf mlc
rm -rf ./Linux mlc.tgz

ENV PATH="${PATH}" \
LD_LIBRARY_PATH="/usr/local/lib:${LD_LIBRARY_PATH}" \
SB_HOME="/opt/superbench" \
SB_MICRO_PATH="/opt/superbench"
SB_HOME=/opt/superbench \
SB_MICRO_PATH=/opt/superbench \
ANSIBLE_DEPRECATION_WARNINGS=FALSE \
ANSIBLE_COLLECTIONS_PATH=/usr/share/ansible/collections

WORKDIR ${SB_HOME}

ADD third_party third_party
RUN ROCM_VERSION=rocm-4.0.0 make -j -C third_party -o rocm_rocblas rocm
RUN ROCM_VERSION=rocm-4.0.0 make -C third_party -o rocm_rocblas rocm

# Workaround for image having package installed in user path
RUN mv /root/.local/bin/* /opt/conda/bin/ && \
Expand Down
18 changes: 9 additions & 9 deletions dockerfile/rocm4.2-pytorch1.7.0.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN wget -qO - http://repo.radeon.com/rocm/rocm.gpg.key | APT_KEY_DONT_WARN_ON_D
git \
jq \
libaio-dev \
libboost-program-options-dev \
libcap2 \
libnuma-dev \
libpci-dev \
Expand Down Expand Up @@ -92,23 +93,22 @@ RUN cd /opt && \

# Install Intel MLC
RUN cd /tmp && \
mkdir -p mlc && \
cd mlc && \
wget --user-agent="Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0" https://www.intel.com/content/dam/develop/external/us/en/documents/mlc_v3.9a.tgz && \
tar xvf mlc_v3.9a.tgz && \
curl https://www.intel.com/content/dam/develop/external/us/en/documents/mlc_v3.9a.tgz -o mlc.tgz && \
tar xzvf mlc.tgz Linux/mlc && \
cp ./Linux/mlc /usr/local/bin/ && \
cd /tmp && \
rm -rf mlc
rm -rf ./Linux mlc.tgz

ENV PATH="${PATH}" \
LD_LIBRARY_PATH="/usr/local/lib:${LD_LIBRARY_PATH}" \
SB_HOME="/opt/superbench" \
SB_MICRO_PATH="/opt/superbench"
SB_HOME=/opt/superbench \
SB_MICRO_PATH=/opt/superbench \
ANSIBLE_DEPRECATION_WARNINGS=FALSE \
ANSIBLE_COLLECTIONS_PATH=/usr/share/ansible/collections

WORKDIR ${SB_HOME}

ADD third_party third_party
RUN ROCM_VERSION=rocm-4.2.0 make -j -C third_party rocm
RUN ROCM_VERSION=rocm-4.2.0 make -C third_party rocm

ADD . .
RUN python3 -m pip install .[torch,ort] && \
Expand Down
18 changes: 9 additions & 9 deletions dockerfile/rocm5.0-pytorch1.9.0.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN apt-get update && \
hipify-clang \
jq \
libaio-dev \
libboost-program-options-dev \
libcap2 \
libpci-dev \
libtinfo5 \
Expand Down Expand Up @@ -88,13 +89,10 @@ RUN cd /tmp && \

# Install Intel MLC
RUN cd /tmp && \
mkdir -p mlc && \
cd mlc && \
curl https://www.intel.com/content/dam/develop/external/us/en/documents/mlc_v3.9a.tgz -o mlc_v3.9a.tgz && \
tar xvf mlc_v3.9a.tgz && \
curl https://www.intel.com/content/dam/develop/external/us/en/documents/mlc_v3.9a.tgz -o mlc.tgz && \
tar xzvf mlc.tgz Linux/mlc && \
cp ./Linux/mlc /usr/local/bin/ && \
cd /tmp && \
rm -rf mlc
rm -rf ./Linux mlc.tgz

# Install rccl-rdma-sharp-plugins
ENV SHARP_VERSION=5.0
Expand All @@ -105,13 +103,15 @@ RUN cd /opt/rocm && \

ENV PATH="${PATH}:/opt/rocm/hip/bin/" \
LD_LIBRARY_PATH="/usr/local/lib/:${LD_LIBRARY_PATH}" \
SB_HOME="/opt/superbench" \
SB_MICRO_PATH="/opt/superbench"
SB_HOME=/opt/superbench \
SB_MICRO_PATH=/opt/superbench \
ANSIBLE_DEPRECATION_WARNINGS=FALSE \
ANSIBLE_COLLECTIONS_PATH=/usr/share/ansible/collections

WORKDIR ${SB_HOME}

ADD third_party third_party
RUN ROCM_VERSION=rocm-5.0.0 make -j ${NUM_MAKE_JOBS} -C third_party rocm
RUN ROCM_VERSION=rocm-5.0.0 make -C third_party rocm

ADD . .
RUN python3 -m pip install .[torch,ort] && \
Expand Down
18 changes: 9 additions & 9 deletions dockerfile/rocm5.0.1-pytorch1.9.0.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN apt-get update && \
hipify-clang \
jq \
libaio-dev \
libboost-program-options-dev \
libcap2 \
libpci-dev \
libtinfo5 \
Expand Down Expand Up @@ -88,13 +89,10 @@ RUN cd /tmp && \

# Install Intel MLC
RUN cd /tmp && \
mkdir -p mlc && \
cd mlc && \
curl https://www.intel.com/content/dam/develop/external/us/en/documents/mlc_v3.9a.tgz -o mlc_v3.9a.tgz && \
tar xvf mlc_v3.9a.tgz && \
curl https://www.intel.com/content/dam/develop/external/us/en/documents/mlc_v3.9a.tgz -o mlc.tgz && \
tar xzvf mlc.tgz Linux/mlc && \
cp ./Linux/mlc /usr/local/bin/ && \
cd /tmp && \
rm -rf mlc
rm -rf ./Linux mlc.tgz

# Install rccl-rdma-sharp-plugins
ENV SHARP_VERSION=5.0
Expand All @@ -105,13 +103,15 @@ RUN cd /opt/rocm && \

ENV PATH="${PATH}:/opt/rocm/hip/bin/" \
LD_LIBRARY_PATH="/usr/local/lib/:${LD_LIBRARY_PATH}" \
SB_HOME="/opt/superbench" \
SB_MICRO_PATH="/opt/superbench"
SB_HOME=/opt/superbench \
SB_MICRO_PATH=/opt/superbench \
ANSIBLE_DEPRECATION_WARNINGS=FALSE \
ANSIBLE_COLLECTIONS_PATH=/usr/share/ansible/collections

WORKDIR ${SB_HOME}

ADD third_party third_party
RUN ROCM_VERSION=rocm-5.0.1 make -j ${NUM_MAKE_JOBS} -C third_party rocm
RUN ROCM_VERSION=rocm-5.0.1 make -C third_party rocm

ADD . .
RUN python3 -m pip install .[torch,ort] && \
Expand Down
18 changes: 9 additions & 9 deletions dockerfile/rocm5.1.1-pytorch1.10.0.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN apt-get update && \
hipify-clang \
jq \
libaio-dev \
libboost-program-options-dev \
libcap2 \
libpci-dev \
libtinfo5 \
Expand Down Expand Up @@ -102,13 +103,10 @@ RUN cd /tmp && \

# Install Intel MLC
RUN cd /tmp && \
mkdir -p mlc && \
cd mlc && \
curl https://www.intel.com/content/dam/develop/external/us/en/documents/mlc_v3.9a.tgz -o mlc_v3.9a.tgz && \
tar xvf mlc_v3.9a.tgz && \
curl https://www.intel.com/content/dam/develop/external/us/en/documents/mlc_v3.9a.tgz -o mlc.tgz && \
tar xzvf mlc.tgz Linux/mlc && \
cp ./Linux/mlc /usr/local/bin/ && \
cd /tmp && \
rm -rf mlc
rm -rf ./Linux mlc.tgz

# Install rccl with commitid 6707a27
RUN cd /tmp && \
Expand All @@ -128,13 +126,15 @@ RUN cd /opt/rocm && \

ENV PATH="${PATH}:/opt/rocm/hip/bin/" \
LD_LIBRARY_PATH="/usr/local/lib/:${LD_LIBRARY_PATH}" \
SB_HOME="/opt/superbench" \
SB_MICRO_PATH="/opt/superbench"
SB_HOME=/opt/superbench \
SB_MICRO_PATH=/opt/superbench \
ANSIBLE_DEPRECATION_WARNINGS=FALSE \
ANSIBLE_COLLECTIONS_PATH=/usr/share/ansible/collections

WORKDIR ${SB_HOME}

ADD third_party third_party
RUN ROCM_VERSION=release/rocm-rel-5.1 make -j ${NUM_MAKE_JOBS} -C third_party rocm
RUN ROCM_VERSION=release/rocm-rel-5.1 make -C third_party rocm

ADD . .
RUN python3 -m pip install .[torch,ort] && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,8 @@ add_executable(ib_validation ib_validation_performance.cc)
find_package(MPI REQUIRED)

# Boost
execute_process(COMMAND wget -O boost_1_71_0.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/)
execute_process(COMMAND tar xzvf boost_1_71_0.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/)
execute_process(COMMAND ./bootstrap.sh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/boost_1_71_0/)
execute_process(COMMAND ./b2 --with-program_options install WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/boost_1_71_0/)
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/boost_1_71_0/build/)

find_package(Boost REQUIRED COMPONENTS program_options)

include_directories(${Boost_INCLUDE_DIRS})
target_link_libraries(ib_validation PUBLIC MPI::MPI_CXX ${Boost_LIBRARIES})
install(TARGETS ib_validation RUNTIME DESTINATION bin)
3 changes: 1 addition & 2 deletions third_party/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

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

Expand Down Expand Up @@ -28,7 +27,7 @@ cuda_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;75;80;86' -DCUTLASS_ENABLE_EXAMPLES=OFF -DCUTLASS_ENABLE_TESTS=OFF -S ./cutlass -B ./cutlass/build
cmake --build ./cutlass/build -j 8 --target install
cmake --build ./cutlass/build -j $(shell nproc --ignore=2) --target install
endif

# Build cuda-samples/Samples/bandwidthTest.
Expand Down