sci-libs/pytorch: fix python build with >=setuptools-59.6#1130
sci-libs/pytorch: fix python build with >=setuptools-59.6#1130littlewu2508 wants to merge 1 commit intogentoo:masterfrom
Conversation
Backport an upstream PR: pytorch/pytorch#69904 Bug: gentoo#1123 (comment) Package-Manager: Portage-3.0.22, Repoman-3.0.3 Signed-off-by: Yiyang Wu <[email protected]>
|
Thanks 👍 |
|
There is still something strange happening here: It appears we aren't properly compiling pytorch for every enable python target, only the version for the highest python target is installed and works. We either need to fix this or set |
|
Exactly, I will try to come up with a solution. It's a bit tricky because src_compile is using cmake.eclass so the compilation runs only once. Complete recompile for every python target is also a bad idea because that means tons of redundant work. |
Replacing: with e.g.: (and equivalent for the other phases) should to the trick. (The default distutils-r1 |
|
@AndrewAmmerlaan Thanks for changing pytorch to single python target. I've investigated the possibility of compiling multiple python target bindings without recompile python-independent parts like libtorch. It seems too complicated. The CMakeLists.txt in pytorch and caffe2 are not intended to configure multiple targets, so there would be too much hack to achieve multi-target support. Just single python implementation is enough since no one has wanted multi-target pytorch yet. |
|
littlewu2508 ***@***.***> writes:
@AndrewAmmerlaan Thanks for changing pytorch to single python
target. I've investigated the possibility of compiling multiple python
target bindings without recompile python-independent parts like
libtorch. It seems too complicated. The CMakeLists.txt in pytorch and
caffe2 are not intended to configure multiple targets, so there would
be too much hack to achieve multi-target support. Just single python
implementation is enough since no one has wanted multi-target pytorch
yet.
I am fine with a single python target for now.
|
Backport an upstream PR: pytorch/pytorch#69904
Bug: #1123 (comment)
Package-Manager: Portage-3.0.22, Repoman-3.0.3
Signed-off-by: Yiyang Wu [email protected]