diff --git a/sci-libs/pytorch/Manifest b/sci-libs/pytorch/Manifest deleted file mode 100644 index 1ce8726..0000000 --- a/sci-libs/pytorch/Manifest +++ /dev/null @@ -1,25 +0,0 @@ -DIST FP16-4dfe081cf.tar.gz 71301 SHA256 90f20492621d5ed80b442aa682ff92d7ccf333ac8fac4a10e7e02afb159f3c13 SHA512 e79a1f6f8d4aeca85982158d5b070923d31d4f2062ed84cfa6f26c47a34f2e8ac49e0f330b7d49f5732d5e1eec6e7afccdac43645070060fb7827e2ce261dd3e WHIRLPOOL 23f13ff27577ff6b018de1d1ded973f6359995d88df577bc04738094d146f5a7938d2dc1c5a6e721afa31eb32043b7f5fe0be2dd5647c5b044863205ed72ef27 -DIST FXdiv-b408327ac.tar.gz 9652 SHA256 9ccf554541666b5c089ad5dd465141d671c99971f36d72f313652f5c49ffce14 SHA512 d46d7c1437eccf8dc5ab5e51b0641d190839451ab059c8a24a220a9cf05a84a66b5d08c3ff730622efe491152a8378a2c726fd9abad19a3df98db40d6a13e4b9 WHIRLPOOL 15729d050a2a1f7e001656f8ad2de3d0498baed882aa459baeeede5df4e2ab54f09d3dda6d0c25b5ab106749498c2b8935b943ca30096f166e087db3b83a60ef -DIST NNPACK-24b55303f.tar.gz 219131 SHA256 1f11dbbfad78d0a4c39fe94e52a28c0821cb25f9880420bb304f6302f73fe002 SHA512 43d6c69f19f9604809a2cc9cd9f8f027ff1f3dc2bac106429df1a0cf65f3f8b8fc3ec4c6b76a29decf3584440ad4c83f800ae2f8bfdc9b73df903a076cd97a18 WHIRLPOOL 78ba471626bc52f8891f577f5984c300c8165643f344f81f17c365cd0955fc93f632f306fb5736c98c8ca707bb8a117cbc44d1b69b4b0c0a89f7cb47107e0921 -DIST PeachPy-07d8fde8a.tar.gz 401648 SHA256 13100c3deed300bbf16f87d8af3539f432462bfef9d38f0c7e3e387dc2e88676 SHA512 8d6cc91c8c4d56b86ef93f0acd6768a1830ecd078524b21d1a3b9ecb015f06607070148de3e634d9c5ce63ed523a8e34aa388d490e7eee061200098f39126afa WHIRLPOOL 1bb2e2793997268570e48440120a436b83680792ae02a4b42f29ab486accabba3c0898586e27eba4b23b7f05ca6f5115d2d368bead2bc87241e08d60beb36a38 -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-9057aa30.tar.gz 534633 SHA256 5c7ecb03ede09a38fa9bcf2527a0f1454cd67a34c0e6fd939ae4d93b276ce982 SHA512 678e5ce4a8d96961be4c10aac67d43aa8949ff022dce855a92cf6d626738be8667668c48953d43b6ef21ad7c5f913d07f7f692ad719870700aa97deb80662baf WHIRLPOOL ff42236d3eadfb3f723619fb01b91c473f7d957ff2cef3ba132c3a990bae7abc7ff19fe72a8c69f5c50708f6874894a8de2eecdb4389d0c5e47084c5515f1f35 -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 cub-d106ddb99.tar.gz 398104 SHA256 d87f6737be1b544c299340b64b9303c1d6ec0447b49b3aaf6642838b4f8280d7 SHA512 8d65c0407448125378495190ee2a2c0e3b27a3577efbd6bb5aa8ad76f5bf2bf17becdc6ef931672a4d16b033fd7c0a199bb60e62b0b2b311e5f59c4136f55835 WHIRLPOOL cad505b7cfa7950269e5447e7a5efcb66f3e4e58bed98ca7abfe7d2e1c99acc4ba26aa7b335d934d7a04a1414f4a9d6ab49d1ab44bd272a1e7ad0bf675ceedc2 -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 gemmlowp-3fb5c176c.tar.gz 826382 SHA256 fdd6f08bdb33d33f4df516ffb91730fdb163479c19502cfc983083fd9cf43bfa SHA512 1c97bba41931c7fddf0e7c01312892cfa3d87abe2a4cdaf4cd20d846a102c5ad3d85329ccdb386f7047f2f037e92639cbcf91b317c2bf38bee11c12e71584afc WHIRLPOOL d5c6ffdebe7e17a92074cc7a6dc483cab7465bac6dc428a34ccb57f0bf810f82dd4b6ef908735c7949aa8cc41a22ea22806528183f2197284c3462adf7859108 -DIST gloo-3d08580f9.tar.gz 227739 SHA256 3a5bf834a5891350ffff8d09b6066de7bd77d18e754f11cbbcb70f9f76a11c94 SHA512 3dee533b350862cabce410f054fd943b4524b60394da1e92b9c73830e143b9abd30e5a493fe0c064d6fee8c15bd09b12620f0b528122170df329548c57116bd1 WHIRLPOOL f7be2672ada1ee385ad592e1c7deabf038f66baadbc3c2823289a883f0bfdec582b3b40ed206ed03414eaf2d8e67b364bcca83bb0d0c5e177b7752e2272c28bb -DIST googletest-2fe3bd994.tar.gz 993527 SHA256 d0d447b4feeedca837a0d46a289d4223089b32ac2f84545fa4982755cc8919be SHA512 130182d2c1067bcd263fb27999c164d240f5d06d837475e71e7cadbf65c7211de00154dc1e15deae0b6ec2963799e55c0c21ee971e1c588064c5063e69a2bf1e WHIRLPOOL e7f57f9e35927c4ce12aba61597c2a8b6cba38c30a0bbde6681d8ff349477c431b9e6128fa6b9040fee99622580e61c8daead2364b9e8fe65542003366d7e346 -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 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 psimd-072586a71.tar.gz 6825 SHA256 f6c4dab91ae9a03b3019e7cab0572743afd0e1b6e75b97fcca50259c737c924e SHA512 a18faea093423dd9fe19ece8b228e011dccce0a2a22222f777ea19b023a13173966d4a8aea01147e8fc58de5d39cffcedeb2221a1572ae52bd5aba1295f86a94 WHIRLPOOL 03a64f0c4f16d7ea263e34e44558b17500e14d88cabfc5267874509279b779f614784ddbe96bb6f2763d5e8868b2afc11754efcd79f1b63275976539c7ee52bc -DIST pthreadpool-029c88620.tar.gz 45970 SHA256 d13818a10a645d557202aa005606337b2a0cdf690e5655253800ab11abb0c076 SHA512 b51099fa9d62065883cc43dcd5f9717a17be5ee2e87fc861667172a09acb3a62929c8bbc8a5c0c00885a638af0ec2ae4149adde2ba85bf3c80834f9b973c2d5b WHIRLPOOL 3b8304ee02e92ec7f298168e7857916f85fe9f30776668ed2a04c4cb52b97c638da025b125599fbf7d5041f60a913e4edf10f9cad40d20a3d7a7005301245cba -DIST pytorch-1.6.0.tar.gz 11376568 SHA256 7160e5bd291ad649d035f1c830dd064d1db42839b64b9a3502b5d47641233fb7 SHA512 117ff1588ed1ebd0df15fbed066c65ea026893fe9a40d14aa1f73d848fab114b1b11bd7ed083815030f7fdf13a824480521cb40865f48a24c7028f4d195f2127 WHIRLPOOL 03d9270b236502454c966f62426bc87d786b2ad180ec2f3d07c79c26184c91e3b52763c34638ce1e3d85c30a4b05b78813e693b714fef19939f478e9cfea85a2 -DIST sleef-7f523de65.tar.gz 1174007 SHA256 8cb5fae822077ca9cbc14dcc7bba9a3a35ad519284fc5169f9a176672c63860a SHA512 d83b24c34e83b36314344d5b31f1c3b673e38b44bc2d2bbbfdaf2019c3f0e73a83f2d13c6d745ca99d1532c1a3e0fcb4a71bd212e423bec03d610af5dd49e3f3 WHIRLPOOL 66acba28240c40557de2db457ed2c8f2462dde9a0f7f18dd3179d9d2806741e3b68033c76fe3f710a7351039e2fe175dbe3ed4e413e26add5c7a4914538dc713 -DIST tensorpipe-3b8089c9c.tar.gz 141980 SHA256 9d78a64a4456eb0caeba8742080c39e07019114c1f4914f0e1ffa8f0a507c40f SHA512 1e9473532b11c23ec7dd9fdb148c0440263ae41f42a7826a4f7e098ed2a7e0c99d5e9df344b310e17098c3d70749a38d20d8af992c4820bebdbd5078d1a20dcc WHIRLPOOL ba9adb45000274968b1b3bd65b7926ad5d761f6bcecf0b0b75cbe4b1cf5148d153cc7d21be027b476b1952f40ab0001217b9bee37416a8108d9743e3e3216ba5 diff --git a/sci-libs/pytorch/files/0002-Don-t-build-libtorch-again-for-PyTorch-1.4.0.patch b/sci-libs/pytorch/files/0002-Don-t-build-libtorch-again-for-PyTorch-1.4.0.patch deleted file mode 100644 index de9fe9a..0000000 --- a/sci-libs/pytorch/files/0002-Don-t-build-libtorch-again-for-PyTorch-1.4.0.patch +++ /dev/null @@ -1,30 +0,0 @@ -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)) diff --git a/sci-libs/pytorch/files/0003-Change-path-to-caffe2-build-dir-made-by-libtorch.patch b/sci-libs/pytorch/files/0003-Change-path-to-caffe2-build-dir-made-by-libtorch.patch deleted file mode 100644 index f71ba17..0000000 --- a/sci-libs/pytorch/files/0003-Change-path-to-caffe2-build-dir-made-by-libtorch.patch +++ /dev/null @@ -1,46 +0,0 @@ -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 - diff --git a/sci-libs/pytorch/files/0004-Don-t-fill-rpath-of-Caffe2-library-for-system-wide-i.patch b/sci-libs/pytorch/files/0004-Don-t-fill-rpath-of-Caffe2-library-for-system-wide-i.patch deleted file mode 100644 index c8f57d9..0000000 --- a/sci-libs/pytorch/files/0004-Don-t-fill-rpath-of-Caffe2-library-for-system-wide-i.patch +++ /dev/null @@ -1,104 +0,0 @@ -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 $ 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 $ 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 - diff --git a/sci-libs/pytorch/files/0005-Change-library-directory-according-to-CMake-build.patch b/sci-libs/pytorch/files/0005-Change-library-directory-according-to-CMake-build.patch deleted file mode 100644 index 324b8f6..0000000 --- a/sci-libs/pytorch/files/0005-Change-library-directory-according-to-CMake-build.patch +++ /dev/null @@ -1,31 +0,0 @@ -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 - diff --git a/sci-libs/pytorch/files/0010-Remove-conversion-ambiguity-in-ternary-operators.patch b/sci-libs/pytorch/files/0010-Remove-conversion-ambiguity-in-ternary-operators.patch deleted file mode 100644 index 49835d2..0000000 --- a/sci-libs/pytorch/files/0010-Remove-conversion-ambiguity-in-ternary-operators.patch +++ /dev/null @@ -1,38 +0,0 @@ -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(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( - 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 - diff --git a/sci-libs/pytorch/files/pytorch-1.2.0-setup.patch b/sci-libs/pytorch/files/pytorch-1.2.0-setup.patch deleted file mode 100644 index 85e796a..0000000 --- a/sci-libs/pytorch/files/pytorch-1.2.0-setup.patch +++ /dev/null @@ -1,24 +0,0 @@ -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 - ################################################################################ diff --git a/sci-libs/pytorch/files/pytorch-1.4.0-nccl-nvccflags.patch b/sci-libs/pytorch/files/pytorch-1.4.0-nccl-nvccflags.patch deleted file mode 100644 index 165e79d..0000000 --- a/sci-libs/pytorch/files/pytorch-1.4.0-nccl-nvccflags.patch +++ /dev/null @@ -1,28 +0,0 @@ -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 diff --git a/sci-libs/pytorch/files/pytorch-1.4.0-skip-tests.patch b/sci-libs/pytorch/files/pytorch-1.4.0-skip-tests.patch deleted file mode 100644 index 3682469..0000000 --- a/sci-libs/pytorch/files/pytorch-1.4.0-skip-tests.patch +++ /dev/null @@ -1,28 +0,0 @@ -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) diff --git a/sci-libs/pytorch/files/pytorch-1.4.0-sleef.patch b/sci-libs/pytorch/files/pytorch-1.4.0-sleef.patch deleted file mode 100644 index 222a0f7..0000000 --- a/sci-libs/pytorch/files/pytorch-1.4.0-sleef.patch +++ /dev/null @@ -1,15 +0,0 @@ -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 $) -+ target_include_directories(${test_name} PRIVATE $) - target_include_directories(${test_name} PRIVATE ${Caffe2_CPU_INCLUDE}) - add_test(NAME ${test_name} COMMAND $) - if (INSTALL_TEST) diff --git a/sci-libs/pytorch/files/pytorch-1.6.0-global-dlopen.patch b/sci-libs/pytorch/files/pytorch-1.6.0-global-dlopen.patch deleted file mode 100644 index 1e9388f..0000000 --- a/sci-libs/pytorch/files/pytorch-1.6.0-global-dlopen.patch +++ /dev/null @@ -1,15 +0,0 @@ -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 \ diff --git a/sci-libs/pytorch/files/pytorch-1.6.0-nccl-nvccflags.patch b/sci-libs/pytorch/files/pytorch-1.6.0-nccl-nvccflags.patch deleted file mode 100644 index 052474e..0000000 --- a/sci-libs/pytorch/files/pytorch-1.6.0-nccl-nvccflags.patch +++ /dev/null @@ -1,27 +0,0 @@ -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 diff --git a/sci-libs/pytorch/files/pytorch-1.6.0-setup.patch b/sci-libs/pytorch/files/pytorch-1.6.0-setup.patch deleted file mode 100644 index 6a197a9..0000000 --- a/sci-libs/pytorch/files/pytorch-1.6.0-setup.patch +++ /dev/null @@ -1,14 +0,0 @@ -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')) diff --git a/sci-libs/pytorch/files/pytorch-1.6.0-skip-tests.patch b/sci-libs/pytorch/files/pytorch-1.6.0-skip-tests.patch deleted file mode 100644 index 3ef2c53..0000000 --- a/sci-libs/pytorch/files/pytorch-1.6.0-skip-tests.patch +++ /dev/null @@ -1,14 +0,0 @@ -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) diff --git a/sci-libs/pytorch/files/pytorch-1.6.0-tensorpipe-unbundle-libuv.patch b/sci-libs/pytorch/files/pytorch-1.6.0-tensorpipe-unbundle-libuv.patch deleted file mode 100644 index a4ba383..0000000 --- a/sci-libs/pytorch/files/pytorch-1.6.0-tensorpipe-unbundle-libuv.patch +++ /dev/null @@ -1,13 +0,0 @@ -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) - diff --git a/sci-libs/pytorch/metadata.xml b/sci-libs/pytorch/metadata.xml deleted file mode 100644 index 423c3c4..0000000 --- a/sci-libs/pytorch/metadata.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - 4ernov@gmail.com - Alexey Chernov - - - heroxbd@gentoo.org - Benda Xu - - - Build with address sanitizer (ASAN) - Use ATLAS as BLAS implementation - Enable support for nVidia CUDA - Use Eigen as BLAS implementation - Enable FBGEMM (Facebook GEneral Matrix Multiplication) support - Build with gflags - Build with glog support - Build gloo distributed communication backend support - Enable support for LevelDB - Enable support for LMDB - Use Intel MKL as BLAS implementation - Build with Intel MKL-DNN support - Enable support for named tensors - Enable NNPACK support - Enable support for NUMA - Enable NumPy support - Build observers - Use OpenBLAS as BLAS implementation - Enable support for OpenCV - Enable support for OpenCL - Enable QNNPACK support - Enable support for Redis - Build binary tools - Enable support for ZeroMQ - - diff --git a/sci-libs/pytorch/pytorch-1.6.0-r2.ebuild b/sci-libs/pytorch/pytorch-1.6.0-r2.ebuild deleted file mode 100644 index 1fab5fd..0000000 --- a/sci-libs/pytorch/pytorch-1.6.0-r2.ebuild +++ /dev/null @@ -1,286 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7,8} ) - -inherit distutils-r1 cmake 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? ( media-video/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 -" - -#ATen code generation -BDEPEND="dev-python/pyyaml" - -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_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 - - addpredict /dev/nvidiactl - cuda_src_prepare - export CUDAHOSTCXX=$(cuda_gccdir)/g++ - fi - - cd ../tensorpipe || die - eapply "${FILESDIR}"/${PN}-1.6.0-tensorpipe-unbundle-libuv.patch - eapply_user -} - -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_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_src_compile - - if use python; then - CMAKE_BUILD_DIR=${BUILD_DIR} distutils-r1_src_compile - fi -} - -src_install() { - cmake_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 -}