From 74c5d7a6e4b1452bc60d8c6edf886db76c54b3ea Mon Sep 17 00:00:00 2001 From: "Jeongseok (JS) Lee" <142548112+jeongseok-meta@users.noreply.github.com> Date: Mon, 8 Jul 2024 22:02:33 -0700 Subject: [PATCH 01/10] Keep libtorch_python --- recipe/build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/recipe/build.sh b/recipe/build.sh index ef00f6c44..9edf5d492 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -218,7 +218,6 @@ if [[ "$PKG_NAME" == "libtorch" ]]; then for f in ATen caffe2 tensorpipe torch c10; do mv torch/include/$f ${PREFIX}/include/$f done - rm ${PREFIX}/lib/libtorch_python.* popd popd From 7e83af6fb199f411e935620654ce92c9c49bc0f9 Mon Sep 17 00:00:00 2001 From: "Jeongseok (JS) Lee" <142548112+jeongseok-meta@users.noreply.github.com> Date: Mon, 8 Jul 2024 22:17:20 -0700 Subject: [PATCH 02/10] Increase build number --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 61e5253e8..8805a01ef 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set version = "2.3.1" %} -{% set build = 1 %} +{% set build = 2 %} {% if cuda_compiler_version != "None" %} {% set build = build + 200 %} From 84af8ac6de8cc179caf60872d4c1df35ccc80cd9 Mon Sep 17 00:00:00 2001 From: "Jeongseok (JS) Lee" <142548112+jeongseok-meta@users.noreply.github.com> Date: Mon, 8 Jul 2024 22:20:35 -0700 Subject: [PATCH 03/10] Add test for libtorch_python --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 8805a01ef..6c09ae299 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -159,7 +159,7 @@ requirements: test: commands: # libraries - {% for each_lib in [ 'libc10', 'libshm', 'libtorch', 'libtorch_cpu', 'libtorch_global_deps'] %} + {% for each_lib in [ 'libc10', 'libshm', 'libtorch', 'libtorch_cpu', 'libtorch_global_deps', 'libtorch_python'] %} - test -f $PREFIX/lib/{{ each_lib }}.so # [linux] - test -f $PREFIX/lib/{{ each_lib }}.dylib # [osx] {% endfor %} From ab2863087fe0fe76e570d162e3a685352c97c71d Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Fri, 2 Aug 2024 17:08:35 -0500 Subject: [PATCH 04/10] Revert "Keep libtorch_python" This reverts commit 74c5d7a6e4b1452bc60d8c6edf886db76c54b3ea. --- recipe/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/build.sh b/recipe/build.sh index 9edf5d492..ef00f6c44 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -218,6 +218,7 @@ if [[ "$PKG_NAME" == "libtorch" ]]; then for f in ATen caffe2 tensorpipe torch c10; do mv torch/include/$f ${PREFIX}/include/$f done + rm ${PREFIX}/lib/libtorch_python.* popd popd From 4ae4eb3fa2e52b4e71c01177c1222a7fbe9e3752 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Fri, 2 Aug 2024 17:08:55 -0500 Subject: [PATCH 05/10] Revert "Add test for libtorch_python" This reverts commit 84af8ac6de8cc179caf60872d4c1df35ccc80cd9. --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 6c09ae299..8805a01ef 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -159,7 +159,7 @@ requirements: test: commands: # libraries - {% for each_lib in [ 'libc10', 'libshm', 'libtorch', 'libtorch_cpu', 'libtorch_global_deps', 'libtorch_python'] %} + {% for each_lib in [ 'libc10', 'libshm', 'libtorch', 'libtorch_cpu', 'libtorch_global_deps'] %} - test -f $PREFIX/lib/{{ each_lib }}.so # [linux] - test -f $PREFIX/lib/{{ each_lib }}.dylib # [osx] {% endfor %} From a62015763fd36a8c263d31c509e3c96483c4014c Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Fri, 2 Aug 2024 17:13:27 -0500 Subject: [PATCH 06/10] move libtorch_python.so to PREFIX/lib --- recipe/build.sh | 7 +++++++ recipe/meta.yaml | 1 + 2 files changed, 8 insertions(+) diff --git a/recipe/build.sh b/recipe/build.sh index ef00f6c44..ba2934961 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -224,4 +224,11 @@ if [[ "$PKG_NAME" == "libtorch" ]]; then # Keep the original backed up to sed later cp build/CMakeCache.txt build/CMakeCache.txt.orig +else + # Keep this in ${PREFIX}/lib so that the library can be found by + # TorchConfig.cmake. + # With upstream non-split build, `libtorch_python.so` + # and TorchConfig.cmake are both in ${SP_DIR}/torch/lib and therefore + # this is not needed. + mv ${SP_DIR}/torch/lib/libtorch_python${SHLIB_EXT} ${PREFIX}/lib fi diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 8805a01ef..15a95a5a5 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -317,6 +317,7 @@ outputs: # But if users install a newer version of OSX, they will have MPS support # https://github.com/conda-forge/pytorch-cpu-feedstock/pull/123#issuecomment-1186355073 # - python -c "import torch; assert torch.backends.mps.is_available()" # [osx] + - test -f $PREFIX/lib/libtorch_python${SHLIB_EXT} # [unix] # 2021/08/01, hmaarrfk # While this seems like a roundabout way of defining the package name From 11ed4ee187d2a8f368894534d2e602854c007900 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Fri, 16 Aug 2024 17:41:46 -0400 Subject: [PATCH 07/10] trigger --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 15a95a5a5..474690dda 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -317,7 +317,7 @@ outputs: # But if users install a newer version of OSX, they will have MPS support # https://github.com/conda-forge/pytorch-cpu-feedstock/pull/123#issuecomment-1186355073 # - python -c "import torch; assert torch.backends.mps.is_available()" # [osx] - - test -f $PREFIX/lib/libtorch_python${SHLIB_EXT} # [unix] + - test -f $PREFIX/lib/libtorch_python${SHLIB_EXT} # [unix] # 2021/08/01, hmaarrfk # While this seems like a roundabout way of defining the package name From e1ce95b10a2a52774429c08abe3366c3f2cca144 Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 21:59:08 +0000 Subject: [PATCH 08/10] MNT: Re-rendered with conda-build 24.7.1, conda-smithy 3.38.0, and conda-forge-pinning 2024.08.16.17.50.00 --- .scripts/build_steps.sh | 1 - .scripts/run_osx_build.sh | 2 +- build-locally.py | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 2496f533c..50dc94e6a 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -72,7 +72,6 @@ else --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" - ( startgroup "Inspecting artifacts" ) 2> /dev/null # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index ca41e5fea..8c1d30c30 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -11,7 +11,7 @@ MINIFORGE_HOME=${MINIFORGE_HOME:-${HOME}/miniforge3} ( startgroup "Installing a fresh version of Miniforge" ) 2> /dev/null MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" -MINIFORGE_FILE="Mambaforge-MacOSX-$(uname -m).sh" +MINIFORGE_FILE="Miniforge3-MacOSX-$(uname -m).sh" curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}" rm -rf ${MINIFORGE_HOME} bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} diff --git a/build-locally.py b/build-locally.py index e0d408d07..d78427b5b 100755 --- a/build-locally.py +++ b/build-locally.py @@ -3,11 +3,11 @@ # This file has been generated by conda-smithy in order to build the recipe # locally. # -import os import glob +import os +import platform import subprocess from argparse import ArgumentParser -import platform def setup_environment(ns): From 8ed8fec4eb1da0c59ac6aae7611048b4bcabf573 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Mon, 19 Aug 2024 23:30:44 -0400 Subject: [PATCH 09/10] no need to specify c_stdlib for linux anymore --- recipe/conda_build_config.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index b43f42ab1..014405057 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -1,5 +1,4 @@ -c_stdlib_version: # [unix] - - 2.17 # [linux] +c_stdlib_version: # [osx and x86_64] - 10.15 # [osx and x86_64] MACOSX_SDK_VERSION: # [osx] From 31956b1908e6dead2109aaa9e1bcec8365c653a1 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Wed, 21 Aug 2024 12:34:41 -0400 Subject: [PATCH 10/10] try to pin magma to 2.7.2 --- recipe/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 474690dda..635194468 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -99,7 +99,7 @@ requirements: # GPU requirements - cudnn # [cuda_compiler_version != "None"] - nccl # [cuda_compiler_version != "None"] - - magma # [cuda_compiler_version != "None"] + - magma 2.7.2 # [cuda_compiler_version != "None"] - cuda-version {{ cuda_compiler_version }} # [cuda_compiler_version != "None"] {% if cuda_major >= 12 %} - cuda-driver-dev @@ -222,7 +222,7 @@ outputs: # GPU requirements - cudnn # [cuda_compiler_version != "None"] - nccl # [cuda_compiler_version != "None"] - - magma # [cuda_compiler_version != "None"] + - magma 2.7.2 # [cuda_compiler_version != "None"] - cuda-version {{ cuda_compiler_version }} # [cuda_compiler_version != "None"] {% if cuda_major >= 12 %} - cuda-driver-dev