From 9547ccc19abbad5df6362ffe916982ba87052add Mon Sep 17 00:00:00 2001 From: Yuting Jiang Date: Thu, 15 Jul 2021 16:41:57 +0800 Subject: [PATCH] Benchmarks: Fix bug - fix bug of third_party/cuda-samples git checkout issue when building docker (#126) * fix bug in docker build of third_party/cuda-samples --- .gitmodules | 3 --- third_party/Makefile | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.gitmodules b/.gitmodules index 6536ca80..07f7559c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,6 +2,3 @@ path = third_party/cutlass url = https://github.com/NVIDIA/cutlass.git branch = v2.4.0 -[submodule "third_party/cuda-samples"] - path = third_party/cuda-samples - url = https://github.com/NVIDIA/cuda-samples.git diff --git a/third_party/Makefile b/third_party/Makefile index afaffe4f..c2e4b6dd 100755 --- a/third_party/Makefile +++ b/third_party/Makefile @@ -25,8 +25,7 @@ endif # 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/ -endif