diff --git a/.ci_support/linux_64_blas_implgenericc_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11.yaml b/.ci_support/linux_64_blas_implgenericc_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11.yaml index 44022beab..35b41fc4d 100644 --- a/.ci_support/linux_64_blas_implgenericc_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11.yaml +++ b/.ci_support/linux_64_blas_implgenericc_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11.yaml @@ -37,7 +37,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' megabuild: - 'true' mkl: @@ -61,7 +61,7 @@ python: - 3.13.* *_cp313 - 3.9.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - linux-64 zip_keys: diff --git a/.ci_support/linux_64_blas_implgenericc_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml b/.ci_support/linux_64_blas_implgenericc_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml index 72bb1a3c9..ada2f3452 100644 --- a/.ci_support/linux_64_blas_implgenericc_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml +++ b/.ci_support/linux_64_blas_implgenericc_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml @@ -37,7 +37,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' megabuild: - 'true' mkl: @@ -61,7 +61,7 @@ python: - 3.13.* *_cp313 - 3.9.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - linux-64 zip_keys: diff --git a/.ci_support/linux_64_blas_implgenericc_compiler_version13cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version13.yaml b/.ci_support/linux_64_blas_implgenericc_compiler_version13cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version13.yaml index b7d59705e..0fe47b80b 100644 --- a/.ci_support/linux_64_blas_implgenericc_compiler_version13cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version13.yaml +++ b/.ci_support/linux_64_blas_implgenericc_compiler_version13cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version13.yaml @@ -37,7 +37,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' megabuild: - 'true' mkl: @@ -61,7 +61,7 @@ python: - 3.13.* *_cp313 - 3.9.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - linux-64 zip_keys: diff --git a/.ci_support/linux_64_blas_implmklc_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11.yaml b/.ci_support/linux_64_blas_implmklc_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11.yaml index 5b83a2aad..ae8f3036b 100644 --- a/.ci_support/linux_64_blas_implmklc_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11.yaml +++ b/.ci_support/linux_64_blas_implmklc_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11.yaml @@ -37,7 +37,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' megabuild: - 'true' mkl: @@ -61,7 +61,7 @@ python: - 3.13.* *_cp313 - 3.9.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - linux-64 zip_keys: diff --git a/.ci_support/linux_64_blas_implmklc_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml b/.ci_support/linux_64_blas_implmklc_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml index eb7dd981e..980193af3 100644 --- a/.ci_support/linux_64_blas_implmklc_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml +++ b/.ci_support/linux_64_blas_implmklc_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml @@ -37,7 +37,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' megabuild: - 'true' mkl: @@ -61,7 +61,7 @@ python: - 3.13.* *_cp313 - 3.9.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - linux-64 zip_keys: diff --git a/.ci_support/linux_64_blas_implmklc_compiler_version13cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version13.yaml b/.ci_support/linux_64_blas_implmklc_compiler_version13cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version13.yaml index fecd77c6a..27b7f688a 100644 --- a/.ci_support/linux_64_blas_implmklc_compiler_version13cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version13.yaml +++ b/.ci_support/linux_64_blas_implmklc_compiler_version13cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version13.yaml @@ -37,7 +37,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' megabuild: - 'true' mkl: @@ -61,7 +61,7 @@ python: - 3.13.* *_cp313 - 3.9.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - linux-64 zip_keys: diff --git a/.ci_support/linux_aarch64_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml b/.ci_support/linux_aarch64_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml index 03492ccba..f59be98a9 100644 --- a/.ci_support/linux_aarch64_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml +++ b/.ci_support/linux_aarch64_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml @@ -37,7 +37,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' megabuild: - 'true' mkl: @@ -61,7 +61,7 @@ python: - 3.13.* *_cp313 - 3.9.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - linux-aarch64 zip_keys: diff --git a/.ci_support/linux_aarch64_c_compiler_version13cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version13.yaml b/.ci_support/linux_aarch64_c_compiler_version13cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version13.yaml index 2ca219c41..b68d5473a 100644 --- a/.ci_support/linux_aarch64_c_compiler_version13cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version13.yaml +++ b/.ci_support/linux_aarch64_c_compiler_version13cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version13.yaml @@ -37,7 +37,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' megabuild: - 'true' mkl: @@ -61,7 +61,7 @@ python: - 3.13.* *_cp313 - 3.9.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - linux-aarch64 zip_keys: diff --git a/.ci_support/osx_64_blas_implgenericnumpy2.0python3.10.____cpython.yaml b/.ci_support/osx_64_blas_implgenericnumpy2.0python3.10.____cpython.yaml index f10cc6865..b5d3111d8 100644 --- a/.ci_support/osx_64_blas_implgenericnumpy2.0python3.10.____cpython.yaml +++ b/.ci_support/osx_64_blas_implgenericnumpy2.0python3.10.____cpython.yaml @@ -33,7 +33,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' llvm_openmp: - '17' macos_machine: @@ -51,7 +51,7 @@ pin_run_as_build: python: - 3.10.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - osx-64 zip_keys: diff --git a/.ci_support/osx_64_blas_implgenericnumpy2.0python3.11.____cpython.yaml b/.ci_support/osx_64_blas_implgenericnumpy2.0python3.11.____cpython.yaml index 737327ee4..d698e3b52 100644 --- a/.ci_support/osx_64_blas_implgenericnumpy2.0python3.11.____cpython.yaml +++ b/.ci_support/osx_64_blas_implgenericnumpy2.0python3.11.____cpython.yaml @@ -33,7 +33,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' llvm_openmp: - '17' macos_machine: @@ -51,7 +51,7 @@ pin_run_as_build: python: - 3.11.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - osx-64 zip_keys: diff --git a/.ci_support/osx_64_blas_implgenericnumpy2.0python3.12.____cpython.yaml b/.ci_support/osx_64_blas_implgenericnumpy2.0python3.12.____cpython.yaml index c320576f1..364e729a0 100644 --- a/.ci_support/osx_64_blas_implgenericnumpy2.0python3.12.____cpython.yaml +++ b/.ci_support/osx_64_blas_implgenericnumpy2.0python3.12.____cpython.yaml @@ -33,7 +33,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' llvm_openmp: - '17' macos_machine: @@ -51,7 +51,7 @@ pin_run_as_build: python: - 3.12.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - osx-64 zip_keys: diff --git a/.ci_support/osx_64_blas_implgenericnumpy2.0python3.9.____cpython.yaml b/.ci_support/osx_64_blas_implgenericnumpy2.0python3.9.____cpython.yaml index 6578a0815..d4d62150c 100644 --- a/.ci_support/osx_64_blas_implgenericnumpy2.0python3.9.____cpython.yaml +++ b/.ci_support/osx_64_blas_implgenericnumpy2.0python3.9.____cpython.yaml @@ -33,7 +33,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' llvm_openmp: - '17' macos_machine: @@ -51,7 +51,7 @@ pin_run_as_build: python: - 3.9.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - osx-64 zip_keys: diff --git a/.ci_support/osx_64_blas_implgenericnumpy2python3.13.____cp313.yaml b/.ci_support/osx_64_blas_implgenericnumpy2python3.13.____cp313.yaml index b471b7ba5..c066c8874 100644 --- a/.ci_support/osx_64_blas_implgenericnumpy2python3.13.____cp313.yaml +++ b/.ci_support/osx_64_blas_implgenericnumpy2python3.13.____cp313.yaml @@ -33,7 +33,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' llvm_openmp: - '17' macos_machine: @@ -51,7 +51,7 @@ pin_run_as_build: python: - 3.13.* *_cp313 pytorch: -- '2.4' +- '2.5' target_platform: - osx-64 zip_keys: diff --git a/.ci_support/osx_64_blas_implmklnumpy2.0python3.10.____cpython.yaml b/.ci_support/osx_64_blas_implmklnumpy2.0python3.10.____cpython.yaml index bdeba1f4c..922357beb 100644 --- a/.ci_support/osx_64_blas_implmklnumpy2.0python3.10.____cpython.yaml +++ b/.ci_support/osx_64_blas_implmklnumpy2.0python3.10.____cpython.yaml @@ -33,7 +33,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' llvm_openmp: - '17' macos_machine: @@ -51,7 +51,7 @@ pin_run_as_build: python: - 3.10.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - osx-64 zip_keys: diff --git a/.ci_support/osx_64_blas_implmklnumpy2.0python3.11.____cpython.yaml b/.ci_support/osx_64_blas_implmklnumpy2.0python3.11.____cpython.yaml index 777692238..28669b712 100644 --- a/.ci_support/osx_64_blas_implmklnumpy2.0python3.11.____cpython.yaml +++ b/.ci_support/osx_64_blas_implmklnumpy2.0python3.11.____cpython.yaml @@ -33,7 +33,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' llvm_openmp: - '17' macos_machine: @@ -51,7 +51,7 @@ pin_run_as_build: python: - 3.11.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - osx-64 zip_keys: diff --git a/.ci_support/osx_64_blas_implmklnumpy2.0python3.12.____cpython.yaml b/.ci_support/osx_64_blas_implmklnumpy2.0python3.12.____cpython.yaml index ac0b1251b..564cf06d5 100644 --- a/.ci_support/osx_64_blas_implmklnumpy2.0python3.12.____cpython.yaml +++ b/.ci_support/osx_64_blas_implmklnumpy2.0python3.12.____cpython.yaml @@ -33,7 +33,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' llvm_openmp: - '17' macos_machine: @@ -51,7 +51,7 @@ pin_run_as_build: python: - 3.12.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - osx-64 zip_keys: diff --git a/.ci_support/osx_64_blas_implmklnumpy2.0python3.9.____cpython.yaml b/.ci_support/osx_64_blas_implmklnumpy2.0python3.9.____cpython.yaml index 0011f2bd5..1ed42dbc2 100644 --- a/.ci_support/osx_64_blas_implmklnumpy2.0python3.9.____cpython.yaml +++ b/.ci_support/osx_64_blas_implmklnumpy2.0python3.9.____cpython.yaml @@ -33,7 +33,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' llvm_openmp: - '17' macos_machine: @@ -51,7 +51,7 @@ pin_run_as_build: python: - 3.9.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - osx-64 zip_keys: diff --git a/.ci_support/osx_64_blas_implmklnumpy2python3.13.____cp313.yaml b/.ci_support/osx_64_blas_implmklnumpy2python3.13.____cp313.yaml index f43f94df9..a1d60f4a8 100644 --- a/.ci_support/osx_64_blas_implmklnumpy2python3.13.____cp313.yaml +++ b/.ci_support/osx_64_blas_implmklnumpy2python3.13.____cp313.yaml @@ -33,7 +33,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' llvm_openmp: - '17' macos_machine: @@ -51,7 +51,7 @@ pin_run_as_build: python: - 3.13.* *_cp313 pytorch: -- '2.4' +- '2.5' target_platform: - osx-64 zip_keys: diff --git a/.ci_support/osx_arm64_numpy2.0python3.10.____cpython.yaml b/.ci_support/osx_arm64_numpy2.0python3.10.____cpython.yaml index 649cfc519..7cc063e9f 100644 --- a/.ci_support/osx_arm64_numpy2.0python3.10.____cpython.yaml +++ b/.ci_support/osx_arm64_numpy2.0python3.10.____cpython.yaml @@ -33,7 +33,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' llvm_openmp: - '17' macos_machine: @@ -51,7 +51,7 @@ pin_run_as_build: python: - 3.10.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - osx-arm64 zip_keys: diff --git a/.ci_support/osx_arm64_numpy2.0python3.11.____cpython.yaml b/.ci_support/osx_arm64_numpy2.0python3.11.____cpython.yaml index d93c3f2fd..1faa30d14 100644 --- a/.ci_support/osx_arm64_numpy2.0python3.11.____cpython.yaml +++ b/.ci_support/osx_arm64_numpy2.0python3.11.____cpython.yaml @@ -33,7 +33,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' llvm_openmp: - '17' macos_machine: @@ -51,7 +51,7 @@ pin_run_as_build: python: - 3.11.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - osx-arm64 zip_keys: diff --git a/.ci_support/osx_arm64_numpy2.0python3.12.____cpython.yaml b/.ci_support/osx_arm64_numpy2.0python3.12.____cpython.yaml index de04e7720..f0c3094b1 100644 --- a/.ci_support/osx_arm64_numpy2.0python3.12.____cpython.yaml +++ b/.ci_support/osx_arm64_numpy2.0python3.12.____cpython.yaml @@ -33,7 +33,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' llvm_openmp: - '17' macos_machine: @@ -51,7 +51,7 @@ pin_run_as_build: python: - 3.12.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - osx-arm64 zip_keys: diff --git a/.ci_support/osx_arm64_numpy2.0python3.9.____cpython.yaml b/.ci_support/osx_arm64_numpy2.0python3.9.____cpython.yaml index 833a3517d..3fb15a058 100644 --- a/.ci_support/osx_arm64_numpy2.0python3.9.____cpython.yaml +++ b/.ci_support/osx_arm64_numpy2.0python3.9.____cpython.yaml @@ -33,7 +33,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' llvm_openmp: - '17' macos_machine: @@ -51,7 +51,7 @@ pin_run_as_build: python: - 3.9.* *_cpython pytorch: -- '2.4' +- '2.5' target_platform: - osx-arm64 zip_keys: diff --git a/.ci_support/osx_arm64_numpy2python3.13.____cp313.yaml b/.ci_support/osx_arm64_numpy2python3.13.____cp313.yaml index 0027e6427..2b6df3b22 100644 --- a/.ci_support/osx_arm64_numpy2python3.13.____cp313.yaml +++ b/.ci_support/osx_arm64_numpy2python3.13.____cp313.yaml @@ -33,7 +33,7 @@ liblapack: libprotobuf: - 5.28.3 libtorch: -- '2.4' +- '2.5' llvm_openmp: - '17' macos_machine: @@ -51,7 +51,7 @@ pin_run_as_build: python: - 3.13.* *_cp313 pytorch: -- '2.4' +- '2.5' target_platform: - osx-arm64 zip_keys: diff --git a/.gitignore b/.gitignore index 179afe55e..47b5408a8 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,8 @@ /build_artifacts *.pyc + +# Rattler-build's artifacts are in `output` when not specifying anything. +/output +# Pixi's configuration +.pixi diff --git a/recipe/build.sh b/recipe/build.sh index ef56a90cc..6b23a2883 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -30,15 +30,13 @@ fi # This is not correctly found for linux-aarch64 since pytorch 2.0.0 for some reason export _GLIBCXX_USE_CXX11_ABI=1 -# KINETO seems to require CUPTI and will look quite hard for it. -# CUPTI seems to cause trouble when users install a version of -# cudatoolkit different than the one specified at compile time. -# https://github.com/conda-forge/pytorch-cpu-feedstock/issues/135 -export USE_KINETO=OFF - if [[ "$target_platform" == "osx-64" ]]; then export CXXFLAGS="$CXXFLAGS -DTARGET_OS_OSX=1" export CFLAGS="$CFLAGS -DTARGET_OS_OSX=1" +elif [[ "$target_platform" == linux-* ]]; then + # Explicitly force non-executable stack to fix compatibility with glibc 2.41, due to: + # ittptmark64.S.o: missing .note.GNU-stack section implies executable stack + LDFLAGS="${LDFLAGS} -Wl,-z,noexecstack" fi # Dynamic libraries need to be lazily loaded so that torch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 245adc6f7..e5418f293 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set version = "2.4.1" %} -{% set build = 5 %} +{% set build = 6 %} {% if cuda_compiler_version != "None" %} {% set build = build + 200 %} @@ -47,11 +47,12 @@ source: - patches/0006-Allow-users-to-overwrite-ld-with-environment-variabl.patch - patches/0007-Fix-duplicate-linker-script.patch # [cuda_compiler_version != "None" and aarch64] + - patches/0008-Fix-CUPTI-lookup-to-include-target-directory.patch build: number: {{ build }} - string: cuda{{ cuda_compiler_version | replace('.', '') }}_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version != "None"] - string: cpu_{{ blas_impl }}_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version == "None"] + string: cuda{{ cuda_compiler_version | replace('.', '') }}_{{ blas_impl }}_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version != "None"] + string: cpu_{{ blas_impl }}_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version == "None"] detect_binary_files_with_prefix: false run_exports: - {{ pin_subpackage('libtorch', max_pin='x.x') }} @@ -85,6 +86,7 @@ requirements: {% if cuda_major >= 12 %} - cuda-driver-dev # [build_platform != target_platform] - cuda-cudart-dev # [build_platform != target_platform] + - cuda-cupti-dev # [build_platform != target_platform] - cuda-nvrtc-dev # [build_platform != target_platform] - cuda-nvtx-dev # [build_platform != target_platform] - cuda-nvml-dev # [build_platform != target_platform] @@ -100,8 +102,7 @@ requirements: - m2-patch # [win] - git # [not win] - m2-git # [win] - - libgomp # [linux] - - llvm-openmp # [osx] + - llvm-openmp # [not win] - cmake - ninja # Keep libprotobuf here so that a compatibile version @@ -118,6 +119,7 @@ requirements: {% if cuda_major >= 12 %} - cuda-driver-dev - cuda-cudart-dev + - cuda-cupti-dev - cuda-nvrtc-dev - cuda-nvtx-dev - cuda-nvml-dev @@ -143,8 +145,7 @@ requirements: - libcblas * *_mkl # [blas_impl == "mkl"] - libcblas # [blas_impl != "mkl"] - liblapack # [blas_impl != "mkl"] - - libgomp # [linux] - - llvm-openmp # [osx] + - llvm-openmp # [not win] - libabseil - libprotobuf - sleef @@ -185,8 +186,8 @@ outputs: - name: libtorch - name: pytorch build: - string: cuda{{ cuda_compiler_version | replace('.', '') }}_py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version != "None"] - string: cpu_{{ blas_impl }}_py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version == "None"] + string: cuda{{ cuda_compiler_version | replace('.', '') }}_{{ blas_impl }}_py{{ CONDA_PY }}_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version != "None"] + string: cpu_{{ blas_impl }}_py{{ CONDA_PY }}_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version == "None"] detect_binary_files_with_prefix: false run_exports: - {{ pin_subpackage('pytorch', max_pin='x.x') }} @@ -208,6 +209,7 @@ outputs: {% if cuda_major >= 12 %} - cuda-driver-dev # [build_platform != target_platform] - cuda-cudart-dev # [build_platform != target_platform] + - cuda-cupti-dev # [build_platform != target_platform] - cuda-nvrtc-dev # [build_platform != target_platform] - cuda-nvtx-dev # [build_platform != target_platform] - cuda-nvml-dev # [build_platform != target_platform] @@ -223,8 +225,7 @@ outputs: - m2-patch # [win] - git # [not win] - m2-git # [win] - - libgomp # [linux] - - llvm-openmp # [osx] + - llvm-openmp # [not win] - cmake - ninja # Keep libprotobuf here so that a compatibile version @@ -241,6 +242,7 @@ outputs: {% if cuda_major >= 12 %} - cuda-driver-dev - cuda-cudart-dev + - cuda-cupti-dev - cuda-nvrtc-dev - cuda-nvtx-dev - cuda-nvml-dev @@ -264,8 +266,7 @@ outputs: - libcblas * *_mkl # [blas_impl == "mkl"] - libcblas # [blas_impl != "mkl"] - liblapack # [blas_impl != "mkl"] - - libgomp # [linux] - - llvm-openmp # [osx] + - llvm-openmp # [not win] - libabseil - libprotobuf - sleef @@ -275,7 +276,7 @@ outputs: - typing_extensions - {{ pin_subpackage('libtorch', exact=True) }} run: - - llvm-openmp # [osx] + - llvm-openmp # [not win] # GPU requirements without run_exports - {{ pin_compatible('cudnn') }} # [cuda_compiler_version != "None"] # other requirements @@ -344,8 +345,10 @@ outputs: {% set pytorch_cpu_gpu = "pytorch-gpu" %} # [cuda_compiler_version != "None"] - name: {{ pytorch_cpu_gpu }} build: - string: cuda{{ cuda_compiler_version | replace('.', '') }}py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version != "None"] - string: cpu_{{ blas_impl }}_py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version == "None"] + string: cuda{{ cuda_compiler_version | replace('.', '') }}_{{ blas_impl }}_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [megabuild and cuda_compiler_version != "None"] + string: cpu_{{ blas_impl }}_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [megabuild and cuda_compiler_version == "None"] + string: cuda{{ cuda_compiler_version | replace('.', '') }}_{{ blas_impl }}py{{ CONDA_PY }}_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [not megabuild and cuda_compiler_version != "None"] + string: cpu_{{ blas_impl }}_py{{ CONDA_PY }}_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [not megabuild and cuda_compiler_version == "None"] detect_binary_files_with_prefix: false skip: true # [cuda_compiler_version != "None" and linux64 and blas_impl != "mkl"] # weigh down cpu implementation and give cuda preference @@ -353,7 +356,9 @@ outputs: - pytorch-cpu # [cuda_compiler_version == "None"] requirements: run: - - {{ pin_subpackage("pytorch", exact=True) }} + - pytorch {{ version }}=cuda*_{{ blas_impl }}*{{ PKG_BUILDNUM }} # [megabuild and cuda_compiler_version != "None"] + - pytorch {{ version }}=cpu_{{ blas_impl }}*{{ PKG_BUILDNUM }} # [megabuild and cuda_compiler_version == "None"] + - {{ pin_subpackage("pytorch", exact=True) }} # [not megabuild] test: imports: - torch diff --git a/recipe/patches/0008-Fix-CUPTI-lookup-to-include-target-directory.patch b/recipe/patches/0008-Fix-CUPTI-lookup-to-include-target-directory.patch new file mode 100644 index 000000000..d46b2505e --- /dev/null +++ b/recipe/patches/0008-Fix-CUPTI-lookup-to-include-target-directory.patch @@ -0,0 +1,25 @@ +From 81de6b92a50ed43323f54e769f1b7c0661ebfb0e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Mon, 17 Mar 2025 15:03:30 +0100 +Subject: [PATCH] Fix CUPTI lookup to include target directory + +--- + cmake/Dependencies.cmake | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake +index c4661e39e..355a5c40f 100644 +--- a/cmake/Dependencies.cmake ++++ b/cmake/Dependencies.cmake +@@ -1605,9 +1605,10 @@ if(USE_KINETO) + ${CUDA_SOURCE_DIR}/extras/CUPTI/lib64 + ${CUDA_SOURCE_DIR}/lib + ${CUDA_SOURCE_DIR}/lib64 +- NO_DEFAULT_PATH) ++ ) + + find_path(CUPTI_INCLUDE_DIR cupti.h PATHS ++ ${CUDAToolkit_TARGET_DIR}/include + ${CUDA_SOURCE_DIR}/extras/CUPTI/include + ${CUDA_INCLUDE_DIRS} + ${CUDA_SOURCE_DIR}