sci-libs/pytorch: fix ahead of Gentoo Science
Bug: https://bugs.gentoo.org/738592 Package-Manager: Portage-3.0.2, Repoman-2.3.23 Signed-off-by: Horea Christian <chr@chymera.eu>
This commit is contained in:
parent
9c3560e52f
commit
61db1849ca
18
sci-libs/pytorch/ChangeLog
Normal file
18
sci-libs/pytorch/ChangeLog
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
*pytorch-1.4.0_p0 (23 Aug 2020)
|
||||||
|
*pytorch-1.6.0 (23 Aug 2020)
|
||||||
|
|
||||||
|
23 Aug 2020; <chymera@gentoo.org>
|
||||||
|
+files/0002-Don-t-build-libtorch-again-for-PyTorch-1.4.0.patch,
|
||||||
|
+files/0003-Change-path-to-caffe2-build-dir-made-by-libtorch.patch,
|
||||||
|
+files/0004-Don-t-fill-rpath-of-Caffe2-library-for-system-wide-i.patch,
|
||||||
|
+files/0005-Change-library-directory-according-to-CMake-build.patch,
|
||||||
|
+files/0010-Remove-conversion-ambiguity-in-ternary-operators.patch,
|
||||||
|
+files/pytorch-1.2.0-setup.patch, +files/pytorch-1.4.0-nccl-nvccflags.patch,
|
||||||
|
+files/pytorch-1.4.0-skip-tests.patch, +files/pytorch-1.4.0-sleef.patch,
|
||||||
|
+files/pytorch-1.6.0-global-dlopen.patch,
|
||||||
|
+files/pytorch-1.6.0-nccl-nvccflags.patch, +files/pytorch-1.6.0-setup.patch,
|
||||||
|
+files/pytorch-1.6.0-skip-tests.patch,
|
||||||
|
+files/pytorch-1.6.0-tensorpipe-unbundle-libuv.patch, +metadata.xml,
|
||||||
|
+pytorch-1.4.0_p0.ebuild, +pytorch-1.6.0.ebuild:
|
||||||
|
sci-libs/pytorch: fix ahead of Gentoo Science Bug:
|
||||||
|
https://bugs.gentoo.org/738592
|
47
sci-libs/pytorch/Manifest
Normal file
47
sci-libs/pytorch/Manifest
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
DIST FP16-4dfe081cf.tar.gz 71301 SHA256 90f20492621d5ed80b442aa682ff92d7ccf333ac8fac4a10e7e02afb159f3c13 SHA512 e79a1f6f8d4aeca85982158d5b070923d31d4f2062ed84cfa6f26c47a34f2e8ac49e0f330b7d49f5732d5e1eec6e7afccdac43645070060fb7827e2ce261dd3e WHIRLPOOL 23f13ff27577ff6b018de1d1ded973f6359995d88df577bc04738094d146f5a7938d2dc1c5a6e721afa31eb32043b7f5fe0be2dd5647c5b044863205ed72ef27
|
||||||
|
DIST FP16-febbb1c1.tar.gz 71108 SHA256 3e71681e0a67cd28552aa0bbb78ec6a6bd238216df15336dc1326280f7958de2 SHA512 9360d9543c05581124e7bb1b40dca07246512a03faf0c06d1d5b7c73c52db3c97819ebc2f6b1c8be3668ace4dfb1fb1f0904bced6998710f3b2118b7416c041a WHIRLPOOL 5a25546f7b47b8d43be76c792803a17973bf409c3d84aa23257f519f62a74e649e22b764d0b73227a346f1ad00ff5bd63a5618e250fe984e535d1f6acb8227f7
|
||||||
|
DIST FXdiv-b408327ac.tar.gz 9652 SHA256 9ccf554541666b5c089ad5dd465141d671c99971f36d72f313652f5c49ffce14 SHA512 d46d7c1437eccf8dc5ab5e51b0641d190839451ab059c8a24a220a9cf05a84a66b5d08c3ff730622efe491152a8378a2c726fd9abad19a3df98db40d6a13e4b9 WHIRLPOOL 15729d050a2a1f7e001656f8ad2de3d0498baed882aa459baeeede5df4e2ab54f09d3dda6d0c25b5ab106749498c2b8935b943ca30096f166e087db3b83a60ef
|
||||||
|
DIST FXdiv-b742d114.tar.gz 8567 SHA256 07625551202a1f35fe5e826669ad495962b26f6a139290e90b321c5996f002ef SHA512 cd363408055c16f8fe39a1c49abd5aba8eedf193e9d4d7964e39ef260a53ba6bd5708a5ba6bbc77130f324c14df57fcc9adf88df7b8a21574bbb4f968895753f WHIRLPOOL e7985f132a549e5a3e47b28d01b63b5b0b9d3f883f3037eb909259cf0531f6e63559f0e03b1d78226820be882eed8da6fe0d988540fbac3cd49a6a7efdf08db5
|
||||||
|
DIST NNPACK-24b55303f.tar.gz 219131 SHA256 1f11dbbfad78d0a4c39fe94e52a28c0821cb25f9880420bb304f6302f73fe002 SHA512 43d6c69f19f9604809a2cc9cd9f8f027ff1f3dc2bac106429df1a0cf65f3f8b8fc3ec4c6b76a29decf3584440ad4c83f800ae2f8bfdc9b73df903a076cd97a18 WHIRLPOOL 78ba471626bc52f8891f577f5984c300c8165643f344f81f17c365cd0955fc93f632f306fb5736c98c8ca707bb8a117cbc44d1b69b4b0c0a89f7cb47107e0921
|
||||||
|
DIST NNPACK-c039579a.tar.gz 219136 SHA256 2c276e6cc9e3fb7a79bc337662aba738a638975381bac6d393254ec288d6269e SHA512 cc5ad260433182b341615f267c2ae07753ffc6e243b6a9f182099daf9111b2863aa01c40f4866ea4d614d3d7b0330a407240a7d7057279c6abbbf3dfbc3cc090 WHIRLPOOL e9bc614bb98e9a4df3b53696229dcf6a9cf14ef51ea51e9ec4c63f540e73b2663d8b791a8b968eae839f6ea425b1933d45cc537fa8d257219f5d00257196962f
|
||||||
|
DIST PeachPy-07d8fde8.tar.gz 401648 SHA256 13100c3deed300bbf16f87d8af3539f432462bfef9d38f0c7e3e387dc2e88676 SHA512 8d6cc91c8c4d56b86ef93f0acd6768a1830ecd078524b21d1a3b9ecb015f06607070148de3e634d9c5ce63ed523a8e34aa388d490e7eee061200098f39126afa WHIRLPOOL 1bb2e2793997268570e48440120a436b83680792ae02a4b42f29ab486accabba3c0898586e27eba4b23b7f05ca6f5115d2d368bead2bc87241e08d60beb36a38
|
||||||
|
DIST PeachPy-07d8fde8a.tar.gz 401648 SHA256 13100c3deed300bbf16f87d8af3539f432462bfef9d38f0c7e3e387dc2e88676 SHA512 8d6cc91c8c4d56b86ef93f0acd6768a1830ecd078524b21d1a3b9ecb015f06607070148de3e634d9c5ce63ed523a8e34aa388d490e7eee061200098f39126afa WHIRLPOOL 1bb2e2793997268570e48440120a436b83680792ae02a4b42f29ab486accabba3c0898586e27eba4b23b7f05ca6f5115d2d368bead2bc87241e08d60beb36a38
|
||||||
|
DIST QNNPACK-7d2a4e99.tar.gz 205600 SHA256 0d752bd75f46ce4d7c6f0a60b0d6c0e5918a7b4683c825284f8db3706dd24f76 SHA512 437a835acfedae851a9a8572fa6eea9854dcb8bcca499bc4a2582314e44f5f199778e857932da4aecf943bea7cb2eb5b1c41d4b4ca6075bddbe0f18b2c7b9127 WHIRLPOOL 33c2286abd57d0282e19613f685d131201658af7bb8f84e8822f168311596e7ece7499772c420dbe989e37038eb0f92e09ea577a57c3980564470d0d3f008992
|
||||||
|
DIST QNNPACK-7d2a4e993.tar.gz 205600 SHA256 0d752bd75f46ce4d7c6f0a60b0d6c0e5918a7b4683c825284f8db3706dd24f76 SHA512 437a835acfedae851a9a8572fa6eea9854dcb8bcca499bc4a2582314e44f5f199778e857932da4aecf943bea7cb2eb5b1c41d4b4ca6075bddbe0f18b2c7b9127 WHIRLPOOL 33c2286abd57d0282e19613f685d131201658af7bb8f84e8822f168311596e7ece7499772c420dbe989e37038eb0f92e09ea577a57c3980564470d0d3f008992
|
||||||
|
DIST XNNPACK-1b354636b.tar.gz 1353346 SHA256 b55a6ef3a0b4c0d3c39ad5578eb4fa9a7b2d7ee1ef06592b8a808a59a8e6589b SHA512 9e7528334a8e3df18a54fce44a122fb6d989a946bb456b01f81772f160bd6532fad460e787c976bbdd76ebaa78cd1c64329ffeb498c5d27e1cd53195bb8a9db4 WHIRLPOOL 8309ea61c85409cd34a7949cf4e3c1621b118115830aaa45360bf051d764fffaf474529cf8d64241471b5002523e73282190fb82c1221d79088960197b912e2b
|
||||||
|
DIST asmjit-17556b2d.tar.gz 527758 SHA256 618e53579b87580b517ee877a3455464219ab56bfdfa2424c1e2cef1092d1e23 SHA512 4513e766d55e22998c2fbee3c22eb0501e37faeb5136d76ea59727f651d0ccd8870e57f224bab1223543a4e11d2ddb31221dfb6cfe99c8e8ed7049f2cd39633b WHIRLPOOL f565b4c1f8deb46d4943867ce444fbcf8a521ff6270a897ff264e7da29c1cbbc75b6eec05b9ab4c20bd6704d6ea45893b2dc47d0973f7d6d067f4ed769794243
|
||||||
|
DIST asmjit-9057aa30.tar.gz 534633 SHA256 5c7ecb03ede09a38fa9bcf2527a0f1454cd67a34c0e6fd939ae4d93b276ce982 SHA512 678e5ce4a8d96961be4c10aac67d43aa8949ff022dce855a92cf6d626738be8667668c48953d43b6ef21ad7c5f913d07f7f692ad719870700aa97deb80662baf WHIRLPOOL ff42236d3eadfb3f723619fb01b91c473f7d957ff2cef3ba132c3a990bae7abc7ff19fe72a8c69f5c50708f6874894a8de2eecdb4389d0c5e47084c5515f1f35
|
||||||
|
DIST benchmark-505be96a.tar.gz 129647 SHA256 0de43b6eaddd356f1d6cd164f73f37faf2f6c96fd684e1f7ea543ce49c1d144e SHA512 2ec79b66c31d4741b214c04f7865cf0139b4c0b14a8fb2a70bf332cf90e73821282b510719689bc2fe59542ee51c87e9f9b49a47b6a67cad897f7f906f0b05e9 WHIRLPOOL 97b3526890572e30fa46c64ba53f15ab082e1587f5398942866263addf90137be2bb23b2f451a9269dceb2dd586635c00e1cb99054d7bb866a85644ee58279e3
|
||||||
|
DIST benchmark-505be96ab.tar.gz 129647 SHA256 0de43b6eaddd356f1d6cd164f73f37faf2f6c96fd684e1f7ea543ce49c1d144e SHA512 2ec79b66c31d4741b214c04f7865cf0139b4c0b14a8fb2a70bf332cf90e73821282b510719689bc2fe59542ee51c87e9f9b49a47b6a67cad897f7f906f0b05e9 WHIRLPOOL 97b3526890572e30fa46c64ba53f15ab082e1587f5398942866263addf90137be2bb23b2f451a9269dceb2dd586635c00e1cb99054d7bb866a85644ee58279e3
|
||||||
|
DIST cpuinfo-63b254577.tar.gz 3495405 SHA256 18a99130ced1eaacab2ba8f75a1435f9955aab54fa0436b60468f020876ee902 SHA512 44f4a55eea9c0d707818dedfec26f007c2bc2271c7bf9375e6e30171384fb0fa2e1d5731cb946570c717e6d88e6b1496d498e6e55dbf37d66174a4c675a3a006 WHIRLPOOL 830272f0aef50a909ccbbdc67b776dca63e4e34a69648d105d71268ac934c60c11b58e90bf826cf8e11f5cb9ce59d002026fa984ae5dedc78ee5d042dcb92f1e
|
||||||
|
DIST cpuinfo-89fe1695.tar.gz 3488961 SHA256 b84c49b4bdc12b0e8f1bff365dcefd50e5a2a25eeef8c928aeb2dab9fda4d599 SHA512 ffb3eb1555e95771964afca8e003f022308dec45ae7533aa92c9c3c183764611d9bfe53b9f1d81964c244a23ebdb6a41214e09cf1c1839c847a31a31f9fc877c WHIRLPOOL 33124d14872a721c53f5189daf9f0024c3bd70e3d15a179fa52f3bc5dcf8e123f12463ff480c395e95f7069310fb1b5f8204b2de83cd980520a3d922db58de50
|
||||||
|
DIST cub-285aeeba.tar.gz 384479 SHA256 7224b03af4acbc54525105bb42e3ecd75c66a3a5b47e8a725ab008467c4109f9 SHA512 0f05a4acc64b929a4cc8d71d7fed5e8780a77d19621caac322fb034343bbe5c84b6532acd2af3b8e273db6d565f69cb2348576ffeeb118f64cef08323902cb18 WHIRLPOOL b2cf400cc11a04733d2cdc63bf700e2333128fc69cd1d58edb4d834b83a2f06653e0db1b6eb623f93bf6630ca46804e5ceea6317c33fddea2dfcfa72e7856aba
|
||||||
|
DIST cub-d106ddb99.tar.gz 398104 SHA256 d87f6737be1b544c299340b64b9303c1d6ec0447b49b3aaf6642838b4f8280d7 SHA512 8d65c0407448125378495190ee2a2c0e3b27a3577efbd6bb5aa8ad76f5bf2bf17becdc6ef931672a4d16b033fd7c0a199bb60e62b0b2b311e5f59c4136f55835 WHIRLPOOL cad505b7cfa7950269e5447e7a5efcb66f3e4e58bed98ca7abfe7d2e1c99acc4ba26aa7b335d934d7a04a1414f4a9d6ab49d1ab44bd272a1e7ad0bf675ceedc2
|
||||||
|
DIST fbgemm-82d259da.tar.gz 159707 SHA256 c69b9c0f056c351be12cfd4a9bdeffcb822afdbaf75d00037f9df9494a07535f SHA512 7c90269aca2f421707808533af82b9702eabfa92b13dfd5c757bd8ba207d76f97f9e8f72495f0f002ea6b88bc4cb32bb11e3f726f361fef41e206d18d36dac80 WHIRLPOOL 5cc9b45dc074b43879f68ee71e40ece51b14ccf36d0244650fba7df5547428bcb2c963f7bdb81bfa0cc6a984cd5a34ab9f36ef7afde3897d649967c42fc135f8
|
||||||
|
DIST fbgemm-87c378172.tar.gz 244850 SHA256 168b35e7726f48f3b26cf4a55c82909811983eef864f68121a181f36b74fefd8 SHA512 42e678560dc774694ed6e2eb7d62a0284532be9c206aa1e056810e00bb7c06d557541e0ce56446735e163d480b504854e45cce9d7f23368974c500ecfe6e9961 WHIRLPOOL 0a65a48ad98a2c1a983617823a27e0320f781fffda48ba6e5fa0e0b149c150caea132407d68ae89971c0b730c3d79797b958b8a371433d06585ce10c0bccdd65
|
||||||
|
DIST fmt-9bdd1596c.tar.gz 733867 SHA256 92b1ba081c55aca384d975bb2069e0ecc5f71a35f894a2047d9783ef6800b41e SHA512 3639b4984a88fc5495c6cb1a0a09bb0a13f5dc05286f5a2b15e60dfda780bcc1fe213497006cc27247c3c358be27d8af4dd995db2b3de0f6a5a1288dc1058585 WHIRLPOOL f1830abd74df99e107dd073e00a8cb159189800621d70d570b2c265a26c28b4164a84c37335fa130bd35b838beb9c3e44581cef4ba50bb201b50732cf89ad063
|
||||||
|
DIST foxi-8015abb72.tar.gz 28571 SHA256 982100f4a514b0678e3161e39c3660dc7be3c83bdc1e39617066dc49712d50ac SHA512 94c8c25d90273941161e04bedee521d3f7bbb296c125083e1d3c1421210b18758917d95c95bbd213c8eb19ad36f4e088c943816505e7fc462aecf12e00ebd2f6 WHIRLPOOL 6a161f6bde33afed15c620f49392f7b3243ed6f549e521b6fd2949d33700ef8e616be700ceff1e5f7b8a8cf2b8dfcb54d215903d0f91d48576a7fed84c35d5db
|
||||||
|
DIST foxi-8f74bc4d.tar.gz 27632 SHA256 b444b4428adc4befc777d9a1af2fd9bbf5f5a2339913668357196c5133e9cc7b SHA512 ae8a6aa5ac8730043ae52cf378d87563cf93a9fe132baca573e38a315703f7823f311beacc2cd2145ed84109e06f31bed97e655693cc3dcab4f19f06c28b5cf8 WHIRLPOOL 6f5175db1770d40464ec6035352da620ae65c548e3f90dd57ac9ba48a9664fa532afba1a2e06cbd3aa2cc847f305e51e46069fdc37d2403f963517f4c5114aad
|
||||||
|
DIST gemmlowp-3fb5c176.tar.gz 826382 SHA256 fdd6f08bdb33d33f4df516ffb91730fdb163479c19502cfc983083fd9cf43bfa SHA512 1c97bba41931c7fddf0e7c01312892cfa3d87abe2a4cdaf4cd20d846a102c5ad3d85329ccdb386f7047f2f037e92639cbcf91b317c2bf38bee11c12e71584afc WHIRLPOOL d5c6ffdebe7e17a92074cc7a6dc483cab7465bac6dc428a34ccb57f0bf810f82dd4b6ef908735c7949aa8cc41a22ea22806528183f2197284c3462adf7859108
|
||||||
|
DIST gemmlowp-3fb5c176c.tar.gz 826382 SHA256 fdd6f08bdb33d33f4df516ffb91730fdb163479c19502cfc983083fd9cf43bfa SHA512 1c97bba41931c7fddf0e7c01312892cfa3d87abe2a4cdaf4cd20d846a102c5ad3d85329ccdb386f7047f2f037e92639cbcf91b317c2bf38bee11c12e71584afc WHIRLPOOL d5c6ffdebe7e17a92074cc7a6dc483cab7465bac6dc428a34ccb57f0bf810f82dd4b6ef908735c7949aa8cc41a22ea22806528183f2197284c3462adf7859108
|
||||||
|
DIST gloo-3d08580f9.tar.gz 227739 SHA256 3a5bf834a5891350ffff8d09b6066de7bd77d18e754f11cbbcb70f9f76a11c94 SHA512 3dee533b350862cabce410f054fd943b4524b60394da1e92b9c73830e143b9abd30e5a493fe0c064d6fee8c15bd09b12620f0b528122170df329548c57116bd1 WHIRLPOOL f7be2672ada1ee385ad592e1c7deabf038f66baadbc3c2823289a883f0bfdec582b3b40ed206ed03414eaf2d8e67b364bcca83bb0d0c5e177b7752e2272c28bb
|
||||||
|
DIST gloo-ca528e32.tar.gz 220673 SHA256 1354079f38459bc8f322d1f5808eb5c57059a473e77489e981fb5debeadf0ad0 SHA512 a915d9ad8fd4427a977d9dc5995dadc69dded22b420eec5164dd10f56a21d7e51d6fc5451573c63b571b305301fb477f6c6bbfda87b9e17888b4bf361b34ec59 WHIRLPOOL 4997dffdf2a905192f90cf088403a160727ad4585463ed7c0df78bf9c506226a66eb7d81731ba43d8a6052075e4e6b14cb1b6af95b980466d315fde3447796da
|
||||||
|
DIST googletest-2fe3bd99.tar.gz 993527 SHA256 d0d447b4feeedca837a0d46a289d4223089b32ac2f84545fa4982755cc8919be SHA512 130182d2c1067bcd263fb27999c164d240f5d06d837475e71e7cadbf65c7211de00154dc1e15deae0b6ec2963799e55c0c21ee971e1c588064c5063e69a2bf1e WHIRLPOOL e7f57f9e35927c4ce12aba61597c2a8b6cba38c30a0bbde6681d8ff349477c431b9e6128fa6b9040fee99622580e61c8daead2364b9e8fe65542003366d7e346
|
||||||
|
DIST googletest-2fe3bd994.tar.gz 993527 SHA256 d0d447b4feeedca837a0d46a289d4223089b32ac2f84545fa4982755cc8919be SHA512 130182d2c1067bcd263fb27999c164d240f5d06d837475e71e7cadbf65c7211de00154dc1e15deae0b6ec2963799e55c0c21ee971e1c588064c5063e69a2bf1e WHIRLPOOL e7f57f9e35927c4ce12aba61597c2a8b6cba38c30a0bbde6681d8ff349477c431b9e6128fa6b9040fee99622580e61c8daead2364b9e8fe65542003366d7e346
|
||||||
|
DIST ideep-78eafa5d.tar.gz 36475 SHA256 b8fb8b4871cc3da4bded01c476957a08f51949c20f834f39f90f9e10811d6dfe SHA512 0de47a89112cb0ff2f9dc380ef91cda6a3c1c7a9fcd10dc7e9621afe6b38132501931b2ac29fc4c5f2c064e7e1bf4802bda1ea6856e9fd046ff1e4d48ef727f1 WHIRLPOOL 2d845091f0ce15d9afc3bc366b11d7640bef11692659dfe7b2a5a8e6bfd66ea6f2fbf5ffb7580408332f8dc7e4a3f64d6cacf69ad031658ba18ba009955066c1
|
||||||
|
DIST ideep-938cc6889.tar.gz 27315 SHA256 ab37b266702557b819a598d1bf89946cba281a8d49224ce105280eb657d0c733 SHA512 24a3f0b35756e3892af99658f7de7d17dff369601ffa7d39a6e2c3609c9c667f341cc66b6664fb69c4d938a1f7b3454e7106b8e27ec9995be5ad2d541927e2e1 WHIRLPOOL ceda9e563d84a854813c46c75932703a1816810e12960231ba59d1c91abcec6ef852a427714170e851f099e97dcd886d57fe0273d688a7d3175544b45f6586fa
|
||||||
|
DIST nccl-5949d96f3.tar.gz 147548 SHA256 67e15ce3d12ba9ea1e0cb239599202b0f61c146149699341043c072de388e90a SHA512 d9ea83caf7940fb47134293236fcb7478c0d4e40365d3b0a29427758e2e2dbb980c5e8c05fc9fc3956ed5e21a82ec0efaa31d973fe9c73fa3f50465f76756131 WHIRLPOOL 47a1803f78a655a07bd315658c3d0ef29150226b97cad10ef770d321e29eaa5c3f17450aacc41965c754c582a00f64c456fd8fc213ef9806817284f8f2049196
|
||||||
|
DIST nccl-7c72dee6.tar.gz 109658 SHA256 ef8b624ef28e9e2d0e162065932dd2f25de8d6d1dc58df91bd36977e4bc0224c SHA512 69f8d197dc0d6ce17d7796410f3c65ea50f23c62a4ea128b3ce117c6a43be92c783c9cc7af9632f362d58c3dc43aa402b722b2280338f4094afa498261da67d6 WHIRLPOOL 2b1f42252bb1cd42988df825801c916478c1fce9c9e4ef0decc948f6003b9ec90780a0d5057634a469eb61c566d178f2b3bc46a40189bf6e2b94d4331b333491
|
||||||
|
DIST onnx-2891e145.tar.gz 2590111 SHA256 597a921893cdec36eac43adda33ffcd12de90bb94e4b0dbb8ba7371272177051 SHA512 7dee19018b9b2a71620cf961f4afcdc2c69a11b43cba4d62c69dbe398c2a6ee1059efc016dc6c5b58645524e196d6308ba1b2c8149acae905a197f84c10f00a4 WHIRLPOOL 7e711d05ac4a3845ea39f295c00ebcb8dcd1bc9e34c58091cc84e35835eb04688704a1da4a35e71b5c8f0ba89a7f58c718cc9bdba71df90408f03b698d11e4a0
|
||||||
|
DIST onnx-a82c6a701.tar.gz 4874549 SHA256 c3bf8cc8091b24c43aa205a1f2037a518d249eb5997bea7f543b7fc880e80e21 SHA512 1ead6644cd28198a428ebcd0f127343c6cbcfdbf39a0832c62ee5ee320a06c655448f508406637702e2da33057c92f76da12302b403ac339a5cad8ea4b5ebab2 WHIRLPOOL 6ba7407487da26dd1a1dfe8ec78afe3ab374c5591fbf327eb84134e3f2f0d5a81f249c4be6dc7605583be2a4edf426aec30501c81943c0676b66922f77e04e2e
|
||||||
|
DIST onnx-tensorrt-c15321141.tar.gz 72464 SHA256 314cde420a7cf692bdb6877bc6af6bc514805f6cdb8bee90f32566ed08d94b1c SHA512 9e814b5dfc3a65ddba229bbddada4c686afab233463329a02cea176b6b1994643f9835ce44a84a9ac1a49e12a7fe2325fd6cd9d2d99a422284089df0202a69a5 WHIRLPOOL 0580bb4037ebf5eea2b44c02728947a7e48a64da11182f6b3dd67180aa5cfd04085c45da76955ab5ed5573c173536e8c35bb9273fb34b2ccc9f91cc4fae41501
|
||||||
|
DIST onnx-tensorrt-cb3d8066.tar.gz 70233 SHA256 1a98c6fece7878c88b59ffe651b427c15b4929c801a09655cd14ca44553787c3 SHA512 4746a5988ec31994aae81324f345564ae2d733bbcbc9b4453a24cf52dda62117325269bcbf6e3e94ee1f09395313d45a7cfe6da34806df901a99740ea9b88f85 WHIRLPOOL 2c43ef44b4e4dea77971a12e228ce51281ecf80203f35ab4fb0a090cc2c5449a81e460b29ea88fe15d91932fedded653280c81df416523c079550a4e51c6ab28
|
||||||
|
DIST psimd-072586a71.tar.gz 6825 SHA256 f6c4dab91ae9a03b3019e7cab0572743afd0e1b6e75b97fcca50259c737c924e SHA512 a18faea093423dd9fe19ece8b228e011dccce0a2a22222f777ea19b023a13173966d4a8aea01147e8fc58de5d39cffcedeb2221a1572ae52bd5aba1295f86a94 WHIRLPOOL 03a64f0c4f16d7ea263e34e44558b17500e14d88cabfc5267874509279b779f614784ddbe96bb6f2763d5e8868b2afc11754efcd79f1b63275976539c7ee52bc
|
||||||
|
DIST psimd-90a938f3.tar.gz 6182 SHA256 afd27417c6df1c85f79a68361055dd3adc292174913c39c1f58b698b9cfd7926 SHA512 f1bbbde0d4e2cb15c9f10722d6d8701d7e4d58396e9981a6887f71977bbd367e181518e44002a3be624fe05473faf094002be94d89e017b43efd4e41892f8c18 WHIRLPOOL 775f0fabc825d8904a9028e4c9ab68c7b56dbdb5d93ad3f0705041e045bb0c6beeffd1eeb50d85b4652f96d00655a3b30faa5cb3dc4a4e0ed24e5f855a1b4efe
|
||||||
|
DIST pthreadpool-029c88620.tar.gz 45970 SHA256 d13818a10a645d557202aa005606337b2a0cdf690e5655253800ab11abb0c076 SHA512 b51099fa9d62065883cc43dcd5f9717a17be5ee2e87fc861667172a09acb3a62929c8bbc8a5c0c00885a638af0ec2ae4149adde2ba85bf3c80834f9b973c2d5b WHIRLPOOL 3b8304ee02e92ec7f298168e7857916f85fe9f30776668ed2a04c4cb52b97c638da025b125599fbf7d5041f60a913e4edf10f9cad40d20a3d7a7005301245cba
|
||||||
|
DIST pthreadpool-13da0b4c.tar.gz 12775 SHA256 90ab4f60ae0e99c0172dd5201dccc6de6c8f384a21b3d959588f4c1e00beec0f SHA512 1a1bdb96c993d785a2b65a190d86d44076aad8420e7e56c4553ad2786d196d41763a6edc9864bd1c456be8e56fc003f20b8e8e640760dd448310e61ef2d05e67 WHIRLPOOL ee7a0e86e63290d25f5695f9966c98ae841eb7bb0a1728022dd4323a05574d43ee5e08f92e2894ef60b99527d21181f86e5ebb15de8caba4520f60a246a51df3
|
||||||
|
DIST pytorch-1.4.0_p0.tar.gz 8715711 SHA256 49de553a27e98d99f2037f2de3435f547fbc433403b69f89ccb1c118ace18483 SHA512 1ad2b7570de95c2bccacc7993cef9b15af1c5f2c2acb8c5c98baea7d8f498377351ce6f495ed4ba160e5412611d1e89747260c19e3db1e45a91faf2ec1e520b3 WHIRLPOOL 4c2a039e381720166761758f37d3cca28790513df62ceba87f3dc8fd54d8b24bed94ecaa21feda41fa896cebd96533e6e818be1ab8a3324a8fc6bc6887c317d2
|
||||||
|
DIST pytorch-1.6.0.tar.gz 11376568 SHA256 7160e5bd291ad649d035f1c830dd064d1db42839b64b9a3502b5d47641233fb7 SHA512 117ff1588ed1ebd0df15fbed066c65ea026893fe9a40d14aa1f73d848fab114b1b11bd7ed083815030f7fdf13a824480521cb40865f48a24c7028f4d195f2127 WHIRLPOOL 03d9270b236502454c966f62426bc87d786b2ad180ec2f3d07c79c26184c91e3b52763c34638ce1e3d85c30a4b05b78813e693b714fef19939f478e9cfea85a2
|
||||||
|
DIST sleef-7f523de6.tar.gz 1174007 SHA256 8cb5fae822077ca9cbc14dcc7bba9a3a35ad519284fc5169f9a176672c63860a SHA512 d83b24c34e83b36314344d5b31f1c3b673e38b44bc2d2bbbfdaf2019c3f0e73a83f2d13c6d745ca99d1532c1a3e0fcb4a71bd212e423bec03d610af5dd49e3f3 WHIRLPOOL 66acba28240c40557de2db457ed2c8f2462dde9a0f7f18dd3179d9d2806741e3b68033c76fe3f710a7351039e2fe175dbe3ed4e413e26add5c7a4914538dc713
|
||||||
|
DIST sleef-7f523de65.tar.gz 1174007 SHA256 8cb5fae822077ca9cbc14dcc7bba9a3a35ad519284fc5169f9a176672c63860a SHA512 d83b24c34e83b36314344d5b31f1c3b673e38b44bc2d2bbbfdaf2019c3f0e73a83f2d13c6d745ca99d1532c1a3e0fcb4a71bd212e423bec03d610af5dd49e3f3 WHIRLPOOL 66acba28240c40557de2db457ed2c8f2462dde9a0f7f18dd3179d9d2806741e3b68033c76fe3f710a7351039e2fe175dbe3ed4e413e26add5c7a4914538dc713
|
||||||
|
DIST tensorpipe-3b8089c9c.tar.gz 141980 SHA256 9d78a64a4456eb0caeba8742080c39e07019114c1f4914f0e1ffa8f0a507c40f SHA512 1e9473532b11c23ec7dd9fdb148c0440263ae41f42a7826a4f7e098ed2a7e0c99d5e9df344b310e17098c3d70749a38d20d8af992c4820bebdbd5078d1a20dcc WHIRLPOOL ba9adb45000274968b1b3bd65b7926ad5d761f6bcecf0b0b75cbe4b1cf5148d153cc7d21be027b476b1952f40ab0001217b9bee37416a8108d9743e3e3216ba5
|
@ -0,0 +1,30 @@
|
|||||||
|
From e5003b88ad3a504eb04c0ba66c2f439149de2ee3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexey Chernov <4ernov@gmail.com>
|
||||||
|
Date: Tue, 5 Nov 2019 00:58:17 +0300
|
||||||
|
Subject: [PATCH 2/7] Don't build `libtorch` again for PyTorch
|
||||||
|
|
||||||
|
If starting with building of `libtorch` using CMake,
|
||||||
|
don't build it again for the sake of running `setup.py`
|
||||||
|
to build Python version (PyTorch).
|
||||||
|
---
|
||||||
|
setup.py | 7 -------
|
||||||
|
1 file changed, 7 deletions(-)
|
||||||
|
|
||||||
|
Index: pytorch-1.4.0_p0/setup.py
|
||||||
|
===================================================================
|
||||||
|
--- pytorch-1.4.0_p0.orig/setup.py
|
||||||
|
+++ pytorch-1.4.0_p0/setup.py
|
||||||
|
@@ -303,13 +303,6 @@ def build_deps():
|
||||||
|
check_pydep('yaml', 'pyyaml')
|
||||||
|
check_pydep('typing', 'typing')
|
||||||
|
|
||||||
|
- build_caffe2(version=version,
|
||||||
|
- cmake_python_library=cmake_python_library,
|
||||||
|
- build_python=True,
|
||||||
|
- rerun_cmake=RERUN_CMAKE,
|
||||||
|
- cmake_only=CMAKE_ONLY,
|
||||||
|
- cmake=cmake)
|
||||||
|
-
|
||||||
|
version_path = os.path.join(cwd, 'torch', 'version.py')
|
||||||
|
with open(version_path, 'w') as f:
|
||||||
|
f.write("__version__ = '{}'\n".format(version))
|
@ -0,0 +1,46 @@
|
|||||||
|
From dbb0bac77986016217cdfe779499a2ccd0e10570 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexey Chernov <4ernov@gmail.com>
|
||||||
|
Date: Wed, 6 Nov 2019 00:16:24 +0300
|
||||||
|
Subject: [PATCH 3/4] Change path to `caffe2` build dir made by `libtorch`
|
||||||
|
|
||||||
|
Setup and use properly `caffe2` build dir made while
|
||||||
|
`libtorch` building with CMake, so that it was used
|
||||||
|
by the Python installation.
|
||||||
|
---
|
||||||
|
setup.py | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/setup.py b/setup.py
|
||||||
|
index f4bfdc99cd..60502b6add 100644
|
||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -236,7 +236,7 @@ else:
|
||||||
|
cwd = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
lib_path = os.path.join(cwd, "torch", "lib")
|
||||||
|
third_party_path = os.path.join(cwd, "third_party")
|
||||||
|
-caffe2_build_dir = os.path.join(cwd, "build")
|
||||||
|
+caffe2_build_dir = os.environ.get("CMAKE_BUILD_DIR", os.path.join(cwd, "build"))
|
||||||
|
# lib/pythonx.x/site-packages
|
||||||
|
rel_site_packages = distutils.sysconfig.get_python_lib(prefix='')
|
||||||
|
# full absolute path to the dir above
|
||||||
|
@@ -279,7 +279,7 @@ elif sha != 'Unknown':
|
||||||
|
version += '+' + sha[:7]
|
||||||
|
report("Building wheel {}-{}".format(package_name, version))
|
||||||
|
|
||||||
|
-cmake = CMake()
|
||||||
|
+cmake = CMake(caffe2_build_dir)
|
||||||
|
|
||||||
|
# all the work we need to do _before_ setup runs
|
||||||
|
def build_deps():
|
||||||
|
@@ -445,7 +445,7 @@ class build_ext(setuptools.command.build_ext.build_ext):
|
||||||
|
filename = self.get_ext_filename(fullname)
|
||||||
|
report("\nCopying extension {}".format(ext.name))
|
||||||
|
|
||||||
|
- src = os.path.join("torch", rel_site_packages, filename)
|
||||||
|
+ src = os.path.join(caffe2_build_dir, filename)
|
||||||
|
if not os.path.exists(src):
|
||||||
|
report("{} does not exist".format(src))
|
||||||
|
del self.extensions[i]
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
@ -0,0 +1,104 @@
|
|||||||
|
From a0ace7295b6895954d2a0f8d6fe311a34a7c4e85 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexey Chernov <4ernov@gmail.com>
|
||||||
|
Date: Tue, 12 Nov 2019 02:01:36 +0300
|
||||||
|
Subject: [PATCH 4/4] Don't fill rpath of Caffe2 library for system-wide
|
||||||
|
install
|
||||||
|
|
||||||
|
Don't fill in runtime path of Caffe2 library for the case of
|
||||||
|
building for system-wide installation.
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 3 +++
|
||||||
|
caffe2/CMakeLists.txt | 18 +++++++++++++++---
|
||||||
|
cmake/Dependencies.cmake | 19 +++++++++++--------
|
||||||
|
3 files changed, 29 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 20923c0544..45a882ae0e 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -193,6 +193,9 @@ option(USE_TBB "Use TBB" OFF)
|
||||||
|
# Used when building Caffe2 through setup.py
|
||||||
|
option(BUILDING_WITH_TORCH_LIBS "Tell cmake if Caffe2 is being built alongside torch libs" ON)
|
||||||
|
|
||||||
|
+# Used when building Caffe2 for further system-wide installation
|
||||||
|
+option(BUILDING_SYSTEM_WIDE "Tell cmake if Caffe2 is being built for system-wide installation" OFF)
|
||||||
|
+
|
||||||
|
# /Z7 override option
|
||||||
|
# When generating debug symbols, CMake default to use the flag /Zi.
|
||||||
|
# However, it is not compatible with sccache. So we rewrite it off.
|
||||||
|
diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt
|
||||||
|
index 1f7d037243..30d5615cdb 100644
|
||||||
|
--- a/caffe2/CMakeLists.txt
|
||||||
|
+++ b/caffe2/CMakeLists.txt
|
||||||
|
@@ -1235,7 +1235,11 @@ if (BUILD_PYTHON)
|
||||||
|
if (MSVC AND BUILD_SHARED_LIBS)
|
||||||
|
install(FILES $<TARGET_PDB_FILE:caffe2_pybind11_state> DESTINATION "${PYTHON_LIB_REL_PATH}/caffe2/python" OPTIONAL)
|
||||||
|
endif()
|
||||||
|
- set_target_properties(caffe2_pybind11_state PROPERTIES INSTALL_RPATH "${caffe2_pybind11_rpath}")
|
||||||
|
+ if (NOT BUILDING_SYSTEM_WIDE)
|
||||||
|
+ set_target_properties(caffe2_pybind11_state PROPERTIES INSTALL_RPATH "${caffe2_pybind11_rpath}")
|
||||||
|
+else()
|
||||||
|
+ set_target_properties(caffe2_pybind11_state PROPERTIES SKIP_BUILD_RPATH ON)
|
||||||
|
+ endif()
|
||||||
|
|
||||||
|
if(USE_CUDA)
|
||||||
|
add_library(caffe2_pybind11_state_gpu MODULE ${Caffe2_GPU_PYTHON_SRCS})
|
||||||
|
@@ -1261,7 +1265,11 @@ if (BUILD_PYTHON)
|
||||||
|
if (MSVC AND BUILD_SHARED_LIBS)
|
||||||
|
install(FILES $<TARGET_PDB_FILE:caffe2_pybind11_state_gpu> DESTINATION "${PYTHON_LIB_REL_PATH}/caffe2/python" OPTIONAL)
|
||||||
|
endif()
|
||||||
|
- set_target_properties(caffe2_pybind11_state_gpu PROPERTIES INSTALL_RPATH "${caffe2_pybind11_rpath}")
|
||||||
|
+ if (NOT BUILDING_SYSTEM_WIDE)
|
||||||
|
+ set_target_properties(caffe2_pybind11_state_gpu PROPERTIES INSTALL_RPATH "${caffe2_pybind11_rpath}")
|
||||||
|
+ else()
|
||||||
|
+ set_target_properties(caffe2_pybind11_state_gpu PROPERTIES SKIP_BUILD_RPATH ON)
|
||||||
|
+ endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(USE_ROCM)
|
||||||
|
@@ -1284,7 +1292,11 @@ if (BUILD_PYTHON)
|
||||||
|
caffe2_pybind11_state_hip PROPERTIES LIBRARY_OUTPUT_DIRECTORY
|
||||||
|
${CMAKE_BINARY_DIR}/caffe2/python)
|
||||||
|
install(TARGETS caffe2_pybind11_state_hip DESTINATION "${PYTHON_LIB_REL_PATH}/caffe2/python")
|
||||||
|
- set_target_properties(caffe2_pybind11_state_hip PROPERTIES INSTALL_RPATH "${caffe2_pybind11_rpath}")
|
||||||
|
+ if (NOT BUILDING_SYSTEM_WIDE)
|
||||||
|
+ set_target_properties(caffe2_pybind11_state_hip PROPERTIES INSTALL_RPATH "${caffe2_pybind11_rpath}")
|
||||||
|
+ else()
|
||||||
|
+ set_target_properties(caffe2_pybind11_state_hip PROPERTIES SKIP_BUILD_RPATH ON)
|
||||||
|
+ endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (MSVC AND CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||||
|
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
|
||||||
|
index a8e9769536..6ef9d7b0e2 100644
|
||||||
|
--- a/cmake/Dependencies.cmake
|
||||||
|
+++ b/cmake/Dependencies.cmake
|
||||||
|
@@ -6,14 +6,17 @@ if (APPLE)
|
||||||
|
else()
|
||||||
|
set(_rpath_portable_origin $ORIGIN)
|
||||||
|
endif(APPLE)
|
||||||
|
-# Use separate rpaths during build and install phases
|
||||||
|
-set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||||
|
-# Don't use the install-rpath during the build phase
|
||||||
|
-set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||||
|
-set(CMAKE_INSTALL_RPATH "${_rpath_portable_origin}")
|
||||||
|
-# Automatically add all linked folders that are NOT in the build directory to
|
||||||
|
-# the rpath (per library?)
|
||||||
|
-set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
|
+
|
||||||
|
+if (NOT BUILDING_SYSTEM_WIDE)
|
||||||
|
+ # Use separate rpaths during build and install phases
|
||||||
|
+ set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||||
|
+ # Don't use the install-rpath during the build phase
|
||||||
|
+ set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||||
|
+ set(CMAKE_INSTALL_RPATH "${_rpath_portable_origin}")
|
||||||
|
+ # Automatically add all linked folders that are NOT in the build directory to
|
||||||
|
+ # the rpath (per library?)
|
||||||
|
+ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
|
+endif()
|
||||||
|
|
||||||
|
# UBSAN triggers when compiling protobuf, so we need to disable it.
|
||||||
|
set(UBSAN_FLAG "-fsanitize=undefined")
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
From 52019a3f395e5fa97b26d424152d91f73b400f8e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexey Chernov <4ernov@gmail.com>
|
||||||
|
Date: Wed, 13 Nov 2019 23:44:12 +0300
|
||||||
|
Subject: [PATCH 5/5] Change library directory according to CMake build
|
||||||
|
|
||||||
|
Change `lib_path` in favour of out-of-tree CMake build
|
||||||
|
directory, so that all the C++ libraries be found.
|
||||||
|
---
|
||||||
|
setup.py | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/setup.py b/setup.py
|
||||||
|
index 60502b6add..cbced52192 100644
|
||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -234,9 +234,10 @@ else:
|
||||||
|
|
||||||
|
# Constant known variables used throughout this file
|
||||||
|
cwd = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
-lib_path = os.path.join(cwd, "torch", "lib")
|
||||||
|
+cmake_build_dir = os.environ.get("CMAKE_BUILD_DIR", os.path.join(cwd, "build"))
|
||||||
|
+lib_path = os.path.join(cmake_build_dir, "lib")
|
||||||
|
third_party_path = os.path.join(cwd, "third_party")
|
||||||
|
-caffe2_build_dir = os.environ.get("CMAKE_BUILD_DIR", os.path.join(cwd, "build"))
|
||||||
|
+caffe2_build_dir = cmake_build_dir
|
||||||
|
# lib/pythonx.x/site-packages
|
||||||
|
rel_site_packages = distutils.sysconfig.get_python_lib(prefix='')
|
||||||
|
# full absolute path to the dir above
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
@ -0,0 +1,38 @@
|
|||||||
|
From 0f3a0d9a948fdd8481a5f7751a255ecd9ed4d37a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexey Chernov <4ernov@gmail.com>
|
||||||
|
Date: Mon, 20 Jan 2020 01:21:22 +0300
|
||||||
|
Subject: [PATCH 3/3] Remove conversion ambiguity in ternary operators
|
||||||
|
|
||||||
|
It fails to compile with recent versions of Clang
|
||||||
|
(namely, version 10 used behind HCC compiler when
|
||||||
|
being built with ROCm support) with the
|
||||||
|
`conditional expression is ambiguous` error.
|
||||||
|
---
|
||||||
|
caffe2/operators/relu_op.cu | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/caffe2/operators/relu_op.cu b/caffe2/operators/relu_op.cu
|
||||||
|
index f6edf7105e..ab49540fc9 100644
|
||||||
|
--- a/caffe2/operators/relu_op.cu
|
||||||
|
+++ b/caffe2/operators/relu_op.cu
|
||||||
|
@@ -51,7 +51,7 @@ __global__ void ReluCUDAKernel<half2>(const int N, const half2* X, half2* Y) {
|
||||||
|
#else
|
||||||
|
const float2 xx = __half22float2(X[i]);
|
||||||
|
Y[i] =
|
||||||
|
- __floats2half2_rn(xx.x > 0.0f ? xx.x : 0.0f, xx.y > 0.0f ? xx.y : 0.0f);
|
||||||
|
+ __floats2half2_rn(xx.x > 0.0f ? float(xx.x) : 0.0f, xx.y > 0.0f ? float(xx.y) : 0.0f);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -101,7 +101,7 @@ __global__ void ReluGradientCUDAKernel<half2>(
|
||||||
|
const float2 dy = __half22float2(dY[i]);
|
||||||
|
const float2 yy = __half22float2(Y[i]);
|
||||||
|
dX[i] =
|
||||||
|
- __floats2half2_rn(yy.x > 0.0f ? dy.x : 0.0f, yy.y > 0.0f ? dy.y : 0.0f);
|
||||||
|
+ __floats2half2_rn(yy.x > 0.0f ? float(dy.x) : 0.0f, yy.y > 0.0f ? float(dy.y) : 0.0f);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.24.1
|
||||||
|
|
24
sci-libs/pytorch/files/pytorch-1.2.0-setup.patch
Normal file
24
sci-libs/pytorch/files/pytorch-1.2.0-setup.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
Index: pytorch-1.4.0_p0/setup.py
|
||||||
|
===================================================================
|
||||||
|
--- pytorch-1.4.0_p0.orig/setup.py
|
||||||
|
+++ pytorch-1.4.0_p0/setup.py
|
||||||
|
@@ -288,9 +288,7 @@ def build_deps():
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
check_file(os.path.join(third_party_path, "gloo", "CMakeLists.txt"))
|
||||||
|
- check_file(os.path.join(third_party_path, "pybind11", "CMakeLists.txt"))
|
||||||
|
check_file(os.path.join(third_party_path, 'cpuinfo', 'CMakeLists.txt'))
|
||||||
|
- check_file(os.path.join(third_party_path, 'tbb', 'Makefile'))
|
||||||
|
check_file(os.path.join(third_party_path, 'onnx', 'CMakeLists.txt'))
|
||||||
|
check_file(os.path.join(third_party_path, 'foxi', 'CMakeLists.txt'))
|
||||||
|
check_file(os.path.join(third_party_path, 'QNNPACK', 'CMakeLists.txt'))
|
||||||
|
@@ -341,9 +339,6 @@ def build_deps():
|
||||||
|
if not same:
|
||||||
|
shutil.copyfile(orig_file, sym_file)
|
||||||
|
|
||||||
|
- dir_util.copy_tree('third_party/pybind11/include/pybind11/',
|
||||||
|
- 'torch/include/pybind11')
|
||||||
|
-
|
||||||
|
################################################################################
|
||||||
|
# Building dependent libraries
|
||||||
|
################################################################################
|
28
sci-libs/pytorch/files/pytorch-1.4.0-nccl-nvccflags.patch
Normal file
28
sci-libs/pytorch/files/pytorch-1.4.0-nccl-nvccflags.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
Index: nccl-7c72dee660e4d055b81721dd6b03e4e1c0a983cf/makefiles/common.mk
|
||||||
|
===================================================================
|
||||||
|
--- nccl-7c72dee660e4d055b81721dd6b03e4e1c0a983cf.orig/makefiles/common.mk
|
||||||
|
+++ nccl-7c72dee660e4d055b81721dd6b03e4e1c0a983cf/makefiles/common.mk
|
||||||
|
@@ -46,7 +46,7 @@ endif
|
||||||
|
CXXFLAGS := -DCUDA_MAJOR=$(CUDA_MAJOR) -DCUDA_MINOR=$(CUDA_MINOR) -fPIC -fvisibility=hidden
|
||||||
|
CXXFLAGS += -Wall -Wno-unused-function -Wno-sign-compare -std=c++11 -Wvla
|
||||||
|
CXXFLAGS += -I $(CUDA_INC)
|
||||||
|
-NVCUFLAGS := -ccbin $(CXX) $(NVCC_GENCODE) -lineinfo -std=c++11 -Xptxas -maxrregcount=96 -Xfatbin -compress-all
|
||||||
|
+NVCUFLAGS := $(NVCCFLAGS) $(NVCC_GENCODE) -lineinfo -std=c++11 -Xptxas -maxrregcount=96 -Xfatbin -compress-all
|
||||||
|
# Use addprefix so that we can specify more than one path
|
||||||
|
NVLDFLAGS := -L${CUDA_LIB} -lcudart -lrt
|
||||||
|
|
||||||
|
@@ -60,14 +60,6 @@ NVLDFLAGS += ${GCOV_FLAGS:%=-Xcompiler
|
||||||
|
# $(warning GCOV_FLAGS=${GCOV_FLAGS})
|
||||||
|
########## GCOV ##########
|
||||||
|
|
||||||
|
-ifeq ($(DEBUG), 0)
|
||||||
|
-NVCUFLAGS += -O3
|
||||||
|
-CXXFLAGS += -O3 -g
|
||||||
|
-else
|
||||||
|
-NVCUFLAGS += -O0 -G -g
|
||||||
|
-CXXFLAGS += -O0 -g -ggdb3
|
||||||
|
-endif
|
||||||
|
-
|
||||||
|
ifneq ($(VERBOSE), 0)
|
||||||
|
NVCUFLAGS += -Xptxas -v -Xcompiler -Wall,-Wextra,-Wno-unused-parameter
|
||||||
|
CXXFLAGS += -Wall -Wextra
|
28
sci-libs/pytorch/files/pytorch-1.4.0-skip-tests.patch
Normal file
28
sci-libs/pytorch/files/pytorch-1.4.0-skip-tests.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
Disable expected test failures.
|
||||||
|
|
||||||
|
TCPStoreTest is too slow to run.
|
||||||
|
|
||||||
|
Reference: https://github.com/pytorch/pytorch/issues/13746
|
||||||
|
Reference: https://github.com/pytorch/pytorch/issues/21873
|
||||||
|
|
||||||
|
Index: pytorch-1.4.0_p0/torch/lib/c10d/test/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- pytorch-1.4.0_p0.orig/torch/lib/c10d/test/CMakeLists.txt
|
||||||
|
+++ pytorch-1.4.0_p0/torch/lib/c10d/test/CMakeLists.txt
|
||||||
|
@@ -14,7 +14,6 @@ function(c10d_add_test test_src)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
c10d_add_test(FileStoreTest.cpp c10d)
|
||||||
|
-c10d_add_test(TCPStoreTest.cpp c10d)
|
||||||
|
|
||||||
|
if(USE_CUDA)
|
||||||
|
if(USE_C10D_GLOO)
|
||||||
|
Index: pytorch-1.4.0_p0/caffe2/share/contrib/depthwise/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- pytorch-1.4.0_p0.orig/caffe2/share/contrib/depthwise/CMakeLists.txt
|
||||||
|
+++ pytorch-1.4.0_p0/caffe2/share/contrib/depthwise/CMakeLists.txt
|
||||||
|
@@ -6,4 +6,3 @@ set(Caffe2_CONTRIB_DEPTHWISE3x3_TEST_CPU
|
||||||
|
)
|
||||||
|
|
||||||
|
set(Caffe2_CPU_SRCS ${Caffe2_CPU_SRCS} ${Caffe2_CONTRIB_DEPTHWISE3x3_CPU_SRC} PARENT_SCOPE)
|
||||||
|
-set(Caffe2_CPU_TEST_SRCS ${Caffe2_CPU_TEST_SRCS} ${Caffe2_CONTRIB_DEPTHWISE3x3_TEST_CPU_SRC} PARENT_SCOPE)
|
15
sci-libs/pytorch/files/pytorch-1.4.0-sleef.patch
Normal file
15
sci-libs/pytorch/files/pytorch-1.4.0-sleef.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
Give the location of sleef.h.
|
||||||
|
|
||||||
|
Reference: https://github.com/pytorch/pytorch/issues/26555
|
||||||
|
Index: pytorch-1.4.0/caffe2/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- pytorch-1.4.0.orig/caffe2/CMakeLists.txt
|
||||||
|
+++ pytorch-1.4.0/caffe2/CMakeLists.txt
|
||||||
|
@@ -1062,6 +1062,7 @@ if (BUILD_TEST)
|
||||||
|
add_executable(${test_name} "${test_src}")
|
||||||
|
target_link_libraries(${test_name} ${Caffe2_MAIN_LIBS} gtest_main)
|
||||||
|
target_include_directories(${test_name} PRIVATE $<INSTALL_INTERFACE:include>)
|
||||||
|
+ target_include_directories(${test_name} PRIVATE $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>)
|
||||||
|
target_include_directories(${test_name} PRIVATE ${Caffe2_CPU_INCLUDE})
|
||||||
|
add_test(NAME ${test_name} COMMAND $<TARGET_FILE:${test_name}>)
|
||||||
|
if (INSTALL_TEST)
|
15
sci-libs/pytorch/files/pytorch-1.6.0-global-dlopen.patch
Normal file
15
sci-libs/pytorch/files/pytorch-1.6.0-global-dlopen.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
Don't hardcode the library path. Leave it to the dynamic loader.
|
||||||
|
|
||||||
|
Index: pytorch-1.6.0/torch/__init__.py
|
||||||
|
===================================================================
|
||||||
|
--- pytorch-1.6.0.orig/torch/__init__.py
|
||||||
|
+++ pytorch-1.6.0/torch/__init__.py
|
||||||
|
@@ -138,7 +138,7 @@ def _load_global_deps():
|
||||||
|
here = os.path.abspath(__file__)
|
||||||
|
lib_path = os.path.join(os.path.dirname(here), 'lib', lib_name)
|
||||||
|
|
||||||
|
- ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
|
||||||
|
+ ctypes.CDLL(lib_name, mode=ctypes.RTLD_GLOBAL)
|
||||||
|
|
||||||
|
|
||||||
|
if (USE_RTLD_GLOBAL_WITH_LIBTORCH or os.getenv('TORCH_USE_RTLD_GLOBAL')) and \
|
27
sci-libs/pytorch/files/pytorch-1.6.0-nccl-nvccflags.patch
Normal file
27
sci-libs/pytorch/files/pytorch-1.6.0-nccl-nvccflags.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
diff -uprN nccl-5949d96f36d050e59d05872f8bbffd2549318e95/makefiles/common.mk nccl-patched/makefiles/common.mk
|
||||||
|
--- nccl-5949d96f36d050e59d05872f8bbffd2549318e95/makefiles/common.mk 2020-06-09 00:31:44.000000000 +0800
|
||||||
|
+++ nccl-patched/makefiles/common.mk 2020-08-06 21:25:57.784279738 +0800
|
||||||
|
@@ -54,7 +54,7 @@ CXXFLAGS := -DCUDA_MAJOR=$(CUDA_MAJOR)
|
||||||
|
# Maxrregcount needs to be set accordingly to NCCL_MAX_NTHREADS (otherwise it will cause kernel launch errors)
|
||||||
|
# 512 : 120, 640 : 96, 768 : 80, 1024 : 60
|
||||||
|
# We would not have to set this if we used __launch_bounds__, but this only works on kernels, not on functions.
|
||||||
|
-NVCUFLAGS := -ccbin $(CXX) $(NVCC_GENCODE) -std=c++11 -Xptxas -maxrregcount=96 -Xfatbin -compress-all
|
||||||
|
+NVCUFLAGS := $(NVCCFLAGS) $(NVCC_GENCODE) -std=c++11 -Xptxas -maxrregcount=96 -Xfatbin -compress-all
|
||||||
|
# Use addprefix so that we can specify more than one path
|
||||||
|
NVLDFLAGS := -L${CUDA_LIB} -lcudart -lrt
|
||||||
|
|
||||||
|
@@ -68,14 +68,6 @@ NVLDFLAGS += ${GCOV_FLAGS:%=-Xcompiler
|
||||||
|
# $(warning GCOV_FLAGS=${GCOV_FLAGS})
|
||||||
|
########## GCOV ##########
|
||||||
|
|
||||||
|
-ifeq ($(DEBUG), 0)
|
||||||
|
-NVCUFLAGS += -O3
|
||||||
|
-CXXFLAGS += -O3 -g
|
||||||
|
-else
|
||||||
|
-NVCUFLAGS += -O0 -G -g
|
||||||
|
-CXXFLAGS += -O0 -g -ggdb3
|
||||||
|
-endif
|
||||||
|
-
|
||||||
|
ifneq ($(VERBOSE), 0)
|
||||||
|
NVCUFLAGS += -Xptxas -v -Xcompiler -Wall,-Wextra,-Wno-unused-parameter
|
||||||
|
CXXFLAGS += -Wall -Wextra
|
14
sci-libs/pytorch/files/pytorch-1.6.0-setup.patch
Normal file
14
sci-libs/pytorch/files/pytorch-1.6.0-setup.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
Index: pytorch-1.4.0_p0/setup.py
|
||||||
|
===================================================================
|
||||||
|
--- pytorch-1.4.0_p0.orig/setup.py
|
||||||
|
+++ pytorch-1.4.0_p0/setup.py
|
||||||
|
@@ -288,9 +288,7 @@ def build_deps():
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
check_file(os.path.join(third_party_path, "gloo", "CMakeLists.txt"))
|
||||||
|
- check_file(os.path.join(third_party_path, "pybind11", "CMakeLists.txt"))
|
||||||
|
check_file(os.path.join(third_party_path, 'cpuinfo', 'CMakeLists.txt'))
|
||||||
|
- check_file(os.path.join(third_party_path, 'tbb', 'Makefile'))
|
||||||
|
check_file(os.path.join(third_party_path, 'onnx', 'CMakeLists.txt'))
|
||||||
|
check_file(os.path.join(third_party_path, 'foxi', 'CMakeLists.txt'))
|
||||||
|
check_file(os.path.join(third_party_path, 'QNNPACK', 'CMakeLists.txt'))
|
14
sci-libs/pytorch/files/pytorch-1.6.0-skip-tests.patch
Normal file
14
sci-libs/pytorch/files/pytorch-1.6.0-skip-tests.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
Disable expected test failures.
|
||||||
|
|
||||||
|
Reference: https://github.com/pytorch/pytorch/issues/13746
|
||||||
|
Reference: https://github.com/pytorch/pytorch/issues/21873
|
||||||
|
|
||||||
|
Index: pytorch-1.4.0_p0/caffe2/share/contrib/depthwise/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- pytorch-1.4.0_p0.orig/caffe2/share/contrib/depthwise/CMakeLists.txt
|
||||||
|
+++ pytorch-1.4.0_p0/caffe2/share/contrib/depthwise/CMakeLists.txt
|
||||||
|
@@ -6,4 +6,3 @@ set(Caffe2_CONTRIB_DEPTHWISE3x3_TEST_CPU
|
||||||
|
)
|
||||||
|
|
||||||
|
set(Caffe2_CPU_SRCS ${Caffe2_CPU_SRCS} ${Caffe2_CONTRIB_DEPTHWISE3x3_CPU_SRC} PARENT_SCOPE)
|
||||||
|
-set(Caffe2_CPU_TEST_SRCS ${Caffe2_CPU_TEST_SRCS} ${Caffe2_CONTRIB_DEPTHWISE3x3_TEST_CPU_SRC} PARENT_SCOPE)
|
@ -0,0 +1,13 @@
|
|||||||
|
Index: tensorpipe/cmake/pytorch.cmake
|
||||||
|
===================================================================
|
||||||
|
--- tensorpipe.orig/cmake/pytorch.cmake
|
||||||
|
+++ tensorpipe/cmake/pytorch.cmake
|
||||||
|
@@ -138,7 +138,7 @@ endif()
|
||||||
|
|
||||||
|
add_library(tensorpipe ${TENSORPIPE_SRC})
|
||||||
|
|
||||||
|
-set(TP_BUILD_LIBUV ON)
|
||||||
|
+set(TP_BUILD_LIBUV OFF)
|
||||||
|
find_package(uv REQUIRED)
|
||||||
|
target_link_libraries(tensorpipe PRIVATE uv::uv)
|
||||||
|
|
39
sci-libs/pytorch/metadata.xml
Normal file
39
sci-libs/pytorch/metadata.xml
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<maintainer type="person">
|
||||||
|
<email>4ernov@gmail.com</email>
|
||||||
|
<name>Alexey Chernov</name>
|
||||||
|
</maintainer>
|
||||||
|
<maintainer type="person">
|
||||||
|
<email>heroxbd@gentoo.org</email>
|
||||||
|
<name>Benda Xu</name>
|
||||||
|
</maintainer>
|
||||||
|
<use>
|
||||||
|
<flag name="asan">Build with address sanitizer (ASAN)</flag>
|
||||||
|
<flag name="atlas">Use ATLAS as BLAS implementation</flag>
|
||||||
|
<flag name="cuda">Enable support for nVidia CUDA</flag>
|
||||||
|
<flag name="eigen">Use Eigen as BLAS implementation</flag>
|
||||||
|
<flag name="fbgemm">Enable FBGEMM (Facebook GEneral Matrix Multiplication) support</flag>
|
||||||
|
<flag name="gflags">Build with gflags</flag>
|
||||||
|
<flag name="glog">Build with glog support</flag>
|
||||||
|
<flag name="gloo">Build gloo distributed communication backend support</flag>
|
||||||
|
<flag name="leveldb">Enable support for LevelDB</flag>
|
||||||
|
<flag name="lmdb">Enable support for LMDB</flag>
|
||||||
|
<flag name="mkl">Use Intel MKL as BLAS implementation</flag>
|
||||||
|
<flag name="mkldnn">Build with Intel MKL-DNN support</flag>
|
||||||
|
<flag name="namedtensor">Enable support for named tensors</flag>
|
||||||
|
<flag name="nnpack">Enable NNPACK support</flag>
|
||||||
|
<flag name="numa">Enable support for NUMA</flag>
|
||||||
|
<flag name="numpy">Enable NumPy support</flag>
|
||||||
|
<flag name="observers">Build observers</flag>
|
||||||
|
<flag name="openblas">Use OpenBLAS as BLAS implementation</flag>
|
||||||
|
<flag name="opencv">Enable support for OpenCV</flag>
|
||||||
|
<flag name="opencl">Enable support for OpenCL</flag>
|
||||||
|
<flag name="qnnpack">Enable QNNPACK support</flag>
|
||||||
|
<flag name="redis">Enable support for Redis</flag>
|
||||||
|
<flag name="tbb">Build with Intel TBB enabled</flag>
|
||||||
|
<flag name="tools">Build binary tools</flag>
|
||||||
|
<flag name="zeromq">Enable support for ZeroMQ</flag>
|
||||||
|
</use>
|
||||||
|
</pkgmetadata>
|
257
sci-libs/pytorch/pytorch-1.4.0_p0.ebuild
Normal file
257
sci-libs/pytorch/pytorch-1.4.0_p0.ebuild
Normal file
@ -0,0 +1,257 @@
|
|||||||
|
# Copyright 1999-2020 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python3_6 )
|
||||||
|
|
||||||
|
inherit distutils-r1 cmake-utils cuda
|
||||||
|
|
||||||
|
MPV=${PV/_p/a}
|
||||||
|
|
||||||
|
DESCRIPTION="Tensors and Dynamic neural networks in Python with strong GPU acceleration"
|
||||||
|
HOMEPAGE="https://pytorch.org/"
|
||||||
|
SRC_URI="https://github.com/pytorch/${PN}/archive/v${MPV}.tar.gz -> ${P}.tar.gz
|
||||||
|
https://github.com/facebookincubator/gloo/archive/ca528e32.tar.gz -> gloo-ca528e32.tar.gz
|
||||||
|
https://github.com/google/benchmark/archive/505be96a.tar.gz -> benchmark-505be96a.tar.gz
|
||||||
|
https://github.com/google/gemmlowp/archive/3fb5c176.tar.gz -> gemmlowp-3fb5c176.tar.gz
|
||||||
|
https://github.com/google/googletest/archive/2fe3bd99.tar.gz -> googletest-2fe3bd99.tar.gz
|
||||||
|
https://github.com/houseroad/foxi/archive/8f74bc4d.tar.gz -> foxi-8f74bc4d.tar.gz
|
||||||
|
https://github.com/intel/ideep/archive/78eafa5d.tar.gz -> ideep-78eafa5d.tar.gz
|
||||||
|
https://github.com/Maratyszcza/FP16/archive/febbb1c1.tar.gz -> FP16-febbb1c1.tar.gz
|
||||||
|
https://github.com/Maratyszcza/FXdiv/archive/b742d114.tar.gz -> FXdiv-b742d114.tar.gz
|
||||||
|
https://github.com/Maratyszcza/NNPACK/archive/c039579a.tar.gz -> NNPACK-c039579a.tar.gz
|
||||||
|
https://github.com/Maratyszcza/PeachPy/archive/07d8fde8.tar.gz -> PeachPy-07d8fde8.tar.gz
|
||||||
|
https://github.com/Maratyszcza/psimd/archive/90a938f3.tar.gz -> psimd-90a938f3.tar.gz
|
||||||
|
https://github.com/Maratyszcza/pthreadpool/archive/13da0b4c.tar.gz -> pthreadpool-13da0b4c.tar.gz
|
||||||
|
cuda? ( https://github.com/NVIDIA/nccl/archive/7c72dee6.tar.gz -> nccl-7c72dee6.tar.gz )
|
||||||
|
https://github.com/NVlabs/cub/archive/285aeeba.tar.gz -> cub-285aeeba.tar.gz
|
||||||
|
https://github.com/onnx/onnx/archive/2891e145.tar.gz -> onnx-2891e145.tar.gz
|
||||||
|
https://github.com/onnx/onnx-tensorrt/archive/cb3d8066.tar.gz -> onnx-tensorrt-cb3d8066.tar.gz
|
||||||
|
https://github.com/pytorch/cpuinfo/archive/89fe1695.tar.gz -> cpuinfo-89fe1695.tar.gz
|
||||||
|
https://github.com/pytorch/fbgemm/archive/82d259da.tar.gz -> fbgemm-82d259da.tar.gz
|
||||||
|
https://github.com/pytorch/QNNPACK/archive/7d2a4e99.tar.gz -> QNNPACK-7d2a4e99.tar.gz
|
||||||
|
https://github.com/shibatch/sleef/archive/7f523de6.tar.gz -> sleef-7f523de6.tar.gz
|
||||||
|
https://github.com/asmjit/asmjit/archive/17556b2d.tar.gz -> asmjit-17556b2d.tar.gz
|
||||||
|
"
|
||||||
|
|
||||||
|
LICENSE="BSD"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
|
||||||
|
IUSE="asan atlas cuda eigen +fbgemm ffmpeg gflags glog +gloo leveldb lmdb mkl mkldnn mpi namedtensor +nnpack numa +numpy +observers +openblas opencl opencv +openmp +python +qnnpack redis static tbb test tools zeromq"
|
||||||
|
|
||||||
|
REQUIRED_USE="
|
||||||
|
python? ( ${PYTHON_REQUIRED_USE} )
|
||||||
|
numpy? ( python )
|
||||||
|
^^ ( atlas eigen mkl openblas )
|
||||||
|
"
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
dev-libs/protobuf
|
||||||
|
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||||
|
atlas? ( sci-libs/atlas )
|
||||||
|
cuda? ( dev-libs/cudnn
|
||||||
|
dev-cpp/eigen[cuda] )
|
||||||
|
ffmpeg? ( virtual/ffmpeg )
|
||||||
|
gflags? ( dev-cpp/gflags )
|
||||||
|
glog? ( dev-cpp/glog )
|
||||||
|
leveldb? ( dev-libs/leveldb )
|
||||||
|
lmdb? ( dev-db/lmdb )
|
||||||
|
mkl? ( sci-libs/mkl )
|
||||||
|
mpi? ( virtual/mpi )
|
||||||
|
numpy? ( dev-python/numpy[${PYTHON_USEDEP}] )
|
||||||
|
openblas? ( sci-libs/openblas )
|
||||||
|
opencl? ( dev-libs/clhpp virtual/opencl )
|
||||||
|
opencv? ( media-libs/opencv )
|
||||||
|
python? ( ${PYTHON_DEPS}
|
||||||
|
dev-python/pybind11[${PYTHON_USEDEP}]
|
||||||
|
)
|
||||||
|
redis? ( dev-db/redis )
|
||||||
|
zeromq? ( net-libs/zeromq )
|
||||||
|
eigen? ( dev-cpp/eigen )
|
||||||
|
"
|
||||||
|
RDEPEND="${DEPEND}"
|
||||||
|
BDEPEND=""
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
test? ( dev-python/pytest[${PYTHON_USEDEP}] )
|
||||||
|
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||||
|
dev-cpp/tbb
|
||||||
|
app-arch/zstd
|
||||||
|
dev-python/protobuf-python[${PYTHON_USEDEP}]
|
||||||
|
dev-python/pybind11[${PYTHON_USEDEP}]
|
||||||
|
sys-fabric/libibverbs
|
||||||
|
sys-process/numactl
|
||||||
|
"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/${PN}-1.2.0-setup.patch
|
||||||
|
"${FILESDIR}"/${PN}-1.4.0-sleef.patch
|
||||||
|
"${FILESDIR}"/${PN}-1.4.0-skip-tests.patch
|
||||||
|
"${FILESDIR}"/0002-Don-t-build-libtorch-again-for-PyTorch-1.4.0.patch
|
||||||
|
"${FILESDIR}"/0003-Change-path-to-caffe2-build-dir-made-by-libtorch.patch
|
||||||
|
"${FILESDIR}"/0005-Change-library-directory-according-to-CMake-build.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
default
|
||||||
|
|
||||||
|
mv -v ${PN}-${MPV} ${P} || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
cmake-utils_src_prepare
|
||||||
|
|
||||||
|
mv -v third_party/miniz-* ../ || die
|
||||||
|
rm -r third_party || die
|
||||||
|
ln -s .. third_party || die
|
||||||
|
cd .. || die
|
||||||
|
for d in *; do
|
||||||
|
case ${d} in
|
||||||
|
${PN}* | miniz-*) continue ;;
|
||||||
|
PeachPy-*) mv -v ${d} python-peachpy || die ;;
|
||||||
|
*) mv -v ${d} ${d%-*} || die ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
mv -v FBGEMM fbgemm || die
|
||||||
|
cd fbgemm || die
|
||||||
|
rm -r third_party || die
|
||||||
|
ln -s .. third_party || die
|
||||||
|
|
||||||
|
cd ../onnx || die
|
||||||
|
rm -r third_party || die
|
||||||
|
ln -s .. third_party || die
|
||||||
|
|
||||||
|
if use cuda; then
|
||||||
|
cd ../nccl || die
|
||||||
|
eapply "${FILESDIR}"/${PN}-1.4.0-nccl-nvccflags.patch
|
||||||
|
ln -s . nccl || die
|
||||||
|
|
||||||
|
cuda_src_prepare
|
||||||
|
export CUDAHOSTCXX=$(cuda_gccdir)/g++
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local blas="Eigen"
|
||||||
|
|
||||||
|
if use atlas; then
|
||||||
|
blas="ATLAS"
|
||||||
|
elif use mkl; then
|
||||||
|
blas="MKL"
|
||||||
|
elif use openblas; then
|
||||||
|
blas="OpenBLAS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local mycmakeargs=(
|
||||||
|
-DTORCH_BUILD_VERSION=${PV}
|
||||||
|
-DTORCH_INSTALL_LIB_DIR=$(get_libdir)
|
||||||
|
-DBUILD_BINARY=$(usex tools ON OFF)
|
||||||
|
-DBUILD_CUSTOM_PROTOBUF=OFF
|
||||||
|
-DBUILD_PYTHON=$(usex python ON OFF)
|
||||||
|
-DBUILD_SHARED_LIBS=$(usex static OFF ON)
|
||||||
|
-DBUILD_TEST=$(usex test ON OFF)
|
||||||
|
-DUSE_ASAN=$(usex asan ON OFF)
|
||||||
|
-DUSE_CUDA=$(usex cuda ON OFF)
|
||||||
|
-DUSE_NCCL=$(usex cuda ON OFF)
|
||||||
|
-DUSE_SYSTEM_NCCL=OFF
|
||||||
|
-DUSE_ROCM=OFF
|
||||||
|
-DUSE_FBGEMM=$(usex fbgemm ON OFF)
|
||||||
|
-DUSE_FFMPEG=$(usex ffmpeg ON OFF)
|
||||||
|
-DUSE_GFLAGS=$(usex gflags ON OFF)
|
||||||
|
-DUSE_GLOG=$(usex glog ON OFF)
|
||||||
|
-DUSE_LEVELDB=$(usex leveldb ON OFF)
|
||||||
|
-DUSE_LITE_PROTO=OFF
|
||||||
|
-DUSE_LMDB=$(usex lmdb ON OFF)
|
||||||
|
-DCAFFE2_USE_MKL=$(usex mkl ON OFF)
|
||||||
|
-DUSE_MKLDNN=$(usex mkldnn ON OFF)
|
||||||
|
-DUSE_MKLDNN_CBLAS=OFF
|
||||||
|
-DUSE_NNPACK=$(usex nnpack ON OFF)
|
||||||
|
-DUSE_NUMPY=$(usex numpy ON OFF)
|
||||||
|
-DUSE_NUMA=$(usex numa ON OFF)
|
||||||
|
-DUSE_OBSERVERS=$(usex observers ON OFF)
|
||||||
|
-DUSE_OPENCL=$(usex opencl ON OFF)
|
||||||
|
-DUSE_OPENCV=$(usex opencv ON OFF)
|
||||||
|
-DUSE_OPENMP=$(usex openmp ON OFF)
|
||||||
|
-DUSE_TBB=OFF
|
||||||
|
-DUSE_PROF=OFF
|
||||||
|
-DUSE_QNNPACK=$(usex qnnpack ON OFF)
|
||||||
|
-DUSE_REDIS=$(usex redis ON OFF)
|
||||||
|
-DUSE_ROCKSDB=OFF
|
||||||
|
-DUSE_ZMQ=$(usex zeromq ON OFF)
|
||||||
|
-DUSE_MPI=$(usex mpi ON OFF)
|
||||||
|
-DUSE_GLOO=$(usex gloo ON OFF)
|
||||||
|
-DUSE_SYSTEM_EIGEN_INSTALL=ON
|
||||||
|
-DBUILD_NAMEDTENSOR=$(usex namedtensor ON OFF)
|
||||||
|
-DBLAS=${blas}
|
||||||
|
)
|
||||||
|
|
||||||
|
cmake-utils_src_configure
|
||||||
|
|
||||||
|
if use python; then
|
||||||
|
CMAKE_BUILD_DIR=${BUILD_DIR} distutils-r1_src_configure
|
||||||
|
fi
|
||||||
|
|
||||||
|
# do not rerun cmake and the build process in src_install
|
||||||
|
sed '/RERUN/,+1d' -i ${BUILD_DIR}/build.ninja || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
cmake-utils_src_compile
|
||||||
|
|
||||||
|
if use python; then
|
||||||
|
CMAKE_BUILD_DIR=${BUILD_DIR} distutils-r1_src_compile
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
cmake-utils_src_install
|
||||||
|
|
||||||
|
local LIB=$(get_libdir)
|
||||||
|
if [[ ${LIB} != lib ]]; then
|
||||||
|
mv -fv "${ED}"/usr/lib/*.so "${ED}"/usr/${LIB}/ || die
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rfv "${ED}/torch"
|
||||||
|
rm -rfv "${ED}/var"
|
||||||
|
rm -rfv "${ED}/usr/lib"
|
||||||
|
|
||||||
|
rm -fv "${ED}/usr/include/*.{h,hpp}"
|
||||||
|
rm -rfv "${ED}/usr/include/asmjit"
|
||||||
|
rm -rfv "${ED}/usr/include/c10d"
|
||||||
|
rm -rfv "${ED}/usr/include/fbgemm"
|
||||||
|
rm -rfv "${ED}/usr/include/fp16"
|
||||||
|
rm -rfv "${ED}/usr/include/gloo"
|
||||||
|
rm -rfv "${ED}/usr/include/include"
|
||||||
|
rm -rfv "${ED}/usr/include/var"
|
||||||
|
|
||||||
|
cp -rv "${WORKDIR}/${P}/third_party/pybind11/include/pybind11" "${ED}/usr/include/"
|
||||||
|
|
||||||
|
rm -fv "${ED}/usr/lib64/libtbb.so"
|
||||||
|
rm -rfv "${ED}/usr/lib64/cmake"
|
||||||
|
|
||||||
|
if use python; then
|
||||||
|
install_shm_manager() {
|
||||||
|
TORCH_BIN_DIR="${ED}/usr/lib64/${EPYTHON}/site-packages/torch/bin"
|
||||||
|
|
||||||
|
mkdir -pv ${TORCH_BIN_DIR}
|
||||||
|
cp -v "${ED}/usr/bin/torch_shm_manager" "${TORCH_BIN_DIR}"
|
||||||
|
}
|
||||||
|
|
||||||
|
python_foreach_impl install_shm_manager
|
||||||
|
|
||||||
|
scanelf -r --fix "${BUILD_DIR}/caffe2/python"
|
||||||
|
CMAKE_BUILD_DIR=${BUILD_DIR} distutils-r1_src_install
|
||||||
|
|
||||||
|
python_foreach_impl python_optimize
|
||||||
|
fi
|
||||||
|
|
||||||
|
find "${ED}/usr/lib64" -name "*.a" -exec rm -fv {} \;
|
||||||
|
|
||||||
|
use test && rm -rfv "${ED}/usr/test" "${ED}"/usr/bin/test_{api,jit}
|
||||||
|
|
||||||
|
# Remove the empty directories by CMake Python:
|
||||||
|
find "${ED}" -type d -empty -delete || die
|
||||||
|
}
|
282
sci-libs/pytorch/pytorch-1.6.0.ebuild
Normal file
282
sci-libs/pytorch/pytorch-1.6.0.ebuild
Normal file
@ -0,0 +1,282 @@
|
|||||||
|
# Copyright 1999-2020 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python3_6 )
|
||||||
|
|
||||||
|
inherit distutils-r1 cmake-utils cuda
|
||||||
|
|
||||||
|
MPV=${PV/_p/a}
|
||||||
|
|
||||||
|
DESCRIPTION="Tensors and Dynamic neural networks in Python with strong GPU acceleration"
|
||||||
|
HOMEPAGE="https://pytorch.org/"
|
||||||
|
SRC_URI="https://github.com/pytorch/${PN}/archive/v${MPV}.tar.gz -> ${P}.tar.gz
|
||||||
|
https://github.com/google/benchmark/archive/505be96ab.tar.gz -> benchmark-505be96ab.tar.gz
|
||||||
|
https://github.com/pytorch/cpuinfo/archive/63b254577.tar.gz -> cpuinfo-63b254577.tar.gz
|
||||||
|
https://github.com/NVlabs/cub/archive/d106ddb99.tar.gz -> cub-d106ddb99.tar.gz
|
||||||
|
https://github.com/pytorch/fbgemm/archive/87c378172.tar.gz -> fbgemm-87c378172.tar.gz
|
||||||
|
https://github.com/fmtlib/fmt/archive/9bdd1596c.tar.gz -> fmt-9bdd1596c.tar.gz
|
||||||
|
https://github.com/houseroad/foxi/archive/8015abb72.tar.gz -> foxi-8015abb72.tar.gz
|
||||||
|
https://github.com/Maratyszcza/FP16/archive/4dfe081cf.tar.gz -> FP16-4dfe081cf.tar.gz
|
||||||
|
https://github.com/Maratyszcza/FXdiv/archive/b408327ac.tar.gz -> FXdiv-b408327ac.tar.gz
|
||||||
|
https://github.com/google/gemmlowp/archive/3fb5c176c.tar.gz -> gemmlowp-3fb5c176c.tar.gz
|
||||||
|
https://github.com/facebookincubator/gloo/archive/3d08580f9.tar.gz -> gloo-3d08580f9.tar.gz
|
||||||
|
https://github.com/google/googletest/archive/2fe3bd994.tar.gz -> googletest-2fe3bd994.tar.gz
|
||||||
|
https://github.com/intel/ideep/archive/938cc6889.tar.gz -> ideep-938cc6889.tar.gz
|
||||||
|
cuda? ( https://github.com/NVIDIA/nccl/archive/5949d96f3.tar.gz -> nccl-5949d96f3.tar.gz )
|
||||||
|
https://github.com/Maratyszcza/NNPACK/archive/24b55303f.tar.gz -> NNPACK-24b55303f.tar.gz
|
||||||
|
https://github.com/onnx/onnx/archive/a82c6a701.tar.gz -> onnx-a82c6a701.tar.gz
|
||||||
|
https://github.com/onnx/onnx-tensorrt/archive/c15321141.tar.gz -> onnx-tensorrt-c15321141.tar.gz
|
||||||
|
https://github.com/Maratyszcza/psimd/archive/072586a71.tar.gz -> psimd-072586a71.tar.gz
|
||||||
|
https://github.com/Maratyszcza/pthreadpool/archive/029c88620.tar.gz -> pthreadpool-029c88620.tar.gz
|
||||||
|
https://github.com/Maratyszcza/PeachPy/archive/07d8fde8a.tar.gz -> PeachPy-07d8fde8a.tar.gz
|
||||||
|
https://github.com/pytorch/QNNPACK/archive/7d2a4e993.tar.gz -> QNNPACK-7d2a4e993.tar.gz
|
||||||
|
https://github.com/shibatch/sleef/archive/7f523de65.tar.gz -> sleef-7f523de65.tar.gz
|
||||||
|
https://github.com/pytorch/tensorpipe/archive/3b8089c9c.tar.gz -> tensorpipe-3b8089c9c.tar.gz
|
||||||
|
https://github.com/google/XNNPACK/archive/1b354636b.tar.gz -> XNNPACK-1b354636b.tar.gz
|
||||||
|
https://github.com/asmjit/asmjit/archive/9057aa30.tar.gz -> asmjit-9057aa30.tar.gz
|
||||||
|
"
|
||||||
|
|
||||||
|
# git clone git@github.com:pytorch/pytorch.git && cd pytorch
|
||||||
|
# src_uri() {
|
||||||
|
# join \
|
||||||
|
# <(git config --file .gitmodules --get-regexp url | sed -r -e 's/^submodule.(.*).url (.*)/\1 \2/' -e 's,NNPACK_deps/,,' -e 's/third-party/third_party/' | sort) \
|
||||||
|
# <(git submodule status | awk '{print $2 " " $1}' | sort) | \
|
||||||
|
# while read path url hash; do
|
||||||
|
# [[ ${path} =~ (eigen|six|ios|neon2sse|protobuf|pybind11|enum34|tbb|zstd|fbjni) ]] && continue
|
||||||
|
# u=${url%.git}
|
||||||
|
# h=${hash#-}
|
||||||
|
# h=${h:0:8}
|
||||||
|
# echo "${u}/archive/${h}.tar.gz -> $(basename ${u})-${h}.tar.gz"
|
||||||
|
# done
|
||||||
|
# }
|
||||||
|
# src_uri
|
||||||
|
|
||||||
|
# git submodule update --init third_party/fbgemm && cd third_party/fbgemm
|
||||||
|
# src_uri | grep asmjit
|
||||||
|
# cd ../..
|
||||||
|
|
||||||
|
LICENSE="BSD"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
|
||||||
|
IUSE="asan atlas cuda eigen +fbgemm ffmpeg gflags glog +gloo leveldb lmdb mkl mkldnn mpi namedtensor +nnpack numa +numpy +observers +openblas opencl opencv +openmp +python +qnnpack redis static test tools zeromq"
|
||||||
|
|
||||||
|
REQUIRED_USE="
|
||||||
|
python? ( ${PYTHON_REQUIRED_USE} )
|
||||||
|
numpy? ( python )
|
||||||
|
^^ ( atlas eigen mkl openblas )
|
||||||
|
"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
dev-libs/protobuf
|
||||||
|
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||||
|
atlas? ( sci-libs/atlas )
|
||||||
|
cuda? ( dev-libs/cudnn
|
||||||
|
dev-cpp/eigen[cuda] )
|
||||||
|
ffmpeg? ( virtual/ffmpeg )
|
||||||
|
gflags? ( dev-cpp/gflags )
|
||||||
|
glog? ( dev-cpp/glog )
|
||||||
|
leveldb? ( dev-libs/leveldb )
|
||||||
|
lmdb? ( dev-db/lmdb )
|
||||||
|
mkl? ( sci-libs/mkl )
|
||||||
|
mpi? ( virtual/mpi )
|
||||||
|
numpy? ( dev-python/numpy[${PYTHON_USEDEP}] )
|
||||||
|
openblas? ( sci-libs/openblas )
|
||||||
|
opencl? ( dev-libs/clhpp virtual/opencl )
|
||||||
|
opencv? ( media-libs/opencv )
|
||||||
|
python? ( ${PYTHON_DEPS}
|
||||||
|
dev-python/pybind11[${PYTHON_USEDEP}]
|
||||||
|
)
|
||||||
|
redis? ( dev-db/redis )
|
||||||
|
zeromq? ( net-libs/zeromq )
|
||||||
|
eigen? ( dev-cpp/eigen )
|
||||||
|
dev-libs/libuv
|
||||||
|
"
|
||||||
|
BDEPEND=""
|
||||||
|
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
test? ( dev-python/pytest[${PYTHON_USEDEP}] )
|
||||||
|
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||||
|
dev-cpp/tbb
|
||||||
|
app-arch/zstd
|
||||||
|
dev-python/protobuf-python[${PYTHON_USEDEP}]
|
||||||
|
dev-python/pybind11[${PYTHON_USEDEP}]
|
||||||
|
sys-fabric/libibverbs
|
||||||
|
sys-process/numactl
|
||||||
|
"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/${PN}-1.6.0-setup.patch
|
||||||
|
"${FILESDIR}"/${PN}-1.6.0-skip-tests.patch
|
||||||
|
"${FILESDIR}"/${PN}-1.6.0-global-dlopen.patch
|
||||||
|
"${FILESDIR}"/0002-Don-t-build-libtorch-again-for-PyTorch-1.4.0.patch
|
||||||
|
"${FILESDIR}"/0003-Change-path-to-caffe2-build-dir-made-by-libtorch.patch
|
||||||
|
"${FILESDIR}"/0005-Change-library-directory-according-to-CMake-build.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
default
|
||||||
|
|
||||||
|
[[ -d ${P} ]] || mv -v ${PN}-${MPV} ${P} || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
cmake-utils_src_prepare
|
||||||
|
|
||||||
|
mv -v third_party/miniz-* ../ || die
|
||||||
|
rm -r third_party || die
|
||||||
|
ln -s .. third_party || die
|
||||||
|
cd .. || die
|
||||||
|
for d in *; do
|
||||||
|
case ${d} in
|
||||||
|
${PN}* | miniz-*) continue ;;
|
||||||
|
PeachPy-*) mv -v ${d} python-peachpy || die ;;
|
||||||
|
*) mv -v ${d} ${d%-*} || die ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
mv -v FBGEMM fbgemm || die
|
||||||
|
cd fbgemm || die
|
||||||
|
rm -r third_party || die
|
||||||
|
ln -s .. third_party || die
|
||||||
|
|
||||||
|
cd ../onnx || die
|
||||||
|
rm -r third_party || die
|
||||||
|
ln -s .. third_party || die
|
||||||
|
|
||||||
|
if use cuda; then
|
||||||
|
cd ../nccl || die
|
||||||
|
eapply "${FILESDIR}"/${PN}-1.6.0-nccl-nvccflags.patch
|
||||||
|
ln -s . nccl || die
|
||||||
|
|
||||||
|
cuda_src_prepare
|
||||||
|
export CUDAHOSTCXX=$(cuda_gccdir)/g++
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd ../tensorpipe || die
|
||||||
|
eapply "${FILESDIR}"/${PN}-1.6.0-tensorpipe-unbundle-libuv.patch
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local blas="Eigen"
|
||||||
|
|
||||||
|
if use atlas; then
|
||||||
|
blas="ATLAS"
|
||||||
|
elif use mkl; then
|
||||||
|
blas="MKL"
|
||||||
|
elif use openblas; then
|
||||||
|
blas="OpenBLAS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local mycmakeargs=(
|
||||||
|
-DTORCH_BUILD_VERSION=${PV}
|
||||||
|
-DTORCH_INSTALL_LIB_DIR=$(get_libdir)
|
||||||
|
-DBUILD_BINARY=$(usex tools ON OFF)
|
||||||
|
-DBUILD_CUSTOM_PROTOBUF=OFF
|
||||||
|
-DBUILD_PYTHON=$(usex python ON OFF)
|
||||||
|
-DBUILD_SHARED_LIBS=$(usex static OFF ON)
|
||||||
|
-DBUILD_TEST=$(usex test ON OFF)
|
||||||
|
-DUSE_ASAN=$(usex asan ON OFF)
|
||||||
|
-DUSE_CUDA=$(usex cuda ON OFF)
|
||||||
|
-DUSE_NCCL=$(usex cuda ON OFF)
|
||||||
|
-DUSE_SYSTEM_NCCL=OFF
|
||||||
|
-DUSE_ROCM=OFF
|
||||||
|
-DUSE_FBGEMM=$(usex fbgemm ON OFF)
|
||||||
|
-DUSE_FFMPEG=$(usex ffmpeg ON OFF)
|
||||||
|
-DUSE_GFLAGS=$(usex gflags ON OFF)
|
||||||
|
-DUSE_GLOG=$(usex glog ON OFF)
|
||||||
|
-DUSE_LEVELDB=$(usex leveldb ON OFF)
|
||||||
|
-DUSE_LITE_PROTO=OFF
|
||||||
|
-DUSE_LMDB=$(usex lmdb ON OFF)
|
||||||
|
-DCAFFE2_USE_MKL=$(usex mkl ON OFF)
|
||||||
|
-DUSE_MKLDNN=$(usex mkldnn ON OFF)
|
||||||
|
-DUSE_MKLDNN_CBLAS=OFF
|
||||||
|
-DUSE_NNPACK=$(usex nnpack ON OFF)
|
||||||
|
-DUSE_NUMPY=$(usex numpy ON OFF)
|
||||||
|
-DUSE_NUMA=$(usex numa ON OFF)
|
||||||
|
-DUSE_OBSERVERS=$(usex observers ON OFF)
|
||||||
|
-DUSE_OPENCL=$(usex opencl ON OFF)
|
||||||
|
-DUSE_OPENCV=$(usex opencv ON OFF)
|
||||||
|
-DUSE_OPENMP=$(usex openmp ON OFF)
|
||||||
|
-DUSE_TBB=OFF
|
||||||
|
-DUSE_PROF=OFF
|
||||||
|
-DUSE_QNNPACK=$(usex qnnpack ON OFF)
|
||||||
|
-DUSE_REDIS=$(usex redis ON OFF)
|
||||||
|
-DUSE_ROCKSDB=OFF
|
||||||
|
-DUSE_ZMQ=$(usex zeromq ON OFF)
|
||||||
|
-DUSE_MPI=$(usex mpi ON OFF)
|
||||||
|
-DUSE_GLOO=$(usex gloo ON OFF)
|
||||||
|
-DUSE_SYSTEM_EIGEN_INSTALL=ON
|
||||||
|
-DBUILD_NAMEDTENSOR=$(usex namedtensor ON OFF)
|
||||||
|
-DBLAS=${blas}
|
||||||
|
)
|
||||||
|
|
||||||
|
cmake-utils_src_configure
|
||||||
|
|
||||||
|
if use python; then
|
||||||
|
CMAKE_BUILD_DIR="${BUILD_DIR}" distutils-r1_src_configure
|
||||||
|
fi
|
||||||
|
|
||||||
|
# do not rerun cmake and the build process in src_install
|
||||||
|
sed '/RERUN/,+1d' -i "${BUILD_DIR}"/build.ninja || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
cmake-utils_src_compile
|
||||||
|
|
||||||
|
if use python; then
|
||||||
|
CMAKE_BUILD_DIR=${BUILD_DIR} distutils-r1_src_compile
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
cmake-utils_src_install
|
||||||
|
|
||||||
|
local LIB=$(get_libdir)
|
||||||
|
if [[ ${LIB} != lib ]]; then
|
||||||
|
mv -fv "${ED}"/usr/lib/*.so "${ED}"/usr/${LIB}/ || die
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rfv "${ED}/torch"
|
||||||
|
rm -rfv "${ED}/var"
|
||||||
|
rm -rfv "${ED}/usr/lib"
|
||||||
|
|
||||||
|
rm -fv "${ED}/usr/include/*.{h,hpp}"
|
||||||
|
rm -rfv "${ED}/usr/include/asmjit"
|
||||||
|
rm -rfv "${ED}/usr/include/c10d"
|
||||||
|
rm -rfv "${ED}/usr/include/fbgemm"
|
||||||
|
rm -rfv "${ED}/usr/include/fp16"
|
||||||
|
rm -rfv "${ED}/usr/include/gloo"
|
||||||
|
rm -rfv "${ED}/usr/include/include"
|
||||||
|
rm -rfv "${ED}/usr/include/var"
|
||||||
|
|
||||||
|
cp -rv "${WORKDIR}/${P}/third_party/pybind11/include/pybind11" "${ED}/usr/include/"
|
||||||
|
|
||||||
|
rm -fv "${ED}/usr/lib64/libtbb.so"
|
||||||
|
rm -rfv "${ED}/usr/lib64/cmake"
|
||||||
|
|
||||||
|
if use python; then
|
||||||
|
install_shm_manager() {
|
||||||
|
TORCH_BIN_DIR="${ED}/usr/lib64/${EPYTHON}/site-packages/torch/bin"
|
||||||
|
|
||||||
|
mkdir -pv ${TORCH_BIN_DIR}
|
||||||
|
cp -v "${ED}/usr/bin/torch_shm_manager" "${TORCH_BIN_DIR}"
|
||||||
|
}
|
||||||
|
|
||||||
|
python_foreach_impl install_shm_manager
|
||||||
|
|
||||||
|
scanelf -r --fix "${BUILD_DIR}/caffe2/python"
|
||||||
|
CMAKE_BUILD_DIR=${BUILD_DIR} distutils-r1_src_install
|
||||||
|
|
||||||
|
python_foreach_impl python_optimize
|
||||||
|
fi
|
||||||
|
|
||||||
|
find "${ED}/usr/${LIB}" -name "*.a" -exec rm -fv {} \;
|
||||||
|
|
||||||
|
use test && rm -rfv "${ED}/usr/test" "${ED}"/usr/bin/test_{api,jit}
|
||||||
|
|
||||||
|
# Remove the empty directories by CMake Python:
|
||||||
|
find "${ED}" -type d -empty -delete || die
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user