Unverified Commit 40d7905e authored by guoshzhao's avatar guoshzhao Committed by GitHub
Browse files

Benchmarks: Build Pipeline - Add cutlass as a submodule and add build logic. (#85)

* add cutlass as submodule.
* add build script for cutlass.
* only support compute capability 7.0(V100) and 8.0(A100)
parent 61c258fe
...@@ -21,6 +21,7 @@ jobs: ...@@ -21,6 +21,7 @@ jobs:
done done
sudo apt-get clean sudo apt-get clean
df -h df -h
echo 'nproc: '$(nproc)
- name: Prepare metadata - name: Prepare metadata
id: metadata id: metadata
run: | run: |
......
[submodule "third_party/cutlass"]
path = third_party/cutlass
url = https://github.com/NVIDIA/cutlass.git
branch = v2.4.0
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
CPPSOURCES := $(shell find $(CURDIR) -regextype posix-extended -regex '.*\.(c|cpp|h|hpp|cc|cxx|cu)') CPPSOURCES := $(shell find $(CURDIR) -regextype posix-extended -regex '.*\.(c|cpp|h|hpp|cc|cxx|cu)')
.PHONY: cpplint cppformat postinstall .PHONY: cpplint cppformat cppbuild thirdparty postinstall
cpplint: cpplint:
clang-format --verbose --dry-run --Werror $(CPPSOURCES) clang-format --verbose --dry-run --Werror $(CPPSOURCES)
...@@ -14,6 +14,9 @@ cppformat: ...@@ -14,6 +14,9 @@ cppformat:
cppbuild: cppbuild:
cd ./superbench/benchmarks/ && bash build.sh cd ./superbench/benchmarks/ && bash build.sh
thirdparty:
cd ./third_party/ && make all
postinstall: postinstall:
ifeq ($(shell which ansible-galaxy),) ifeq ($(shell which ansible-galaxy),)
$(error 'Cannot find ansible-galaxy') $(error 'Cannot find ansible-galaxy')
......
...@@ -81,11 +81,13 @@ RUN git clone https://github.com/nvidia/nccl-tests /usr/local/nccl-tests && \ ...@@ -81,11 +81,13 @@ RUN git clone https://github.com/nvidia/nccl-tests /usr/local/nccl-tests && \
ENV PATH="${PATH}:/usr/local/cmake/bin:/usr/local/nccl-tests/build" \ ENV PATH="${PATH}:/usr/local/cmake/bin:/usr/local/nccl-tests/build" \
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib" \ LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib" \
SB_HOME="/opt/superbench" SB_HOME="/opt/superbench" \
SB_MICRO_PATH="/opt/superbench"
WORKDIR ${SB_HOME} WORKDIR ${SB_HOME}
ADD . . ADD . .
RUN cd ${SB_HOME} && \ RUN cd ${SB_HOME} && \
python3 -m pip install .[torch] && \ python3 -m pip install .[torch] && \
make cppbuild make cppbuild && \
make thirdparty
# Copyright (c) Microsoft Corporation - All rights reserved
# Licensed under the MIT License
SB_MICRO_PATH ?= "/usr/local"
.PHONY: all cutlass
# Build all targets.
all: cutlass
# 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
Subproject commit ccb697bac77fcc898e9c897b2c90aa5b60ac72fb
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment