Skip to content

Commit

Permalink
Update pytorch version to 2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongseok-meta committed Oct 17, 2024
1 parent 3b8d6fc commit 5559a7e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
13 changes: 8 additions & 5 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set version = "2.4.1" %}
{% set build = 2 %}
{% set version = "2.5.0" %}
{% set build = 0 %}

{% if cuda_compiler_version != "None" %}
{% set build = build + 200 %}
Expand All @@ -21,21 +21,22 @@ package:

source:
url: https://github.com/pytorch/pytorch/releases/download/v{{ version }}/pytorch-v{{ version }}.tar.gz
sha256: 39666a43c0c10f5fd46c1a7ca95dc74d3bc39de2678b70066481cbf02e58384f
sha256: 91b3ba7db9cd6ac48f672a615872dcf1e4c29783d9c615336b11553915d5298a
patches:
# The patch below is probably OK for other versions too, but it is untested with them
# https://github.com/conda-forge/pytorch-cpu-feedstock/pull/203#issuecomment-1797352452
# https://github.com/pytorch/pytorch/pull/82695/files#diff-8e5cb190cc46be808993381a31fe9c027705d356b6bc0460368c0310ae82b273R61-R66
# https://github.com/pytorch/pytorch/pull/108932
# cross compiling CUDA also needs to delete the check
- patches/0001-Allow-splayed-layouts.patch # [cuda_compiler_version == "12.0" or (build_platform != target_platform and cuda_compiler_version != "None")]
# - patches/0001-Allow-splayed-layouts.patch # [cuda_compiler_version == "12.0" or (build_platform != target_platform and cuda_compiler_version != "None")]
# https://github.com/pytorch/pytorch/issues/101135
# the following patch was transcribed to work wit 2.1.0
# https://gist.github.com/andreigh/f78f631e0039f0af410b269acbb0c8dc
- patches/0002-Use-new-nvtoolset.patch # [cuda_compiler_version == "12.0"]
# - patches/0002-Use-new-nvtoolset.patch # [cuda_compiler_version == "12.0"]
- patches/0003-Force-usage-of-python-3-and-error-without-numpy.patch
# https://github.com/pytorch/pytorch/pull/137084
- patches/0004-Help-find-numpy.patch
- patches/0005-Use-system-nvtx3.patch

# Fix linker script inclusion for aarch64
# Already merged, can remove on Pytorch 2.4.1+
Expand Down Expand Up @@ -92,6 +93,7 @@ requirements:
- libcurand-dev # [build_platform != target_platform]
- libcusolver-dev # [build_platform != target_platform]
- libcusparse-dev # [build_platform != target_platform]
- nvtx-c
{% endif %}
# Dec 2020: it seems that git is broken on windows, so we use m2-git
- patch # [not win]
Expand Down Expand Up @@ -125,6 +127,7 @@ requirements:
- libcurand-dev
- libcusolver-dev
- libcusparse-dev
- nvtx-c
{% endif %}
# other requirements
- python 3.12 # [megabuild]
Expand Down
13 changes: 13 additions & 0 deletions recipe/patches/0005-Use-system-nvtx3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/cmake/public/cuda.cmake b/cmake/public/cuda.cmake
index afc1bc12ab..497dce5313 100644
--- a/cmake/public/cuda.cmake
+++ b/cmake/public/cuda.cmake
@@ -170,7 +170,7 @@ else()
endif()

# nvToolsExt
-find_path(nvtx3_dir NAMES nvtx3 PATHS "${PROJECT_SOURCE_DIR}/third_party/NVTX/c/include" NO_DEFAULT_PATH)
+find_path(nvtx3_dir NAMES nvtx3)
find_package_handle_standard_args(nvtx3 DEFAULT_MSG nvtx3_dir)
if(nvtx3_FOUND)
add_library(torch::nvtx3 INTERFACE IMPORTED)

0 comments on commit 5559a7e

Please sign in to comment.