xref: /aosp_15_r20/external/pytorch/.circleci/scripts/binary_macos_build.sh (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1#!/bin/bash
2set -eux -o pipefail
3
4source "${BINARY_ENV_FILE:-/Users/distiller/project/env}"
5mkdir -p "$PYTORCH_FINAL_PACKAGE_DIR"
6
7# Build
8export USE_PYTORCH_METAL_EXPORT=1
9export USE_COREML_DELEGATE=1
10if [[ "$PACKAGE_TYPE" == conda ]]; then
11  "${BUILDER_ROOT}/conda/build_pytorch.sh"
12else
13  export TORCH_PACKAGE_NAME="$(echo $TORCH_PACKAGE_NAME | tr '-' '_')"
14  "${BUILDER_ROOT}/wheel/build_wheel.sh"
15fi
16