From ce2cf316236181fb5e0c2242ce2cbb66476b72ca Mon Sep 17 00:00:00 2001 From: Catherine Lee Date: Wed, 30 Apr 2025 17:10:27 +0000 Subject: [PATCH] Remove dead binary_ios_build, test, upload scripts (#152461) Can't find any mentions of them in the codebase, presumably no longer used? Pull Request resolved: https://github.com/pytorch/pytorch/pull/152461 Approved by: https://github.com/seemethere, https://github.com/janeyx99, https://github.com/malfet --- .circleci/scripts/binary_ios_build.sh | 47 ---------------- .circleci/scripts/binary_ios_test.sh | 19 ------- .circleci/scripts/binary_ios_upload.sh | 75 -------------------------- 3 files changed, 141 deletions(-) delete mode 100644 .circleci/scripts/binary_ios_build.sh delete mode 100644 .circleci/scripts/binary_ios_test.sh delete mode 100644 .circleci/scripts/binary_ios_upload.sh diff --git a/.circleci/scripts/binary_ios_build.sh b/.circleci/scripts/binary_ios_build.sh deleted file mode 100644 index 43d8bb41499..00000000000 --- a/.circleci/scripts/binary_ios_build.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -set -ex -o pipefail - -echo "" -echo "DIR: $(pwd)" -WORKSPACE=/Users/distiller/workspace -PROJ_ROOT=/Users/distiller/project -export TCLLIBPATH="/usr/local/lib" - -# Install conda -curl --retry 3 -o ~/conda.sh https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-MacOSX-x86_64.sh -chmod +x ~/conda.sh -/bin/bash ~/conda.sh -b -p ~/anaconda -export PATH="~/anaconda/bin:${PATH}" -source ~/anaconda/bin/activate - -# Install dependencies -conda install numpy ninja pyyaml mkl mkl-include setuptools cmake requests typing-extensions --yes -conda install -c conda-forge valgrind --yes -export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"} - -# sync submodules -cd ${PROJ_ROOT} -git submodule sync -git submodule update --init --recursive - -# run build script -chmod a+x ${PROJ_ROOT}/scripts/build_ios.sh -echo "########################################################" -cat ${PROJ_ROOT}/scripts/build_ios.sh -echo "########################################################" -echo "IOS_ARCH: ${IOS_ARCH}" -echo "IOS_PLATFORM: ${IOS_PLATFORM}" -echo "USE_PYTORCH_METAL: ${USE_PYTORCH_METAL}" -echo "USE_COREML_DELEGATE: ${USE_COREML_DELEGATE}" -export IOS_ARCH=${IOS_ARCH} -export IOS_PLATFORM=${IOS_PLATFORM} -export USE_PYTORCH_METAL=${USE_PYTORCH_METAL} -export USE_COREML_DELEGATE=${USE_COREML_DELEGATE} -unbuffer ${PROJ_ROOT}/scripts/build_ios.sh 2>&1 | ts - -#store the binary -cd ${WORKSPACE} -DEST_DIR=${WORKSPACE}/ios -mkdir -p ${DEST_DIR} -cp -R ${PROJ_ROOT}/build_ios/install ${DEST_DIR} -mv ${DEST_DIR}/install ${DEST_DIR}/${IOS_ARCH} diff --git a/.circleci/scripts/binary_ios_test.sh b/.circleci/scripts/binary_ios_test.sh deleted file mode 100644 index c750dbceca8..00000000000 --- a/.circleci/scripts/binary_ios_test.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -set -ex -o pipefail - -if ! [ "$IOS_PLATFORM" == "SIMULATOR" ]; then - exit 0 -fi - -echo "" -echo "DIR: $(pwd)" -PROJ_ROOT=/Users/distiller/project -cd ${PROJ_ROOT}/ios/TestApp -# install fastlane -sudo gem install bundler && bundle install -# run the ruby build script -if ! [ -x "$(command -v xcodebuild)" ]; then - echo 'Error: xcodebuild is not installed.' - exit 1 -fi -ruby ${PROJ_ROOT}/scripts/xcode_build.rb -i ${PROJ_ROOT}/build_ios/install -x ${PROJ_ROOT}/ios/TestApp/TestApp.xcodeproj -p ${IOS_PLATFORM} diff --git a/.circleci/scripts/binary_ios_upload.sh b/.circleci/scripts/binary_ios_upload.sh deleted file mode 100644 index 13058030ceb..00000000000 --- a/.circleci/scripts/binary_ios_upload.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash -set -ex -o pipefail - -echo "" -echo "DIR: $(pwd)" -WORKSPACE=/Users/distiller/workspace -PROJ_ROOT=/Users/distiller/project -ARTIFACTS_DIR=${WORKSPACE}/ios -ls ${ARTIFACTS_DIR} -ZIP_DIR=${WORKSPACE}/zip -mkdir -p ${ZIP_DIR}/install/lib -mkdir -p ${ZIP_DIR}/src -# copy header files -cp -R ${ARTIFACTS_DIR}/arm64/include ${ZIP_DIR}/install/ -# build a FAT bianry -cd ${ZIP_DIR}/install/lib -target_libs=(libc10.a libclog.a libcpuinfo.a libeigen_blas.a libpthreadpool.a libpytorch_qnnpack.a libtorch_cpu.a libtorch.a libXNNPACK.a libmicrokernels-prod.a) -for lib in ${target_libs[*]} -do - if [ -f "${ARTIFACTS_DIR}/x86_64/lib/${lib}" ] && [ -f "${ARTIFACTS_DIR}/arm64/lib/${lib}" ]; then - libs=("${ARTIFACTS_DIR}/x86_64/lib/${lib}" "${ARTIFACTS_DIR}/arm64/lib/${lib}") - lipo -create "${libs[@]}" -o ${ZIP_DIR}/install/lib/${lib} - fi -done -lipo -i ${ZIP_DIR}/install/lib/*.a -echo "BUILD_LITE_INTERPRETER: ${BUILD_LITE_INTERPRETER}" -# copy the umbrella header and license -if [ "${BUILD_LITE_INTERPRETER}" == "1" ]; then - cp ${PROJ_ROOT}/ios/LibTorch-Lite.h ${ZIP_DIR}/src/ -else - cp ${PROJ_ROOT}/ios/LibTorch.h ${ZIP_DIR}/src/ -fi -cp ${PROJ_ROOT}/LICENSE ${ZIP_DIR}/ -# zip the library -export DATE="$(date -u +%Y%m%d)" -export IOS_NIGHTLY_BUILD_VERSION="2.2.0.${DATE}" -if [ "${BUILD_LITE_INTERPRETER}" == "1" ]; then - # libtorch_lite_ios_nightly_1.11.0.20210810.zip - ZIPFILE="libtorch_lite_ios_nightly_${IOS_NIGHTLY_BUILD_VERSION}.zip" -else - ZIPFILE="libtorch_ios_nightly_build.zip" -fi -cd ${ZIP_DIR} -#for testing -touch version.txt -echo "${IOS_NIGHTLY_BUILD_VERSION}" > version.txt -zip -r ${ZIPFILE} install src version.txt LICENSE -# upload to aws -# Install conda then 'conda install' awscli -curl --retry 3 -o ~/conda.sh https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-MacOSX-x86_64.sh -chmod +x ~/conda.sh -/bin/bash ~/conda.sh -b -p ~/anaconda -export PATH="~/anaconda/bin:${PATH}" -source ~/anaconda/bin/activate -conda install -c conda-forge awscli --yes -set +x -export AWS_ACCESS_KEY_ID=${AWS_S3_ACCESS_KEY_FOR_PYTORCH_BINARY_UPLOAD} -export AWS_SECRET_ACCESS_KEY=${AWS_S3_ACCESS_SECRET_FOR_PYTORCH_BINARY_UPLOAD} -set +x -# echo "AWS KEY: ${AWS_ACCESS_KEY_ID}" -# echo "AWS SECRET: ${AWS_SECRET_ACCESS_KEY}" -aws s3 cp ${ZIPFILE} s3://ossci-ios-build/ --acl public-read - -if [ "${BUILD_LITE_INTERPRETER}" == "1" ]; then - # create a new LibTorch-Lite-Nightly.podspec from the template - echo "cp ${PROJ_ROOT}/ios/LibTorch-Lite-Nightly.podspec.template ${PROJ_ROOT}/ios/LibTorch-Lite-Nightly.podspec" - cp ${PROJ_ROOT}/ios/LibTorch-Lite-Nightly.podspec.template ${PROJ_ROOT}/ios/LibTorch-Lite-Nightly.podspec - - # update pod version - sed -i '' -e "s/IOS_NIGHTLY_BUILD_VERSION/${IOS_NIGHTLY_BUILD_VERSION}/g" ${PROJ_ROOT}/ios/LibTorch-Lite-Nightly.podspec - cat ${PROJ_ROOT}/ios/LibTorch-Lite-Nightly.podspec - - # push the new LibTorch-Lite-Nightly.podspec to CocoaPods - pod trunk push --verbose --allow-warnings --use-libraries --skip-import-validation ${PROJ_ROOT}/ios/LibTorch-Lite-Nightly.podspec -fi