mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-10 06:57:08 -08:00
sci-ml/*: moving caffe2 from python-single-r1 to python-r1
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
ROCM_VERSION=6.1
|
||||
inherit python-single-r1 cmake cuda flag-o-matic prefix rocm toolchain-funcs
|
||||
inherit python-r1 cmake cuda flag-o-matic prefix rocm toolchain-funcs
|
||||
|
||||
MYPN=pytorch
|
||||
MYP=${MYPN}-${PV}
|
||||
@@ -100,19 +100,17 @@ RDEPEND="
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
dev-libs/clog
|
||||
cuda? ( <=dev-libs/cutlass-3.4.1 )
|
||||
onednn? ( sci-ml/ideep )
|
||||
dev-libs/psimd
|
||||
sci-ml/FP16
|
||||
dev-libs/FXdiv
|
||||
dev-libs/pocketfft
|
||||
dev-libs/flatbuffers
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
dev-python/pybind11[${PYTHON_USEDEP}]
|
||||
dev-python/typing-extensions[${PYTHON_USEDEP}]
|
||||
sci-ml/FP16
|
||||
sci-ml/kineto
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
dev-python/pybind11[${PYTHON_USEDEP}]
|
||||
dev-python/typing-extensions[${PYTHON_USEDEP}]
|
||||
')
|
||||
cuda? ( <=dev-libs/cutlass-3.4.1 )
|
||||
onednn? ( sci-ml/ideep )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
@@ -277,15 +275,24 @@ src_configure() {
|
||||
)
|
||||
fi
|
||||
|
||||
python_setup
|
||||
cmake_src_configure
|
||||
|
||||
# do not rerun cmake and the build process in src_install
|
||||
sed '/RERUN/,+1d' -i "${BUILD_DIR}"/build.ninja || die
|
||||
}
|
||||
|
||||
python_install() {
|
||||
python_domodule python/caffe2
|
||||
python_domodule python/torch
|
||||
ln -s ../../../../../include/torch \
|
||||
"${D}$(python_get_sitedir)"/torch/include/torch || die # bug 923269
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
|
||||
# Used by pytorch ebuild
|
||||
insinto "/var/lib/${PN}"
|
||||
doins "${BUILD_DIR}"/CMakeCache.txt
|
||||
|
||||
@@ -293,8 +300,5 @@ src_install() {
|
||||
mkdir -p python/torch/include || die
|
||||
mv "${ED}"/usr/lib/python*/site-packages/caffe2 python/ || die
|
||||
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
|
||||
python_foreach_impl python_install
|
||||
}
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
ROCM_VERSION=6.1
|
||||
inherit python-single-r1 cmake cuda flag-o-matic prefix rocm toolchain-funcs
|
||||
inherit python-r1 cmake cuda flag-o-matic prefix rocm toolchain-funcs
|
||||
|
||||
MYPN=pytorch
|
||||
MYP=${MYPN}-${PV}
|
||||
@@ -46,9 +46,9 @@ RDEPEND="
|
||||
dev-libs/protobuf:=
|
||||
dev-libs/pthreadpool
|
||||
dev-libs/sleef
|
||||
virtual/lapack
|
||||
sci-ml/onnx
|
||||
sci-ml/foxi
|
||||
virtual/lapack
|
||||
cuda? (
|
||||
dev-libs/cudnn
|
||||
>=dev-libs/cudnn-frontend-1.0.3:0/8
|
||||
@@ -98,20 +98,18 @@ RDEPEND="
|
||||
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
qnnpack? ( dev-libs/clog )
|
||||
cuda? ( <=dev-libs/cutlass-3.4.1 )
|
||||
onednn? ( sci-ml/ideep )
|
||||
dev-libs/psimd
|
||||
sci-ml/FP16
|
||||
dev-libs/flatbuffers
|
||||
dev-libs/FXdiv
|
||||
dev-libs/pocketfft
|
||||
dev-libs/flatbuffers
|
||||
dev-libs/psimd
|
||||
dev-python/pybind11[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
dev-python/typing-extensions[${PYTHON_USEDEP}]
|
||||
sci-ml/FP16
|
||||
sci-ml/kineto
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
dev-python/pybind11[${PYTHON_USEDEP}]
|
||||
dev-python/typing-extensions[${PYTHON_USEDEP}]
|
||||
')
|
||||
cuda? ( <=dev-libs/cutlass-3.4.1 )
|
||||
onednn? ( sci-ml/ideep )
|
||||
qnnpack? ( dev-libs/clog )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
@@ -294,6 +292,7 @@ src_configure() {
|
||||
)
|
||||
fi
|
||||
|
||||
python_setup
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
@@ -303,6 +302,19 @@ src_compile() {
|
||||
cmake_src_compile
|
||||
}
|
||||
|
||||
python_install() {
|
||||
python_domodule python/torch
|
||||
mkdir "${D}"$(python_get_sitedir)/torch/bin || die
|
||||
mkdir "${D}"$(python_get_sitedir)/torch/lib || die
|
||||
mkdir "${D}"$(python_get_sitedir)/torch/include || die
|
||||
ln -s ../../../../../include/torch \
|
||||
"${D}$(python_get_sitedir)"/torch/include/torch || die # bug 923269
|
||||
ln -s ../../../../../bin/torch_shm_manager \
|
||||
"${D}"/$(python_get_sitedir)/torch/bin/torch_shm_manager || die
|
||||
ln -s ../../../../../$(get_libdir)/libtorch_global_deps.so \
|
||||
"${D}"/$(python_get_sitedir)/torch/lib/libtorch_global_deps.so || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
|
||||
@@ -314,18 +326,5 @@ src_install() {
|
||||
rm -rf python
|
||||
mkdir -p python/torch || die
|
||||
cp torch/version.py python/torch/ || die
|
||||
python_domodule python/torch
|
||||
|
||||
mkdir "${D}"$(python_get_sitedir)/torch/bin || die
|
||||
mkdir "${D}"$(python_get_sitedir)/torch/lib || die
|
||||
mkdir "${D}"$(python_get_sitedir)/torch/include || die
|
||||
|
||||
ln -s ../../../../../include/torch \
|
||||
"${D}$(python_get_sitedir)"/torch/include/torch || die # bug 923269
|
||||
|
||||
mv "${ED}"/usr/bin/torch_shm_manager \
|
||||
"${D}"/$(python_get_sitedir)/torch/bin/ || die
|
||||
|
||||
mv "${ED}"/usr/$(get_libdir)/libtorch_global_deps.so \
|
||||
"${D}"/$(python_get_sitedir)/torch/lib/ || die
|
||||
python_foreach_impl python_install
|
||||
}
|
||||
@@ -5,7 +5,7 @@ EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
ROCM_VERSION=6.1
|
||||
inherit python-single-r1 cmake cuda flag-o-matic prefix rocm toolchain-funcs
|
||||
inherit python-r1 cmake cuda flag-o-matic prefix rocm toolchain-funcs
|
||||
|
||||
MYPN=pytorch
|
||||
MYP=${MYPN}-${PV}
|
||||
@@ -47,8 +47,8 @@ RDEPEND="
|
||||
dev-libs/pthreadpool
|
||||
dev-libs/sleef
|
||||
virtual/lapack
|
||||
sci-ml/onnx
|
||||
sci-ml/foxi
|
||||
sci-ml/onnx
|
||||
cuda? (
|
||||
dev-libs/cudnn
|
||||
>=dev-libs/cudnn-frontend-1.0.3:0/8
|
||||
@@ -98,20 +98,18 @@ RDEPEND="
|
||||
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
qnnpack? ( dev-libs/clog )
|
||||
cuda? ( <=dev-libs/cutlass-3.4.1 )
|
||||
onednn? ( sci-ml/ideep )
|
||||
dev-libs/psimd
|
||||
sci-ml/FP16
|
||||
dev-libs/flatbuffers
|
||||
dev-libs/FXdiv
|
||||
dev-libs/pocketfft
|
||||
dev-libs/flatbuffers
|
||||
dev-libs/psimd
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
dev-python/pybind11[${PYTHON_USEDEP}]
|
||||
dev-python/typing-extensions[${PYTHON_USEDEP}]
|
||||
sci-ml/FP16
|
||||
sci-ml/kineto
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
dev-python/pybind11[${PYTHON_USEDEP}]
|
||||
dev-python/typing-extensions[${PYTHON_USEDEP}]
|
||||
')
|
||||
cuda? ( <=dev-libs/cutlass-3.4.1 )
|
||||
onednn? ( sci-ml/ideep )
|
||||
qnnpack? ( dev-libs/clog )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
@@ -294,6 +292,7 @@ src_configure() {
|
||||
)
|
||||
fi
|
||||
|
||||
python_setup
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
@@ -303,6 +302,19 @@ src_compile() {
|
||||
cmake_src_compile
|
||||
}
|
||||
|
||||
python_install() {
|
||||
python_domodule python/torch
|
||||
mkdir "${D}"$(python_get_sitedir)/torch/bin || die
|
||||
mkdir "${D}"$(python_get_sitedir)/torch/lib || die
|
||||
mkdir "${D}"$(python_get_sitedir)/torch/include || die
|
||||
ln -s ../../../../../include/torch \
|
||||
"${D}$(python_get_sitedir)"/torch/include/torch || die # bug 923269
|
||||
ln -s ../../../../../bin/torch_shm_manager \
|
||||
"${D}"/$(python_get_sitedir)/torch/bin/torch_shm_manager || die
|
||||
ln -s ../../../../../$(get_libdir)/libtorch_global_deps.so \
|
||||
"${D}"/$(python_get_sitedir)/torch/lib/libtorch_global_deps.so || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
|
||||
@@ -314,18 +326,5 @@ src_install() {
|
||||
rm -rf python
|
||||
mkdir -p python/torch || die
|
||||
cp torch/version.py python/torch/ || die
|
||||
python_domodule python/torch
|
||||
|
||||
mkdir "${D}"$(python_get_sitedir)/torch/bin || die
|
||||
mkdir "${D}"$(python_get_sitedir)/torch/lib || die
|
||||
mkdir "${D}"$(python_get_sitedir)/torch/include || die
|
||||
|
||||
ln -s ../../../../../include/torch \
|
||||
"${D}$(python_get_sitedir)"/torch/include/torch || die # bug 923269
|
||||
|
||||
mv "${ED}"/usr/bin/torch_shm_manager \
|
||||
"${D}"/$(python_get_sitedir)/torch/bin/ || die
|
||||
|
||||
mv "${ED}"/usr/$(get_libdir)/libtorch_global_deps.so \
|
||||
"${D}"/$(python_get_sitedir)/torch/lib/ || die
|
||||
python_foreach_impl python_install
|
||||
}
|
||||
+1
-1
@@ -22,7 +22,6 @@ IUSE="test"
|
||||
RDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
sci-ml/pytorch[${PYTHON_SINGLE_USEDEP}]
|
||||
sci-ml/caffe2[${PYTHON_SINGLE_USEDEP},numpy]
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/aiohttp[${PYTHON_USEDEP}]
|
||||
dev-python/dill[${PYTHON_USEDEP}]
|
||||
@@ -37,6 +36,7 @@ RDEPEND="
|
||||
dev-python/requests[${PYTHON_USEDEP}]
|
||||
dev-python/tqdm[${PYTHON_USEDEP}]
|
||||
dev-python/xxhash[${PYTHON_USEDEP}]
|
||||
sci-ml/caffe2[${PYTHON_USEDEP},numpy]
|
||||
sci-ml/huggingface_hub[${PYTHON_USEDEP}]
|
||||
')
|
||||
"
|
||||
@@ -22,10 +22,10 @@ RESTRICT="test"
|
||||
REQUIRED_USE=${PYTHON_REQUIRED_USE}
|
||||
RDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
~sci-ml/caffe2-${PV}[${PYTHON_SINGLE_USEDEP}]
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/typing-extensions[${PYTHON_USEDEP}]
|
||||
dev-python/sympy[${PYTHON_USEDEP}]
|
||||
dev-python/typing-extensions[${PYTHON_USEDEP}]
|
||||
~sci-ml/caffe2-2.4.1[${PYTHON_USEDEP}]
|
||||
')
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
@@ -22,11 +22,11 @@ RESTRICT="test"
|
||||
REQUIRED_USE=${PYTHON_REQUIRED_USE}
|
||||
RDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
~sci-ml/caffe2-${PV}[${PYTHON_SINGLE_USEDEP}]
|
||||
>=sci-ml/caffe2-2.5.1-r5
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/typing-extensions[${PYTHON_USEDEP}]
|
||||
dev-python/sympy[${PYTHON_USEDEP}]
|
||||
dev-python/typing-extensions[${PYTHON_USEDEP}]
|
||||
~sci-ml/caffe2-2.5.1[${PYTHON_USEDEP}]
|
||||
')
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
@@ -22,10 +22,10 @@ RESTRICT="test"
|
||||
REQUIRED_USE=${PYTHON_REQUIRED_USE}
|
||||
RDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
~sci-ml/caffe2-${PV}[${PYTHON_SINGLE_USEDEP}]
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/typing-extensions[${PYTHON_USEDEP}]
|
||||
dev-python/sympy[${PYTHON_USEDEP}]
|
||||
dev-python/typing-extensions[${PYTHON_USEDEP}]
|
||||
~sci-ml/caffe2-2.6.0[${PYTHON_USEDEP}]
|
||||
')
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
+3
-1
@@ -34,10 +34,12 @@ RDEPEND="
|
||||
dev-python/tqdm[${PYTHON_USEDEP}]
|
||||
>=sci-ml/huggingface_hub-0.26[${PYTHON_USEDEP}]
|
||||
>=sci-ml/safetensors-0.4.1[${PYTHON_USEDEP}]
|
||||
torch? (
|
||||
sci-ml/caffe2[${PYTHON_USEDEP}]
|
||||
)
|
||||
')
|
||||
torch? (
|
||||
sci-ml/pytorch[${PYTHON_SINGLE_USEDEP}]
|
||||
sci-ml/caffe2[${PYTHON_SINGLE_USEDEP}]
|
||||
sci-ml/accelerate[${PYTHON_SINGLE_USEDEP}]
|
||||
)
|
||||
"
|
||||
Reference in New Issue
Block a user