diff --git a/.github/workflows/build-torch.yml b/.github/workflows/build-torch.yml index f18ded9e..eec411b3 100644 --- a/.github/workflows/build-torch.yml +++ b/.github/workflows/build-torch.yml @@ -63,9 +63,9 @@ jobs: - name: Patch pytorch source working-directory: pytorch run: | - git apply ../python-wheels/patches/torch/${{ env.TORCH_VERSION }}/0001-CI-Add-manywheel-Dockerfile-for-riscv64.patch - git apply ../python-wheels/patches/torch/${{ env.TORCH_VERSION }}/0002-CI-Add-cpu-riscv64-support-to-manywheel-scripts.patch - git apply ../python-wheels/patches/torch/${{ env.TORCH_VERSION }}/0003-CI-Add-native-build-image-for-linux-riscv64.patch + git apply ../python-wheels/patches/torch/${{ env.TORCH_VERSION }}+cpu/0001-CI-Add-manywheel-Dockerfile-for-riscv64.patch + git apply ../python-wheels/patches/torch/${{ env.TORCH_VERSION }}+cpu/0002-CI-Add-cpu-riscv64-support-to-manywheel-scripts.patch + git apply ../python-wheels/patches/torch/${{ env.TORCH_VERSION }}+cpu/0003-CI-Add-native-build-image-for-linux-riscv64.patch - name: Login to GitHub Container Registry uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 diff --git a/docs/packages/generate_packages_doc.py b/docs/packages/generate_packages_doc.py index 754b4083..838d1218 100644 --- a/docs/packages/generate_packages_doc.py +++ b/docs/packages/generate_packages_doc.py @@ -17,6 +17,9 @@ GITLAB_WHEEL_BUILDER_URL = ( "https://gitlab.com/riseproject/python/wheel_builder/-/tree/main" ) +GITHUB_PYTHON_WHEELS_URL = ( + "https://github.com/riseproject-dev/python-wheels/tree/main" +) PYPI_INDEX_URL = "https://pypi.riseproject.dev/simple/" # Match RST inline external refs: `Label `_ or `Label `__ @@ -219,6 +222,18 @@ def generate_md_page(yaml_file, output_md, package_list): f"[{patch_link}]({patch_link})" ) lines.append("") + else: + # if upstream tag is not present, it means the package was uploaded from github action + # on github we changed the way we store patches: we use package_name and version + # instead of project_name and tag + patch_link = ( + f"{GITHUB_PYTHON_WHEELS_URL}/" + f"patches/{package_name}/{version_number}" + ) + lines.append( + f"**Patch applied for this version:** " + f"[{patch_link}]({patch_link})" + ) if version.get("comment"): _callout(lines, "note", version["comment"]) diff --git a/patches/torch/2.13.0/0001-CI-Add-manywheel-Dockerfile-for-riscv64.patch b/patches/torch/2.13.0+cpu/0001-CI-Add-manywheel-Dockerfile-for-riscv64.patch similarity index 100% rename from patches/torch/2.13.0/0001-CI-Add-manywheel-Dockerfile-for-riscv64.patch rename to patches/torch/2.13.0+cpu/0001-CI-Add-manywheel-Dockerfile-for-riscv64.patch diff --git a/patches/torch/2.13.0/0002-CI-Add-cpu-riscv64-support-to-manywheel-scripts.patch b/patches/torch/2.13.0+cpu/0002-CI-Add-cpu-riscv64-support-to-manywheel-scripts.patch similarity index 100% rename from patches/torch/2.13.0/0002-CI-Add-cpu-riscv64-support-to-manywheel-scripts.patch rename to patches/torch/2.13.0+cpu/0002-CI-Add-cpu-riscv64-support-to-manywheel-scripts.patch diff --git a/patches/torch/2.13.0/0003-CI-Add-native-build-image-for-linux-riscv64.patch b/patches/torch/2.13.0+cpu/0003-CI-Add-native-build-image-for-linux-riscv64.patch similarity index 100% rename from patches/torch/2.13.0/0003-CI-Add-native-build-image-for-linux-riscv64.patch rename to patches/torch/2.13.0+cpu/0003-CI-Add-native-build-image-for-linux-riscv64.patch