Skip to content

Commit

Permalink
Merge branch 'main' into fix_validations
Browse files Browse the repository at this point in the history
  • Loading branch information
atalman committed Nov 21, 2023
2 parents e277210 + c3e0f55 commit dcc13a0
Show file tree
Hide file tree
Showing 18 changed files with 63 additions and 242 deletions.
14 changes: 12 additions & 2 deletions aarch64_linux/aarch64_ci_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@ curl -L -o /mambaforge.sh https://github.com/conda-forge/miniforge/releases/late
chmod +x /mambaforge.sh
/mambaforge.sh -b -p /opt/conda
rm /mambaforge.sh
/opt/conda/bin/conda config --set ssl_verify False
/opt/conda/bin/conda install -y -c conda-forge python=${DESIRED_PYTHON} numpy pyyaml setuptools patchelf pygit2 openblas ninja scons
source /opt/conda/etc/profile.d/conda.sh
conda config --set ssl_verify False
conda create -y -c conda-forge -n aarch64_env python=${DESIRED_PYTHON}
conda activate aarch64_env

if [[ "$DESIRED_PYTHON" == "3.8" ]]; then
NUMPY_VERSION="1.24.4"
else
NUMPY_VERSION="1.26.0"
fi
conda install -y -c conda-forge numpy==${NUMPY_VERSION} pyyaml==6.0.1 patchelf==0.17.2 pygit2==1.13.2 openblas==0.3.24 ninja==1.11.1 scons==4.5.2

python --version
conda --version
45 changes: 0 additions & 45 deletions build_m1_domains.sh

This file was deleted.

9 changes: 6 additions & 3 deletions conda/pytorch-nightly/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,20 @@ requirements:
- pyyaml
{% if cross_compile_arm64 == 0 %}
- mkl-include # [x86_64]
- mkl=2020.2 # [x86_64 and not win]
- mkl=2020.2 # [py <= 311 and x86_64 and not win]
- mkl=2023.1 # [py >= 312 and x86_64 and not win]
- mkl=2021.4 # [x86_64 and win]
{% endif %}
- typing_extensions
- ninja
- libuv # [win]
- numpy=1.19 # [py <= 39]
- numpy=1.21.5 # [py == 310]
- numpy=1.23.5 # [py >= 311]
- numpy=1.23.5 # [py == 311]
- numpy=1.26.1 # [py >= 312]
- openssl=1.1.1l # [py >= 38 and py <= 310 and linux]
- openssl=1.1.1s # [py >= 311 and linux]
- openssl=1.1.1s # [py == 311 and linux]
- openssl=3.1.4 # [py >= 312 and linux]
{{ environ.get('PYTORCH_LLVM_PACKAGE', ' - llvmdev=9') }}
{{ environ.get('MAGMA_PACKAGE', '') }}

Expand Down
28 changes: 0 additions & 28 deletions conda/upload.sh

This file was deleted.

3 changes: 3 additions & 0 deletions manywheel/build_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ case ${DESIRED_PYTHON} in
cp311*)
retry pip install -q numpy==1.23.1
;;
cp312*)
retry pip install -q numpy==1.26.1
;;
# Should catch 3.9+
*)
retry pip install -q numpy==1.19.4
Expand Down
6 changes: 4 additions & 2 deletions manywheel/build_cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if [[ -n "$DESIRED_CUDA" ]]; then
# There really has to be a better way to do this - eli
# Possibly limiting builds to specific cuda versions be delimiting images would be a choice
if [[ "$OS_NAME" == *"Ubuntu"* ]]; then
echo "Switching to CUDA version $desired_cuda"
echo "Switching to CUDA version ${DESIRED_CUDA}"
/builder/conda/switch_cuda_version.sh "${DESIRED_CUDA}"
fi
else
Expand Down Expand Up @@ -263,7 +263,9 @@ else
fi

# TODO: Remove me when Triton has a proper release channel
if [[ $(uname) == "Linux" ]]; then
# No triton dependency for now on 3.12 since we don't have binaries for it
# and torch.compile doesn't work.
if [[ $(uname) == "Linux" && "$DESIRED_PYTHON" != "3.12" ]]; then
TRITON_SHORTHASH=$(cut -c1-10 $PYTORCH_ROOT/.github/ci_commit_pins/triton.txt)

if [[ -z "$PYTORCH_EXTRA_INSTALL_REQUIREMENTS" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion manywheel/build_libtorch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ for pkg in /$LIBTORCH_HOUSE_DIR/libtorch*.zip; do
fi

# zip up the wheel back
zip -rq $(basename $pkg) $PREIX*
zip -rq $(basename $pkg) $PREFIX*

# replace original wheel
rm -f $pkg
Expand Down
4 changes: 3 additions & 1 deletion manywheel/build_rocm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ if [[ $ROCM_INT -ge 50600 ]]; then
fi

# Add triton install dependency
if [[ $(uname) == "Linux" ]]; then
# No triton dependency for now on 3.12 since we don't have binaries for it
# and torch.compile doesn't work.
if [[ $(uname) == "Linux" && "$DESIRED_PYTHON" != "3.12" ]]; then
TRITON_SHORTHASH=$(cut -c1-10 $PYTORCH_ROOT/.ci/docker/ci_commit_pins/triton-rocm.txt)
TRITON_VERSION=$(cat $PYTORCH_ROOT/.ci/docker/triton_version.txt)

Expand Down
44 changes: 0 additions & 44 deletions manywheel/upload.sh

This file was deleted.

1 change: 1 addition & 0 deletions release/pypi/promote_pypi_to_production.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ promote_staging_binaries torch "${PYTORCH_VERSION}"
promote_staging_binaries torchvision "${TORCHVISION_VERSION}"
promote_staging_binaries torchaudio "${TORCHAUDIO_VERSION}"
promote_staging_binaries torchtext "${TORCHTEXT_VERSION}"
promote_staging_binaries torchdata "${TORCHDATA_VERSION}"
18 changes: 13 additions & 5 deletions release/pypi/promote_pypi_to_staging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,34 @@ upload_pypi_to_staging() {
# Uncomment these to promote to pypi
PYTORCH_LINUX_VERSION_SUFFIX="%2Bcu121.with.pypi.cudnn"
LINUX_VERSION_SUFFIX="%2Bcu121"
WIN_VERSION_SUFFIX="%2Bcpu"
CPU_VERSION_SUFFIX="%2Bcpu"
MACOS_X86_64="macosx_.*_x86_64"
MACOS_ARM64="macosx_.*_arm64"

PLATFORM="linux_x86_64" VERSION_SUFFIX="${PYTORCH_LINUX_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
PLATFORM="manylinux2014_aarch64" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
PLATFORM="win_amd64" VERSION_SUFFIX="${WIN_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
PLATFORM="win_amd64" VERSION_SUFFIX="${CPU_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}" # intel mac
PLATFORM="${MACOS_ARM64}" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}" # m1 mac

PLATFORM="linux_x86_64" VERSION_SUFFIX="${LINUX_VERSION_SUFFIX}" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}"
PLATFORM="linux_aarch64" VERSION_SUFFIX="" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}"
PLATFORM="win_amd64" VERSION_SUFFIX="${WIN_VERSION_SUFFIX}" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}"
PLATFORM="win_amd64" VERSION_SUFFIX="${CPU_VERSION_SUFFIX}" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}"
PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}"
PLATFORM="${MACOS_ARM64}" VERSION_SUFFIX="" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}"

PLATFORM="linux_x86_64" VERSION_SUFFIX="${LINUX_VERSION_SUFFIX}" upload_pypi_to_staging torchaudio "${TORCHAUDIO_VERSION}"
PLATFORM="linux_aarch64" VERSION_SUFFIX="" upload_pypi_to_staging torchaudio "${TORCHAUDIO_VERSION}"
PLATFORM="win_amd64" VERSION_SUFFIX="${WIN_VERSION_SUFFIX}" upload_pypi_to_staging torchaudio "${TORCHAUDIO_VERSION}"
PLATFORM="win_amd64" VERSION_SUFFIX="${CPU_VERSION_SUFFIX}" upload_pypi_to_staging torchaudio "${TORCHAUDIO_VERSION}"
PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torchaudio "${TORCHAUDIO_VERSION}"
PLATFORM="${MACOS_ARM64}" VERSION_SUFFIX="" upload_pypi_to_staging torchaudio "${TORCHAUDIO_VERSION}"

upload_pypi_to_staging torchtext "${TORCHTEXT_VERSION}"
PLATFORM="linux_x86" VERSION_SUFFIX="${CPU_VERSION_SUFFIX}" upload_pypi_to_staging torchtext "${TORCHTEXT_VERSION}"
PLATFORM="win_amd64" VERSION_SUFFIX="${CPU_VERSION_SUFFIX}" upload_pypi_to_staging torchtext "${TORCHTEXT_VERSION}"
PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torchtext "${TORCHTEXT_VERSION}"
PLATFORM="${MACOS_ARM64}" VERSION_SUFFIX="" upload_pypi_to_staging torchtext "${TORCHTEXT_VERSION}"

PLATFORM="manylinux2014_x86_64" VERSION_SUFFIX="" upload_pypi_to_staging torchdata "${TORCHDATA_VERSION}"
PLATFORM="win_amd64" VERSION_SUFFIX="" upload_pypi_to_staging torchdata "${TORCHDATA_VERSION}"
PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torchdata "${TORCHDATA_VERSION}"
PLATFORM="${MACOS_ARM64}" VERSION_SUFFIX="" upload_pypi_to_staging torchdata "${TORCHDATA_VERSION}"
2 changes: 1 addition & 1 deletion release/pypi/upload_pypi_to_staging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fi
for pkg in ${pkgs_to_promote}; do
pkg_basename="$(basename "${pkg}")"

if [[ "${pkg}" != *aarch64* ]]; then
if [[ "${pkg}" != *aarch64* && "${pkg}" != *torchdata* ]]; then
# sub out linux for manylinux1
pkg_basename="$(basename "${pkg//linux/manylinux1}")"
elif [[ "${pkg}" == *manylinux_2_17_aarch64* ]]; then
Expand Down
6 changes: 4 additions & 2 deletions test/smoke_test/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@ def check_version(package: str) -> None:
module_version = imported_module.__version__
if not module_version.startswith(release_matrix[module["name"]]):
raise RuntimeError(
f"{module['name']} version mismatch, expected {release_matrix[module['name']]} for channel {channel}. But its {module_version}"
f"{module['name']} version mismatch, expected: \
{release_matrix[module['name']]} for channel {channel}. But its {module_version}"
)
else:
print(f"{module['name']} version actual: {module_version} expected: {release_matrix[module['name']]} for channel {channel}.")
print(f"{module['name']} version actual: {module_version} expected: \
{release_matrix[module['name']]} for channel {channel}.")

else:
print(f"Skip version check for channel {channel} as stable version is None")
Expand Down
13 changes: 12 additions & 1 deletion wheel/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,23 +136,33 @@ export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
SETUPTOOLS_PINNED_VERSION="=46.0.0"
PYYAML_PINNED_VERSION="=5.3"
EXTRA_CONDA_INSTALL_FLAGS=""
case ${desired_python} in
case $desired_python in
3.12)
echo "Using 3.12 deps"
SETUPTOOLS_PINNED_VERSION=">=68.0.0"
PYYAML_PINNED_VERSION=">=6.0.1"
NUMPY_PINNED_VERSION="==1.26.0"
;;
3.11)
echo "Using 3.11 deps"
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
PYYAML_PINNED_VERSION=">=5.3"
NUMPY_PINNED_VERSION="==1.23.5"
;;
3.10)
echo "Using 3.10 deps"
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
PYYAML_PINNED_VERSION=">=5.3"
NUMPY_PINNED_VERSION="=1.21.2"
;;
3.9)
echo "Using 3.9 deps"
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
PYYAML_PINNED_VERSION=">=5.3"
NUMPY_PINNED_VERSION="=1.19"
;;
3.8)
echo "Using 3.8 deps"
if [[ "$(uname -m)" == "arm64" ]]; then
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
PYYAML_PINNED_VERSION=">=5.3"
Expand All @@ -162,6 +172,7 @@ case ${desired_python} in
fi
;;
*)
echo "Using default deps"
NUMPY_PINNED_VERSION="=1.11.3"
;;
esac
Expand Down

0 comments on commit dcc13a0

Please sign in to comment.