2018-09-24 16:06:59 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
#
|
2019-03-14 19:39:20 -07:00
|
|
|
# Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
|
2018-09-24 16:06:59 -07:00
|
|
|
#
|
|
|
|
|
# See LICENSE.txt for license information
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
# To run from $BUILDDIR/
|
|
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
NCCLDIR=`basename $PWD`
|
|
|
|
|
|
|
|
|
|
echo "Checking for unclean directory ..."
|
|
|
|
|
git clean -x -i
|
|
|
|
|
echo "Clean done."
|
|
|
|
|
echo "Checking for uncommited files ..."
|
|
|
|
|
if [ "`git status -s | wc -l`" != "0" ]; then
|
|
|
|
|
git status -s
|
|
|
|
|
echo "Some changes are not committed yet. Continue ? (Ctrl-C to abort)"
|
|
|
|
|
read
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
NCCL_MAJOR=${nccl:Major}
|
|
|
|
|
NCCL_MINOR=${nccl:Minor}
|
|
|
|
|
NCCL_PATCH=${nccl:Patch}
|
|
|
|
|
NCCL_SUFFIX=${nccl:Suffix}
|
2018-12-13 15:56:12 -08:00
|
|
|
NCCL_BUILD=${pkg:Revision}
|
2018-09-24 16:06:59 -07:00
|
|
|
|
2018-12-13 15:56:12 -08:00
|
|
|
NCCLNAME="nccl-src_${NCCL_MAJOR}.${NCCL_MINOR}.${NCCL_PATCH}${NCCL_SUFFIX}-${NCCL_BUILD}"
|
2025-09-02 13:21:14 -07:00
|
|
|
if [ "${SRCTXZ_APITESTS}" = "1" ]; then
|
|
|
|
|
NCCLNAME+="-apitest"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
INCLUDE_TEST_ENTRIES=("apitest" "googletest" "gtest.mk")
|
|
|
|
|
|
|
|
|
|
if [ "${SRCTXZ_APITESTS}" = "1" ]; then
|
|
|
|
|
# Exclude all entries inside test folder except those in INCLUDE_TEST_ENTRIES
|
|
|
|
|
for entry in $(ls $NCCLDIR/test); do
|
|
|
|
|
if [[ ! " ${INCLUDE_TEST_ENTRIES[@]} " =~ " $entry " ]]; then
|
|
|
|
|
EXCLUDE_TEST+=" --exclude $NCCLDIR/test/$entry"
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
else
|
|
|
|
|
# Exclude the entire test directory
|
|
|
|
|
EXCLUDE_TEST+=" --exclude test"
|
|
|
|
|
fi
|
2018-09-24 16:06:59 -07:00
|
|
|
|
2025-09-02 13:21:14 -07:00
|
|
|
tar --exclude fortran \
|
|
|
|
|
--exclude doc \
|
|
|
|
|
--exclude plc \
|
|
|
|
|
--exclude build \
|
2018-09-24 16:06:59 -07:00
|
|
|
--exclude ".git*" \
|
2025-09-02 13:21:14 -07:00
|
|
|
--exclude share \
|
|
|
|
|
--exclude ompi \
|
|
|
|
|
--exclude ext-net \
|
2018-09-24 16:06:59 -07:00
|
|
|
--exclude pkg/srctxz \
|
2025-09-02 13:21:14 -07:00
|
|
|
--exclude docker \
|
|
|
|
|
$EXCLUDE_TEST \
|
2018-09-24 16:06:59 -07:00
|
|
|
--transform "s/^$NCCLDIR/$NCCLNAME/" -Jcf $NCCLNAME.txz --owner=0 --group=0 $NCCLDIR
|