This repository was archived by the owner on Apr 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -9,27 +9,27 @@ source /etc/lsb-release
9
9
# condition: if any and non-conda, simply build TC from scratch
10
10
11
11
if [[ " $DISTRIB_RELEASE " == 14.04 ]]; then
12
- if which conda & > /dev/null ; then
12
+ if [[ $( conda --version | wc -c ) -ne 0 ]] ; then
13
13
echo " Building TC in conda env"
14
14
source activate
15
15
conda install -y -c pytorch pytorch
16
16
conda install -y pyyaml
17
- WITH_PYTHON_C2=OFF CLANG_PREFIX=/usr/local/clang+llvm-tapir5.0 BUILD_TYPE=Release ./build.sh --all
17
+ WITH_PYTHON_C2=OFF CORES= $( nproc ) CLANG_PREFIX=/usr/local/clang+llvm-tapir5.0 BUILD_TYPE=Release ./build.sh --all
18
18
else
19
19
echo " Building TC in non-conda env"
20
- WITH_PYTHON_C2=OFF CLANG_PREFIX=/usr/local/clang+llvm-tapir5.0 BUILD_TYPE=Release ./build.sh --all
20
+ WITH_PYTHON_C2=OFF CORES= $( nproc ) CLANG_PREFIX=/usr/local/clang+llvm-tapir5.0 BUILD_TYPE=Release ./build.sh --all
21
21
fi
22
22
fi
23
23
24
24
if [[ " $DISTRIB_RELEASE " == 16.04 ]]; then
25
- if which conda & > /dev/null ; then
25
+ if [[ $( conda --version | wc -c ) -ne 0 ]] ; then
26
26
echo " Building TC in conda env"
27
27
source activate
28
28
conda install -y pytorch cuda90 -c pytorch
29
29
conda install -y pyyaml
30
- WITH_PYTHON_C2=OFF CLANG_PREFIX=/usr/local/clang+llvm-tapir5.0 BUILD_TYPE=Release ./build.sh --all
30
+ WITH_PYTHON_C2=OFF CORES= $( nproc ) CLANG_PREFIX=/usr/local/clang+llvm-tapir5.0 BUILD_TYPE=Release ./build.sh --all
31
31
else
32
32
echo " Building TC in non-conda env"
33
- WITH_PYTHON_C2=OFF CLANG_PREFIX=/usr/local/clang+llvm-tapir5.0 BUILD_TYPE=Release ./build.sh --all
33
+ WITH_PYTHON_C2=OFF CORES= $( nproc ) CLANG_PREFIX=/usr/local/clang+llvm-tapir5.0 BUILD_TYPE=Release ./build.sh --all
34
34
fi
35
35
fi
Original file line number Diff line number Diff line change @@ -11,15 +11,15 @@ source /etc/lsb-release
11
11
if [[ " $DISTRIB_RELEASE " == 14.04 ]]; then
12
12
echo " Running TC backend tests"
13
13
./test.sh
14
- if which conda & > /dev/null ; then
14
+ if [[ $( conda --version | wc -c ) -ne 0 ]] ; then
15
15
source activate
16
16
echo " Running TC PyTorch tests"
17
17
./test_python/run_test.sh
18
18
fi
19
19
fi
20
20
21
21
if [[ " $DISTRIB_RELEASE " == 16.04 ]]; then
22
- if which conda & > /dev/null ; then
22
+ if [[ $( conda --version | wc -c ) -ne 0 ]] ; then
23
23
echo " Running TC PyTorch tests"
24
24
source activate
25
25
./test_python/run_test.sh
Original file line number Diff line number Diff line change @@ -327,7 +327,7 @@ function install_tc_python() {
327
327
export PYTHONPATH=${TC_DIR} /build/tensor_comprehensions/pybinds:${PYTHONPATH}
328
328
echo " PYTHONPATH: ${PYTHONPATH} "
329
329
else
330
- if which conda & > /dev/null ; then
330
+ if [[ $( conda --version | wc -c ) -ne 0 ]] ; then
331
331
echo " Found conda, going to install Python packages"
332
332
cd ${TC_DIR}
333
333
export CONDA_PYTHON=$( which python3)
You can’t perform that action at this time.
0 commit comments