Skip to content

Commit

Permalink
Merge pull request #956 from hmaarrfk/pytorch_gpu_2.41
Browse files Browse the repository at this point in the history
Patch pytorch-cpu/gpu for 2.4.1 increased compatibility
  • Loading branch information
h-vetinari authored Feb 2, 2025
2 parents f43ade7 + ec8a06e commit 5fb08fa
Showing 1 changed file with 63 additions and 0 deletions.
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}"

0 comments on commit 5fb08fa

Please sign in to comment.