Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch pytorch-cpu/gpu for 2.4.1 increased compatibility #956

Merged
merged 1 commit into from
Feb 2, 2025
Merged
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
63 changes: 63 additions & 0 deletions recipe/patch_yaml/pytorch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,66 @@ if:

then:
- add_constrains: pybind11 <0.0.0a0


---
# Pytorch 2.4.1 did not upload a package for pytorch-gpu and pytorch-cpu that
# compatible with all versions of python
# Only the linux builds use the "megabuild" that cause the issue
# The OSX builds were "safe"
# https://github.com/conda-forge/pytorch-cpu-feedstock/issues/338
# https://github.com/conda-forge/pytorch-cpu-feedstock/pull/341

if:
name: pytorch-gpu
version: 2.4.1
subdir_in: linux-64
# cpu is build number 0-5
# mkl is +100
# cuda compiler + mkl is +300
# Cuda without mkl doesn't exist for 2.4.1
# cuda compiler is +200
build_number_in:
- 300
- 301
- 302
- 303
- 304
- 305

then:
- replace_depends:
old: "pytorch 2.4.1 cuda118_*"
new: "pytorch 2.4.1 cuda118_*_${build_number}"
- replace_depends:
old: "pytorch 2.4.1 cuda120_*"
new: "pytorch 2.4.1 cuda120_*_${build_number}"

---
if:
name: pytorch-cpu
version: 2.4.1
subdir_in: linux-64
# cpu is build number 0-5
# mkl is +100
# cuda compiler + mkl is +300
# Cuda without mkl doesn't exist for 2.4.1
# cuda compiler is +200
build_number_in:
- 0
- 1
- 2
- 3
- 4
- 5
- 100
- 101
- 102
- 103
- 104
- 105

then:
- replace_depends:
old: "pytorch 2.4.1 cpu_*"
new: "pytorch 2.4.1 cpu_*_${build_number}"