diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 45682f922..d34b7485a 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -8,41 +8,14 @@ jobs: vmImage: macOS-15 strategy: matrix: - osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.10.____cpython: - CONFIG: osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.10.____cpython + osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalse: + CONFIG: osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalse UPLOAD_PACKAGES: 'True' - osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.11.____cpython: - CONFIG: osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.11.____cpython + osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalse: + CONFIG: osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalse UPLOAD_PACKAGES: 'True' - osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.12.____cpython: - CONFIG: osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.12.____cpython - UPLOAD_PACKAGES: 'True' - osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.13.____cp313: - CONFIG: osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.13.____cp313 - UPLOAD_PACKAGES: 'True' - osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.10.____cpython: - CONFIG: osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.10.____cpython - UPLOAD_PACKAGES: 'True' - osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.11.____cpython: - CONFIG: osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.11.____cpython - UPLOAD_PACKAGES: 'True' - osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.12.____cpython: - CONFIG: osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.12.____cpython - UPLOAD_PACKAGES: 'True' - osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.13.____cp313: - CONFIG: osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.13.____cp313 - UPLOAD_PACKAGES: 'True' - osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.10.____cpython: - CONFIG: osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.10.____cpython - UPLOAD_PACKAGES: 'True' - osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.11.____cpython: - CONFIG: osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.11.____cpython - UPLOAD_PACKAGES: 'True' - osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.12.____cpython: - CONFIG: osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.12.____cpython - UPLOAD_PACKAGES: 'True' - osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.13.____cp313: - CONFIG: osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.13.____cp313 + osx_arm64_channel_targetsconda-forge_mainis_rcFalse: + CONFIG: osx_arm64_channel_targetsconda-forge_mainis_rcFalse UPLOAD_PACKAGES: 'True' timeoutInMinutes: 360 variables: {} diff --git a/.ci_support/linux_64_blas_implgenericchannel_targetsconda-forge_maincuda_compiler_version12.9is_rcFalse.yaml b/.ci_support/linux_64_blas_implgenericchannel_targetsconda-forge_maincuda_compiler_version12.9is_rcFalse.yaml index 7a9361488..987bcf429 100644 --- a/.ci_support/linux_64_blas_implgenericchannel_targetsconda-forge_maincuda_compiler_version12.9is_rcFalse.yaml +++ b/.ci_support/linux_64_blas_implgenericchannel_targetsconda-forge_maincuda_compiler_version12.9is_rcFalse.yaml @@ -22,6 +22,8 @@ cxx_compiler_version: - '14' docker_image: - quay.io/condaforge/linux-anvil-x86_64:alma9 +fmt: +- '12.0' github_actions_labels: - cirun-openstack-gpu-2xlarge is_rc: @@ -57,12 +59,9 @@ pin_run_as_build: min_pin: x.x max_pin: x.x pybind11_abi: -- '4' +- '11' python: -- 3.10.* *_cpython -- 3.11.* *_cpython - 3.12.* *_cpython -- 3.13.* *_cp313 pytorch: - '2.7' target_platform: diff --git a/.ci_support/linux_64_blas_implgenericchannel_targetsconda-forge_maincuda_compiler_versionNoneis_rcFalse.yaml b/.ci_support/linux_64_blas_implgenericchannel_targetsconda-forge_maincuda_compiler_versionNoneis_rcFalse.yaml index 7ee909eb9..dbe43b245 100644 --- a/.ci_support/linux_64_blas_implgenericchannel_targetsconda-forge_maincuda_compiler_versionNoneis_rcFalse.yaml +++ b/.ci_support/linux_64_blas_implgenericchannel_targetsconda-forge_maincuda_compiler_versionNoneis_rcFalse.yaml @@ -22,6 +22,8 @@ cxx_compiler_version: - '14' docker_image: - quay.io/condaforge/linux-anvil-x86_64:alma9 +fmt: +- '12.0' github_actions_labels: - cirun-openstack-gpu-2xlarge is_rc: @@ -57,12 +59,9 @@ pin_run_as_build: min_pin: x.x max_pin: x.x pybind11_abi: -- '4' +- '11' python: -- 3.10.* *_cpython -- 3.11.* *_cpython - 3.12.* *_cpython -- 3.13.* *_cp313 pytorch: - '2.7' target_platform: diff --git a/.ci_support/linux_64_blas_implmklchannel_targetsconda-forge_maincuda_compiler_version12.9is_rcFalse.yaml b/.ci_support/linux_64_blas_implmklchannel_targetsconda-forge_maincuda_compiler_version12.9is_rcFalse.yaml index 207e4a3c5..a88ffa81f 100644 --- a/.ci_support/linux_64_blas_implmklchannel_targetsconda-forge_maincuda_compiler_version12.9is_rcFalse.yaml +++ b/.ci_support/linux_64_blas_implmklchannel_targetsconda-forge_maincuda_compiler_version12.9is_rcFalse.yaml @@ -22,6 +22,8 @@ cxx_compiler_version: - '14' docker_image: - quay.io/condaforge/linux-anvil-x86_64:alma9 +fmt: +- '12.0' github_actions_labels: - cirun-openstack-gpu-2xlarge is_rc: @@ -57,12 +59,9 @@ pin_run_as_build: min_pin: x.x max_pin: x.x pybind11_abi: -- '4' +- '11' python: -- 3.10.* *_cpython -- 3.11.* *_cpython - 3.12.* *_cpython -- 3.13.* *_cp313 pytorch: - '2.7' target_platform: diff --git a/.ci_support/linux_64_blas_implmklchannel_targetsconda-forge_maincuda_compiler_versionNoneis_rcFalse.yaml b/.ci_support/linux_64_blas_implmklchannel_targetsconda-forge_maincuda_compiler_versionNoneis_rcFalse.yaml index 2e1f421f4..fbf400c82 100644 --- a/.ci_support/linux_64_blas_implmklchannel_targetsconda-forge_maincuda_compiler_versionNoneis_rcFalse.yaml +++ b/.ci_support/linux_64_blas_implmklchannel_targetsconda-forge_maincuda_compiler_versionNoneis_rcFalse.yaml @@ -22,6 +22,8 @@ cxx_compiler_version: - '14' docker_image: - quay.io/condaforge/linux-anvil-x86_64:alma9 +fmt: +- '12.0' github_actions_labels: - cirun-openstack-gpu-2xlarge is_rc: @@ -57,12 +59,9 @@ pin_run_as_build: min_pin: x.x max_pin: x.x pybind11_abi: -- '4' +- '11' python: -- 3.10.* *_cpython -- 3.11.* *_cpython - 3.12.* *_cpython -- 3.13.* *_cp313 pytorch: - '2.7' target_platform: diff --git a/.ci_support/linux_aarch64_channel_targetsconda-forge_maincuda_compiler_version12.9is_rcFalse.yaml b/.ci_support/linux_aarch64_channel_targetsconda-forge_maincuda_compiler_version12.9is_rcFalse.yaml index ae5a77aa7..3e352ca9b 100644 --- a/.ci_support/linux_aarch64_channel_targetsconda-forge_maincuda_compiler_version12.9is_rcFalse.yaml +++ b/.ci_support/linux_aarch64_channel_targetsconda-forge_maincuda_compiler_version12.9is_rcFalse.yaml @@ -22,6 +22,8 @@ cxx_compiler_version: - '13' docker_image: - quay.io/condaforge/linux-anvil-x86_64:alma9 +fmt: +- '12.0' github_actions_labels: - cirun-openstack-gpu-2xlarge is_rc: @@ -57,12 +59,9 @@ pin_run_as_build: min_pin: x.x max_pin: x.x pybind11_abi: -- '4' +- '11' python: -- 3.10.* *_cpython -- 3.11.* *_cpython - 3.12.* *_cpython -- 3.13.* *_cp313 pytorch: - '2.7' target_platform: diff --git a/.ci_support/linux_aarch64_channel_targetsconda-forge_maincuda_compiler_versionNoneis_rcFalse.yaml b/.ci_support/linux_aarch64_channel_targetsconda-forge_maincuda_compiler_versionNoneis_rcFalse.yaml index bab7acc5f..56a1115bc 100644 --- a/.ci_support/linux_aarch64_channel_targetsconda-forge_maincuda_compiler_versionNoneis_rcFalse.yaml +++ b/.ci_support/linux_aarch64_channel_targetsconda-forge_maincuda_compiler_versionNoneis_rcFalse.yaml @@ -22,6 +22,8 @@ cxx_compiler_version: - '13' docker_image: - quay.io/condaforge/linux-anvil-x86_64:alma9 +fmt: +- '12.0' github_actions_labels: - cirun-openstack-gpu-2xlarge is_rc: @@ -57,12 +59,9 @@ pin_run_as_build: min_pin: x.x max_pin: x.x pybind11_abi: -- '4' +- '11' python: -- 3.10.* *_cpython -- 3.11.* *_cpython - 3.12.* *_cpython -- 3.13.* *_cp313 pytorch: - '2.7' target_platform: diff --git a/.ci_support/migrations/fmt12_spdlog116.yaml b/.ci_support/migrations/fmt12_spdlog116.yaml new file mode 100644 index 000000000..87c31a2ba --- /dev/null +++ b/.ci_support/migrations/fmt12_spdlog116.yaml @@ -0,0 +1,10 @@ +__migrator: + build_number: 1 + commit_message: Rebuild for fmt 12.0 and spdlog 1.16 + kind: version + migration_number: 1 +migrator_ts: 1760196591.995821 +fmt: +- '12.0' +spdlog: +- '1.16' diff --git a/.ci_support/migrations/pybind11_abi11.yaml b/.ci_support/migrations/pybind11_abi11.yaml new file mode 100644 index 000000000..172a6d909 --- /dev/null +++ b/.ci_support/migrations/pybind11_abi11.yaml @@ -0,0 +1,8 @@ +__migrator: + build_number: 1 + commit_message: Rebuild for pybind11 3 and pybind11_abi 11 + kind: version + migration_number: 1 +migrator_ts: 1752454025.946169 +pybind11_abi: +- '11' diff --git a/.ci_support/migrations/python313.yaml b/.ci_support/migrations/python313.yaml deleted file mode 100644 index f9389e3bf..000000000 --- a/.ci_support/migrations/python313.yaml +++ /dev/null @@ -1,46 +0,0 @@ -migrator_ts: 1724712607 -__migrator: - commit_message: Rebuild for python 3.13 - migration_number: 1 - operation: key_add - primary_key: python - ordering: - python: - - 3.6.* *_cpython - - 3.7.* *_cpython - - 3.8.* *_cpython - - 3.9.* *_cpython - - 3.10.* *_cpython - - 3.11.* *_cpython - - 3.12.* *_cpython - - 3.13.* *_cp313 # new entry - - 3.6.* *_73_pypy - - 3.7.* *_73_pypy - - 3.8.* *_73_pypy - - 3.9.* *_73_pypy - paused: false - longterm: true - pr_limit: 20 - max_solver_attempts: 3 # this will make the bot retry "not solvable" stuff 12 times - exclude: - # this shouldn't attempt to modify the python feedstocks - - python - - pypy3.6 - - pypy-meta - - cross-python - - python_abi - # see https://github.com/conda-forge/scipy-feedstock/pull/283 - - scipy - exclude_pinned_pkgs: false - additional_zip_keys: - - channel_sources - -python: -- 3.13.* *_cp313 -channel_sources: -- conda-forge/label/python_rc,conda-forge -# additional entries to add for zip_keys -numpy: -- 2 -python_impl: -- cpython diff --git a/.ci_support/osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.12.____cpython.yaml b/.ci_support/osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalse.yaml similarity index 97% rename from .ci_support/osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.12.____cpython.yaml rename to .ci_support/osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalse.yaml index 645d7d5af..34eddf54e 100644 --- a/.ci_support/osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.12.____cpython.yaml +++ b/.ci_support/osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalse.yaml @@ -24,6 +24,8 @@ cxx_compiler: - clangxx cxx_compiler_version: - '19' +fmt: +- '12.0' is_rc: - 'False' libabseil: @@ -57,7 +59,7 @@ pin_run_as_build: min_pin: x.x max_pin: x.x pybind11_abi: -- '4' +- '11' python: - 3.12.* *_cpython pytorch: diff --git a/.ci_support/osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.10.____cpython.yaml b/.ci_support/osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.10.____cpython.yaml deleted file mode 100644 index 8be669d52..000000000 --- a/.ci_support/osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.10.____cpython.yaml +++ /dev/null @@ -1,73 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '11.0' -MACOSX_SDK_VERSION: -- '13.3' -blas_impl: -- generic -c_compiler: -- clang -c_compiler_version: -- '19' -c_stdlib: -- macosx_deployment_target -c_stdlib_version: -- '11.0' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -cuda_compiler: -- cuda-nvcc -cuda_compiler_version: -- None -cxx_compiler: -- clangxx -cxx_compiler_version: -- '19' -is_rc: -- 'False' -libabseil: -- '20250512' -libblas: -- 3.9.* *netlib -libcblas: -- 3.9.* *netlib -liblapack: -- 3.9.* *netlib -libmagma_sparse: -- '2.9' -libprotobuf: -- 6.31.1 -libtorch: -- '2.7' -llvm_openmp: -- '19' -macos_machine: -- x86_64-apple-darwin13.4.0 -megabuild: -- false -mkl: -- '2023' -numpy: -- '2' -orc: -- 2.2.1 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -pybind11_abi: -- '4' -python: -- 3.10.* *_cpython -pytorch: -- '2.7' -target_platform: -- osx-64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -- - channel_targets - - is_rc -zlib: -- '1' diff --git a/.ci_support/osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.11.____cpython.yaml b/.ci_support/osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.11.____cpython.yaml deleted file mode 100644 index 20e30c1e4..000000000 --- a/.ci_support/osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.11.____cpython.yaml +++ /dev/null @@ -1,73 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '11.0' -MACOSX_SDK_VERSION: -- '13.3' -blas_impl: -- generic -c_compiler: -- clang -c_compiler_version: -- '19' -c_stdlib: -- macosx_deployment_target -c_stdlib_version: -- '11.0' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -cuda_compiler: -- cuda-nvcc -cuda_compiler_version: -- None -cxx_compiler: -- clangxx -cxx_compiler_version: -- '19' -is_rc: -- 'False' -libabseil: -- '20250512' -libblas: -- 3.9.* *netlib -libcblas: -- 3.9.* *netlib -liblapack: -- 3.9.* *netlib -libmagma_sparse: -- '2.9' -libprotobuf: -- 6.31.1 -libtorch: -- '2.7' -llvm_openmp: -- '19' -macos_machine: -- x86_64-apple-darwin13.4.0 -megabuild: -- false -mkl: -- '2023' -numpy: -- '2' -orc: -- 2.2.1 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -pybind11_abi: -- '4' -python: -- 3.11.* *_cpython -pytorch: -- '2.7' -target_platform: -- osx-64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -- - channel_targets - - is_rc -zlib: -- '1' diff --git a/.ci_support/osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.13.____cp313.yaml b/.ci_support/osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.13.____cp313.yaml deleted file mode 100644 index 2370ea2e3..000000000 --- a/.ci_support/osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.13.____cp313.yaml +++ /dev/null @@ -1,73 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '11.0' -MACOSX_SDK_VERSION: -- '13.3' -blas_impl: -- generic -c_compiler: -- clang -c_compiler_version: -- '19' -c_stdlib: -- macosx_deployment_target -c_stdlib_version: -- '11.0' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -cuda_compiler: -- cuda-nvcc -cuda_compiler_version: -- None -cxx_compiler: -- clangxx -cxx_compiler_version: -- '19' -is_rc: -- 'False' -libabseil: -- '20250512' -libblas: -- 3.9.* *netlib -libcblas: -- 3.9.* *netlib -liblapack: -- 3.9.* *netlib -libmagma_sparse: -- '2.9' -libprotobuf: -- 6.31.1 -libtorch: -- '2.7' -llvm_openmp: -- '19' -macos_machine: -- x86_64-apple-darwin13.4.0 -megabuild: -- false -mkl: -- '2023' -numpy: -- '2' -orc: -- 2.2.1 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -pybind11_abi: -- '4' -python: -- 3.13.* *_cp313 -pytorch: -- '2.7' -target_platform: -- osx-64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -- - channel_targets - - is_rc -zlib: -- '1' diff --git a/.ci_support/osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.12.____cpython.yaml b/.ci_support/osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalse.yaml similarity index 97% rename from .ci_support/osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.12.____cpython.yaml rename to .ci_support/osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalse.yaml index a13e14986..68ec2aa05 100644 --- a/.ci_support/osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.12.____cpython.yaml +++ b/.ci_support/osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalse.yaml @@ -24,6 +24,8 @@ cxx_compiler: - clangxx cxx_compiler_version: - '19' +fmt: +- '12.0' is_rc: - 'False' libabseil: @@ -57,7 +59,7 @@ pin_run_as_build: min_pin: x.x max_pin: x.x pybind11_abi: -- '4' +- '11' python: - 3.12.* *_cpython pytorch: diff --git a/.ci_support/osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.10.____cpython.yaml b/.ci_support/osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.10.____cpython.yaml deleted file mode 100644 index f33a4006e..000000000 --- a/.ci_support/osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.10.____cpython.yaml +++ /dev/null @@ -1,73 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '11.0' -MACOSX_SDK_VERSION: -- '13.3' -blas_impl: -- mkl -c_compiler: -- clang -c_compiler_version: -- '19' -c_stdlib: -- macosx_deployment_target -c_stdlib_version: -- '11.0' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -cuda_compiler: -- cuda-nvcc -cuda_compiler_version: -- None -cxx_compiler: -- clangxx -cxx_compiler_version: -- '19' -is_rc: -- 'False' -libabseil: -- '20250512' -libblas: -- 3.9.* *netlib -libcblas: -- 3.9.* *netlib -liblapack: -- 3.9.* *netlib -libmagma_sparse: -- '2.9' -libprotobuf: -- 6.31.1 -libtorch: -- '2.7' -llvm_openmp: -- '19' -macos_machine: -- x86_64-apple-darwin13.4.0 -megabuild: -- false -mkl: -- '2023' -numpy: -- '2' -orc: -- 2.2.1 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -pybind11_abi: -- '4' -python: -- 3.10.* *_cpython -pytorch: -- '2.7' -target_platform: -- osx-64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -- - channel_targets - - is_rc -zlib: -- '1' diff --git a/.ci_support/osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.11.____cpython.yaml b/.ci_support/osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.11.____cpython.yaml deleted file mode 100644 index 863922260..000000000 --- a/.ci_support/osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.11.____cpython.yaml +++ /dev/null @@ -1,73 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '11.0' -MACOSX_SDK_VERSION: -- '13.3' -blas_impl: -- mkl -c_compiler: -- clang -c_compiler_version: -- '19' -c_stdlib: -- macosx_deployment_target -c_stdlib_version: -- '11.0' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -cuda_compiler: -- cuda-nvcc -cuda_compiler_version: -- None -cxx_compiler: -- clangxx -cxx_compiler_version: -- '19' -is_rc: -- 'False' -libabseil: -- '20250512' -libblas: -- 3.9.* *netlib -libcblas: -- 3.9.* *netlib -liblapack: -- 3.9.* *netlib -libmagma_sparse: -- '2.9' -libprotobuf: -- 6.31.1 -libtorch: -- '2.7' -llvm_openmp: -- '19' -macos_machine: -- x86_64-apple-darwin13.4.0 -megabuild: -- false -mkl: -- '2023' -numpy: -- '2' -orc: -- 2.2.1 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -pybind11_abi: -- '4' -python: -- 3.11.* *_cpython -pytorch: -- '2.7' -target_platform: -- osx-64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -- - channel_targets - - is_rc -zlib: -- '1' diff --git a/.ci_support/osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.13.____cp313.yaml b/.ci_support/osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.13.____cp313.yaml deleted file mode 100644 index 18f53c78c..000000000 --- a/.ci_support/osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.13.____cp313.yaml +++ /dev/null @@ -1,73 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '11.0' -MACOSX_SDK_VERSION: -- '13.3' -blas_impl: -- mkl -c_compiler: -- clang -c_compiler_version: -- '19' -c_stdlib: -- macosx_deployment_target -c_stdlib_version: -- '11.0' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -cuda_compiler: -- cuda-nvcc -cuda_compiler_version: -- None -cxx_compiler: -- clangxx -cxx_compiler_version: -- '19' -is_rc: -- 'False' -libabseil: -- '20250512' -libblas: -- 3.9.* *netlib -libcblas: -- 3.9.* *netlib -liblapack: -- 3.9.* *netlib -libmagma_sparse: -- '2.9' -libprotobuf: -- 6.31.1 -libtorch: -- '2.7' -llvm_openmp: -- '19' -macos_machine: -- x86_64-apple-darwin13.4.0 -megabuild: -- false -mkl: -- '2023' -numpy: -- '2' -orc: -- 2.2.1 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -pybind11_abi: -- '4' -python: -- 3.13.* *_cp313 -pytorch: -- '2.7' -target_platform: -- osx-64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -- - channel_targets - - is_rc -zlib: -- '1' diff --git a/.ci_support/osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.12.____cpython.yaml b/.ci_support/osx_arm64_channel_targetsconda-forge_mainis_rcFalse.yaml similarity index 97% rename from .ci_support/osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.12.____cpython.yaml rename to .ci_support/osx_arm64_channel_targetsconda-forge_mainis_rcFalse.yaml index c8f097ee7..7a29f8832 100644 --- a/.ci_support/osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.12.____cpython.yaml +++ b/.ci_support/osx_arm64_channel_targetsconda-forge_mainis_rcFalse.yaml @@ -24,6 +24,8 @@ cxx_compiler: - clangxx cxx_compiler_version: - '19' +fmt: +- '12.0' is_rc: - 'False' libabseil: @@ -57,7 +59,7 @@ pin_run_as_build: min_pin: x.x max_pin: x.x pybind11_abi: -- '4' +- '11' python: - 3.12.* *_cpython pytorch: diff --git a/.ci_support/osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.10.____cpython.yaml b/.ci_support/osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.10.____cpython.yaml deleted file mode 100644 index 6dce277f9..000000000 --- a/.ci_support/osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.10.____cpython.yaml +++ /dev/null @@ -1,73 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '11.0' -MACOSX_SDK_VERSION: -- '13.3' -blas_impl: -- generic -c_compiler: -- clang -c_compiler_version: -- '19' -c_stdlib: -- macosx_deployment_target -c_stdlib_version: -- '11.0' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -cuda_compiler: -- cuda-nvcc -cuda_compiler_version: -- None -cxx_compiler: -- clangxx -cxx_compiler_version: -- '19' -is_rc: -- 'False' -libabseil: -- '20250512' -libblas: -- 3.9.* *netlib -libcblas: -- 3.9.* *netlib -liblapack: -- 3.9.* *netlib -libmagma_sparse: -- '2.9' -libprotobuf: -- 6.31.1 -libtorch: -- '2.7' -llvm_openmp: -- '19' -macos_machine: -- arm64-apple-darwin20.0.0 -megabuild: -- false -mkl: -- '2023' -numpy: -- '2' -orc: -- 2.2.1 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -pybind11_abi: -- '4' -python: -- 3.10.* *_cpython -pytorch: -- '2.7' -target_platform: -- osx-arm64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -- - channel_targets - - is_rc -zlib: -- '1' diff --git a/.ci_support/osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.11.____cpython.yaml b/.ci_support/osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.11.____cpython.yaml deleted file mode 100644 index 95299b40f..000000000 --- a/.ci_support/osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.11.____cpython.yaml +++ /dev/null @@ -1,73 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '11.0' -MACOSX_SDK_VERSION: -- '13.3' -blas_impl: -- generic -c_compiler: -- clang -c_compiler_version: -- '19' -c_stdlib: -- macosx_deployment_target -c_stdlib_version: -- '11.0' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -cuda_compiler: -- cuda-nvcc -cuda_compiler_version: -- None -cxx_compiler: -- clangxx -cxx_compiler_version: -- '19' -is_rc: -- 'False' -libabseil: -- '20250512' -libblas: -- 3.9.* *netlib -libcblas: -- 3.9.* *netlib -liblapack: -- 3.9.* *netlib -libmagma_sparse: -- '2.9' -libprotobuf: -- 6.31.1 -libtorch: -- '2.7' -llvm_openmp: -- '19' -macos_machine: -- arm64-apple-darwin20.0.0 -megabuild: -- false -mkl: -- '2023' -numpy: -- '2' -orc: -- 2.2.1 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -pybind11_abi: -- '4' -python: -- 3.11.* *_cpython -pytorch: -- '2.7' -target_platform: -- osx-arm64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -- - channel_targets - - is_rc -zlib: -- '1' diff --git a/.ci_support/osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.13.____cp313.yaml b/.ci_support/osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.13.____cp313.yaml deleted file mode 100644 index 714684015..000000000 --- a/.ci_support/osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.13.____cp313.yaml +++ /dev/null @@ -1,73 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '11.0' -MACOSX_SDK_VERSION: -- '13.3' -blas_impl: -- generic -c_compiler: -- clang -c_compiler_version: -- '19' -c_stdlib: -- macosx_deployment_target -c_stdlib_version: -- '11.0' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -cuda_compiler: -- cuda-nvcc -cuda_compiler_version: -- None -cxx_compiler: -- clangxx -cxx_compiler_version: -- '19' -is_rc: -- 'False' -libabseil: -- '20250512' -libblas: -- 3.9.* *netlib -libcblas: -- 3.9.* *netlib -liblapack: -- 3.9.* *netlib -libmagma_sparse: -- '2.9' -libprotobuf: -- 6.31.1 -libtorch: -- '2.7' -llvm_openmp: -- '19' -macos_machine: -- arm64-apple-darwin20.0.0 -megabuild: -- false -mkl: -- '2023' -numpy: -- '2' -orc: -- 2.2.1 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -pybind11_abi: -- '4' -python: -- 3.13.* *_cp313 -pytorch: -- '2.7' -target_platform: -- osx-arm64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -- - channel_targets - - is_rc -zlib: -- '1' diff --git a/.ci_support/win_64_channel_targetsconda-forge_maincuda_compiler_version12.8is_rcFalse.yaml b/.ci_support/win_64_channel_targetsconda-forge_maincuda_compiler_version12.8is_rcFalse.yaml index 96ff58e6a..4537f14f2 100644 --- a/.ci_support/win_64_channel_targetsconda-forge_maincuda_compiler_version12.8is_rcFalse.yaml +++ b/.ci_support/win_64_channel_targetsconda-forge_maincuda_compiler_version12.8is_rcFalse.yaml @@ -14,6 +14,8 @@ cuda_compiler_version: - '12.8' cxx_compiler: - vs2022 +fmt: +- '12.0' github_actions_labels: - cirun-azure-windows-4xlarge is_rc: @@ -41,12 +43,9 @@ pin_run_as_build: min_pin: x.x max_pin: x.x pybind11_abi: -- '4' +- '11' python: -- 3.10.* *_cpython -- 3.11.* *_cpython - 3.12.* *_cpython -- 3.13.* *_cp313 pytorch: - '2.7' target_platform: diff --git a/.ci_support/win_64_channel_targetsconda-forge_maincuda_compiler_versionNoneis_rcFalse.yaml b/.ci_support/win_64_channel_targetsconda-forge_maincuda_compiler_versionNoneis_rcFalse.yaml index 5329c62ab..e0e2157b4 100644 --- a/.ci_support/win_64_channel_targetsconda-forge_maincuda_compiler_versionNoneis_rcFalse.yaml +++ b/.ci_support/win_64_channel_targetsconda-forge_maincuda_compiler_versionNoneis_rcFalse.yaml @@ -14,6 +14,8 @@ cuda_compiler_version: - None cxx_compiler: - vs2022 +fmt: +- '12.0' github_actions_labels: - cirun-azure-windows-4xlarge is_rc: @@ -41,12 +43,9 @@ pin_run_as_build: min_pin: x.x max_pin: x.x pybind11_abi: -- '4' +- '11' python: -- 3.10.* *_cpython -- 3.11.* *_cpython - 3.12.* *_cpython -- 3.13.* *_cp313 pytorch: - '2.7' target_platform: diff --git a/README.md b/README.md index 0bde8a067..f5d837c7a 100644 --- a/README.md +++ b/README.md @@ -79,87 +79,24 @@ Current build status - osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.10.____cpython + osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalse - variant + variant - osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.11.____cpython + osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalse - variant + variant - osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.12.____cpython + osx_arm64_channel_targetsconda-forge_mainis_rcFalse - variant - - - - osx_64_blas_implgenericchannel_targetsconda-forge_mainis_rcFalsepython3.13.____cp313 - - - variant - - - - osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.10.____cpython - - - variant - - - - osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.11.____cpython - - - variant - - - - osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.12.____cpython - - - variant - - - - osx_64_blas_implmklchannel_targetsconda-forge_mainis_rcFalsepython3.13.____cp313 - - - variant - - - - osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.10.____cpython - - - variant - - - - osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.11.____cpython - - - variant - - - - osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.12.____cpython - - - variant - - - - osx_arm64_channel_targetsconda-forge_mainis_rcFalsepython3.13.____cp313 - - - variant + variant diff --git a/recipe/bld.bat b/recipe/bld.bat index e5e215ede..75570d3a0 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -95,7 +95,7 @@ if not "%cuda_compiler_version%" == "None" ( @REM set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%desired_cuda% @REM set CUDA_BIN_PATH=%CUDA_PATH%\bin - set "TORCH_CUDA_ARCH_LIST=5.0;6.0;7.0;7.5;8.0;8.6;9.0;10.0;12.0+PTX" + set "TORCH_CUDA_ARCH_LIST=7.0+PTX" set "TORCH_NVCC_FLAGS=-Xfatbin -compress-all" set MAGMA_HOME=%LIBRARY_PREFIX% @@ -198,9 +198,8 @@ if "%PKG_NAME%" == "libtorch" ( if %ERRORLEVEL% neq 0 exit 1 @REM Move the binaries into the packages site-package directory - @REM the only content of torch\bin, {asmjit,fbgemm}.dll, also exists in torch\lib - robocopy /NP /NFL /NDL /NJH /E torch\bin\ %LIBRARY_BIN%\ torch*.dll c10.dll shm.dll asmjit.dll fbgemm.dll - robocopy /NP /NFL /NDL /NJH /E torch\lib\ %LIBRARY_LIB%\ torch*.lib c10.lib shm.lib asmjit.lib fbgemm.lib + robocopy /NP /NFL /NDL /NJH /E torch\bin\ %LIBRARY_BIN%\ torch*.dll c10.dll shm.dll + robocopy /NP /NFL /NDL /NJH /E torch\lib\ %LIBRARY_LIB%\ torch*.lib c10.lib shm.lib if not "%cuda_compiler_version%" == "None" ( robocopy /NP /NFL /NDL /NJH /E torch\bin\ %LIBRARY_BIN%\ c10_cuda.dll caffe2_nvrtc.dll robocopy /NP /NFL /NDL /NJH /E torch\lib\ %LIBRARY_LIB%\ c10_cuda.lib caffe2_nvrtc.lib diff --git a/recipe/build.sh b/recipe/build.sh index ab9444680..7277a1fff 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -100,6 +100,10 @@ export USE_SYSTEM_PYBIND11=1 export USE_SYSTEM_EIGEN_INSTALL=1 export Python_ROOT_DIR=$PREFIX +# force using cblas_dot when cross-compiling +# (this matches the behavior to our patches) +export PYTORCH_BLAS_USE_CBLAS_DOT=1 + # workaround to stop setup.py from trying to check whether we checked out # all submodules (we don't use all of them) rm -f .gitmodules @@ -195,15 +199,17 @@ elif [[ ${cuda_compiler_version} != "None" ]]; then export CUDAToolkit_ROOT=${PREFIX} case ${target_platform} in linux-64) - export CUDAToolkit_TARGET_DIR=${PREFIX}/targets/x86_64-linux + CUDA_TARGET=x86_64-linux ;; linux-aarch64) - export CUDAToolkit_TARGET_DIR=${PREFIX}/targets/sbsa-linux + CUDA_TARGET=sbsa-linux ;; *) echo "unknown CUDA arch, edit build.sh" exit 1 esac + export CUDAToolkit_TARGET_DIR=${PREFIX}/targets/${CUDA_TARGET} + sed -i -e "s,@CUDA_TARGET@,${CUDA_TARGET}," torch/_inductor/cpp_builder.py # Compatibility matrix for update: https://en.wikipedia.org/wiki/CUDA#GPUs_supported # Warning from pytorch v1.12.1: In the future we will require one to @@ -218,7 +224,7 @@ elif [[ ${cuda_compiler_version} != "None" ]]; then # https://github.com/pytorch/pytorch/blob/main/.ci/manywheel/build_cuda.sh case ${cuda_compiler_version} in 12.[89]) - export TORCH_CUDA_ARCH_LIST="5.0;6.0;7.0;7.5;8.0;8.6;9.0;10.0;12.0+PTX" + export TORCH_CUDA_ARCH_LIST="7.0+PTX" ;; *) echo "No CUDA architecture list exists for CUDA v${cuda_compiler_version}. See build.sh for information on adding one." diff --git a/recipe/cmake_test/CMakeLists.txt b/recipe/cmake_test/CMakeLists.txt index 4632bbb62..36f65c660 100644 --- a/recipe/cmake_test/CMakeLists.txt +++ b/recipe/cmake_test/CMakeLists.txt @@ -36,7 +36,14 @@ if(WITH_TORCH_PYTHON) ${torch_python} ) + set(MSVC_UTF8_FLAG) + if(MSVC) + # The source code is in utf-8 encoding + set(MSVC_UTF8_FLAG "/utf-8") + endif() + target_compile_options(cmake_test PRIVATE ${TORCH_CXX_FLAGS} + ${MSVC_UTF8_FLAG} ) endif() diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index d1b0da63f..4cea1b208 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -34,3 +34,9 @@ megabuild: - true # [linux] - false # [osx] - true # [win] + +is_python_min: +- true + +python: +- 3.12.* *_cpython diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 44a923bfe..dba39b4d4 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,6 +1,6 @@ # if you wish to build release candidate number X, append the version string with ".rcX" -{% set version = "2.8.0" %} -{% set build = 1 %} +{% set version = "2.9.0" %} +{% set build = 0 %} # Use a higher build number for the CUDA variant, to ensure that it's # preferred by conda's solver, and it's preferentially @@ -16,7 +16,7 @@ # see https://github.com/pytorch/pytorch/blame/v{{ version }}/.ci/docker/ci_commit_pins/triton.txt # pytorch and triton are released in tandem, see notes in their release process # https://github.com/pytorch/pytorch/blob/main/RELEASE.md#triton-dependency-for-the-release -{% set triton = "3.4.0" %} +{% set triton = "3.5.0" %} # TODO Temporary pin, remove me {% set mkl = "<2025" %} @@ -38,34 +38,28 @@ source: {% else %} # The "pytorch-v" tarballs contain submodules; the "pytorch-" ones don't. - url: https://github.com/pytorch/pytorch/releases/download/v{{ version }}/pytorch-v{{ version }}.tar.gz - sha256: c70a2c9488f6f6e8af5982a10d1cc2c37b7df5e6506d839daa5d5e250953d7b5 + sha256: c6980af3c0ea311f49f90987982be715e4d702539fea41e52f55ad7f0b105dc3 {% endif %} patches: - patches/0001-Force-usage-of-python-3-and-error-without-numpy.patch - # backport https://github.com/pytorch/pytorch/pull/137084 - - patches/0002-Help-find-numpy.patch - - patches/0003-Fix-duplicate-linker-script.patch # [cuda_compiler_version != "None" and aarch64] + - patches/0002-Fix-duplicate-linker-script.patch # [cuda_compiler_version != "None" and aarch64] # conda-specific patch, lets us override CUDA paths - - patches/0004-Allow-overriding-CUDA-related-paths.patch + - patches/0003-Allow-overriding-CUDA-related-paths.patch # fix BLAS calling convention for openblas - - patches/0005-Use-BLAS_USE_CBLAS_DOT-for-OpenBLAS-builds.patch - # fix mkl-2024 issue - # https://github.com/pytorch/pytorch/pull/143894 - - patches/0006-fix-issue-142484.patch - - patches/0007-Fix-FindOpenBLAS.patch + - patches/0004-Use-BLAS_USE_CBLAS_DOT-for-OpenBLAS-builds.patch + - patches/0005-Fix-FindOpenBLAS.patch # point to headers that are now living in $PREFIX/include instead of $SP_DIR/torch/include - - patches/0008-point-include-paths-to-Conda-prefix-include-dir.patch - - patches/0009-Add-conda-prefix-to-inductor-include-paths.patch - - patches/0010-make-ATEN_INCLUDE_DIR-relative-to-TORCH_INSTALL_PREF.patch - - patches/0011-remove-DESTINATION-lib-from-CMake-install-TARGETS-di.patch # [win] - - patches/0012-avoid-deprecated-find_package-CUDA-in-caffe2-CMake-m.patch + - patches/0006-point-include-paths-to-Conda-prefix-include-dir.patch + - patches/0007-Add-conda-prefix-to-inductor-include-lib-paths.patch + - patches/0008-make-ATEN_INCLUDE_DIR-relative-to-TORCH_INSTALL_PREF.patch + - patches/0009-remove-DESTINATION-lib-from-CMake-install-TARGETS-di.patch # [win] + - patches/0010-avoid-deprecated-find_package-CUDA-in-caffe2-CMake-m.patch # backport https://github.com/pytorch/pytorch/pull/148668 - - patches/0013-Fix-CUPTI-lookup-to-include-target-directory.patch + - patches/0011-Fix-CUPTI-lookup-to-include-target-directory.patch # skip a test that fails with numpy 2.3; can be dropped for pytorch>2.7 - - patches/0014-skip-test_norm_matrix_degenerate_shapes-on-numpy-2.3.patch + - patches/0012-skip-test_norm_matrix_degenerate_shapes-on-numpy-2.3.patch # backport https://github.com/pytorch/pytorch/pull/127702 - - patches/0015-Define-PY_SSIZE_T_CLEAN-before-include-Python.h.patch - - patches_submodules/fbgemm/0001-remove-DESTINATION-lib-from-CMake-install-directives.patch # [win] + - patches/0013-Define-PY_SSIZE_T_CLEAN-before-include-Python.h.patch - patches_submodules/tensorpipe/0001-switch-away-from-find_package-CUDA.patch build: @@ -171,6 +165,7 @@ requirements: - pybind11-abi - eigen - zlib + - fmt run: - intel-openmp {{ mkl }} # [win] - libblas * *{{ blas_impl }} # [blas_impl == "mkl"] @@ -216,8 +211,6 @@ test: "torch_cuda_linalg" ] + (cuda_compiler_version != "None") * [ "c10_cuda", "caffe2_nvrtc", "torch_cuda" - ] + target_platform.startswith("win") * [ - "asmjit", "fbgemm" ] %} {% for each_lib in torch_libs %} @@ -320,6 +313,7 @@ outputs: - pkg-config # [unix] - typing_extensions - zlib + - fmt run: - {{ pin_subpackage('libtorch', exact=True) }} # [megabuild] # for non-megabuild, allow libtorch from any python version @@ -417,7 +411,7 @@ outputs: # We have had issues with openmp .dylibs being doubly loaded in certain cases. These two tests catch the (observed) issue - python -c "import torch; import numpy" - python -c "import numpy; import torch" - - python -c "import numpy as np;import torch;x = torch.tensor([2], dtype=torch.complex128);assert torch.dot(x, x).real == 4.0" + - python -c "import numpy as np;import torch;x = torch.tensor([2], dtype=torch.complex128);res = torch.dot(x, x); assert res.real == 4.0, res" # distributed support is enabled by default on linux; for mac, we enable it manually in build.sh - python -c "import torch; assert torch.distributed.is_available()" # [linux or osx] - python -c "import torch; assert torch.backends.cuda.is_built()" # [cuda_compiler_version != "None"] diff --git a/recipe/patches/0001-Force-usage-of-python-3-and-error-without-numpy.patch b/recipe/patches/0001-Force-usage-of-python-3-and-error-without-numpy.patch index ee2975f67..0b209063f 100644 --- a/recipe/patches/0001-Force-usage-of-python-3-and-error-without-numpy.patch +++ b/recipe/patches/0001-Force-usage-of-python-3-and-error-without-numpy.patch @@ -1,17 +1,17 @@ -From 8afc8dc7eaf960071d95cb62a5c5138b17af20b4 Mon Sep 17 00:00:00 2001 +From 7eeddc8b77fbcb44ce4c5d97c4962efc242a3f75 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Sun, 1 Sep 2024 17:35:40 -0400 -Subject: [PATCH 01/15] Force usage of python 3 and error without numpy +Subject: [PATCH 01/13] Force usage of python 3 and error without numpy --- cmake/Dependencies.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake -index a93386c27f8..96988e89d09 100644 +index ef5c2fd4e97..72d9e298dcc 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake -@@ -819,9 +819,9 @@ if(BUILD_PYTHON) +@@ -804,9 +804,9 @@ if(BUILD_PYTHON) if(USE_NUMPY) list(APPEND PYTHON_COMPONENTS NumPy) endif() @@ -23,7 +23,7 @@ index a93386c27f8..96988e89d09 100644 endif() if(NOT Python_Interpreter_FOUND) -@@ -838,7 +838,7 @@ if(BUILD_PYTHON) +@@ -823,7 +823,7 @@ if(BUILD_PYTHON) if(Python_Development.Module_FOUND) if(USE_NUMPY) if(NOT Python_NumPy_FOUND) diff --git a/recipe/patches/0003-Fix-duplicate-linker-script.patch b/recipe/patches/0002-Fix-duplicate-linker-script.patch similarity index 79% rename from recipe/patches/0003-Fix-duplicate-linker-script.patch rename to recipe/patches/0002-Fix-duplicate-linker-script.patch index 6af3ac580..d4adbe562 100644 --- a/recipe/patches/0003-Fix-duplicate-linker-script.patch +++ b/recipe/patches/0002-Fix-duplicate-linker-script.patch @@ -1,17 +1,17 @@ -From 2e913176f2b8ff4a5fd0cb8e8f24ed4850ac9474 Mon Sep 17 00:00:00 2001 +From 532682e899bed8cb97b922e0d1ff92664100e521 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Sun, 3 Nov 2024 01:12:36 -0700 -Subject: [PATCH 03/15] Fix duplicate linker script +Subject: [PATCH 02/13] Fix duplicate linker script --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py -index b4ebc92f592..7f88ade34bf 100644 +index 11ca48482a7..1c5b75897df 100644 --- a/setup.py +++ b/setup.py -@@ -1198,7 +1198,9 @@ def main(): +@@ -1632,7 +1632,9 @@ def main() -> None: filein="cmake/prioritized_text.txt", fout="cmake/linker_script.ld" ) linker_script_path = os.path.abspath("cmake/linker_script.ld") diff --git a/recipe/patches/0002-Help-find-numpy.patch b/recipe/patches/0002-Help-find-numpy.patch deleted file mode 100644 index 15ed3b51f..000000000 --- a/recipe/patches/0002-Help-find-numpy.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 078d8b4be2adbf8a8d20ec1ab69922d534afe6e7 Mon Sep 17 00:00:00 2001 -From: Mark Harfouche -Date: Tue, 1 Oct 2024 00:28:40 -0400 -Subject: [PATCH 02/15] Help find numpy - ---- - tools/setup_helpers/cmake.py | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/tools/setup_helpers/cmake.py b/tools/setup_helpers/cmake.py -index 678ba7ab207..92052f9bc5c 100644 ---- a/tools/setup_helpers/cmake.py -+++ b/tools/setup_helpers/cmake.py -@@ -313,9 +313,15 @@ class CMake: - sys.exit(1) - build_options.update(cmake__options) - -+ Python_NumPy_INCLUDE_DIR = os.environ.get("Python_NumPy_INCLUDE_DIR") -+ if Python_NumPy_INCLUDE_DIR is None: -+ import numpy as np -+ Python_NumPy_INCLUDE_DIR = np.get_include() -+ - CMake.defines( - args, - Python_EXECUTABLE=sys.executable, -+ Python_NumPy_INCLUDE_DIR=Python_NumPy_INCLUDE_DIR, - TORCH_BUILD_VERSION=version, - **build_options, - ) diff --git a/recipe/patches/0004-Allow-overriding-CUDA-related-paths.patch b/recipe/patches/0003-Allow-overriding-CUDA-related-paths.patch similarity index 89% rename from recipe/patches/0004-Allow-overriding-CUDA-related-paths.patch rename to recipe/patches/0003-Allow-overriding-CUDA-related-paths.patch index c010d8f69..2fbe631ff 100644 --- a/recipe/patches/0004-Allow-overriding-CUDA-related-paths.patch +++ b/recipe/patches/0003-Allow-overriding-CUDA-related-paths.patch @@ -1,7 +1,7 @@ -From 69647852ad6bfa0f0d9f22f88a981496a71225df Mon Sep 17 00:00:00 2001 +From afa9e9bc6e2f6db7af3b3a46e608bc8d2833f18d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Wed, 27 Nov 2024 13:47:23 +0100 -Subject: [PATCH 04/15] Allow overriding CUDA-related paths +Subject: [PATCH 03/13] Allow overriding CUDA-related paths --- cmake/Modules/FindCUDAToolkit.cmake | 2 +- @@ -22,10 +22,10 @@ index ec9ae530aa6..b7c0bd9fc51 100644 set(CUDAToolkit_LIBRARY_ROOT "${CMAKE_CUDA_COMPILER_LIBRARY_ROOT}") set(CUDAToolkit_VERSION "${CMAKE_CUDA_COMPILER_TOOLKIT_VERSION}") diff --git a/tools/setup_helpers/cmake.py b/tools/setup_helpers/cmake.py -index 92052f9bc5c..bd2a8db5b3b 100644 +index 02ab011dd48..447628cc4c1 100644 --- a/tools/setup_helpers/cmake.py +++ b/tools/setup_helpers/cmake.py -@@ -254,7 +254,7 @@ class CMake: +@@ -314,7 +314,7 @@ class CMake: true_var = additional_options.get(var) if true_var is not None: build_options[true_var] = val diff --git a/recipe/patches/0005-Use-BLAS_USE_CBLAS_DOT-for-OpenBLAS-builds.patch b/recipe/patches/0004-Use-BLAS_USE_CBLAS_DOT-for-OpenBLAS-builds.patch similarity index 84% rename from recipe/patches/0005-Use-BLAS_USE_CBLAS_DOT-for-OpenBLAS-builds.patch rename to recipe/patches/0004-Use-BLAS_USE_CBLAS_DOT-for-OpenBLAS-builds.patch index 1e88de702..c3a933b6f 100644 --- a/recipe/patches/0005-Use-BLAS_USE_CBLAS_DOT-for-OpenBLAS-builds.patch +++ b/recipe/patches/0004-Use-BLAS_USE_CBLAS_DOT-for-OpenBLAS-builds.patch @@ -1,7 +1,7 @@ -From e1355fa88c355aa90c7179b4708a9de52cb7d5a2 Mon Sep 17 00:00:00 2001 +From 6af9801059f087440b2a756884d6f1fe3d91d865 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 18 Dec 2024 03:59:00 +0000 -Subject: [PATCH 05/15] Use BLAS_USE_CBLAS_DOT for OpenBLAS builds +Subject: [PATCH 04/13] Use BLAS_USE_CBLAS_DOT for OpenBLAS builds There are two calling conventions for *dotu functions @@ -31,18 +31,18 @@ functional calls. 1 file changed, 2 insertions(+) diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake -index 96988e89d09..1dee5889d34 100644 +index 72d9e298dcc..f7e56828bdf 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake -@@ -182,6 +182,7 @@ elseif(BLAS STREQUAL "OpenBLAS") - set(BLAS_INFO "open") +@@ -186,6 +186,7 @@ elseif(BLAS STREQUAL "OpenBLAS") set(BLAS_FOUND 1) set(BLAS_LIBRARIES ${OpenBLAS_LIB}) + set(BLAS_CHECK_F2C 1) + set(BLAS_USE_CBLAS_DOT TRUE) elseif(BLAS STREQUAL "BLIS") find_package(BLIS REQUIRED) include_directories(SYSTEM ${BLIS_INCLUDE_DIR}) -@@ -204,6 +205,7 @@ elseif(BLAS STREQUAL "MKL") +@@ -209,6 +210,7 @@ elseif(BLAS STREQUAL "MKL") set(BLAS_INFO "mkl") set(BLAS_FOUND 1) set(BLAS_LIBRARIES ${MKL_LIBRARIES}) diff --git a/recipe/patches/0007-Fix-FindOpenBLAS.patch b/recipe/patches/0005-Fix-FindOpenBLAS.patch similarity index 93% rename from recipe/patches/0007-Fix-FindOpenBLAS.patch rename to recipe/patches/0005-Fix-FindOpenBLAS.patch index 724d41f04..b8e4c8ae8 100644 --- a/recipe/patches/0007-Fix-FindOpenBLAS.patch +++ b/recipe/patches/0005-Fix-FindOpenBLAS.patch @@ -1,7 +1,7 @@ -From 08f3ff64bbec8420fd779a609e03a52a567a7ee6 Mon Sep 17 00:00:00 2001 +From 4487751a213664c3d62023da331007c712c60f79 Mon Sep 17 00:00:00 2001 From: Bas Zalmstra Date: Thu, 16 May 2024 10:46:49 +0200 -Subject: [PATCH 07/15] Fix FindOpenBLAS +Subject: [PATCH 05/13] Fix FindOpenBLAS --- cmake/Modules/FindOpenBLAS.cmake | 15 +++++++++------ diff --git a/recipe/patches/0006-fix-issue-142484.patch b/recipe/patches/0006-fix-issue-142484.patch deleted file mode 100644 index 666cc1e1d..000000000 --- a/recipe/patches/0006-fix-issue-142484.patch +++ /dev/null @@ -1,33 +0,0 @@ -From e0d77da902d7e861ba3f37c7fcff2d1d66c489c2 Mon Sep 17 00:00:00 2001 -From: "Zheng, Zhaoqiong" -Date: Fri, 27 Dec 2024 13:49:36 +0800 -Subject: [PATCH 06/15] fix issue 142484 - -From https://github.com/pytorch/pytorch/pull/143894 ---- - aten/src/ATen/native/mkl/SpectralOps.cpp | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/aten/src/ATen/native/mkl/SpectralOps.cpp b/aten/src/ATen/native/mkl/SpectralOps.cpp -index 636e94e20f6..6e52871e8e0 100644 ---- a/aten/src/ATen/native/mkl/SpectralOps.cpp -+++ b/aten/src/ATen/native/mkl/SpectralOps.cpp -@@ -478,7 +478,17 @@ static Tensor& _exec_fft(Tensor& out, const Tensor& self, IntArrayRef out_sizes, - - const auto value_type = c10::toRealValueType(input.scalar_type()); - out.resize_(batched_out_sizes, MemoryFormat::Contiguous); -- -+ auto astrides = input.strides(); -+ bool all_zero = true; -+ for (const auto& stride : astrides) { -+ if (stride != 0) { -+ all_zero = false; -+ break; -+ } -+ } -+ if (all_zero) { -+ input = input.clone(MemoryFormat::Contiguous); -+ } - auto descriptor = _plan_mkl_fft( - input.strides(), out.strides(), signal_size, input.is_complex(), - out.is_complex(), normalization, forward, value_type); diff --git a/recipe/patches/0008-point-include-paths-to-Conda-prefix-include-dir.patch b/recipe/patches/0006-point-include-paths-to-Conda-prefix-include-dir.patch similarity index 82% rename from recipe/patches/0008-point-include-paths-to-Conda-prefix-include-dir.patch rename to recipe/patches/0006-point-include-paths-to-Conda-prefix-include-dir.patch index 401e2df31..95e2d48cb 100644 --- a/recipe/patches/0008-point-include-paths-to-Conda-prefix-include-dir.patch +++ b/recipe/patches/0006-point-include-paths-to-Conda-prefix-include-dir.patch @@ -1,7 +1,7 @@ -From 89eedf14f72f2baa2fa8b1766a3b3682f454538d Mon Sep 17 00:00:00 2001 +From b1d699a5efd5659ab7e1d0dd3a203d432e63ffb7 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Thu, 23 Jan 2025 22:58:14 +1100 -Subject: [PATCH 08/15] point include paths to Conda prefix include dir +Subject: [PATCH 06/13] point include paths to Conda prefix include dir Updated to use `sys.prefix` per https://github.com/conda-forge/pytorch-cpu-feedstock/issues/424. @@ -10,10 +10,10 @@ https://github.com/conda-forge/pytorch-cpu-feedstock/issues/424. 1 file changed, 5 insertions(+) diff --git a/torch/utils/cpp_extension.py b/torch/utils/cpp_extension.py -index 7fa5237994e..99fbd38e81a 100644 +index 902d2fe6ce0..3701edf1ce4 100644 --- a/torch/utils/cpp_extension.py +++ b/torch/utils/cpp_extension.py -@@ -1495,9 +1495,14 @@ def include_paths(device_type: str = "cpu") -> list[str]: +@@ -1506,9 +1506,14 @@ def include_paths(device_type: str = "cpu") -> list[str]: A list of include path strings. """ lib_include = os.path.join(_TORCH_PATH, 'include') diff --git a/recipe/patches/0009-Add-conda-prefix-to-inductor-include-paths.patch b/recipe/patches/0007-Add-conda-prefix-to-inductor-include-lib-paths.patch similarity index 53% rename from recipe/patches/0009-Add-conda-prefix-to-inductor-include-paths.patch rename to recipe/patches/0007-Add-conda-prefix-to-inductor-include-lib-paths.patch index d7d846d9b..f094aa8bf 100644 --- a/recipe/patches/0009-Add-conda-prefix-to-inductor-include-paths.patch +++ b/recipe/patches/0007-Add-conda-prefix-to-inductor-include-lib-paths.patch @@ -1,7 +1,7 @@ -From 31542c7ab379cb4bed47a021f013e018aa9603c9 Mon Sep 17 00:00:00 2001 +From 6c71d8d16faf7c13b786f3f35fef6ab533bad2c1 Mon Sep 17 00:00:00 2001 From: Daniel Petry Date: Tue, 21 Jan 2025 17:45:23 -0600 -Subject: [PATCH 09/15] Add conda prefix to inductor include paths +Subject: [PATCH 07/14] Add conda prefix to inductor include & lib paths Currently inductor doesn't look in conda's includes and libs. This results in errors when it tries to compile, if system versions are being used of @@ -13,18 +13,24 @@ end user provides a _compile_flags.json file. Updated to use `sys.prefix` per https://github.com/conda-forge/pytorch-cpu-feedstock/issues/424. --- - torch/_inductor/cpp_builder.py | 1 + - 1 file changed, 1 insertion(+) + torch/_inductor/cpp_builder.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/torch/_inductor/cpp_builder.py b/torch/_inductor/cpp_builder.py -index d0a646c1de8..99c22d0ae40 100644 +index e2cb445ed10..89905bec464 100644 --- a/torch/_inductor/cpp_builder.py +++ b/torch/_inductor/cpp_builder.py -@@ -1136,6 +1136,7 @@ def get_cpp_torch_options( +@@ -1410,10 +1410,12 @@ def get_cpp_torch_options( + python_include_dirs + torch_include_dirs + omp_include_dir_paths + + [sys.prefix + '/include'] ++ + [sys.prefix + '/targets/@CUDA_TARGET@/include'] ) cflags = sys_libs_cflags + omp_cflags ldflags = omp_ldflags +- libraries_dirs = python_libraries_dirs + torch_libraries_dirs + omp_lib_dir_paths ++ libraries_dirs = python_libraries_dirs + torch_libraries_dirs + omp_lib_dir_paths + [sys.prefix + '/targets/@CUDA_TARGET@/lib/stubs'] + libraries = torch_libraries + omp_lib + passthrough_args = ( + sys_libs_passthrough_args + isa_ps_args_build_flags + omp_passthrough_args diff --git a/recipe/patches/0010-make-ATEN_INCLUDE_DIR-relative-to-TORCH_INSTALL_PREF.patch b/recipe/patches/0008-make-ATEN_INCLUDE_DIR-relative-to-TORCH_INSTALL_PREF.patch similarity index 83% rename from recipe/patches/0010-make-ATEN_INCLUDE_DIR-relative-to-TORCH_INSTALL_PREF.patch rename to recipe/patches/0008-make-ATEN_INCLUDE_DIR-relative-to-TORCH_INSTALL_PREF.patch index b3362ba95..a2db4fc88 100644 --- a/recipe/patches/0010-make-ATEN_INCLUDE_DIR-relative-to-TORCH_INSTALL_PREF.patch +++ b/recipe/patches/0008-make-ATEN_INCLUDE_DIR-relative-to-TORCH_INSTALL_PREF.patch @@ -1,7 +1,7 @@ -From fa7cbe57e21e30cd605cf78ac1cec8c3c243df89 Mon Sep 17 00:00:00 2001 +From 7520f1737851d8a812dacfb150399e701fc27769 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 28 Jan 2025 14:15:34 +1100 -Subject: [PATCH 10/15] make ATEN_INCLUDE_DIR relative to TORCH_INSTALL_PREFIX +Subject: [PATCH 08/13] make ATEN_INCLUDE_DIR relative to TORCH_INSTALL_PREFIX we cannot set CMAKE_INSTALL_PREFIX without the pytorch build complaining, but we can use TORCH_INSTALL_PREFIX, which is set correctly relative to our CMake files already: @@ -11,10 +11,10 @@ https://github.com/pytorch/pytorch/blob/v2.5.1/cmake/TorchConfig.cmake.in#L47 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aten/src/ATen/CMakeLists.txt b/aten/src/ATen/CMakeLists.txt -index c9cfd74b501..0ccb7b1d2e5 100644 +index 6c095680733..d7c7a74a302 100644 --- a/aten/src/ATen/CMakeLists.txt +++ b/aten/src/ATen/CMakeLists.txt -@@ -696,7 +696,7 @@ if(USE_ROCM) +@@ -793,7 +793,7 @@ if(USE_ROCM) # list(APPEND ATen_HIP_DEPENDENCY_LIBS ATEN_CUDA_FILES_GEN_LIB) endif() diff --git a/recipe/patches/0011-remove-DESTINATION-lib-from-CMake-install-TARGETS-di.patch b/recipe/patches/0009-remove-DESTINATION-lib-from-CMake-install-TARGETS-di.patch similarity index 89% rename from recipe/patches/0011-remove-DESTINATION-lib-from-CMake-install-TARGETS-di.patch rename to recipe/patches/0009-remove-DESTINATION-lib-from-CMake-install-TARGETS-di.patch index a126aea5c..aa4e3a029 100644 --- a/recipe/patches/0011-remove-DESTINATION-lib-from-CMake-install-TARGETS-di.patch +++ b/recipe/patches/0009-remove-DESTINATION-lib-from-CMake-install-TARGETS-di.patch @@ -1,7 +1,7 @@ -From 24e8b1baf4cc5fe783b6a2b13f36ef026bb98554 Mon Sep 17 00:00:00 2001 +From 755c05e421afd36dc38f07208f28e6df94d48323 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 28 Jan 2025 10:58:29 +1100 -Subject: [PATCH 11/15] remove `DESTINATION lib` from CMake `install(TARGETS` +Subject: [PATCH 09/13] remove `DESTINATION lib` from CMake `install(TARGETS` directives Suggested-By: Silvio Traversaro @@ -16,10 +16,10 @@ Suggested-By: Silvio Traversaro 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/c10/CMakeLists.txt b/c10/CMakeLists.txt -index 8e9d267352d..6c4a4472325 100644 +index f82e460cafc..d5df53938c3 100644 --- a/c10/CMakeLists.txt +++ b/c10/CMakeLists.txt -@@ -164,7 +164,7 @@ if(NOT BUILD_LIBTORCHLESS) +@@ -162,7 +162,7 @@ if(NOT BUILD_LIBTORCHLESS) # Note: for now, we will put all export path into one single Caffe2Targets group # to deal with the cmake deployment need. Inside the Caffe2Targets set, the # individual libraries like libc10.so and libcaffe2.so are still self-contained. @@ -68,10 +68,10 @@ index 95b9f031c3e..f1ce6d1ad14 100644 add_subdirectory(test) endif() diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt -index d1ce24e37fe..1f929e7b8b3 100644 +index 6ab41b6c847..a78ad102aa6 100644 --- a/caffe2/CMakeLists.txt +++ b/caffe2/CMakeLists.txt -@@ -562,7 +562,7 @@ if(USE_CUDA) +@@ -567,7 +567,7 @@ if(USE_CUDA) endif() target_link_libraries(caffe2_nvrtc PRIVATE caffe2::nvrtc ${DELAY_LOAD_FLAGS}) @@ -80,7 +80,7 @@ index d1ce24e37fe..1f929e7b8b3 100644 if(USE_NCCL) list(APPEND Caffe2_GPU_SRCS ${TORCH_SRC_DIR}/csrc/cuda/nccl.cpp) -@@ -636,7 +636,7 @@ if(USE_ROCM) +@@ -642,7 +642,7 @@ if(USE_ROCM) target_link_libraries(caffe2_nvrtc hip::amdhip64 hiprtc::hiprtc) target_include_directories(caffe2_nvrtc PRIVATE ${CMAKE_BINARY_DIR}) target_compile_definitions(caffe2_nvrtc PRIVATE USE_ROCM __HIP_PLATFORM_AMD__) @@ -89,7 +89,7 @@ index d1ce24e37fe..1f929e7b8b3 100644 endif() if(NOT NO_API AND NOT BUILD_LITE_INTERPRETER) -@@ -1098,7 +1098,7 @@ elseif(USE_CUDA) +@@ -1112,7 +1112,7 @@ elseif(USE_CUDA) CUDA::culibos ${CMAKE_DL_LIBS}) endif() set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/../aten/src/ATen/native/cuda/LinearAlgebraStubs.cpp PROPERTIES COMPILE_FLAGS "-DBUILD_LAZY_CUDA_LINALG") @@ -98,7 +98,7 @@ index d1ce24e37fe..1f929e7b8b3 100644 endif() if(USE_PRECOMPILED_HEADERS) -@@ -1584,17 +1584,17 @@ endif() +@@ -1590,17 +1590,17 @@ endif() caffe2_interface_library(torch torch_library) @@ -121,9 +121,9 @@ index d1ce24e37fe..1f929e7b8b3 100644 target_link_libraries(torch PUBLIC torch_cpu_library) -@@ -1726,7 +1726,7 @@ if(BUILD_SHARED_LIBS) - target_link_libraries(torch_global_deps ${Caffe2_PUBLIC_CUDA_DEPENDENCY_LIBS}) - target_link_libraries(torch_global_deps torch::cudart) +@@ -1743,7 +1743,7 @@ if(BUILD_SHARED_LIBS) + target_link_libraries(torch_global_deps torch::nvtoolsext) + endif() endif() - install(TARGETS torch_global_deps DESTINATION "${TORCH_INSTALL_LIB_DIR}") + install(TARGETS torch_global_deps) @@ -131,10 +131,10 @@ index d1ce24e37fe..1f929e7b8b3 100644 # ---[ Caffe2 HIP sources. diff --git a/torch/CMakeLists.txt b/torch/CMakeLists.txt -index 3985cf50c14..bcb90bfc672 100644 +index 1632147f022..ca8a193adb5 100644 --- a/torch/CMakeLists.txt +++ b/torch/CMakeLists.txt -@@ -463,7 +463,7 @@ if(NOT TORCH_PYTHON_LINK_FLAGS STREQUAL "") +@@ -468,7 +468,7 @@ if(NOT TORCH_PYTHON_LINK_FLAGS STREQUAL "") set_target_properties(torch_python PROPERTIES LINK_FLAGS ${TORCH_PYTHON_LINK_FLAGS}) endif() diff --git a/recipe/patches/0012-avoid-deprecated-find_package-CUDA-in-caffe2-CMake-m.patch b/recipe/patches/0010-avoid-deprecated-find_package-CUDA-in-caffe2-CMake-m.patch similarity index 88% rename from recipe/patches/0012-avoid-deprecated-find_package-CUDA-in-caffe2-CMake-m.patch rename to recipe/patches/0010-avoid-deprecated-find_package-CUDA-in-caffe2-CMake-m.patch index faa260e89..381edb708 100644 --- a/recipe/patches/0012-avoid-deprecated-find_package-CUDA-in-caffe2-CMake-m.patch +++ b/recipe/patches/0010-avoid-deprecated-find_package-CUDA-in-caffe2-CMake-m.patch @@ -1,24 +1,24 @@ -From 6785dd8f59dc951fb1194a287f24ea205d72b456 Mon Sep 17 00:00:00 2001 +From 0ee779ff0a9573eeda2b67cf32ea7061d13dd75c Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Thu, 30 Jan 2025 08:33:44 +1100 -Subject: [PATCH 12/15] avoid deprecated `find_package(CUDA)` in caffe2 CMake +Subject: [PATCH 10/13] avoid deprecated `find_package(CUDA)` in caffe2 CMake metadata vendor the not-available-anymore function torch_cuda_get_nvcc_gencode_flag from CMake --- - caffe2/CMakeLists.txt | 14 ++-- + caffe2/CMakeLists.txt | 10 +-- cmake/Summary.cmake | 10 +-- cmake/TorchConfig.cmake.in | 2 +- cmake/public/cuda.cmake | 48 ++++---------- cmake/public/utils.cmake | 127 +++++++++++++++++++++++++++++++++++++ setup.py | 2 +- - 6 files changed, 153 insertions(+), 50 deletions(-) + 6 files changed, 151 insertions(+), 48 deletions(-) diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt -index 1f929e7b8b3..8116b5fb5ec 100644 +index a78ad102aa6..fb89e8b2e3c 100644 --- a/caffe2/CMakeLists.txt +++ b/caffe2/CMakeLists.txt -@@ -948,25 +948,25 @@ if(USE_ROCM) +@@ -953,25 +953,25 @@ if(USE_ROCM) "$<$:ATen/core/ATen_pch.h>") endif() elseif(USE_CUDA) @@ -49,26 +49,11 @@ index 1f929e7b8b3..8116b5fb5ec 100644 torch_compile_options(torch_cuda) # see cmake/public/utils.cmake target_compile_definitions(torch_cuda PRIVATE USE_CUDA) -@@ -1076,12 +1076,12 @@ elseif(USE_CUDA) - torch_cuda - ) - if($ENV{ATEN_STATIC_CUDA}) -- if(CUDA_VERSION_MAJOR LESS_EQUAL 11) -+ if(CUDAToolkit_VERSION_MAJOR LESS_EQUAL 11) - target_link_libraries(torch_cuda_linalg PRIVATE - CUDA::cusolver_static - ${CUDAToolkit_LIBRARY_DIR}/liblapack_static.a # needed for libcusolver_static - ) -- elseif(CUDA_VERSION_MAJOR GREATER_EQUAL 12) -+ elseif(CUDAToolkit_VERSION_MAJOR GREATER_EQUAL 12) - target_link_libraries(torch_cuda_linalg PRIVATE - CUDA::cusolver_static - ${CUDAToolkit_LIBRARY_DIR}/libcusolver_lapack_static.a # needed for libcusolver_static diff --git a/cmake/Summary.cmake b/cmake/Summary.cmake -index c33269c0a28..ac200e24ca0 100644 +index 745d9ea0586..993892c6d80 100644 --- a/cmake/Summary.cmake +++ b/cmake/Summary.cmake -@@ -76,7 +76,7 @@ function(caffe2_print_configuration_summary) +@@ -75,7 +75,7 @@ function(caffe2_print_configuration_summary) message(STATUS " USE_CUSPARSELT : ${USE_CUSPARSELT}") message(STATUS " USE_CUDSS : ${USE_CUDSS}") message(STATUS " USE_CUFILE : ${USE_CUFILE}") @@ -77,7 +62,7 @@ index c33269c0a28..ac200e24ca0 100644 message(STATUS " USE_FLASH_ATTENTION : ${USE_FLASH_ATTENTION}") message(STATUS " USE_MEM_EFF_ATTENTION : ${USE_MEM_EFF_ATTENTION}") if(${USE_CUDNN}) -@@ -88,7 +88,7 @@ function(caffe2_print_configuration_summary) +@@ -87,7 +87,7 @@ function(caffe2_print_configuration_summary) if(${USE_CUFILE}) message(STATUS " cufile library : ${CUDA_cuFile_LIBRARY}") endif() @@ -86,7 +71,7 @@ index c33269c0a28..ac200e24ca0 100644 message(STATUS " CUDA library : ${CUDA_cuda_driver_LIBRARY}") message(STATUS " cudart library : ${CUDA_cudart_LIBRARY}") message(STATUS " cublas library : ${CUDA_cublas_LIBRARY}") -@@ -108,12 +108,12 @@ function(caffe2_print_configuration_summary) +@@ -107,12 +107,12 @@ function(caffe2_print_configuration_summary) message(STATUS " cuDSS library : ${__tmp}") endif() message(STATUS " nvrtc : ${CUDA_nvrtc_LIBRARY}") @@ -103,7 +88,7 @@ index c33269c0a28..ac200e24ca0 100644 if(${USE_TENSORRT}) message(STATUS " TensorRT runtime library: ${TENSORRT_LIBRARY}") diff --git a/cmake/TorchConfig.cmake.in b/cmake/TorchConfig.cmake.in -index 8a5587cad27..90c03147817 100644 +index 0b32ffa99ce..471b7154ed0 100644 --- a/cmake/TorchConfig.cmake.in +++ b/cmake/TorchConfig.cmake.in @@ -130,7 +130,7 @@ if(@USE_CUDA@) @@ -113,10 +98,10 @@ index 8a5587cad27..90c03147817 100644 - set(TORCH_CUDA_LIBRARIES ${CUDA_NVRTC_LIB}) + set(TORCH_CUDA_LIBRARIES CUDA::nvrtc) endif() - - if(@BUILD_SHARED_LIBS@) + if(TARGET torch::nvtoolsext) + list(APPEND TORCH_CUDA_LIBRARIES torch::nvtoolsext) diff --git a/cmake/public/cuda.cmake b/cmake/public/cuda.cmake -index ca888bb9db2..ef4119d8a00 100644 +index 218c50a69c6..8ee4e2fe98b 100644 --- a/cmake/public/cuda.cmake +++ b/cmake/public/cuda.cmake @@ -26,8 +26,8 @@ if(NOT MSVC) @@ -157,12 +142,12 @@ index ca888bb9db2..ef4119d8a00 100644 -message(STATUS "PyTorch: CUDA detected: " ${CUDA_VERSION}) -message(STATUS "PyTorch: CUDA nvcc is: " ${CUDA_NVCC_EXECUTABLE}) -message(STATUS "PyTorch: CUDA toolkit directory: " ${CUDA_TOOLKIT_ROOT_DIR}) --if(CUDA_VERSION VERSION_LESS 11.0) +-if(CUDA_VERSION VERSION_LESS 12.0) +message(STATUS "PyTorch: CUDA detected: " ${CUDAToolkit_VERSION}) +message(STATUS "PyTorch: CUDA nvcc is: " ${CUDAToolkit_NVCC_EXECUTABLE}) +message(STATUS "PyTorch: CUDA toolkit directory: " ${CUDAToolkit_ROOT}) -+if(CUDAToolkit_VERSION VERSION_LESS 11.0) - message(FATAL_ERROR "PyTorch requires CUDA 11.0 or above.") ++if(CUDAToolkit_VERSION VERSION_LESS 12.0) + message(FATAL_ERROR "PyTorch requires CUDA 12.0 or above.") endif() -if(CUDA_FOUND) @@ -189,7 +174,7 @@ index ca888bb9db2..ef4119d8a00 100644 - # Force CUDA to be processed for again next time - # TODO: I'm not sure if this counts as an implementation detail of - # FindCUDA -- set(${cuda_version_from_findcuda} ${CUDA_VERSION_STRING}) +- set(cuda_version_from_findcuda ${CUDA_VERSION_STRING}) - unset(CUDA_TOOLKIT_ROOT_DIR_INTERNAL CACHE) - # Not strictly necessary, but for good luck. - unset(CUDA_VERSION CACHE) @@ -215,10 +200,10 @@ index ca888bb9db2..ef4119d8a00 100644 execute_process( COMMAND Python::Interpreter -c diff --git a/cmake/public/utils.cmake b/cmake/public/utils.cmake -index d56dd74d6c0..9f59b40d612 100644 +index 68e66bb3fc3..e02a4abf8cc 100644 --- a/cmake/public/utils.cmake +++ b/cmake/public/utils.cmake -@@ -306,6 +306,133 @@ macro(torch_hip_get_arch_list store_var) +@@ -293,6 +293,133 @@ macro(torch_hip_get_arch_list store_var) string(REPLACE " " ";" ${store_var} "${_TMP}") endmacro() @@ -353,14 +338,14 @@ index d56dd74d6c0..9f59b40d612 100644 # Get the XPU arch flags specified by TORCH_XPU_ARCH_LIST. # Usage: diff --git a/setup.py b/setup.py -index 7f88ade34bf..3b3a3ab46fa 100644 +index 1c5b75897df..759a756739c 100644 --- a/setup.py +++ b/setup.py -@@ -695,7 +695,7 @@ class build_ext(setuptools.command.build_ext.build_ext): +@@ -1175,7 +1175,7 @@ class build_ext(setuptools.command.build_ext.build_ext): else: report("-- Not using cuDNN") if cmake_cache_vars["USE_CUDA"]: -- report("-- Detected CUDA at " + cmake_cache_vars["CUDA_TOOLKIT_ROOT_DIR"]) +- report(f"-- Detected CUDA at {cmake_cache_vars['CUDA_TOOLKIT_ROOT_DIR']}") + report(f"-- Detected CUDA at {cmake_cache_vars['CMAKE_CUDA_COMPILER_TOOLKIT_ROOT']}") else: report("-- Not using CUDA") diff --git a/recipe/patches/0013-Fix-CUPTI-lookup-to-include-target-directory.patch b/recipe/patches/0011-Fix-CUPTI-lookup-to-include-target-directory.patch similarity index 75% rename from recipe/patches/0013-Fix-CUPTI-lookup-to-include-target-directory.patch rename to recipe/patches/0011-Fix-CUPTI-lookup-to-include-target-directory.patch index 28ed68282..629f10183 100644 --- a/recipe/patches/0013-Fix-CUPTI-lookup-to-include-target-directory.patch +++ b/recipe/patches/0011-Fix-CUPTI-lookup-to-include-target-directory.patch @@ -1,17 +1,17 @@ -From 5b0baec85cfa42559474098f0dfd7952145a044e Mon Sep 17 00:00:00 2001 +From 846567d76fe17ac1c9f1154bb439c6a106445dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Thu, 6 Mar 2025 13:57:25 +0100 -Subject: [PATCH 13/15] Fix CUPTI lookup to include target directory +Subject: [PATCH 11/13] Fix CUPTI lookup to include target directory --- cmake/Dependencies.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake -index 1dee5889d34..11577a2c0dc 100644 +index f7e56828bdf..4a9fe193830 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake -@@ -1637,6 +1637,7 @@ if(USE_KINETO) +@@ -1626,6 +1626,7 @@ if(USE_KINETO) endif() find_library(CUPTI_LIBRARY_PATH ${CUPTI_LIB_NAME} PATHS @@ -19,7 +19,7 @@ index 1dee5889d34..11577a2c0dc 100644 ${CUDA_SOURCE_DIR} ${CUDA_SOURCE_DIR}/extras/CUPTI/lib64 ${CUDA_SOURCE_DIR}/lib -@@ -1644,6 +1645,7 @@ if(USE_KINETO) +@@ -1633,6 +1634,7 @@ if(USE_KINETO) NO_DEFAULT_PATH) find_path(CUPTI_INCLUDE_DIR cupti.h PATHS diff --git a/recipe/patches/0014-skip-test_norm_matrix_degenerate_shapes-on-numpy-2.3.patch b/recipe/patches/0012-skip-test_norm_matrix_degenerate_shapes-on-numpy-2.3.patch similarity index 81% rename from recipe/patches/0014-skip-test_norm_matrix_degenerate_shapes-on-numpy-2.3.patch rename to recipe/patches/0012-skip-test_norm_matrix_degenerate_shapes-on-numpy-2.3.patch index 27a2069fc..e0d52f2ef 100644 --- a/recipe/patches/0014-skip-test_norm_matrix_degenerate_shapes-on-numpy-2.3.patch +++ b/recipe/patches/0012-skip-test_norm_matrix_degenerate_shapes-on-numpy-2.3.patch @@ -1,14 +1,14 @@ -From f69f6c1f9f1bd001571f22689086ca15c23819f6 Mon Sep 17 00:00:00 2001 +From f38ba11d997851548be9682b37e1dba88cd7856b Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 14 Jun 2025 07:34:48 +1100 -Subject: [PATCH 14/15] skip test_norm_matrix_degenerate_shapes on numpy >=2.3 +Subject: [PATCH 12/13] skip test_norm_matrix_degenerate_shapes on numpy >=2.3 --- test/test_linalg.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_linalg.py b/test/test_linalg.py -index 108a5f59007..5381635b395 100644 +index 0f6c8f20742..f54dcce901d 100644 --- a/test/test_linalg.py +++ b/test/test_linalg.py @@ -2042,6 +2042,7 @@ class TestLinalg(TestCase): diff --git a/recipe/patches/0015-Define-PY_SSIZE_T_CLEAN-before-include-Python.h.patch b/recipe/patches/0013-Define-PY_SSIZE_T_CLEAN-before-include-Python.h.patch similarity index 81% rename from recipe/patches/0015-Define-PY_SSIZE_T_CLEAN-before-include-Python.h.patch rename to recipe/patches/0013-Define-PY_SSIZE_T_CLEAN-before-include-Python.h.patch index e9976cba0..e7f0887ae 100644 --- a/recipe/patches/0015-Define-PY_SSIZE_T_CLEAN-before-include-Python.h.patch +++ b/recipe/patches/0013-Define-PY_SSIZE_T_CLEAN-before-include-Python.h.patch @@ -1,7 +1,7 @@ -From 3d38a7377927da6eb0224e24ba4374db78edfef8 Mon Sep 17 00:00:00 2001 +From 8686ba30882206176dbbeba67a1063d1a08ef669 Mon Sep 17 00:00:00 2001 From: LWisteria Date: Sun, 2 Jun 2024 19:13:23 +0900 -Subject: [PATCH 15/15] Define PY_SSIZE_T_CLEAN before #include +Subject: [PATCH 13/13] Define PY_SSIZE_T_CLEAN before #include See https://docs.python.org/3/c-api/intro.html#include-files --- diff --git a/recipe/patches/0014-Use-system-fmt.patch b/recipe/patches/0014-Use-system-fmt.patch new file mode 100644 index 000000000..16de80b38 --- /dev/null +++ b/recipe/patches/0014-Use-system-fmt.patch @@ -0,0 +1,22 @@ +From 4db89ab160fc8c827c540d6a605676225b5d6cea Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Tue, 28 Oct 2025 12:56:04 +0100 +Subject: [PATCH 14/14] Use system fmt + +--- + cmake/Dependencies.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake +index 4a9fe193830..6c5ae208072 100644 +--- a/cmake/Dependencies.cmake ++++ b/cmake/Dependencies.cmake +@@ -1548,7 +1548,7 @@ endif() + # + set(TEMP_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) + set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libs" FORCE) +-add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/fmt) ++find_package(fmt) + + # Disable compiler feature checks for `fmt`. + # diff --git a/recipe/patches_submodules/fbgemm/0001-remove-DESTINATION-lib-from-CMake-install-directives.patch b/recipe/patches_submodules/fbgemm/0001-remove-DESTINATION-lib-from-CMake-install-directives.patch deleted file mode 100644 index 665cc74e8..000000000 --- a/recipe/patches_submodules/fbgemm/0001-remove-DESTINATION-lib-from-CMake-install-directives.patch +++ /dev/null @@ -1,25 +0,0 @@ -From a9879bdd5ea793c5301a4b86f163a07e1f28f321 Mon Sep 17 00:00:00 2001 -From: "H. Vetinari" -Date: Tue, 28 Jan 2025 13:32:28 +1100 -Subject: [PATCH] remove `DESTINATION lib` from CMake install directives - -Suggested-By: Silvio Traversaro ---- - CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/third_party/fbgemm/CMakeLists.txt b/third_party/fbgemm/CMakeLists.txt -index 134523e7..86fb8fad 100644 ---- a/third_party/fbgemm/CMakeLists.txt -+++ b/third_party/fbgemm/CMakeLists.txt -@@ -370,8 +370,8 @@ if(MSVC) - FILES $ $ - DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL) - endif() -- install(TARGETS fbgemm DESTINATION ${CMAKE_INSTALL_LIBDIR}) -- install(TARGETS asmjit DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ install(TARGETS fbgemm) -+ install(TARGETS asmjit) - endif() - - #Make project importable from the build directory