From 0dffeb29fcad061b1b1f336222014012b1e04de0 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Thu, 17 Oct 2024 15:04:05 -0700 Subject: [PATCH] Update pytorch version to 2.5.0 --- recipe/meta.yaml | 15 +++++++++------ recipe/patches/0005-Use-system-nvtx3.patch | 13 +++++++++++++ 2 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 recipe/patches/0005-Use-system-nvtx3.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index b689ea973..b265d0c6d 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -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 %} @@ -21,26 +21,27 @@ 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+ # https://github.com/pytorch/pytorch/pull/130370 - - patches/130370.patch + # - patches/130370.patch # See https://github.com/pytorch/pytorch/pull/137331 # for status @@ -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] @@ -125,6 +127,7 @@ requirements: - libcurand-dev - libcusolver-dev - libcusparse-dev + - nvtx-c {% endif %} # other requirements - python 3.12 # [megabuild] diff --git a/recipe/patches/0005-Use-system-nvtx3.patch b/recipe/patches/0005-Use-system-nvtx3.patch new file mode 100644 index 000000000..6f742ba21 --- /dev/null +++ b/recipe/patches/0005-Use-system-nvtx3.patch @@ -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)