Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion release/pypi/prep_binary_for_pypi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ for whl_file in "$@"; do
find "${dist_info_folder}" -type f -exec sed -i "s!${version_with_suffix}!${version_no_suffix}!" {} \;
# Moves distinfo from one with a version suffix to one without
# Example: torch-1.8.0+cpu.dist-info => torch-1.8.0.dist-info
mv "${dist_info_folder}" "${dirname_dist_info_folder}/${basename_dist_info_folder/${version_with_suffix}/${version_no_suffix}}"
if [[ -n "${VERSION_SUFFIX}" ]]; then
mv "${dist_info_folder}" "${dirname_dist_info_folder}/${basename_dist_info_folder/${version_with_suffix}/${version_no_suffix}}"
fi
if [[ "${PLATFORM}" == "manylinux2014_aarch64" && ${PACKAGE_NAME} == "torch" ]]; then
echo "Injecting triton"
sed -i 's,nvidia-nvtx-cu12.*$,&\nRequires-Dist: triton==3.1.0 ; platform_system == "Linux" and platform_machine == "x86_64" and python_version < "3.13"\r,g' "${dist_info_folder}/METADATA"
fi

cd "${whl_dir}"

(
Expand Down
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 @@ -58,7 +58,7 @@ for pkg in ${pkgs_to_promote}; do
curl -fSL -o "${orig_pkg}" "https://download.pytorch.org${pkg}"
)

if [[ -n "${VERSION_SUFFIX}" ]]; then
if [[ -n "${VERSION_SUFFIX}" ]] || [[ "${PLATFORM}" == "manylinux2014_aarch64" && "${PACKAGE_NAME}" == "torch" ]]; then
OUTPUT_DIR="${output_tmp_dir}" bash "${DIR}/prep_binary_for_pypi.sh" "${orig_pkg}"
else
mv "${orig_pkg}" "${output_tmp_dir}/"
Expand Down
Loading