Skip to content

Commit 920e436

Browse files
atalmanpytorchmergebot
authored andcommitted
[BE] Remove "$PACKAGE_TYPE" == 'conda' logic from build scripts (#142019)
Please see: #138506 Pull Request resolved: #142019 Approved by: https://github.com/huydhn, https://github.com/malfet
1 parent 0582b32 commit 920e436

File tree

5 files changed

+7
-45
lines changed

5 files changed

+7
-45
lines changed

.circleci/scripts/binary_linux_build.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ if [[ "${DESIRED_CUDA}" =~ cu1[1-2][0-9] ]]; then
1616
fi
1717

1818
# Parse the parameters
19-
if [[ "$PACKAGE_TYPE" == 'conda' ]]; then
20-
build_script='conda/build_pytorch.sh'
21-
elif [[ "$DESIRED_CUDA" == cpu ]]; then
19+
if [[ "$DESIRED_CUDA" == cpu ]]; then
2220
build_script='manywheel/build_cpu.sh'
2321
elif [[ "$DESIRED_CUDA" == *"rocm"* ]]; then
2422
build_script='manywheel/build_rocm.sh'

.circleci/scripts/binary_linux_test.sh

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ fi
2222
python_nodot="\$(echo $DESIRED_PYTHON | tr -d m.u)"
2323
2424
# Set up Python
25-
if [[ "$PACKAGE_TYPE" == conda ]]; then
26-
retry conda create -qyn testenv python="$DESIRED_PYTHON"
27-
source activate testenv >/dev/null
28-
elif [[ "$PACKAGE_TYPE" != libtorch ]]; then
25+
if [[ "$PACKAGE_TYPE" != libtorch ]]; then
2926
python_path="/opt/python/cp\$python_nodot-cp\${python_nodot}"
3027
if [[ "\$python_nodot" = *t ]]; then
3128
python_digits="\$(echo $DESIRED_PYTHON | tr -cd [:digit:])"
@@ -69,30 +66,7 @@ else
6966
CHANNEL="test"
7067
fi
7168
72-
if [[ "$PACKAGE_TYPE" == conda ]]; then
73-
(
74-
# For some reason conda likes to re-activate the conda environment when attempting this install
75-
# which means that a deactivate is run and some variables might not exist when that happens,
76-
# namely CONDA_MKL_INTERFACE_LAYER_BACKUP from libblas so let's just ignore unbound variables when
77-
# it comes to the conda installation commands
78-
set +u
79-
retry conda install \${EXTRA_CONDA_FLAGS} -yq \
80-
"numpy\${NUMPY_PIN}" \
81-
mkl>=2018 \
82-
ninja \
83-
sympy>=1.12 \
84-
typing-extensions \
85-
${PROTOBUF_PACKAGE}
86-
if [[ "$DESIRED_CUDA" == 'cpu' ]]; then
87-
retry conda install -c pytorch -y cpuonly
88-
else
89-
cu_ver="${DESIRED_CUDA:2:2}.${DESIRED_CUDA:4}"
90-
CUDA_PACKAGE="pytorch-cuda"
91-
retry conda install \${EXTRA_CONDA_FLAGS} -yq -c nvidia -c "pytorch-\${CHANNEL}" "pytorch-cuda=\${cu_ver}"
92-
fi
93-
conda install \${EXTRA_CONDA_FLAGS} -y "\$pkg" --offline
94-
)
95-
elif [[ "$PACKAGE_TYPE" != libtorch ]]; then
69+
if [[ "$PACKAGE_TYPE" != libtorch ]]; then
9670
if [[ "\$BUILD_ENVIRONMENT" != *s390x* ]]; then
9771
if [[ "$USE_SPLIT_BUILD" == "true" ]]; then
9872
pkg_no_python="$(ls -1 /final_pkgs/torch_no_python* | sort |tail -1)"

.circleci/scripts/binary_macos_build.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,5 @@ mkdir -p "$PYTORCH_FINAL_PACKAGE_DIR"
77
# Build
88
export USE_PYTORCH_METAL_EXPORT=1
99
export USE_COREML_DELEGATE=1
10-
if [[ "$PACKAGE_TYPE" == conda ]]; then
11-
"${BUILDER_ROOT}/conda/build_pytorch.sh"
12-
else
13-
export TORCH_PACKAGE_NAME="$(echo $TORCH_PACKAGE_NAME | tr '-' '_')"
14-
"${BUILDER_ROOT}/wheel/build_wheel.sh"
15-
fi
10+
export TORCH_PACKAGE_NAME="$(echo $TORCH_PACKAGE_NAME | tr '-' '_')"
11+
"${BUILDER_ROOT}/wheel/build_wheel.sh"

.circleci/scripts/binary_macos_test.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ if [[ "$PACKAGE_TYPE" == libtorch ]]; then
1919
pkg="$(ls $workdir/final_pkgs/*-latest.zip)"
2020
unzip "$pkg" -d /tmp
2121
cd /tmp/libtorch
22-
elif [[ "$PACKAGE_TYPE" == conda ]]; then
23-
conda install -y "$pkg"
2422
else
2523
pip install "$pkg" -v
2624
fi

.circleci/scripts/binary_windows_build.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,8 @@ echo "Free space on filesystem before build:"
2020
df -h
2121

2222
pushd "$BUILDER_ROOT"
23-
if [[ "$PACKAGE_TYPE" == 'conda' ]]; then
24-
./windows/internal/build_conda.bat
25-
elif [[ "$PACKAGE_TYPE" == 'wheel' || "$PACKAGE_TYPE" == 'libtorch' ]]; then
26-
export NIGHTLIES_PYTORCH_ROOT="$PYTORCH_ROOT"
27-
./windows/internal/build_wheels.bat
28-
fi
23+
export NIGHTLIES_PYTORCH_ROOT="$PYTORCH_ROOT"
24+
./windows/internal/build_wheels.bat
2925

3026
echo "Free space on filesystem after build:"
3127
df -h

0 commit comments

Comments
 (0)