From d69399c7befdd98cda62d6a1788ae2aa7f104c5e Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 7 Jan 2025 06:41:06 +0000 Subject: gentoo auto-resync : 07:01:2025 - 06:41:06 --- dev-util/hip/Manifest | 16 +- dev-util/hip/files/hip-6.2.4-libcxx.patch | 25 ++ dev-util/hip/files/hip-6.3.0-clr-fix-libcxx.patch | 30 +++ dev-util/hip/files/hip-6.3.0-hip-fix-libcxx.patch | 27 +++ dev-util/hip/files/hip-6.3.0-install.patch | 12 + .../files/hip-6.3.0-no-isystem-usr-include.patch | 17 ++ .../hip-test-6.3.0-hipcc-system-install.patch | 12 + dev-util/hip/hip-6.1.2.ebuild | 6 +- dev-util/hip/hip-6.2.4.ebuild | 243 -------------------- dev-util/hip/hip-6.3.0.ebuild | 255 +++++++++++++++++++++ 10 files changed, 392 insertions(+), 251 deletions(-) create mode 100644 dev-util/hip/files/hip-6.2.4-libcxx.patch create mode 100644 dev-util/hip/files/hip-6.3.0-clr-fix-libcxx.patch create mode 100644 dev-util/hip/files/hip-6.3.0-hip-fix-libcxx.patch create mode 100644 dev-util/hip/files/hip-6.3.0-install.patch create mode 100644 dev-util/hip/files/hip-6.3.0-no-isystem-usr-include.patch create mode 100644 dev-util/hip/files/hip-test-6.3.0-hipcc-system-install.patch delete mode 100644 dev-util/hip/hip-6.2.4.ebuild create mode 100644 dev-util/hip/hip-6.3.0.ebuild (limited to 'dev-util/hip') diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest index 81cfbb00a65d..d0ae73866975 100644 --- a/dev-util/hip/Manifest +++ b/dev-util/hip/Manifest @@ -33,11 +33,17 @@ AUX hip-5.7.1-fix-unaligned-access.patch 3011 BLAKE2B d8a6a130edcf51c40e88250508 AUX hip-5.7.1-no_asan_doc.patch 817 BLAKE2B 4bc80470f9cb476289086ae561560bb54fcdd9d1e66ef420dc60f129f29b0de02025be0ed2a7bfd2143b9bc0b456a354abc574dcbff509872a35e2e0c06f7760 SHA512 10a97524acce0c45c8edeccd11b64445f6edeb380e8262e1fc63163c4758efd731af36701dae1c9988264e8ce10971c9b3959ea881e81646994c779a96d10bb9 AUX hip-6.1.0-install.patch 937 BLAKE2B a694b8d4fd433ed788e97df09ed26a58305944b63f1f88948b0ff47f9f60f96236bda072917d279d263d02059aaab0e3d2282feb0cee02a7da86e9f016a091f0 SHA512 62a38326021bb1b81a43cf26336528dd1cb30ac90d41c5a3ab9a2d8996090cb8677fc163d156785347f0cb893c84b7166b698b801e1d52449fdb3ee01e75483b AUX hip-6.1.1-fix-musl.patch 566 BLAKE2B ca84d7a1c38b6ae3e7dedbda8cafa0ad5bf31165c3a7b5af8a1a9714d871eeedb64bd6e6c71960e65ee3f7bed2bdf302d07e7c33e225102123d8516018391430 SHA512 e224e84b6eb4b43fd79e5172ad4882d1862d7a50fcb7ed60afc58148a399a96fafaf14477ed31d503f3ecb4c93ba2b58bdcad3c6dce7afab61ee7a8e60d3f65e +AUX hip-6.2.4-libcxx.patch 659 BLAKE2B 17dbdbbaaacf276a8cc93044c757e8e7df41d1565f4eda26b42a11950ea50d09adca08a129a0bd663d7686fa32efcfa655647ab44531220d58d58ff03a8a62ef SHA512 d6e95b4bbac37f80d194a3e9c701ee9ff23badde37157630d4d07e040693f1d815d1898295d4af4ae16d64d7890c61a328f8cb760004dee6be7c8a96c5a00b1d +AUX hip-6.3.0-clr-fix-libcxx.patch 1218 BLAKE2B 3feb626047419077f257101e181a02420f1141e4d1c3beca1debb737ca01ef77c7208fe34ef53d7e87c39f5e689757a94d0b87bf886e2aaa34d38f22eab4441f SHA512 47df6ca82d215ca92c25175427637f78730a735ca5360c5a3e6cda5a65ac6500e42ed99813c63650f05e8e88e0de8245d769d8204bd4c9b77bfd1019ebbf3852 +AUX hip-6.3.0-hip-fix-libcxx.patch 699 BLAKE2B 5e7063074b9e2b469d6e0a23852f5883871c5fe4e516154ff25785fce00adc3fc4320c49e10d345c47f06927c634d31ec7f45ff0ac096dde31372a2b8e2a1919 SHA512 7ad4dee7c112b94252015752cac571a4b6b09639d16eb61ce00ed3114183c814cb16030916465a89f74de2415c7b2464b45e676f1b1fdc0062c8727c37ad5c48 +AUX hip-6.3.0-install.patch 538 BLAKE2B 583fffab7a744949d6b88b7eba4b77c984a1880cbf9d42d513cb353a51278a93878d3b55f5dd4060f6a98fb787542d9918fa8d599b9cee2e0264c1b38218a20c SHA512 d3e93060abc205605143742734c0facd4004ada29b77fd5f04e758bdd528460d4b0056cbcecd54d844a1313122a0be9e509eca625da04949c2e002f0ab5797cc +AUX hip-6.3.0-no-isystem-usr-include.patch 611 BLAKE2B e5782ed9f6d9ab5be40c5a1d6d3d56387397fd873d55a9c27d5c6f27299ff5e95b97e46bfb9b2010c9a6081c7077445a8a8039dbefcc3bae07038e9ff421fc90 SHA512 f211bd321e8c6c8464108bd5b2a7e5bb0d21c94592ea4e2e54f2157c4d9e8f5c8b4189653e9ad571355279a17aed3b3fa650b9b1ebf1676cbc653a7ca4fa2bc7 AUX hip-test-5.7.0-rocm_agent_enumerator-location.patch 651 BLAKE2B 237ae5e71c9a6c565680c4fb07ece160f6bc635d25c77a20f3da54b92fcead95c0f6871f53a58a1e9b26b1d5fef3372ebc547638ba2fba43621c2867d276e75a SHA512 79d3cb277c41a84e6db70b28ad465067403f27d1f54adcbcd3e3501fc08c29f2aafc60fa2e6e78794eed95987352aa7ae844fbd55abc1abe0be8ff1879ed7d8f AUX hip-test-5.7.1-remove-incompatible-flag.patch 1474 BLAKE2B eeb5442fbb4db172a88949b8d824e036bf6be68b92096d827239a841ede8247e663cb54ede44914272e36be552c2a5f2e99c089807477a8961a255ce2c789b6f SHA512 7ebb72f29adea25200bcd400e7b8dc8fb3b7d017699717d7f495a4cf07a25b3aba749938392268b9b9a461057932cfd340763a43b55623cb6aa64c30e0ee48e0 AUX hip-test-6.0.2-hipcc-system-install.patch 1912 BLAKE2B a20f5bdaf84d7e22ee7903e36d31f9e61328474456a1b91ab936478dd7e79f50510a4f5cb7cfefd31f6c200f9c40afc9ff2641667f10bb8c88871c9aa964faea SHA512 c237658d8d3f3c2ab7cc583dd62c32d1ccda610b2515b47250ce112639d4838c9b3d14e77a9edc7b854d14368fa16c9bd048ec014f528620cb8d11d7601e1350 AUX hip-test-6.1.0-disable-hipKerArgOptimization.patch 943 BLAKE2B 1cfc94f9969d28f64c3b2598916669101f4d5704abec8fedb896f3d26403b273a6acdce5a189380da08174f8a5b679f4c7f3a97e4856c9b683dc68fdd72edb47 SHA512 3cb098d8d672801f394e059540846d541eef38f52da5044e29cac0863b473150a8771c12585ddad1e2e2599c667367529649914779df467f1c5e1dd8acfc13b5 AUX hip-test-6.1.1-fix-musl.patch 5506 BLAKE2B 9f6c97491c76d5194b20e8705a645de170d1234dd1422b1857442c5d1a90d33c726b473d35ce673465e3893cb36f4f2cb1babef5f2140b453234131bb5883193 SHA512 173cdb65c24091548a8ec3c994fc393052ccd582e27a9ffb259bedf6fabf543a0e18aa6a5f5d9fd1541834acee470a1d6d2dc7def88d6b1cbe0c916bbc361a21 +AUX hip-test-6.3.0-hipcc-system-install.patch 581 BLAKE2B c84f259404b1eb7cd616b2d1e4c5f1a46b5b56e330707530107eb3d7d744dc087c5100310453f734dcd43b17a38cbbcabea79bcdade64d12f66b2e2657b3ea2e SHA512 7634d8fa62cb8db2ae5db821e09ec9944ae94920d40fead3d780ff61c8efe95e2f972469f2c2997de4a5c3d2807e61da20bd7ba5718ddbe6086c71ec51456ecb AUX hipvars-5.1.3.pm 629 BLAKE2B 6149f230aa0756603ac0b455d802db9c698be8e4a22367e98915db974ea16176f85f9b5a22e2572183641734cedbbe2ba2c826aa0223ea3e12c5550983db0480 SHA512 26ba459b13df1ad6dc50411ac6589dd3d17eff727fee0e938275912e36459c7a43b35233a7f78bbed282a992e969d8b8f95007964c810a5954b0abeccc67082d AUX hipvars-5.3.3.pm 581 BLAKE2B edf0c1df5f7f5c57189c76fbcedec8155072a9f8e2c580d637dcfb557a844e7cc276b754d0fd8f5a9f59d2c5bbcfda6c9ac9951ad16d8a12bb48e74f062987ab SHA512 9fd72b000f59ec25a74ef5965f4affc5e866025424211b4d81fbea979ffba9f08319dde0063c8c835507a1b9db990f8f25eea3a8e2e6d88faceaf34d5dd722cb AUX hipvars.pm 598 BLAKE2B 1645b12179195b95757d207248c85b7c8d9eda0347caee5cb48bdc66e85fda517f607bcb69cdfc63657a0db04ad8e96494a0a80268df7c17d6bb0e689325c2e8 SHA512 6c4e71455341673a329b4b0163fefd7f2f4b7d62da3496643d0de096755899c99b3b5a80fffbdf29896c234cb4f617b368217f4eecfd005849b294ff434b79c6 @@ -47,10 +53,10 @@ DIST hip-5.1.3-update-header.patch.gz 3406 BLAKE2B 805539c3396a9cdcc4b807afd96ea DIST hip-5.7.1.tar.gz 553774 BLAKE2B f88c235f688d3a662ec6cb4ad7fe3f82c0015015997871609cc30ab5b2f7fcb9709a08683d77194e45a6dbbe1d24c6355b128d2ecf655f1dea3468711c64e0a3 SHA512 68fa8753725b53c999d102d254c6b1dba53af4e00d6a48db93d10213cc02eec30b4a39c66e773d4f625dd9636cf8b0c5faa05b69fac27cf5a6b19dd3ddd2b905 DIST hip-6.1.1.tar.gz 247192 BLAKE2B c40bb483fb61b3037693f456e546046598df7e0dd81a1f1c8d222ab0d9c0752092ce85c8533bd355f883dda5ce1f32f7ff2b2a58cebac50d53e0e7f4d85ca3ae SHA512 3e6162938294a74af51bc2161ada38dc4ba19614e182238f320f2052a9025be6ea413e40f00cb80f4e86696793d6c4431e2417ea798a2330886a3f3e66aedf0d DIST hip-6.1.2.tar.gz 247193 BLAKE2B e343bdf233752e40cdefa0c2bbd56858bbb471155045ae1adcf651ddff2ed40dc7c7069998a35e9b26324fdf1c972e13e1222406bc52ae2591c23a45611864c5 SHA512 771f6494c7ff0ddb7d22193dfdbb3fb9461f6e4be347ecb879bb84c5a01a95fb4c4d3f7a0f039265d5369f6c6a5b66949af7bc91ed220f5e81a5b15ec98a68eb -DIST hip-6.2.4.tar.gz 1482993 BLAKE2B 5ba367305505109631941d89f0b0566fddd73d9f7722216b9a42f9f863490fbbe3f817075ea3739005fc2b0c6c757dbe043823d9d1ec62416a5319992dd1b447 SHA512 1415770bec17cb93aee51683efe17b2bafb625300dd5dbf8e0dbb609a98ef875810dc40f4a3923c8a28f3cecd118d4c58bce61d1334197bca33dfa01336f62fd +DIST hip-6.3.0.tar.gz 1486630 BLAKE2B 97759fa9cbedf9c87dba85b7e3caf030a6f72429aaf63651bfb9fd208a6f6b03e564f5dd973b94dfc07c6b6aea8296c1f9de6a049565a010c14319dc29f2db7a SHA512 86f7c1c18d3ebd14b4e0f6a5b662017145634dd672142ed9d60b4c2310f356b0d7480748b273f3652a4e2fdeaa6a4185a69cd6d45a462c73028a6741c11f092d DIST hip-test-6.1.1.tar.gz 1080605 BLAKE2B 7eddf648be31365479baa0cd4fd1c060a682a6b44d923cac1c4840c0768782db2fef4e5d97318ef0423be1e5c85b1a0cc6b9d324db789dad28be17f64ab38cae SHA512 0dd679c5b94a59e192bea5789f4448b53ac23c8a03b24a347758b1d70ff692483fd4aaea0b19345eb6ffb82a4492ed21958398b53ae6244a244a660dfa33412f DIST hip-test-6.1.2.tar.gz 1080493 BLAKE2B ff501ab92c1d3207e330f5e9630e3300aa52f7c2acfae2173a964a2843952db90eea2b4ecf5db1ec6ba65d7764750b9eae3f2a9641d1a3fc71d5172e3a7264a8 SHA512 09fa4243c8b73ddbe163ff4c60f0f8f4182f1a37071e9747bf95ecdc219ba3a0407bdf1e2391481f537b223565a38f16e918667194666558a469d94f88a1e236 -DIST hip-test-6.2.4.tar.gz 1403884 BLAKE2B edd19e1cd44eeea6c8df9eb3a8af96f12d5296149b7167a0754c79ca494881f76a0ed04ea7c0ff686cb54384c10ee457d367b645624c836024556da3453a6097 SHA512 8b28f07dcece8cb25d6ec2aed63b02feca91c5f48cecd5ae545b058317b6ed59a6300689a398cfb3310ac4e1eb52a83f03f5a671fe0c1a0bca57c49399dc782d +DIST hip-test-6.3.0.tar.gz 1446413 BLAKE2B c24c352eb16fc54099329edd94a88f59270c92d87b12f86ca4728ae0afdefe6b774bb59927d7c9ec74bd291ef3754a676ad446574abc01170dd7bdc3e5fcb084 SHA512 b10a437a1eb7a8caa80234b9f9d21fbd1442e9f5c0d0bcb237c10743f40a40aef2675128c97f9592af256bad08c93fcc3288e4a289a7efcc626302aba77f149f DIST rocclr-5.1.3.tar.gz 618606 BLAKE2B 02b7732ddd03c0883bee49c56466cd21c649159f801bfb2537eea6e640c65613eb57b37d942f465a9deb83d65735f51212dde5e4f77ba8239d1a6b7037e1800c SHA512 89fd2eca39ed84a1cf525b2c606089ef39f64c1f997c4880e10722da6de4864110752640e1508db1aeb9d15c48ba4e6fe5dbe7a9e56718853ece42548028b2ca DIST rocclr-5.3.3.tar.gz 625944 BLAKE2B 0cdbc1415a355e1d56628834846aaa8587c9827eeea59f4312b788e868265dcb42197181fd5ef411416da2e11662c7f665f578aa750ab88c3a5405bcc58ee449 SHA512 3f85532cffc09c2ca8e7cd1770263d1c1a38633ed2bc5cfe62072e12a6f8f669db400519950718be31f6b77693d372e2ef905f06c7f02e126aa9ff7d2da97924 DIST rocclr-5.4.3.tar.gz 640557 BLAKE2B 9ab91bab7ffb06c9c0d1c2ae79533fccc597071dda289ac375e32eb2965c638a7029951d2a49d46eeead9d7d242fe3a0cedb3e444d877af1bbf0e2d801c91e11 SHA512 c1d1a2ca08c2d762a221c04d394469aa7aff46086151333b145e0db9a7c7eb3dbbf8b9693e50d816aa9a13c16b4ebacf5ff3d5d8ff3393a8a764728ef5172d3a @@ -59,7 +65,7 @@ DIST rocm-5.7.0.tar.gz 845881 BLAKE2B 08255edc1407e5ef85895336b11496319695318fce DIST rocm-clr-5.7.1.tar.gz 2008647 BLAKE2B 3db0760d6f83504e60caf88a2dd5e0bc02c7db9d6f263ad0eb2cfc79aa0f88a3699c412844a0158a796d9d02e79660287e791edad787d814eefffea4fd2298b4 SHA512 d79323481d82fc02c12a32cdcc0d14437d512af023e7737db0387b7eecb27fe6e4ae7c71d6adce57932a04bb24c880440d9dc10aeb5af11a4f2ca64d44330965 DIST rocm-clr-6.1.1.tar.gz 2031034 BLAKE2B b0485bb015d31986f4988d1db0c029c826856e50b5bb1b58fac2097c14b3966668f1b8d41ec198889e27ac860497a8b3c081ec31d52390d5c9ff5db092bf7cce SHA512 86925e8b9a9e77b06a57daefbc7279887b4ef7c6a79c3717bc2f2d3bf29926281c60063fd17e21c65d7def520d9f579bf88f69051d053a38750ba968f69ca3fc DIST rocm-clr-6.1.2.tar.gz 2031283 BLAKE2B d51d32a77794ea97f1a3817786c9fd6b482106b665eea6e2c9b4c11e4dce19a3486386eb5ba111554c2d82c30e2a93add7502eed5768caf3fb709fb5fbb2e71b SHA512 e97224451864efe0084c4117f54893c9624a6a9f365a0b4abad08fd9635f008dea742dc589429fbb714e1b8177d06362c0f5a741f6c4a050d0fd4d48da72d54b -DIST rocm-clr-6.2.4.tar.gz 2078004 BLAKE2B 28fdd2a81a5b831e157d781d6d869c02a288d9b8dc47a8a1d0a9f3b7ed99393c06f9b2bbc8d7dc2b2173a1b8c57fa1328b0fd6a7f24e759ace77e8c1ae777442 SHA512 74a198595929003248a3684fb5d83c20a8769eef237fcc07371f4385380f347917d6beaca15527334d06ea19bc446a03fca7251e5b2782f05547a36ccd1dfa49 +DIST rocm-clr-6.3.0.tar.gz 2093572 BLAKE2B 14f75f9f5dc4000a2abf28e523659def8cd96112c9c8b95abb634c33433077faa3ddab3fbe659e0ed2e1f309f63a93b7eb03fa6f246b4cea06ca8c512c13308a SHA512 f005baaf2a8f63946811db990e2d373906b31a4085a51427d407c9e4c1d877a14aeb713190a285953cadb960b5517570941c60e2f998adb2b1f9833f1d2f5925 DIST rocm-hip-5.1.3.tar.gz 967696 BLAKE2B 15cb52b5934b84acf515fe9c83b7c8982e00a23e20af933bdd2c4bc5b56fd42b08c8a08e840c85d2e0a8386d5a0e9c110504f68499989de1aaad00e9a5efcf43 SHA512 6b6fd6c12d73788df1711b12326b97fc7a184f319e0db114947b7967b75f2ee131f81e42e43a4981456b507221a6013133731120409f90214e13304299ccbc24 DIST rocm-hip-5.3.3.tar.gz 1151858 BLAKE2B 5f460b2078c850b3eb4414fcec4a6f951a3b282aa9828f77ba5d5adfdc0ee8d2e62c856e112a154c340daaf7dad49f4871412edd7b38f7fae2e6b17840ee144b SHA512 e747cc10e78cd09009cac762f0e060be13f3447af7ec2a4a2889cbdc09cd76ecb1b5b58c89f09a3b45a8296c2c71e1c55baf113e58a5a12434af3de7168b8d87 DIST rocm-hip-5.4.3.tar.gz 1195173 BLAKE2B 7452ee7a874bc4703b0d3aaaf9fa2a51e223d5650c65c34982a9981dbe14e8ec70c93d7e70c5ad36a8d02c3d2214fa6a393e20502a01418fb3320d8cfe363feb SHA512 1f4100e114576dcbad83aae453e21ab85cf25bd8a6ada380bb11cfc30e5f92ba903055b7257a099321a84b65adb444dd52b8258e82567f4bc882e65d89369b43 @@ -79,6 +85,6 @@ EBUILD hip-5.4.3.ebuild 5263 BLAKE2B 96361dfba28db620df7069af9ea42cc7add5e1a8190 EBUILD hip-5.5.1.ebuild 5269 BLAKE2B 9d23e626dcd85ab20eebf7fcbdd4bd56667564141f5ad57fbfb6d2a3a8b33a5a7008662cde0510f990ca9396effeacc67ff80739a402b6657577a2417f379524 SHA512 df7a300346ebf83eedef34230db52bdf812329781b6c7e7056635c41cb789cca4b87105e0c8d89b316521b2d303b76b699ad50bcde0bfc0bdd0e03e1e931838b EBUILD hip-5.7.1-r2.ebuild 5452 BLAKE2B 18bc692522628f78517622f7201473aa2230d3e05d86efcbf9c476ebe6fc560d46766494288bb85d3cc2a57b0cdcaa8b68d08dd8ce925a9d6920919cd8851972 SHA512 75ace26f26978b0db3b5fd00402b48e84b363649cfb318a82b7dae54fc529c4d79a5b55a1fb0a5282fbe6e6136d8d264d3a3a3f5607e6395e2f8e892d375954b EBUILD hip-6.1.1.ebuild 6720 BLAKE2B 85e752a8d1c409fff2bfed9ea139a9130e4de5c953ceb5a6c1e57f784da42d5326434f72fdf04db4a1592e23b3f7dfc48aaf7738492bfaa50a5a7cac65bf185f SHA512 2567f8f8566289f782c322eb6701ad1bd750150cadd29ea0cd061e184e3ba5fcf4a78550457c6e4b92db9c5743ca40c6e201cbb120fc9f546aa3e7b6e0c26478 -EBUILD hip-6.1.2.ebuild 6720 BLAKE2B 85e752a8d1c409fff2bfed9ea139a9130e4de5c953ceb5a6c1e57f784da42d5326434f72fdf04db4a1592e23b3f7dfc48aaf7738492bfaa50a5a7cac65bf185f SHA512 2567f8f8566289f782c322eb6701ad1bd750150cadd29ea0cd061e184e3ba5fcf4a78550457c6e4b92db9c5743ca40c6e201cbb120fc9f546aa3e7b6e0c26478 -EBUILD hip-6.2.4.ebuild 6652 BLAKE2B e911ac659ece564a210ad6fa318fc05be9f55554e2b369c85e79d784d827aa4c65f9ee4eb1a1c5e491a1a57d146077fd88feee0db7df18a0b4058d3ce8f6deac SHA512 459059eece898e77c7460dd23e5416ec484cf9f0a64f29766f31167be13378aa9416848c262745f4f5326119cc0add4f9c0787e073495916ee72aae333465c07 +EBUILD hip-6.1.2.ebuild 6728 BLAKE2B 2353a8dd93b3bccc1f78119b257209ce4bd53f51ebe07d4867b8df3fab43bd3dfb22f025b216f2b9f37cfdf787f7275c4b8c30e2897d6c1345ff13bd4980049c SHA512 9606245500e1c82bff0b6b0e33eaed4ae2bbc68874af66dc4d27f1830f889c225642f52ab9a565a9bc4720d2a02102389676f44565d49fe0ce5d381cb469ca2b +EBUILD hip-6.3.0.ebuild 6901 BLAKE2B ba577f9729928d15c232dcabbd9eb8a4a52e954a46656d012505c853bf8c0fe94bcda4793e1b19b8aefae5b0a9b1b1ba11821f76aa069914268c77cd950fe104 SHA512 b5b17cea0a25aff604c0a5be1487d46aa4e20257b478f1ceb63c702f2dc8709a4e8a63078544f37cead4a40b0efac2ee9eb008ec6dd6837fb4b30fb81175e31e MISC metadata.xml 1076 BLAKE2B 816a3628360882d89e2bc64f7b5be6442ad4fb0866b6a8291c4701a03e626d9482b93980b34e5ab21c37bda025359978b471d09e2d4817ceeb209d83afaecbfe SHA512 009079d56a9fb1c3212dc4e67dd88bc16bbc6350bb832912543b2a1e6747c77d13021e7a94da9a4c9371722828214b308246e7ad58406276126cdf6e44281506 diff --git a/dev-util/hip/files/hip-6.2.4-libcxx.patch b/dev-util/hip/files/hip-6.2.4-libcxx.patch new file mode 100644 index 000000000000..9f11bae1cd20 --- /dev/null +++ b/dev-util/hip/files/hip-6.2.4-libcxx.patch @@ -0,0 +1,25 @@ +Fix for: class template specialization of '__numeric_type' not in a namespace enclosing '__hip' + +Backports https://github.com/ROCm/clr/pull/109 +--- a/hipamd/include/hip/amd_detail/amd_math_functions.h ++++ b/hipamd/include/hip/amd_detail/amd_math_functions.h +@@ -41,19 +41,6 @@ THE SOFTWARE. + #include + #endif // !defined(__HIPCC_RTC__) + +-#if _LIBCPP_VERSION && __HIP__ +-namespace std { +-template <> +-struct __numeric_type<_Float16> +-{ +- static _Float16 __test(_Float16); +- +- typedef _Float16 type; +- static const bool value = true; +-}; +-} +-#endif // _LIBCPP_VERSION +- + #pragma push_macro("__DEVICE__") + #pragma push_macro("__RETURN_TYPE") + diff --git a/dev-util/hip/files/hip-6.3.0-clr-fix-libcxx.patch b/dev-util/hip/files/hip-6.3.0-clr-fix-libcxx.patch new file mode 100644 index 000000000000..3052e254daba --- /dev/null +++ b/dev-util/hip/files/hip-6.3.0-clr-fix-libcxx.patch @@ -0,0 +1,30 @@ +Fix compilation with libc++ (ROCM/clr part) +--- a/hipamd/include/hip/amd_detail/amd_hip_runtime.h ++++ b/hipamd/include/hip/amd_detail/amd_hip_runtime.h +@@ -386,15 +386,26 @@ hc_get_workitem_absolute_id(int dim) + #pragma push_macro("__CUDA__") + #define __CUDA__ + #include <__clang_cuda_math_forward_declares.h> ++// __clang_cuda_complex_builtins wants ::max ++#include <__clang_hip_math.h> + #include <__clang_cuda_complex_builtins.h> + // Workaround for using libc++ with HIP-Clang. + // The following headers requires clang include path before standard C++ include path. + // However libc++ include path requires to be before clang include path. + // To workaround this, we pass -isystem with the parent directory of clang include + // path instead of the clang include path itself. ++ ++// libc++: transitively includes , which uses __local ++#define ORIGINAL__LOCAL __local ++#undef __local ++ + #include + #include + #include ++ ++#define __local ORIGINAL__LOCAL ++#undef ORIGINAL__LOCAL ++ + #undef __CUDA__ + #pragma pop_macro("__CUDA__") + #endif // !_OPENMP || __HIP_ENABLE_CUDA_WRAPPER_FOR_OPENMP__ diff --git a/dev-util/hip/files/hip-6.3.0-hip-fix-libcxx.patch b/dev-util/hip/files/hip-6.3.0-hip-fix-libcxx.patch new file mode 100644 index 000000000000..01409cb5a6d1 --- /dev/null +++ b/dev-util/hip/files/hip-6.3.0-hip-fix-libcxx.patch @@ -0,0 +1,27 @@ +Fix compilation with libc++ (ROCm/HIP part) +--- a/include/hip/hip_runtime.h ++++ b/include/hip/hip_runtime.h +@@ -49,10 +49,6 @@ THE SOFTWARE. + #include + #include + #include +- +-#if __cplusplus > 199711L +-#include +-#endif + #endif // !defined(__HIPCC_RTC__) + + #include +@@ -67,6 +63,12 @@ THE SOFTWARE. + #endif + + #if !defined(__HIPCC_RTC__) ++// libc++ transitively includes thread->string_view->cuda_wrappers/algorithm, ++// which uses __host__, which is included via hip runtime above ++#if __cplusplus > 199711L ++#include ++#endif ++ + #include + #include + #endif // !defined(__HIPCC_RTC__) diff --git a/dev-util/hip/files/hip-6.3.0-install.patch b/dev-util/hip/files/hip-6.3.0-install.patch new file mode 100644 index 000000000000..40b88f4fcc51 --- /dev/null +++ b/dev-util/hip/files/hip-6.3.0-install.patch @@ -0,0 +1,12 @@ +hipcc files are already installed by dev-util/hipcc, which is a runtime dep +--- a/hipamd/CMakeLists.txt ++++ b/hipamd/CMakeLists.txt +@@ -393,7 +393,7 @@ endif() + install(FILES ${PROJECT_BINARY_DIR}/include/hip/hip_version.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hip) + +-if (NOT ${HIPCC_BIN_DIR} STREQUAL "") ++if (INSTALL_HIPCC AND NOT ${HIPCC_BIN_DIR} STREQUAL "") + file(TO_CMAKE_PATH "${HIPCC_BIN_DIR}" HIPCC_BIN_DIR) + if(EXISTS ${HIPCC_BIN_DIR}) + install(PROGRAMS ${HIPCC_BIN_DIR}/${HIPCC_EXECUTABLE} DESTINATION bin) diff --git a/dev-util/hip/files/hip-6.3.0-no-isystem-usr-include.patch b/dev-util/hip/files/hip-6.3.0-no-isystem-usr-include.patch new file mode 100644 index 000000000000..973de0826c4f --- /dev/null +++ b/dev-util/hip/files/hip-6.3.0-no-isystem-usr-include.patch @@ -0,0 +1,17 @@ +Prevent HIP targets from adding -isystem /usr/include, which breaks +--- a/hipamd/hip-config-amd.cmake.in ++++ b/hipamd/hip-config-amd.cmake.in +@@ -135,13 +135,11 @@ set_target_properties(hip::host PROPERTIES + + set_target_properties(hip::amdhip64 PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" +- INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" + ) + + if(NOT WIN32) + set_target_properties(hip::device PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" +- INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" + ) + endif() + diff --git a/dev-util/hip/files/hip-test-6.3.0-hipcc-system-install.patch b/dev-util/hip/files/hip-test-6.3.0-hipcc-system-install.patch new file mode 100644 index 000000000000..291da5a9ba69 --- /dev/null +++ b/dev-util/hip/files/hip-test-6.3.0-hipcc-system-install.patch @@ -0,0 +1,12 @@ +In Gentoo rocm_agent_enumerator is installed by rocminfo and is in PATH. +--- a/hipTestMain/hip_test_context.cc ++++ b/hipTestMain/hip_test_context.cc +@@ -37,7 +37,7 @@ std::string TestContext::substringFound( + + std::string TestContext::getCurrentArch() { + #if HT_LINUX +- const char* cmd = "/opt/rocm/bin/rocm_agent_enumerator | sort -u | xargs | sed -e 's/ /;/g'"; ++ const char* cmd = "rocm_agent_enumerator | sort -u | xargs | sed -e 's/ /;/g'"; + std::array buffer; + std::string result; + std::unique_ptr pipe(popen(cmd, "r"), pclose); diff --git a/dev-util/hip/hip-6.1.2.ebuild b/dev-util/hip/hip-6.1.2.ebuild index 119be35a396a..f2a1872917fb 100644 --- a/dev-util/hip/hip-6.1.2.ebuild +++ b/dev-util/hip/hip-6.1.2.ebuild @@ -39,7 +39,7 @@ REQUIRED_USE=" DEPEND=" video_cards_amdgpu? ( - >=dev-util/rocminfo-5 + dev-util/rocminfo:${SLOT} $(llvm_gen_dep ' llvm-core/clang:${LLVM_SLOT} ') @@ -67,8 +67,8 @@ RDEPEND="${DEPEND} ) video_cards_amdgpu? ( dev-util/hipcc:${SLOT}[${LLVM_USEDEP}] - >=dev-libs/rocm-device-libs-${PV} - >=dev-libs/roct-thunk-interface-5 + dev-libs/rocm-device-libs:${SLOT} + dev-libs/roct-thunk-interface:${SLOT} ) " diff --git a/dev-util/hip/hip-6.2.4.ebuild b/dev-util/hip/hip-6.2.4.ebuild deleted file mode 100644 index 9671c5fb225b..000000000000 --- a/dev-util/hip/hip-6.2.4.ebuild +++ /dev/null @@ -1,243 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DOCS_BUILDER="doxygen" -DOCS_DEPEND="media-gfx/graphviz" -ROCM_SKIP_GLOBALS=1 - -LLVM_COMPAT=( 18 ) - -inherit cmake docs flag-o-matic llvm-r1 rocm - -TEST_PV=${PV} - -DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability" -HOMEPAGE="https://github.com/ROCm/clr" -SRC_URI=" - https://github.com/ROCm/clr/archive/refs/tags/rocm-${PV}.tar.gz -> rocm-clr-${PV}.tar.gz - https://github.com/ROCm/HIP/archive/refs/tags/rocm-${PV}.tar.gz -> hip-${PV}.tar.gz - test? ( - https://github.com/ROCm/hip-tests/archive/refs/tags/rocm-${TEST_PV}.tar.gz -> hip-test-${TEST_PV}.tar.gz - ) -" -S="${WORKDIR}/clr-rocm-${PV}/" -TEST_S="${WORKDIR}/hip-tests-rocm-${TEST_PV}/catch" - -LICENSE="MIT" -SLOT="0/$(ver_cut 1-2)" -KEYWORDS="~amd64" - -IUSE="debug +hip opencl test video_cards_amdgpu video_cards_nvidia" -RESTRICT="!test? ( test )" - -REQUIRED_USE=" - || ( hip opencl ) - ^^ ( video_cards_amdgpu video_cards_nvidia ) -" - -DEPEND=" - video_cards_amdgpu? ( - >=dev-util/rocminfo-5 - $(llvm_gen_dep ' - llvm-core/clang:${LLVM_SLOT} - ') - dev-libs/rocm-comgr:${SLOT} - dev-libs/rocr-runtime:${SLOT} - ) - video_cards_nvidia? ( - dev-libs/hipother:${SLOT} - ) - x11-base/xorg-proto - virtual/opengl -" -BDEPEND=" - video_cards_amdgpu? ( - dev-util/hipcc:${SLOT}[${LLVM_USEDEP}] - ) -" -RDEPEND="${DEPEND} - llvm-core/clang-runtime:= - opencl? ( - !dev-libs/opencl-icd-loader - !dev-libs/rocm-opencl-runtime - !dev-util/clinfo - !dev-util/opencl-headers - ) - video_cards_amdgpu? ( - dev-util/hipcc:${SLOT}[${LLVM_USEDEP}] - >=dev-libs/rocm-device-libs-${PV} - >=dev-libs/roct-thunk-interface-5 - ) -" - -PATCHES=( - "${FILESDIR}/${PN}-5.7.1-no_asan_doc.patch" - "${FILESDIR}/${PN}-6.1.0-install.patch" - "${FILESDIR}/${PN}-6.1.1-fix-musl.patch" -) - -hip_test_wrapper() { - local CMAKE_USE_DIR="${TEST_S}" - local BUILD_DIR="${TEST_S}_build" - cd "${TEST_S}" || die - "${@}" -} - -src_prepare() { - # NOTE We do this head stand to safe the patch size. - # NOTE Adjust when we drop 5.7.1 - sed \ - -e 's:kAmdgcnTargetTriple:AMDGCN_TARGET_TRIPLE:g' \ - -i hipamd/src/hip_code_object.cpp || die - eapply "${FILESDIR}/${PN}-5.7.1-extend-isa-compatibility-check.patch" - sed \ - -e 's:AMDGCN_TARGET_TRIPLE:kAmdgcnTargetTriple:g' \ - -i hipamd/src/hip_code_object.cpp || die - - # hipamd is itself built by cmake, and should never provide a - # FindHIP.cmake module. But the reality is some package relies on it. - # Set HIP and HIP Clang paths directly, don't search using heuristics - sed -e "s:# Search for HIP installation:set(HIP_ROOT_DIR \"${EPREFIX}/usr\"):" \ - -e "s:#Set HIP_CLANG_PATH:set(HIP_CLANG_PATH \"$(get_llvm_prefix -d)/bin\"):" \ - -i "${WORKDIR}/HIP-rocm-${PV}/cmake/FindHIP.cmake" || die - - cmake_src_prepare - - # With Clang>17 -amdgpu-early-inline-all=true causes OOMs in dependencies - # https://github.com/llvm/llvm-project/issues/86332 - if [ "$LLVM_SLOT" -le "17" ]; then - sed -e "s/-mllvm=-amdgpu-early-inline-all=true //" -i hipamd/hip-config-amd.cmake || die - sed -e "s/-mllvm=-amdgpu-early-inline-all=true;//" -i "${WORKDIR}/HIP-rocm-${PV}/hip-lang-config.cmake.in" - fi - - if use test; then - local PATCHES=( - "${FILESDIR}"/hip-test-6.0.2-hipcc-system-install.patch - "${FILESDIR}"/hip-test-5.7.1-remove-incompatible-flag.patch - "${FILESDIR}"/hip-test-6.1.1-fix-musl.patch - ) - hip_test_wrapper cmake_src_prepare - fi -} - -src_configure() { - # -Werror=strict-aliasing - # https://bugs.gentoo.org/858383 - # https://github.com/ROCm/clr/issues/64 - # - # Do not trust it for LTO either - append-flags -fno-strict-aliasing - filter-lto - - use debug && CMAKE_BUILD_TYPE="Debug" - - # Fix ld.lld linker error: https://github.com/ROCm/HIP/issues/3382 - # See also: https://github.com/gentoo/gentoo/pull/29097 - append-ldflags $(test-flags-CCLD -Wl,--undefined-version) - - local mycmakeargs=( - -DCMAKE_PREFIX_PATH="$(get_llvm_prefix)" - -DCMAKE_SKIP_RPATH=ON - -D__HIP_ENABLE_PCH="no" - - -DCLR_BUILD_HIP="$(usex hip)" - -DCLR_BUILD_OCL="$(usex opencl)" - - -DHIP_COMMON_DIR="${WORKDIR}/HIP-rocm-${PV}" - -DHIPCC_BIN_DIR="${EPREFIX}/usr/bin" - -DROCM_PATH="${EPREFIX}/usr" - -DUSE_PROF_API="no" - -DFILE_REORG_BACKWARD_COMPATIBILITY="no" - - -DOpenGL_GL_PREFERENCE="GLVND" - -DCMAKE_DISABLE_FIND_PACKAGE_Git="yes" - ) - - if use video_cards_amdgpu; then - mycmakeargs+=( - -DHIP_PLATFORM="amd" - ) - elif use video_cards_nvidia; then - mycmakeargs+=( - -DHIPNV_DIR="${EPREFIX}/usr" - -DHIP_PLATFORM="nvidia" - ) - fi - - cmake_src_configure - - if use test; then - local mycmakeargs=( - -DCMAKE_MODULE_PATH="${TEST_S}/external/Catch2/cmake/Catch2" - ) - if use video_cards_amdgpu; then - mycmakeargs+=( - -DROCM_PATH="${BUILD_DIR}/hipamd" - -DHIP_PLATFORM="amd" - ) - elif use video_cards_nvidia; then - mycmakeargs+=( - -DROCM_PATH="${BUILD_DIR}/hipother" - -DHIP_PLATFORM="nvidia" - ) - fi - HIP_PATH="${EPREFIX}/usr" hip_test_wrapper cmake_src_configure - fi -} - -src_compile() { - cmake_src_compile - - if use test; then - HIP_PATH="${BUILD_DIR}"/hipamd \ - hip_test_wrapper cmake_src_compile build_tests - fi -} - -src_test() { - check_amdgpu - export LD_LIBRARY_PATH="${BUILD_DIR}/hipamd/lib" - - # TODO: research how to test Vulkan-related features. - local CMAKE_SKIP_TESTS=( - Unit_hipExternalMemoryGetMappedBuffer_Vulkan_Positive_Read_Write - Unit_hipExternalMemoryGetMappedBuffer_Vulkan_Negative_Parameters - Unit_hipImportExternalMemory_Vulkan_Negative_Parameters - Unit_hipWaitExternalSemaphoresAsync_Vulkan_Positive_Binary_Semaphore - Unit_hipWaitExternalSemaphoresAsync_Vulkan_Positive_Multiple_Semaphores - Unit_hipWaitExternalSemaphoresAsync_Vulkan_Negative_Parameters - Unit_hipSignalExternalSemaphoresAsync_Vulkan_Positive_Binary_Semaphore - Unit_hipSignalExternalSemaphoresAsync_Vulkan_Positive_Multiple_Semaphores - Unit_hipSignalExternalSemaphoresAsync_Vulkan_Negative_Parameters - Unit_hipImportExternalSemaphore_Vulkan_Negative_Parameters - Unit_hipDestroyExternalSemaphore_Vulkan_Negative_Parameters - ) - - MAKEOPTS="-j1" hip_test_wrapper cmake_src_test -} - -src_install() { - cmake_src_install - - # add version file that is required by some libraries - mkdir "${ED}"/usr/include/rocm-core || die - cat <<-EOF > "${ED}"/usr/include/rocm-core/rocm_version.h || die - #pragma once - #define ROCM_VERSION_MAJOR $(ver_cut 1) - #define ROCM_VERSION_MINOR $(ver_cut 2) - #define ROCM_VERSION_PATCH $(ver_cut 3) - #define ROCM_BUILD_INFO "$(ver_cut 1-3).0-9999-unknown" - EOF - - dosym -r /usr/include/rocm-core/rocm_version.h /usr/include/rocm_version.h - - if use video_cards_nvidia; then - newenvd - 99hipconfig <<-EOF - HIP_PLATFORM="nvidia" - HIP_RUNTIME="cuda" - CUDA_PATH="${EPREFIX}/opt/cuda" - EOF - fi -} diff --git a/dev-util/hip/hip-6.3.0.ebuild b/dev-util/hip/hip-6.3.0.ebuild new file mode 100644 index 000000000000..44e28cebea57 --- /dev/null +++ b/dev-util/hip/hip-6.3.0.ebuild @@ -0,0 +1,255 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DOCS_BUILDER="doxygen" +DOCS_DEPEND="media-gfx/graphviz" +ROCM_SKIP_GLOBALS=1 + +LLVM_COMPAT=( 19 ) + +inherit cmake docs flag-o-matic llvm-r1 rocm + +TEST_PV=${PV} + +DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability" +HOMEPAGE="https://github.com/ROCm/clr" +SRC_URI=" + https://github.com/ROCm/clr/archive/refs/tags/rocm-${PV}.tar.gz -> rocm-clr-${PV}.tar.gz + https://github.com/ROCm/HIP/archive/refs/tags/rocm-${PV}.tar.gz -> hip-${PV}.tar.gz + test? ( + https://github.com/ROCm/hip-tests/archive/refs/tags/rocm-${TEST_PV}.tar.gz -> hip-test-${TEST_PV}.tar.gz + ) +" +S="${WORKDIR}/clr-rocm-${PV}/" +TEST_S="${WORKDIR}/hip-tests-rocm-${TEST_PV}/catch" +HIP_S="${WORKDIR}/HIP-rocm-${PV}" + +LICENSE="MIT" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64" + +IUSE="debug +hip opencl test video_cards_amdgpu video_cards_nvidia" + +# some tests are broken +RESTRICT="test" + +REQUIRED_USE=" + || ( hip opencl ) + ^^ ( video_cards_amdgpu video_cards_nvidia ) +" + +DEPEND=" + video_cards_amdgpu? ( + dev-util/rocminfo:${SLOT} + dev-libs/rocm-comgr:${SLOT} + dev-libs/rocr-runtime:${SLOT} + ) + video_cards_nvidia? ( + dev-libs/hipother:${SLOT} + ) + x11-base/xorg-proto + virtual/opengl +" +BDEPEND=" + video_cards_amdgpu? ( + dev-util/hipcc:${SLOT}[${LLVM_USEDEP}] + ) + test? ( + media-libs/freeglut + ) +" +RDEPEND="${DEPEND} + opencl? ( + !dev-libs/opencl-icd-loader + !dev-libs/rocm-opencl-runtime + !dev-util/clinfo + !dev-util/opencl-headers + ) + video_cards_amdgpu? ( + dev-util/hipcc:${SLOT}[${LLVM_USEDEP}] + dev-libs/rocm-device-libs:${SLOT} + dev-libs/roct-thunk-interface:${SLOT} + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-5.7.1-no_asan_doc.patch" + "${FILESDIR}/${PN}-6.3.0-install.patch" + "${FILESDIR}/${PN}-6.1.1-fix-musl.patch" + "${FILESDIR}/${PN}-6.2.4-libcxx.patch" + "${FILESDIR}/${PN}-6.3.0-no-isystem-usr-include.patch" + "${FILESDIR}/${PN}-6.3.0-clr-fix-libcxx.patch" +) + +hip_test_wrapper() { + local CMAKE_USE_DIR="${TEST_S}" + local BUILD_DIR="${TEST_S}_build" + cd "${TEST_S}" || die + "${@}" +} + +src_prepare() { + # NOTE We do this head stand to safe the patch size. + # NOTE Adjust when we drop 5.7.1 + sed \ + -e 's:kAmdgcnTargetTriple:AMDGCN_TARGET_TRIPLE:g' \ + -i hipamd/src/hip_code_object.cpp || die + eapply "${FILESDIR}/${PN}-5.7.1-extend-isa-compatibility-check.patch" + sed \ + -e 's:AMDGCN_TARGET_TRIPLE:kAmdgcnTargetTriple:g' \ + -i hipamd/src/hip_code_object.cpp || die + + pushd "${HIP_S}" >/dev/null || die + eapply "${FILESDIR}/${PN}-6.3.0-hip-fix-libcxx.patch" + + # hipamd is itself built by cmake, and should never provide a + # FindHIP.cmake module. But the reality is some package relies on it. + # Set HIP and HIP Clang paths directly, don't search using heuristics + sed -e "s:# Search for HIP installation:set(HIP_ROOT_DIR \"${EPREFIX}/usr\"):" \ + -e "s:#Set HIP_CLANG_PATH:set(HIP_CLANG_PATH \"$(get_llvm_prefix -d)/bin\"):" \ + -i "cmake/FindHIP.cmake" || die + popd >/dev/null || die + + sed -e "s/ -Werror//g" -i "hipamd/src/CMakeLists.txt" || die + + cmake_src_prepare + + if use test; then + local PATCHES=( + "${FILESDIR}"/hip-test-6.3.0-hipcc-system-install.patch + "${FILESDIR}"/hip-test-5.7.1-remove-incompatible-flag.patch + "${FILESDIR}"/hip-test-6.1.1-fix-musl.patch + ) + sed -e "s/-Werror //" -e "s/-Wall -Wextra //" -i "${TEST_S}/CMakeLists.txt" || die + + hip_test_wrapper cmake_src_prepare + fi +} + +src_configure() { + # -Werror=strict-aliasing + # https://bugs.gentoo.org/858383 + # https://github.com/ROCm/clr/issues/64 + # + # Do not trust it for LTO either + append-flags -fno-strict-aliasing + filter-lto + + use debug && CMAKE_BUILD_TYPE="Debug" + + # Fix ld.lld linker error: https://github.com/ROCm/HIP/issues/3382 + # See also: https://github.com/gentoo/gentoo/pull/29097 + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + local mycmakeargs=( + -DCMAKE_PREFIX_PATH="$(get_llvm_prefix)" + -DCMAKE_SKIP_RPATH=ON + -D__HIP_ENABLE_PCH=OFF + + -DCLR_BUILD_HIP="$(usex hip)" + -DCLR_BUILD_OCL="$(usex opencl)" + + -DHIP_COMMON_DIR="${HIP_S}" + -DHIP_ENABLE_ROCPROFILER_REGISTER=OFF + -DHIPCC_BIN_DIR="${EPREFIX}/usr/bin" + -DROCM_PATH="${EPREFIX}/usr" + -DUSE_PROF_API=OFF + -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF + + -DOpenGL_GL_PREFERENCE="GLVND" + -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON + ) + + if use video_cards_amdgpu; then + mycmakeargs+=( + -DHIP_PLATFORM="amd" + ) + elif use video_cards_nvidia; then + mycmakeargs+=( + -DHIPNV_DIR="${EPREFIX}/usr" + -DHIP_PLATFORM="nvidia" + ) + fi + + cmake_src_configure + + if use test; then + local mycmakeargs=( + -DCMAKE_MODULE_PATH="${TEST_S}/external/Catch2/cmake/Catch2" + -DROCM_PATH="${EPREFIX}/usr" + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON + -Wno-dev + + # 1) Use custom build of hipamd instead of system one + # 2) Build fails with libc++: https://github.com/llvm/llvm-project/issues/119076 + -DCMAKE_CXX_FLAGS="-I${BUILD_DIR}/hipamd/include -stdlib=libstdc++" + -DCMAKE_EXE_LINKER_FLAGS="-L${BUILD_DIR}/hipamd/lib" + ) + if use video_cards_amdgpu; then + mycmakeargs+=( + -DHIP_PLATFORM="amd" + ) + elif use video_cards_nvidia; then + mycmakeargs+=( + -DHIP_PLATFORM="nvidia" + ) + fi + hip_test_wrapper cmake_src_configure + fi +} + +src_compile() { + cmake_src_compile + + if use test; then + hip_test_wrapper cmake_src_compile build_tests + fi +} + +src_test() { + check_amdgpu + export LD_LIBRARY_PATH="${BUILD_DIR}/hipamd/lib" + + # TODO: research how to test Vulkan-related features. + local CMAKE_SKIP_TESTS=( + Unit_hipExternalMemoryGetMappedBuffer_Vulkan_Positive_Read_Write + Unit_hipExternalMemoryGetMappedBuffer_Vulkan_Negative_Parameters + Unit_hipImportExternalMemory_Vulkan_Negative_Parameters + Unit_hipWaitExternalSemaphoresAsync_Vulkan_Positive_Binary_Semaphore + Unit_hipWaitExternalSemaphoresAsync_Vulkan_Positive_Multiple_Semaphores + Unit_hipWaitExternalSemaphoresAsync_Vulkan_Negative_Parameters + Unit_hipSignalExternalSemaphoresAsync_Vulkan_Positive_Binary_Semaphore + Unit_hipSignalExternalSemaphoresAsync_Vulkan_Positive_Multiple_Semaphores + Unit_hipSignalExternalSemaphoresAsync_Vulkan_Negative_Parameters + Unit_hipImportExternalSemaphore_Vulkan_Negative_Parameters + Unit_hipDestroyExternalSemaphore_Vulkan_Negative_Parameters + ) + + MAKEOPTS="-j1" hip_test_wrapper cmake_src_test +} + +src_install() { + cmake_src_install + + # add version file that is required by some libraries + mkdir "${ED}"/usr/include/rocm-core || die + cat <<-EOF > "${ED}"/usr/include/rocm-core/rocm_version.h || die + #pragma once + #define ROCM_VERSION_MAJOR $(ver_cut 1) + #define ROCM_VERSION_MINOR $(ver_cut 2) + #define ROCM_VERSION_PATCH $(ver_cut 3) + #define ROCM_BUILD_INFO "$(ver_cut 1-3).0-9999-unknown" + EOF + + dosym -r /usr/include/rocm-core/rocm_version.h /usr/include/rocm_version.h + + if use video_cards_nvidia; then + newenvd - 99hipconfig <<-EOF + HIP_PLATFORM="nvidia" + HIP_RUNTIME="cuda" + CUDA_PATH="${EPREFIX}/opt/cuda" + EOF + fi +} -- cgit v1.2.3