From 3c1648a0749c1d66b300d857e6b417c1162890da Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 27 May 2024 00:07:23 +0100 Subject: gentoo auto-resync : 27:05:2024 - 00:07:23 --- sci-libs/caffe2/Manifest | 6 +- sci-libs/caffe2/caffe2-2.1.2-r7.ebuild | 283 --------------------- sci-libs/caffe2/files/caffe2-2.1.1-cudaExtra.patch | 28 -- sci-libs/caffe2/files/caffe2-2.1.1-gentoo.patch | 188 -------------- sci-libs/caffe2/metadata.xml | 1 - 5 files changed, 1 insertion(+), 505 deletions(-) delete mode 100644 sci-libs/caffe2/caffe2-2.1.2-r7.ebuild delete mode 100644 sci-libs/caffe2/files/caffe2-2.1.1-cudaExtra.patch delete mode 100644 sci-libs/caffe2/files/caffe2-2.1.1-gentoo.patch (limited to 'sci-libs/caffe2') diff --git a/sci-libs/caffe2/Manifest b/sci-libs/caffe2/Manifest index 8bc33101739b..09293913770e 100644 --- a/sci-libs/caffe2/Manifest +++ b/sci-libs/caffe2/Manifest @@ -3,8 +3,6 @@ AUX caffe2-1.13.0-install-dirs.patch 5737 BLAKE2B 10b10e3a29976344c7596e1c4e7a60 AUX caffe2-1.13.1-tensorpipe.patch 374 BLAKE2B 46d45aae88f99c213f0da039bad5aa0c470a6c505ed1d28088ecb8dd445547e52a6d2c087c52c15b20da31808cd9213c1e672880e9bf4afe9c487358b4d4cd9d SHA512 d7315408b3ad4630715c18fff853b07e589ae78f5fcc8eef7f8791202fca459a3b23481856a50a5d432aec26482eb33adf37ba0a37d45f719ceb29081449345d AUX caffe2-2.0.0-cudnn_include_fix.patch 526 BLAKE2B 63959783a94bfa2b02f78e36e754ef6c54d9f3dfb0bfdedd0fb9ef6553204b54b2dfb1676312689bbc3eace897d5f0441faf9af376f27c3c831c3ffcece31e5d SHA512 ff2ba61a4c69620bb1078aa7235b015a6165bc0df65e5e4ec04d4f3515f80dc865cc904d279fefbc90784b571f41d82441ce8045a27947ae7d3d52505e813b3c AUX caffe2-2.0.0-gcc13.patch 1203 BLAKE2B df55608c6019802da32809cb210b60cf0debf38e8d7a20135e92465be28d3537f2d0b52c67a61b264e241539b64fa02aa99eefb856686a9f9e3c45291b8d6a70 SHA512 59e933c60abef3ac97a1e3b2cd7a9935f9fdde4bc3ed1c2c53c729af6d7ed735ffd38cbdac08d32c668cd2751f3f871cc833883efd19732c04a0f67fbb49c41d -AUX caffe2-2.1.1-cudaExtra.patch 1336 BLAKE2B f12d29a624f9345452227076108b9ded4c6c60051f10645340e03694b53765cf1c892e9a8797748cfba1fc416d84782a265b961c9c5e7ab1b0f367192287c891 SHA512 9c394305f99e377c5eec6d271c9c80b3c45eb0ccaeb96ad21feba93bc13ae562843c0ae055d11ddee63b8e2b180dc2a0e7a44b9772b0044ac3cd94a0ee4c3d67 -AUX caffe2-2.1.1-gentoo.patch 6329 BLAKE2B c002f1605888ac79bed292cf1967eedd4d177193947dbafea8443958e498b371865a8f7548cc7e2c572d7fff69418344286071d64f4742691e943e81b73d811c SHA512 8eb2b2f89de809ff93e0deaa4bd6116f73bed55642904e689ba97e5bf21ba5754935a8d0c1f632b1f262400f0c809398524056f7691f7787c154a5b7f6f1b7b2 AUX caffe2-2.1.2-fix-openmp-link.patch 483 BLAKE2B dfe9ae0978b71449486d12f769c3c962001c138bc53b0605ed6f2215fe732356da90c5084488bc4d9f54c88aab2a426b8c935543f7ba0890783bb58da30a5cb4 SHA512 a9cee8ae2a8477a21e92bd4ef286af68efd90283593db7ed4641a826b19b4266bcab9c131c93be2b6c2f13d5cd545c766612791cf2e23cff9a731a03f3ad7648 AUX caffe2-2.1.2-fix-rpath.patch 510 BLAKE2B 6585e8089acc6e7fe69713ad04a64263ab2e9d2d5cf6d3a844dbbc917383e4b7a0688ebdfb3142e3c42108c8c14a6435f48ae4ce3adee8db338286d60ed7b503 SHA512 ede770559b487fff736aded0cf4b077d8308c2b85c5cd139150b04bcb8b72a0d78af6a2b74fbb153b75acff71df0832d8f139231d1c18558f5b5479af348e6a0 AUX caffe2-2.1.2-rocm-fix-std-cpp17.patch 3485 BLAKE2B 38f07fa876e1b628f1709dc35669ee62bbd5b00e23880800a0c430c72365799da86213ba76d344e9b46559ec1a4c98e1be6b46466bee8ebbf484976c597bb5ba SHA512 8dffee073c7744c3eba62f22b5f11d1f5db980fd7e9ac593ae44b489fe1eded532739db397f4599b8cda1b75c26e493dff81c2862056f62823570ab94a8f3389 @@ -13,10 +11,8 @@ AUX caffe2-2.2.2-musl.patch 363 BLAKE2B 9c62b8d93b430cec9d0e739802d5938933109369 AUX caffe2-2.3.0-CMakeFix.patch 519 BLAKE2B 0249b7c31cea647a0c82d94cd99fac3415cbd357aacde4d0cc0e5b936c27dc96afcbecdb9ae55ee464080603c9c71f6c995166ae7045e19e9d874dcf688b4a0a SHA512 a8c5200abf4f059a2c43a2fa0b2a639dde60cbf48f6bb461c133e02b7986e8bc9bb98c4a1c51478308ac13b886691c89debf0b762fc821cd52500f5648c3bd39 AUX caffe2-2.3.0-cudnn_include_fix.patch 587 BLAKE2B 8ffeb9080ee77b953e7a77c9bea9af8c078adf147c314e07cf40d6f9ce1c988ac201e282ffd67a29703ced5885329d44be013c54cf3ba870c009aed40e65fefc SHA512 b37427e35d8147e603331eb344a3542ed31d0b133df3c7ce10ebecec93b1d09d040f77c33f23f70e9835db10fa209c0318b89b70b3b91263655d160ed737d6f3 AUX caffe2-2.3.0-rocm-fix-std-cpp17.patch 3378 BLAKE2B 9e88fa1bf68c397c8122ea5b3504a22b3f6ef92c77dad8bd84ee03b4f75792b0e1281d8b1aa981ad1bf65060179fa08ef14e776e82abdec9147dfbb3bf37a7ae SHA512 7797a140abf736f2a4628cd727cf0c58ed39c9764b9ce3b67d17fc0c9b9965e647266c815e5322f96f807680120e25ccdbbc66b66c7c6cf84edb811330ad452c -DIST pytorch-2.1.2.tar.gz 116316469 BLAKE2B c5a55ee264bc3477d3556ba6376b5591117e992e56e0dd0c9ba93d12526e2727f7840f6f1e0730a38223b6492c9556840c4ebf22ffd220e97225c2abff303747 SHA512 a8961d78ad785b13c959a0612563a60e0de17a7c8bb9822ddea9a24072796354d07e81c47b6cc8761b21a6448845b088cf80e1661d9e889b0ed5474d3dc76756 DIST pytorch-2.2.2.tar.gz 116367503 BLAKE2B 0be22f2ec4b9aac6f5e976664cae01facf07929a32565cd57d7cc5b2d9888e9ae71ca301853752fe8f31d174d04c9974eb9ed2f3d452360a50ccf024f200726a SHA512 7990e0f9484038c3458c0bda2c863bf2b19e56edab81fc5938c6e0f08b17558287f853bb67350e8cca8f42bec0f1d4ba0e94e50a145db8da44bdd4bd703d91d0 DIST pytorch-2.3.0.tar.gz 117029829 BLAKE2B 8f9c0d71ee0a9219b495eddccdcc65107f7ad537c43c68100b229f3d27b0e6c01ccb1659c7fffc356a48d80f2adc0a10361305dc8f1df20446de837d380f89f6 SHA512 67f7e9a096c3ffb952206ebf9105bedebb68c24ad82456083adf1d1d210437fcaa9dd52b68484cfc97d408c9eebc9541c76868c34a7c9982494dc3f424cfb07c -EBUILD caffe2-2.1.2-r7.ebuild 7930 BLAKE2B 4fd832a61e952491d3825b6e1faf7a12c17ffdcb24c125b8da470831a5dc9f6afb7afe162be07ade4faec5d2cc77c40a7afc755cd8e1eea066b76181d68a90f1 SHA512 e0f94a21539aef4dba8208a14c42342f72a6ec63cc7aa59ce7dd49aa92d6c2adb876d0ce13416a437c9ace7628e81bfb31c2ab65c4cdcb19989163ad3fb7cc03 EBUILD caffe2-2.2.2-r1.ebuild 7452 BLAKE2B 6b4c14a8304ef36349f6442616bb1e2a9563596293ea507ffd1d9083fc01c251dd237db3babbdc9841273b7c31b8ac4b420e3047e6ffd128763ca9afc4b6aa16 SHA512 cfa525d40f3dfbcd4dcf7e31cb772dcd809d528981925b50239961e91ae2147723d261b71f433e5a22e73f59b0bd156a97d84b385d1d5bfffd51db9fc6db2b57 EBUILD caffe2-2.3.0-r3.ebuild 7542 BLAKE2B 6b230db4d2a033b5078e8c61e40955a0981aa3b6b06734145e4bec8f78719329a3825218045a8f57efce9bfddad7b252ee4447d82cc0637db8656d5f8178b9cc SHA512 d3861111081d26a883790e7a5097ddf77ef2e491eb4471a3cc95d25e659ad8c283c22bda5674cb09d575768da5b6a401ea5347febd4f194dbedd4196d1ac628d -MISC metadata.xml 1273 BLAKE2B 2021a10ffae1fb62699a965d4b88465200fee43adff9e22223d715d0f0623a60cb242d6b919f5835b933add1599f54c1abbbd557ecd60896a7c59742d17bf72f SHA512 a5bfe7df09355ac8b64df4970f2562eb52dfcb7c542b2b17297d20ce4958f2a2e8afe292051efb0766380c19593ce00cf7b3bb1b2b63c0ab95bd113dbd8792e5 +MISC metadata.xml 1225 BLAKE2B ab7fb0bf8b2d37ddaa1a9ecc815eb094e85465d20d3a30af081b42e0b60ade9858d0053b101ba0e7750a90cb48b5b79db9bdc2729bf66d0420732489da62fe54 SHA512 dfb58597fb4bcdd7df0fcc3f2514518e118e8fc9b1cd24868aab60c32a62ff419b8b72a7c294925eff4c8871cc8df606af7fa60bfa99901091d8195101ee1153 diff --git a/sci-libs/caffe2/caffe2-2.1.2-r7.ebuild b/sci-libs/caffe2/caffe2-2.1.2-r7.ebuild deleted file mode 100644 index 8198f516b251..000000000000 --- a/sci-libs/caffe2/caffe2-2.1.2-r7.ebuild +++ /dev/null @@ -1,283 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..12} ) -ROCM_VERSION=5.7 -inherit python-single-r1 cmake cuda flag-o-matic prefix rocm - -MYPN=pytorch -MYP=${MYPN}-${PV} - -DESCRIPTION="A deep learning framework" -HOMEPAGE="https://pytorch.org/" -SRC_URI="https://github.com/pytorch/${MYPN}/archive/refs/tags/v${PV}.tar.gz - -> ${MYP}.tar.gz" - -S="${WORKDIR}"/${MYP} - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64" -IUSE="cuda distributed fbgemm ffmpeg gloo mkl mpi nnpack +numpy onednn openblas opencl opencv openmp qnnpack rocm tensorpipe xnnpack" -RESTRICT="test" -REQUIRED_USE=" - ${PYTHON_REQUIRED_USE} - ffmpeg? ( opencv ) - mpi? ( distributed ) - tensorpipe? ( distributed ) - distributed? ( tensorpipe ) - gloo? ( distributed ) - ?? ( cuda rocm ) - rocm? ( || ( ${ROCM_REQUIRED_USE} ) ) -" - -# CUDA 12 not supported yet: https://github.com/pytorch/pytorch/issues/91122 -RDEPEND=" - ${PYTHON_DEPS} - dev-cpp/gflags:= - >=dev-cpp/glog-0.5.0 - dev-libs/cpuinfo - dev-libs/libfmt - dev-libs/protobuf:= - dev-libs/pthreadpool - dev-libs/sleef - virtual/lapack - >=sci-libs/onnx-1.12.0 - =dev-libs/cudnn-frontend-0.9.2:0/8 - =dev-libs/FBGEMM-2023.11.02 ) - ffmpeg? ( media-video/ffmpeg:= ) - gloo? ( sci-libs/gloo[cuda?] ) - mpi? ( virtual/mpi ) - nnpack? ( sci-libs/NNPACK ) - numpy? ( $(python_gen_cond_dep ' - dev-python/numpy[${PYTHON_USEDEP}] - ') ) - onednn? ( dev-libs/oneDNN ) - opencl? ( virtual/opencl ) - opencv? ( media-libs/opencv:= ) - qnnpack? ( sci-libs/QNNPACK ) - rocm? ( - >=dev-util/hip-5.7 - >=dev-libs/rccl-5.7[${ROCM_USEDEP}] - >=sci-libs/rocThrust-5.7[${ROCM_USEDEP}] - >=sci-libs/rocPRIM-5.7[${ROCM_USEDEP}] - >=sci-libs/hipBLAS-5.7[${ROCM_USEDEP}] - >=sci-libs/hipFFT-5.7[${ROCM_USEDEP}] - >=sci-libs/hipSPARSE-5.7[${ROCM_USEDEP}] - >=sci-libs/hipRAND-5.7[${ROCM_USEDEP}] - >=sci-libs/hipCUB-5.7[${ROCM_USEDEP}] - >=sci-libs/hipSOLVER-5.7[${ROCM_USEDEP}] - >=sci-libs/miopen-5.7[${ROCM_USEDEP}] - >=dev-util/roctracer-5.7[${ROCM_USEDEP}] - ) - tensorpipe? ( sci-libs/tensorpipe[cuda?] ) - xnnpack? ( >=sci-libs/XNNPACK-2022.12.22 ) - mkl? ( sci-libs/mkl ) - openblas? ( sci-libs/openblas ) -" -DEPEND=" - ${RDEPEND} - cuda? ( >=dev-libs/cutlass-3.1.0 ) - onednn? ( sci-libs/ideep ) - dev-libs/psimd - dev-libs/FP16 - dev-libs/FXdiv - dev-libs/pocketfft - dev-libs/flatbuffers - >=sci-libs/kineto-0.4.0_p20231031 - $(python_gen_cond_dep ' - dev-python/pyyaml[${PYTHON_USEDEP}] - dev-python/pybind11[${PYTHON_USEDEP}] - ') -" - -PATCHES=( - "${FILESDIR}"/${PN}-2.1.1-gentoo.patch - "${FILESDIR}"/${PN}-1.13.0-install-dirs.patch - "${FILESDIR}"/${PN}-1.12.0-glog-0.6.0.patch - "${FILESDIR}"/${PN}-1.13.1-tensorpipe.patch - "${FILESDIR}"/${PN}-2.0.0-gcc13.patch - "${FILESDIR}"/${PN}-2.0.0-cudnn_include_fix.patch - "${FILESDIR}"/${PN}-2.1.1-cudaExtra.patch - "${FILESDIR}"/${PN}-2.1.2-fix-rpath.patch - "${FILESDIR}"/${PN}-2.1.2-fix-openmp-link.patch - "${FILESDIR}"/${PN}-2.1.2-rocm-fix-std-cpp17.patch -) - -src_prepare() { - filter-lto #bug 862672 - sed -i \ - -e "/third_party\/gloo/d" \ - cmake/Dependencies.cmake \ - || die - cmake_src_prepare - pushd torch/csrc/jit/serialization || die - flatc --cpp --gen-mutable --scoped-enums mobile_bytecode.fbs || die - popd - # prefixify the hardcoded paths, after all patches are applied - hprefixify \ - aten/CMakeLists.txt \ - caffe2/CMakeLists.txt \ - cmake/Metal.cmake \ - cmake/Modules/*.cmake \ - cmake/Modules_CUDA_fix/FindCUDNN.cmake \ - cmake/Modules_CUDA_fix/upstream/FindCUDA/make2cmake.cmake \ - cmake/Modules_CUDA_fix/upstream/FindPackageHandleStandardArgs.cmake \ - cmake/public/LoadHIP.cmake \ - cmake/public/cuda.cmake \ - cmake/Dependencies.cmake \ - torch/CMakeLists.txt \ - CMakeLists.txt - - if use rocm; then - sed -e "s:ROCM_PATH /opt/rocm:ROCM_PATH /usr:" \ - -e "s:HIP_PATH \${ROCM_PATH}/hip:HIP_PATH /usr:" \ - -e "s:\${HIP_PATH}/cmake:/usr/$(get_libdir)/cmake/hip:g" \ - -e "s/HIP 1.0/HIP 1.0 REQUIRED/" \ - -i cmake/public/LoadHIP.cmake || die - - ebegin "HIPifying cuda sources" - ${EPYTHON} tools/amd_build/build_amd.py || die - eend $? - fi -} - -src_configure() { - if use cuda && [[ -z ${TORCH_CUDA_ARCH_LIST} ]]; then - ewarn "WARNING: caffe2 is being built with its default CUDA compute capabilities: 3.5 and 7.0." - ewarn "These may not be optimal for your GPU." - ewarn "" - ewarn "To configure caffe2 with the CUDA compute capability that is optimal for your GPU," - ewarn "set TORCH_CUDA_ARCH_LIST in your make.conf, and re-emerge caffe2." - ewarn "For example, to use CUDA capability 7.5 & 3.5, add: TORCH_CUDA_ARCH_LIST=7.5 3.5" - ewarn "For a Maxwell model GPU, an example value would be: TORCH_CUDA_ARCH_LIST=Maxwell" - ewarn "" - ewarn "You can look up your GPU's CUDA compute capability at https://developer.nvidia.com/cuda-gpus" - ewarn "or by running /opt/cuda/extras/demo_suite/deviceQuery | grep 'CUDA Capability'" - fi - - local mycmakeargs=( - -DBUILD_CUSTOM_PROTOBUF=OFF - -DBUILD_SHARED_LIBS=ON - - -DUSE_CCACHE=OFF - -DUSE_CUDA=$(usex cuda) - -DUSE_DISTRIBUTED=$(usex distributed) - -DUSE_MPI=$(usex mpi) - -DUSE_FAKELOWP=OFF - -DUSE_FBGEMM=$(usex fbgemm) - -DUSE_FFMPEG=$(usex ffmpeg) - -DUSE_GFLAGS=ON - -DUSE_GLOG=ON - -DUSE_GLOO=$(usex gloo) - -DUSE_KINETO=OFF # TODO - -DUSE_LEVELDB=OFF - -DUSE_MAGMA=OFF # TODO: In GURU as sci-libs/magma - -DUSE_MKLDNN=$(usex onednn) - -DUSE_NNPACK=$(usex nnpack) - -DUSE_QNNPACK=$(usex qnnpack) - -DUSE_XNNPACK=$(usex xnnpack) - -DUSE_SYSTEM_XNNPACK=$(usex xnnpack) - -DUSE_TENSORPIPE=$(usex tensorpipe) - -DUSE_PYTORCH_QNNPACK=OFF - -DUSE_NUMPY=$(usex numpy) - -DUSE_OPENCL=$(usex opencl) - -DUSE_OPENCV=$(usex opencv) - -DUSE_OPENMP=$(usex openmp) - -DUSE_ROCM=$(usex rocm) - -DUSE_SYSTEM_CPUINFO=ON - -DUSE_SYSTEM_PYBIND11=ON - -DUSE_UCC=OFF - -DUSE_VALGRIND=OFF - -DPYBIND11_PYTHON_VERSION="${EPYTHON#python}" - -DPYTHON_EXECUTABLE="${PYTHON}" - -DUSE_ITT=OFF - -DUSE_SYSTEM_PTHREADPOOL=ON - -DUSE_SYSTEM_FXDIV=ON - -DUSE_SYSTEM_FP16=ON - -DUSE_SYSTEM_GLOO=ON - -DUSE_SYSTEM_ONNX=ON - -DUSE_SYSTEM_SLEEF=ON - -DUSE_METAL=OFF - - -Wno-dev - -DTORCH_INSTALL_LIB_DIR="${EPREFIX}"/usr/$(get_libdir) - -DLIBSHM_INSTALL_LIB_SUBDIR="${EPREFIX}"/usr/$(get_libdir) - ) - - if use mkl; then - mycmakeargs+=(-DBLAS=MKL) - elif use openblas; then - mycmakeargs+=(-DBLAS=OpenBLAS) - else - mycmakeargs+=(-DBLAS=Generic -DBLAS_LIBRARIES=) - fi - - if use cuda; then - addpredict "/dev/nvidiactl" # bug 867706 - addpredict "/dev/char" - - mycmakeargs+=( - -DUSE_CUDNN=ON - -DTORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST:-3.5 7.0}" - -DBUILD_NVFUSER=ON - -DUSE_NCCL=OFF # TODO: NVIDIA Collective Communication Library - -DCMAKE_CUDA_FLAGS="$(cuda_gccdir -f | tr -d \")" - ) - elif use rocm; then - export PYTORCH_ROCM_ARCH="$(get_amdgpu_flags)" - - mycmakeargs+=( - -DBUILD_NVFUSER=ON - -DUSE_NCCL=ON - -DUSE_SYSTEM_NCCL=ON - ) - fi - - if use onednn; then - mycmakeargs+=( - -DUSE_MKLDNN=ON - -DMKLDNN_FOUND=ON - -DMKLDNN_LIBRARIES=dnnl - -DMKLDNN_INCLUDE_DIR="${ESYSROOT}/usr/include/oneapi/dnnl" - ) - fi - - cmake_src_configure - - # do not rerun cmake and the build process in src_install - sed '/RERUN/,+1d' -i "${BUILD_DIR}"/build.ninja || die -} - -src_install() { - cmake_src_install - - insinto "/var/lib/${PN}" - doins "${BUILD_DIR}"/CMakeCache.txt - - rm -rf python - mkdir -p python/torch/include || die - mv "${ED}"/usr/lib/python*/site-packages/caffe2 python/ || die - if use cuda || use rocm; then - mv "${ED}${S}"/nvfuser python/nvfuser || die - mv "${ED}"/usr/$(get_libdir)/nvfuser.so python/nvfuser/_C.so || die - fi - cp torch/version.py python/torch/ || die - python_domodule python/caffe2 - python_domodule python/torch - ln -s ../../../../../include/torch \ - "${D}$(python_get_sitedir)"/torch/include/torch || die # bug 923269 - if use cuda || use rocm; then - python_domodule python/nvfuser - fi - rm -rf "${ED}${WORKDIR}" - find "${ED}" -empty -delete -} diff --git a/sci-libs/caffe2/files/caffe2-2.1.1-cudaExtra.patch b/sci-libs/caffe2/files/caffe2-2.1.1-cudaExtra.patch deleted file mode 100644 index f12623f2068a..000000000000 --- a/sci-libs/caffe2/files/caffe2-2.1.1-cudaExtra.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/third_party/nvfuser/CMakeLists.txt 2023-11-30 21:42:07.336946970 +0100 -+++ b/third_party/nvfuser/CMakeLists.txt 2023-11-30 21:46:35.101749250 +0100 -@@ -18,7 +18,7 @@ - set(NVFUSER_ROOT ${PROJECT_SOURCE_DIR}) - set(NVFUSER_SRCS_DIR "${NVFUSER_ROOT}/csrc") - set(TORCH_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../..") --set(TORCH_INSTALL_LIB_DIR ${TORCH_ROOT}/torch/lib) -+set(TORCH_INSTALL_LIB_DIR ${CMAKE_INSTALL_LIBDIR}) - - # --- build nvfuser_codegen library - -@@ -218,7 +218,7 @@ - message(STATUS "somehow this is happening") - set_target_properties(${NVFUSER} PROPERTIES LINK_FLAGS ${TORCH_PYTHON_LINK_FLAGS}) - endif() -- install(TARGETS ${NVFUSER} EXPORT NvfuserTargets DESTINATION ${TORCH_ROOT}/nvfuser/) -+ install(TARGETS ${NVFUSER} EXPORT NvfuserTargets DESTINATION "${TORCH_INSTALL_LIB_DIR}") - - # install nvfuser python files - install(DIRECTORY "${NVFUSER_ROOT}/python/" ---- a/functorch/CMakeLists.txt 2023-11-30 20:30:45.805209036 +0100 -+++ b/functorch/CMakeLists.txt 2023-11-30 20:31:13.284766157 +0100 -@@ -35,4 +35,4 @@ - if(NOT ${TORCH_PYTHON_LINK_FLAGS} STREQUAL "") - set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS ${TORCH_PYTHON_LINK_FLAGS}) - endif() --install(TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}") -+install(TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_INSTALL_LIBDIR}") diff --git a/sci-libs/caffe2/files/caffe2-2.1.1-gentoo.patch b/sci-libs/caffe2/files/caffe2-2.1.1-gentoo.patch deleted file mode 100644 index 056ac9afe5b3..000000000000 --- a/sci-libs/caffe2/files/caffe2-2.1.1-gentoo.patch +++ /dev/null @@ -1,188 +0,0 @@ ---- a/cmake/Dependencies.cmake -+++ b/cmake/Dependencies.cmake -@@ -487,7 +487,7 @@ endif() - list(APPEND Caffe2_DEPENDENCY_LIBS cpuinfo) - - # ---[ QNNPACK --if(USE_QNNPACK) -+if(FALSE) - set(CAFFE2_THIRD_PARTY_ROOT "${PROJECT_SOURCE_DIR}/third_party") - - if(NOT DEFINED QNNPACK_SOURCE_DIR) -@@ -543,7 +543,7 @@ if(USE_QNNPACK) - endif() - - # ---[ Caffe2 Int8 operators (enabled by USE_QNNPACK) depend on gemmlowp and neon2sse headers --if(USE_QNNPACK) -+if(FALSE) - set(CAFFE2_THIRD_PARTY_ROOT "${PROJECT_SOURCE_DIR}/third_party") - include_directories(SYSTEM "${CAFFE2_THIRD_PARTY_ROOT}/gemmlowp") - include_directories(SYSTEM "${CAFFE2_THIRD_PARTY_ROOT}/neon2sse") -@@ -803,7 +803,7 @@ - endif() - - # ---[ FBGEMM --if(USE_FBGEMM) -+if(FALSE) - set(CAFFE2_THIRD_PARTY_ROOT "${PROJECT_SOURCE_DIR}/third_party") - if(NOT DEFINED FBGEMM_SOURCE_DIR) - set(FBGEMM_SOURCE_DIR "${CAFFE2_THIRD_PARTY_ROOT}/fbgemm" CACHE STRING "FBGEMM source directory") -@@ -848,6 +848,7 @@ - endif() - - if(USE_FBGEMM) -+ list(APPEND Caffe2_DEPENDENCY_LIBS fbgemm) - caffe2_update_option(USE_FBGEMM ON) - else() - caffe2_update_option(USE_FBGEMM OFF) -@@ -1552,7 +1553,6 @@ - set_target_properties(onnx_proto PROPERTIES CXX_STANDARD 17) - endif() - endif() -- add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../third_party/foxi EXCLUDE_FROM_ALL) - - add_definitions(-DONNX_NAMESPACE=${ONNX_NAMESPACE}) - if(NOT USE_SYSTEM_ONNX) -@@ -1831,7 +1831,6 @@ - # - 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) - - # Disable compiler feature checks for `fmt`. - # -@@ -1840,9 +1839,7 @@ - # CMAKE_CXX_FLAGS in ways that break feature checks. Since we already know - # `fmt` is compatible with a superset of the compilers that PyTorch is, it - # shouldn't be too bad to just disable the checks. --set_target_properties(fmt-header-only PROPERTIES INTERFACE_COMPILE_FEATURES "") - --list(APPEND Caffe2_DEPENDENCY_LIBS fmt::fmt-header-only) - set(BUILD_SHARED_LIBS ${TEMP_BUILD_SHARED_LIBS} CACHE BOOL "Build shared libs" FORCE) - - # ---[ Kineto ---- a/c10/CMakeLists.txt -+++ b/c10/CMakeLists.txt -@@ -87,7 +87,7 @@ - if(${USE_GLOG}) - target_link_libraries(c10 PUBLIC glog::glog) - endif() --target_link_libraries(c10 PRIVATE fmt::fmt-header-only) -+target_link_libraries(c10 PRIVATE fmt) - - find_package(Backtrace) - if(Backtrace_FOUND) ---- a/torch/CMakeLists.txt -+++ b/torch/CMakeLists.txt -@@ -63,15 +63,9 @@ - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/aten/src - ${CMAKE_BINARY_DIR}/caffe2/aten/src -- ${CMAKE_BINARY_DIR}/third_party -- ${CMAKE_BINARY_DIR}/third_party/onnx - -- ${TORCH_ROOT}/third_party/valgrind-headers - -- ${TORCH_ROOT}/third_party/gloo -- ${TORCH_ROOT}/third_party/onnx -- ${TORCH_ROOT}/third_party/flatbuffers/include -- ${TORCH_ROOT}/third_party/kineto/libkineto/include -+ /usr/include/kineto - - ${TORCH_SRC_DIR}/csrc - ${TORCH_SRC_DIR}/csrc/api/include -@@ -84,7 +78,6 @@ - python::python - pybind::pybind11 - shm -- fmt::fmt-header-only - ATEN_CPU_FILES_GEN_LIB) - - if(USE_ASAN AND TARGET Sanitizer::address) ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -812,12 +812,11 @@ - - # ---[ Build flags - if(NOT MSVC) -- string(APPEND CMAKE_CXX_FLAGS " -O2 -fPIC") -+ string(APPEND CMAKE_CXX_FLAGS " -fPIC") - # Eigen fails to build with some versions, so convert this to a warning - # Details at http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1459 - string(APPEND CMAKE_CXX_FLAGS " -Wall") - string(APPEND CMAKE_CXX_FLAGS " -Wextra") -- append_cxx_flag_if_supported("-Werror=return-type" CMAKE_CXX_FLAGS) - append_cxx_flag_if_supported("-Werror=non-virtual-dtor" CMAKE_CXX_FLAGS) - append_cxx_flag_if_supported("-Werror=braced-scalar-init" CMAKE_CXX_FLAGS) - append_cxx_flag_if_supported("-Werror=range-loop-construct" CMAKE_CXX_FLAGS) -@@ -917,8 +916,6 @@ - string(APPEND CMAKE_LINKER_FLAGS_DEBUG " -fno-omit-frame-pointer -O0") - append_cxx_flag_if_supported("-fno-math-errno" CMAKE_CXX_FLAGS) - append_cxx_flag_if_supported("-fno-trapping-math" CMAKE_CXX_FLAGS) -- append_cxx_flag_if_supported("-Werror=format" CMAKE_CXX_FLAGS) -- append_cxx_flag_if_supported("-Werror=cast-function-type" CMAKE_CXX_FLAGS) - else() - # skip unwanted includes from windows.h - add_compile_definitions(WIN32_LEAN_AND_MEAN) ---- a/cmake/public/utils.cmake -+++ b/cmake/public/utils.cmake -@@ -492,8 +492,6 @@ - endif() - - # Use -O2 for release builds (-O3 doesn't improve perf, and -Os results in perf regression) -- target_compile_options(${libname} PRIVATE -- $<$,$,$>>:-O2>) - - endfunction() - ---- a/cmake/Codegen.cmake -+++ b/cmake/Codegen.cmake -@@ -57,7 +57,7 @@ - if(MSVC) - set(OPT_FLAG "/fp:strict ") - else(MSVC) -- set(OPT_FLAG "-O3 ") -+ set(OPT_FLAG " ") - if("${CMAKE_BUILD_TYPE}" MATCHES "Debug") - set(OPT_FLAG " ") - endif() ---- a/caffe2/CMakeLists.txt -+++ b/caffe2/CMakeLists.txt -@@ -107,7 +107,7 @@ - # Note: the folders that are being commented out have not been properly - # addressed yet. - --if(NOT MSVC AND USE_XNNPACK) -+if(FALSE) - if(NOT TARGET fxdiv) - set(FXDIV_BUILD_TESTS OFF CACHE BOOL "") - set(FXDIV_BUILD_BENCHMARKS OFF CACHE BOOL "") -@@ -1023,7 +1025,6 @@ - endif() - - if(NOT MSVC AND USE_XNNPACK) -- TARGET_LINK_LIBRARIES(torch_cpu PRIVATE fxdiv) - endif() - - # ========================================================== -@@ -1143,8 +1146,7 @@ - target_include_directories(torch_cpu PRIVATE - ${TORCH_ROOT}/third_party/miniz-2.1.0) - --target_include_directories(torch_cpu PRIVATE -- ${TORCH_ROOT}/third_party/kineto/libkineto/include) -+target_include_directories(torch_cpu PRIVATE /usr/include/kineto) - - if(USE_KINETO) - target_include_directories(torch_cpu PRIVATE ---- a/cmake/External/nnpack.cmake -+++ b/cmake/External/nnpack.cmake -@@ -58,7 +58,7 @@ - set(PTHREADPOOL_SOURCE_DIR "${CAFFE2_THIRD_PARTY_ROOT}/pthreadpool" CACHE STRING "pthreadpool source directory") - set(GOOGLETEST_SOURCE_DIR "${CAFFE2_THIRD_PARTY_ROOT}/googletest" CACHE STRING "Google Test source directory") - -- if(NOT TARGET nnpack) -+ if(FALSE) - if(NOT USE_SYSTEM_PTHREADPOOL AND USE_INTERNAL_PTHREADPOOL_IMPL) - set(NNPACK_CUSTOM_THREADPOOL ON CACHE BOOL "") - endif() diff --git a/sci-libs/caffe2/metadata.xml b/sci-libs/caffe2/metadata.xml index 43aee37ffc47..e99253402e7a 100644 --- a/sci-libs/caffe2/metadata.xml +++ b/sci-libs/caffe2/metadata.xml @@ -20,7 +20,6 @@ Use OpenMP for parallel code Use QNNPACK Enable ROCm gpu computing support - Use tensorpipe Use XNNPACK -- cgit v1.2.3