Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ export USE_SYSTEM_SLEEF=1
# use our protobuf
export BUILD_CUSTOM_PROTOBUF=OFF
rm -rf $PREFIX/bin/protoc
export USE_SYSTEM_PYBIND11=1
export USE_SYSTEM_EIGEN_INSTALL=1

# prevent six from being downloaded
> third_party/NNPACK/cmake/DownloadSix.cmake
Expand Down Expand Up @@ -244,16 +242,15 @@ case ${PKG_NAME} in

mv build/lib.*/torch/bin/* ${PREFIX}/bin/
mv build/lib.*/torch/lib/* ${PREFIX}/lib/
# need to merge these now because we're using system pybind11, meaning the destination directory is not empty
rsync -a build/lib.*/torch/share/* ${PREFIX}/share/
mv build/lib.*/torch/share/* ${PREFIX}/share/
mv build/lib.*/torch/include/{ATen,caffe2,tensorpipe,torch,c10} ${PREFIX}/include/
rm ${PREFIX}/lib/libtorch_python.*

# Keep the original backed up to sed later
cp build/CMakeCache.txt build/CMakeCache.txt.orig
;;
pytorch)
$PREFIX/bin/python -m pip install . --no-deps --no-build-isolation -v --no-clean \
$PREFIX/bin/python -m pip install . --no-deps -v --no-clean \
| sed "s,${CXX},\$\{CXX\},g" \
| sed "s,${PREFIX},\$\{PREFIX\},g"
# Keep this in ${PREFIX}/lib so that the library can be found by
Expand Down
40 changes: 8 additions & 32 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ source:
- patches/0017-Add-conda-prefix-to-inductor-include-paths.patch
- patches/0018-make-ATEN_INCLUDE_DIR-relative-to-TORCH_INSTALL_PREF.patch
- patches/0019-remove-DESTINATION-lib-from-CMake-install-TARGETS-di.patch # [win]
- patches/0020-make-library-name-in-test_mutable_custom_op_fixed_la.patch
- patches/0021-avoid-deprecated-find_package-CUDA-in-caffe2-CMake-m.patch
- patches_submodules/fbgemm/0001-remove-DESTINATION-lib-from-CMake-install-directives.patch # [win]
- patches_submodules/tensorpipe/0001-switch-away-from-find_package-CUDA.patch
Expand All @@ -79,6 +78,8 @@ build:
number: {{ build }}
# cuda 11.8 was dropped due to maintenance effort, see discussion in #177
skip: true # [cuda_compiler_version == "11.8"]
# skip known-passing builds while bringing up GPU builds
skip: true # [cuda_compiler_version == "None" or win]
# This logic allows two rc variants to be defined in the conda_build_config, but only one to actually be built.
# We want to be able to define two variants in the cbc so we can assign different labels to each in the upload channel
# (by zipping is_rc with channel_targets). This prevents rc builds being used unless specifically requested.
Expand Down Expand Up @@ -127,7 +128,6 @@ requirements:
- protobuf
- make # [linux]
- sccache # [win]
- rsync # [unix]
host:
# GPU requirements
- cudnn # [cuda_compiler_version != "None"]
Expand Down Expand Up @@ -178,8 +178,8 @@ requirements:
- libuv
- pkg-config # [unix]
- typing_extensions
- pybind11
- eigen
- pybind11 # [win]
- eigen # [win]
- zlib
run:
# GPU requirements without run_exports
Expand Down Expand Up @@ -325,13 +325,13 @@ outputs:
- intel-openmp {{ mkl }} # [win]
- libabseil
- libprotobuf
- eigen # [win]
- pybind11 # [win]
- sleef
- libuv
- pkg-config # [unix]
- typing_extensions
- {{ pin_subpackage('libtorch', exact=True) }}
- pybind11
- eigen
- zlib
run:
- llvm-openmp # [osx]
Expand All @@ -348,7 +348,7 @@ outputs:
- filelock
- jinja2
- networkx
- pybind11
- pybind11 # [win]
- nomkl # [blas_impl != "mkl"]
- fsspec
# avoid that people without GPUs needlessly download ~0.5-1GB
Expand Down Expand Up @@ -397,7 +397,6 @@ outputs:
# tools/ is needed to optimise test run
# as of pytorch=2.0.0, there is a bug when trying to run tests without the tools
- tools
#- .ci/pytorch/smoke_test/smoke_test.py
commands:
# Run pip check so as to ensure that all pytorch packages are installed
# https://github.com/conda-forge/pytorch-cpu-feedstock/issues/24
Expand All @@ -423,30 +422,6 @@ outputs:
- if not exist %LIBRARY_BIN%\torch_python.dll exit 1 # [win]
- if not exist %LIBRARY_LIB%\torch_python.lib exit 1 # [win]

# See here for environment variables needed by the smoke test script
# https://github.com/pytorch/pytorch/blob/266fd35c5842902f6304aa8e7713b252cbfb243c/.ci/pytorch/smoke_test/smoke_test.py#L16
- set MATRIX_GPU_ARCH_VERSION="{{ '.'.join((cuda_compiler_version or "").split('.')[:2]) }}" # [(cuda_compiler_version != "None") and (win)]
- set MATRIX_GPU_ARCH_TYPE="cuda" # [(cuda_compiler_version != "None") and (win)]
- set MATRIX_GPU_ARCH_VERSION="none" # [(cuda_compiler_version == "None") and (win)]
- set MATRIX_GPU_ARCH_TYPE="none" # [(cuda_compiler_version == "None") and (win)]
- set MATRIX_CHANNEL="defaults" # [win]
- set MATRIX_STABLE_VERSION={{ version }} # [win]
- set MATRIX_PACKAGE_TYPE="conda" # [win]
- set TARGET_OS="windows" # [win]
- set OMP_NUM_THREADS=4 # [win]
- export MATRIX_GPU_ARCH_VERSION="{{ '.'.join((cuda_compiler_version or "").split('.')[:2]) }}" # [(cuda_compiler_version != "None") and (linux and x86_64)]
- export MATRIX_GPU_ARCH_TYPE="cuda" # [(cuda_compiler_version != "None") and (linux and x86_64)]
- export MATRIX_GPU_ARCH_VERSION="none" # [(cuda_compiler_version == "None") and (not win)]
- export MATRIX_GPU_ARCH_TYPE="none" # [(cuda_compiler_version == "None") and (not win)]
- export MATRIX_CHANNEL="defaults" # [not win]
- export MATRIX_STABLE_VERSION="{{ version }}" # [not win]
- export MATRIX_PACKAGE_TYPE="conda" # [not win]
- export TARGET_OS="linux" # [linux]
- export TARGET_OS="macos-arm64" # [(osx and arm64)]
- export TARGET_OS="macos-x86_64" # [(osx and x86_64)]
- export OMP_NUM_THREADS=4 # [not win]
#- python ./smoke_test/smoke_test.py --package torchonly

# a reasonably safe subset of tests that should run under 15 minutes
{% set tests = " ".join([
"test/test_autograd.py",
Expand Down Expand Up @@ -566,6 +541,7 @@ about:
- LICENSE
- NOTICE
- third_party/CMake/Copyright.txt
- third_party/pybind11/LICENSE # [unix]
summary: PyTorch is an optimized tensor library for deep learning using GPUs and CPUs.
description: |
PyTorch is a Python package that provides two high-level features:
Expand Down

This file was deleted.

Loading