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)
This commit is contained in:
guoshzhao 2021-06-01 11:17:44 +08:00 коммит произвёл GitHub
Родитель 61c258fe5b
Коммит 40d7905e6b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 32 добавлений и 3 удалений

1
.github/workflows/build-image.yml поставляемый
Просмотреть файл

@ -21,6 +21,7 @@ jobs:
done
sudo apt-get clean
df -h
echo 'nproc: '$(nproc)
- name: Prepare metadata
id: metadata
run: |

4
.gitmodules поставляемый Normal file
Просмотреть файл

@ -0,0 +1,4 @@
[submodule "third_party/cutlass"]
path = third_party/cutlass
url = https://github.com/NVIDIA/cutlass.git
branch = v2.4.0

Просмотреть файл

@ -3,7 +3,7 @@
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:
clang-format --verbose --dry-run --Werror $(CPPSOURCES)
@ -14,6 +14,9 @@ cppformat:
cppbuild:
cd ./superbench/benchmarks/ && bash build.sh
thirdparty:
cd ./third_party/ && make all
postinstall:
ifeq ($(shell which ansible-galaxy),)
$(error 'Cannot find ansible-galaxy')

Просмотреть файл

@ -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" \
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}
ADD . .
RUN cd ${SB_HOME} && \
python3 -m pip install .[torch] && \
make cppbuild
make cppbuild && \
make thirdparty

18
third_party/Makefile поставляемый Executable file
Просмотреть файл

@ -0,0 +1,18 @@
# 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

1
third_party/cutlass поставляемый Submodule

@ -0,0 +1 @@
Subproject commit ccb697bac77fcc898e9c897b2c90aa5b60ac72fb