# Copyright 2022-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 PYTHON_COMPAT=( python3_{9..11} ) inherit python-single-r1 cmake cuda flag-o-matic 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" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64" IUSE="cuda distributed ffmpeg mpi nnpack +numpy opencl opencv openmp qnnpack tensorpipe xnnpack" RESTRICT="test" REQUIRED_USE=" ${PYTHON_REQUIRED_USE} ffmpeg? ( opencv ) mpi? ( distributed ) tensorpipe? ( distributed ) " # ?? ( cuda rocm ) # 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 sci-libs/lapack >=sci-libs/onnx-1.12.0 sci-libs/foxi cuda? ( =dev-libs/cudnn-8* dev-libs/cudnn-frontend:0/8