diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-06-27 07:59:40 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-06-27 07:59:40 +0100 |
commit | d2ed973482fdd800013658e83a61709b29e0a80f (patch) | |
tree | 57ea7666a57b5a05a4c8866e4915e90b4a6e7c94 /dev-util/hip | |
parent | 9f6a82a85d400d6ae7de04c43cee88dbc6bc4da0 (diff) |
gentoo auto-resync : 27:06:2024 - 07:59:39
Diffstat (limited to 'dev-util/hip')
24 files changed, 904 insertions, 211 deletions
diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest index d2bd67b92f8b..9579ca8ea457 100644 --- a/dev-util/hip/Manifest +++ b/dev-util/hip/Manifest @@ -1,14 +1,10 @@ -AUX 0001-SWDEV-316128-HIP-surface-API-support.patch 1156 BLAKE2B 52ff9a2389533ac213055ff8c1d4359cbd490f64699233a6c97dbb54ea8216d94039b016b9dcdde7a304662b9ca5c444ac889a6491e847b0a701e0b0cc0e4b59 SHA512 0c210ac60929a951ce1210b1f76e2e6966cc411834a350e6d01d1eb20cb862056cec881a00978cdbe5bfc61e53128c1cd09c6138cca9469213a6bbf425b8686d -AUX 0001-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch 2734 BLAKE2B 5580ae24e854a42837979a1f6e688eb7edcfeee554577f41611941aa69d5a0bf3f1eb1916c4c7b2ba0389fc16efc31b229a9b21dbec3bfcf0cccad20241191a7 SHA512 156f650559fdeb625c15a8b94320f0b422b04b883f84a5e74ef03293420292be25c118df67bba1ae11fca6a1ac7429b0254aa32b963f7e09a7d8d923589009fd -AUX 0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch 7304 BLAKE2B 3fca9d44f706250438f1c3f5d44142e1fa3040336eb9ab8b9e7fc54b9473e11957962a9a93cdb3b6980228fffe1a3fd5dab3f8c972340a83723858c12790c1f8 SHA512 7e54d22b0a0924c79d0b31764586891401d1a39f37380d3809e23a60075baacc55468930c30fa5a8ce64083b274701dbc190f67244822191873ae4f831a7fc33 -AUX 0002-SWDEV-355608-Remove-clang-include-path-2996.patch 1866 BLAKE2B 89e377104b0bc383f69c10f894ff28cb8282eeaf042fcb27b03a64b78959c147ef6cd4291aef47a25b616ea2b801363d7a382df4d924ba94fcea7e9ffa1b26f6 SHA512 7f73d7a66adc959ef4dd0dc3540b6db472a3650926f315f4c79761a45e619432107898dc58cb15958be4b36823029ccf91e599760a23fd886429789de586db3b -AUX 0003-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch 8063 BLAKE2B c0b7b83682c13bb21e6a152b8c4c2b003024fd2dfc4f5f59e8b91b3d933bbfa888549c1a4471a29a225400f3d900d47023c3394111d41a3ecf52a48647db1694 SHA512 972a249daf692ce847884821a1205608d9ee2941793c474cb36f435eff2ad52dc7cb4f1a3a48a4037df3d62a6e47db84c86014933c94b4bb9bf7b7b12f31cce1 AUX hip-4.2.0-cancel-hcc-header-removal.patch 820 BLAKE2B 544f93864fafe38a0ac2456f6301f8076ea24061bd4fe9a5501a366cca6d46edbb50eaac6c71acb3534579cdd9fa5518a687ac7e6d265926db53f0820fdec0f2 SHA512 3e37b761148cc31f78d6beb6bdff4b472fe4171a496b8f76ecbe82900f1483df690f846e0473ae700127482bcc3787af16bcd6217506e1e9dd1ad019408725a5 AUX hip-4.2.0-config-cmake-in.patch 588 BLAKE2B 98081d4caa593756c966b8eff9e3a306ba4d9799abaaccb9bdab40db3e32dd769b07b3c428a22787231e8819e62cd50a33f549f2d1de32f9528036f1abf400cb SHA512 803aae515ee8e2694e5ba1cf6b5d66c98a9e0abf422479c7f599e8bfa38b027062a40e3e9806fa0057fa89a00d019c93d22f1c1ad78f68f1ac3f9bea5ebd93be AUX hip-5.0.1-DisableTest.patch 1689 BLAKE2B dd25393370a594abd3cb6fe8abab6481c2c544edb3f84c7b6481501fd5c2cd33970245cb38d148c5218915a67a8c1d24fde14a5a5c47ed809c613ec78b6d25c7 SHA512 6932af7662b067766b6566f858dba9606818757070b642778d559b83052097ee2ecedb1ae0184ab000c7b068b5413201bb5521e0aa3bf090df369139f292306e AUX hip-5.0.1-hip_vector_types.patch 312 BLAKE2B fb5a61a73e741e2456c031adc9c2e96fdccb5b88a3d99e6b4d31a9b53897f6ccbb41c9535296b55512055f0581a394289bae31036d3b7c07a8081e88708b9a19 SHA512 2ab41b46baf0f8adcb82f55b7ebfcfa3097159b7317d2609b490c0406ba47728c37531c03b0a4e474d760776cf7b614e32ccab45c769ce2fb8e54fcdffa61f5a AUX hip-5.0.2-correct-ldflag.patch 1117 BLAKE2B 8d11bc278660fb7e14585822a462de96ebca78bf5cec026c8097fa2b9eef87f3d4fd21641d0cfe77f217067bc161b6ece94eb55de71611f106243c8bd41b157c SHA512 1d4b46f941f5b3115705a416822b2a7c034ca6611a7706bc126902e5130239dcf84624f35624f9c7b952314c1d76fcba3f17e40ceb2574b4b37bddada073f808 AUX hip-5.0.2-set-build-id.patch 741 BLAKE2B 9d4668ab770fd1ebc93a19a3ddc2916e8feb69a95e54ceb5955c4a162733b8899d43f906c86b0b994add22ab46969ff18aad03035e6285a6492bc9c1405bce38 SHA512 714b2f8e791f0e30a7af567e430e2bba38473725e0d96e42de0c97a2ba939fd83b2f233eebf03cb8a6a82d10c46cfa5ea869af97f35c02da38924250a19e660a +AUX hip-5.1.3-0001-SWDEV-316128-HIP-surface-API-support.patch 1156 BLAKE2B 52ff9a2389533ac213055ff8c1d4359cbd490f64699233a6c97dbb54ea8216d94039b016b9dcdde7a304662b9ca5c444ac889a6491e847b0a701e0b0cc0e4b59 SHA512 0c210ac60929a951ce1210b1f76e2e6966cc411834a350e6d01d1eb20cb862056cec881a00978cdbe5bfc61e53128c1cd09c6138cca9469213a6bbf425b8686d AUX hip-5.1.3-clang-include-path.patch 564 BLAKE2B 8cdfbd9eba9c5e642a8e85aa269b0e369ef11a90c30771e0b1ef21d1ff1bfbb6d9f27cc03693b22b39347d939a11994ffbe4dd2f9edc5583811fff273c304307 SHA512 e6d8dda10155a6d269435f37bf8d4fa25b503861450d474cc01c21ea582857caa9ed26ca04e513b12708ae60348cd32296aaf39c805ee3f925e7d6590cae658c AUX hip-5.1.3-correct-sample-install-location.patch 537 BLAKE2B 924010e903cf7a27591930f5533bc41591ea7821b1f5f73bbbe5d5659a78a712699bb3be94ec5e473a0a5e0d11140850f7bb8e00f7775688adaa79deb7f2597f SHA512 91d89d403eef7ba460e648f5415f654601147920a81f650c40928733d5dbb8a99ebc00530052bf22bec67d9d325bde867c08e7d24e1e05b734b9e31a909030f7 AUX hip-5.1.3-fix-hip_prof_gen.patch 1480 BLAKE2B caa3fa9840a8add5a25daaeb6f26eed9da3fe55686f6343e31b836a0b2e12999cd45d9220469cde036c7914f672b6cc46695fce1bfe4a8d6d35c836cdc14e413 SHA512 a588238cb12dc973acc6513bead68439b10b49214d5dceb81a0498510f79269b79897a02dd9e2ee1ef396a762d49310fd0a406d7f8b6c0e85faeba0f69b1de23 @@ -16,6 +12,10 @@ AUX hip-5.1.3-fno-stack-protector.patch 788 BLAKE2B 8f9d01ceeec2098df4d49e116c14 AUX hip-5.1.3-llvm-15-noinline-keyword.patch 829 BLAKE2B 39b859e90acacd2eccdd60b690e1d882b63cfa66ff1b12effe447b18de72ffd61dd32983552f9ae39b384c3bbfbbcfd59ff2bb47943c1340bf6c1df5cb7d4075 SHA512 1933e883f84451e8512669572ea03dd25c916c6baeafac27b07e3d4a5e89165952a64afaceade4546e7e2d4473aba9811ac21131f283f9680d35e777ad9659a7 AUX hip-5.1.3-remove-cmake-doxygen-commands.patch 896 BLAKE2B 35640516bf416760db69b736d72c1e78efdbad8a930d621fdaffd13c5c250f5d80a6975c1e4c368389ce8059aee964c36645f420d0844141d09463637ba0bccb SHA512 b1288e1f4b7553c5bf0fe38a46fbdf269ca5c01fd8e0e225b9454d4916092601d565c57eaf9f716e06fee816e41cb3a948884060551b5a9d71da9b1a050765f9 AUX hip-5.1.3-rocm-path.patch 564 BLAKE2B ad554063a11d58ce5acfa8c8980bac2668d199b059bc2555d4cea40fbc53b6334daaea448d99cc391cee246d8318a450efdef669db2ee164a4db3a55d7d8e193 SHA512 eaa03f4d2394f61dcedde376de6c398625d284a7ac0c94ff2484929efdf298f455c796b96f16bf3989de6593a9a026a7681620b5ca13ce403aba4a32e5a38226 +AUX hip-5.3.3-0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch 7304 BLAKE2B 3fca9d44f706250438f1c3f5d44142e1fa3040336eb9ab8b9e7fc54b9473e11957962a9a93cdb3b6980228fffe1a3fd5dab3f8c972340a83723858c12790c1f8 SHA512 7e54d22b0a0924c79d0b31764586891401d1a39f37380d3809e23a60075baacc55468930c30fa5a8ce64083b274701dbc190f67244822191873ae4f831a7fc33 +AUX hip-5.3.3-0002-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch 2734 BLAKE2B 5580ae24e854a42837979a1f6e688eb7edcfeee554577f41611941aa69d5a0bf3f1eb1916c4c7b2ba0389fc16efc31b229a9b21dbec3bfcf0cccad20241191a7 SHA512 156f650559fdeb625c15a8b94320f0b422b04b883f84a5e74ef03293420292be25c118df67bba1ae11fca6a1ac7429b0254aa32b963f7e09a7d8d923589009fd +AUX hip-5.3.3-0003-SWDEV-355608-Remove-clang-include-path-2996.patch 1866 BLAKE2B 89e377104b0bc383f69c10f894ff28cb8282eeaf042fcb27b03a64b78959c147ef6cd4291aef47a25b616ea2b801363d7a382df4d924ba94fcea7e9ffa1b26f6 SHA512 7f73d7a66adc959ef4dd0dc3540b6db472a3650926f315f4c79761a45e619432107898dc58cb15958be4b36823029ccf91e599760a23fd886429789de586db3b +AUX hip-5.3.3-0004-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch 8063 BLAKE2B c0b7b83682c13bb21e6a152b8c4c2b003024fd2dfc4f5f59e8b91b3d933bbfa888549c1a4471a29a225400f3d900d47023c3394111d41a3ecf52a48647db1694 SHA512 972a249daf692ce847884821a1205608d9ee2941793c474cb36f435eff2ad52dc7cb4f1a3a48a4037df3d62a6e47db84c86014933c94b4bb9bf7b7b12f31cce1 AUX hip-5.3.3-correct-ldflag.patch 1196 BLAKE2B 93c0e7e92c898cfa5d39d008f8c18d82b9032d3f865725b59fb4c0fef263c9a7c4108ecca9f406c21411d72781b88fcacbd7b1e50cc6dd5483cbe89a37b9a2fc SHA512 7a81444c6f2b1a70a451b13440235ba14e058f9023abfd56502ad2ba12a00e31970873b92313a7888c3794083d0c011ce8a314b43e835e9fe872ad97de4e758f AUX hip-5.3.3-disable-Werror.patch 621 BLAKE2B 9bcdec821484ac20343e1352e3c3d5a9297f8e7ab81ed135c5b27f11dd0667c68939fe04157ae8b7dacc5cdcbb6631e0a1b66d6cc2cd796f6322b6ded75055c7 SHA512 799c40b5a2524e166aa674c432c7bfb93c03fe00832680a99cd701b2498cd33c52e5582f9754161173f17048b6ae346a7a5b6d59eddce8696670b1f229858fef AUX hip-5.3.3-remove-cmake-doxygen-commands.patch 976 BLAKE2B edff02ed7b2371739f1659a93ecad9485045091ec48c6aa018d8fde3a9f4a9a48bdcf0cca660e03b4f3ff0e6c4f019068019407f429913f8c3231cdb252b0464 SHA512 f6835f74fb34cd4a9ea0db693eff6e57c742f6912b29046f7b01b87037c014cdeb38f17dd0a6b90dd823656e2957b2d0bc981eb0c71221994ae455cefc03805b @@ -27,11 +27,20 @@ AUX hip-5.5.1-disable-Werror.patch 748 BLAKE2B 965af2240c72e22706c5b1ecb414954ba AUX hip-5.7.0-install.patch 576 BLAKE2B b3c5437a81bcc901327ba4ee9419ad77ea94aab3f6df49c1ce581fd5dad9321d7ffe4d81e1991476978690811d748ee8600dbdf9d70151cfdfb348130e18efdc SHA512 28301e939b3dc49c47d5db16d11b580dbedd47796a2765afab2b535fcd005d4a909f54865f044f0bacb0470ca2e29e529d1511c8bf4d037987bc046704e8e9eb AUX hip-5.7.1-disable-stack-protector.patch 771 BLAKE2B 46ea4b48ae32c7e120418fec467fedc7c496fec2c0589c04e4b62a0afe9b7e6b6e9aae8a4502d5772eefc07c5f71d39b37e4a47d1796d7688b1804814a0274da SHA512 30b82c3b8e7403e8098d1d564c94a85cd29fbf0d6fb4d4af26874bbc5ed03477933fb61064d57c2e2c724182b4816598752b38b1bb9f9384685be72a774d81af AUX hip-5.7.1-exec-stack.patch 1136 BLAKE2B b45560c1cd3410ba9340d5dea7fc2ab7167126a3dbcee6fdaa5ccdab6140db8a6ce9c9f588451f77a1cd27154551a4cb00743d7b2ac3dcb6c36e87f2bc182fe1 SHA512 66a6a9518975a9702f365ae6e9b09835ff93cde49209714b4cbb19c375052859ac26f3d4d2b61052280eee93e237f930a4b7b2d837245a7d477e30893ca6a0b4 -AUX hip-5.7.1-extend-isa-compatibility-check.patch 9043 BLAKE2B 8effc992b0d3478939fed4b003b4cbc1ef09ca1f59792f46d4c5c9253ac1a4d9a32357294b15c50e9c0dc867ebf284fe1823f3c7d829097c69d6633ff2027adc SHA512 ccab928a25089e6f9260dcdda665258fb71b6aefaae444ea25274475b3d668785b5bf4396ca4fbefb1471c06115b139b13f0af4d9b1f76e66821d585e7c8b781 +AUX hip-5.7.1-extend-isa-compatibility-check.patch 9039 BLAKE2B d1c80da9ca584aa43461f4301e8caa49aa995f1050ba71b9a81bf4e184cd361e28ac79ee25b081802611251b0b6ac30afbcd60759724f88361768ffc3f2cfe39 SHA512 b4db426300d93ddf97d419a4388359abd7841213c9be7dee20b0b7bd7a9a7c8f8fc391629984759bc4b365dd7b73e205fbd14d04be8caaff8037df8c572e3b84 AUX hip-5.7.1-fix-mmap-oom-check.patch 1317 BLAKE2B d1e9db74bb815cd9194b47688bb125630a8baf8c3df14e454b2f8c59303c136c6c69b7ca89fddabb2533bfa034c984d88ec276851daf2241d9abeda7f5a50f87 SHA512 b6a5d7b861fe4138c72f91b765df822cce00fda94d3b8b85c0a40c3697455b018256f37317adf714280aa387ebe5da14a092ab69e375e8a804f01243837f7b60 AUX hip-5.7.1-fix-unaligned-access.patch 3011 BLAKE2B d8a6a130edcf51c40e88250508ff3db13f134fb3833d1eadfac32dfdee09c7635091b1f32ed640bcba0c5ca2b745c401183ee8adaa392977ecece12a03450f9e SHA512 f9b85117927d18921d939daa73d2d97477bb49eb6ff7e496f9b110b8e70e00734b698517ae4235a03c560bdfc3618367d7eb2970c9d90dc2bcf07e2ab803d994 AUX hip-5.7.1-no_asan_doc.patch 817 BLAKE2B 4bc80470f9cb476289086ae561560bb54fcdd9d1e66ef420dc60f129f29b0de02025be0ed2a7bfd2143b9bc0b456a354abc574dcbff509872a35e2e0c06f7760 SHA512 10a97524acce0c45c8edeccd11b64445f6edeb380e8262e1fc63163c4758efd731af36701dae1c9988264e8ce10971c9b3959ea881e81646994c779a96d10bb9 +AUX hip-6.0.2-install.patch 993 BLAKE2B e54542801197ad33e3feee0896401acec60190e95ec09ede70b357f5af550255dc4f08e75279d21e3932d7be6b7e0c0b5cd86f8ca235f463135d42699855f4d9 SHA512 a3d772d60d3842a91796f32d8bad3289eee8f878bcedb6c064df43f514ed102729f8f7ed62fc1d8b3f73dd969e5368a86b847b0858d296da916ac424ef593059 +AUX hip-6.1.0-extend-isa-compatibility-check-v2.patch 1323 BLAKE2B 1af3ebf4c9c328a89a6b7440acd744955078b1a35c90d7476905417398e05848435776ba954184e37a943d2ff31d10aa3116ce00eed754574bf843a16cd0da1c SHA512 19c93c98ea3bc6fbff309ff02424355e482ea584266adf4322bd46d55a2f6f0196fd02eae843c08080d01a6afc1cf94e1bed3905881a67df9f3c3b0d8b17c464 +AUX hip-6.1.0-extend-isa-compatibility-check.patch 9037 BLAKE2B d9dceb54665816468971e8ee1ae9e749df48f60be0cd9a131259179f4b5cc8e465a27971906f2d990e73ad00f278e9736cba9941686ecb604ca8820e82e2ac94 SHA512 18bd5365774694619d8601dc6ed40517cc77f4dcdd124ef59f486416c4f6c08586adece94bd175ef33109744de84a11e78a34b4e07425a2616cbf68ef1c1bf49 +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-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 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 @@ -39,14 +48,15 @@ AUX rocclr-5.3.3-fix-include.patch 6053 BLAKE2B e215cefd0f2895beda0e3c029a24e48f AUX rocclr-5.3.3-gcc13.patch 776 BLAKE2B f942628db7c91aff27ba6f0cb96ec857b28f6967806aba88473e11a9ab0b6b6169f12f4a1990131709c74da6635e793fafaf2d0bef9759c8f4f816e9777c966c SHA512 72bafbd708a222f03e8f5a89aaaf3050eff9d15202f759298a50995aeb545238107a5c8e00ff5b4d2ba510dad3f71a4061261b20d7dd958632ebae63c2ccb2ca DIST hip-5.1.3-update-header.patch.gz 3406 BLAKE2B 805539c3396a9cdcc4b807afd96eacd2de0e494a9ec927a1526cb8ce26b1c6e0a4d06415cd0210cba1398b5ff70f995fa67ad22b659578c075eb24c2a2cc9228 SHA512 eef4d70f9470a61d1d8cb140728cc4f2e792a4e64e0900a7410a74f3a6421410e7546e4e62bbbf35ae231b566bf162fb85de1f1ad1d8cfb2f282d2ed9a34b53a DIST hip-5.7.1.tar.gz 553774 BLAKE2B f88c235f688d3a662ec6cb4ad7fe3f82c0015015997871609cc30ab5b2f7fcb9709a08683d77194e45a6dbbe1d24c6355b128d2ecf655f1dea3468711c64e0a3 SHA512 68fa8753725b53c999d102d254c6b1dba53af4e00d6a48db93d10213cc02eec30b4a39c66e773d4f625dd9636cf8b0c5faa05b69fac27cf5a6b19dd3ddd2b905 -DIST hip-6.0.0.tar.gz 243451 BLAKE2B c404d23f7ee46a6c5601077d598edf4d6b2ca48da5e6cabf45c926ee1224eedc3d9eb6715948bc44cf3da2431a2feb879b1b8cd35bac69319c9dc066ab2e12f7 SHA512 2beb100812f9f515d6bc29fd4930913c2ff64c4f824727c9fc38d2e249841c840bd35357f652ab2b5022d166331de8f7409e72c49a5f69042f54f16a6a290339 +DIST hip-6.1.1.tar.gz 247192 BLAKE2B c40bb483fb61b3037693f456e546046598df7e0dd81a1f1c8d222ab0d9c0752092ce85c8533bd355f883dda5ce1f32f7ff2b2a58cebac50d53e0e7f4d85ca3ae SHA512 3e6162938294a74af51bc2161ada38dc4ba19614e182238f320f2052a9025be6ea413e40f00cb80f4e86696793d6c4431e2417ea798a2330886a3f3e66aedf0d +DIST hip-test-6.1.1.tar.gz 1080605 BLAKE2B 7eddf648be31365479baa0cd4fd1c060a682a6b44d923cac1c4840c0768782db2fef4e5d97318ef0423be1e5c85b1a0cc6b9d324db789dad28be17f64ab38cae SHA512 0dd679c5b94a59e192bea5789f4448b53ac23c8a03b24a347758b1d70ff692483fd4aaea0b19345eb6ffb82a4492ed21958398b53ae6244a244a660dfa33412f 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 DIST rocclr-5.5.1.tar.gz 634330 BLAKE2B e6383a6b6b09f274a944d66effd345e38a191ec73ee5c5240f8ec8bb62a4df97b80835ce57f8f78c3834602b9da425b49289b5c7cd7e4c7071147ff409c6a6c9 SHA512 4c12011d22a4f14d9e93250b2a38716eb973139afa1adbbbd51c0e0ed13c0b7c1f45a37c71ef937c5fdabf09e928d7913ca3332fc61b7a2c10d21421306a228f DIST rocm-5.7.0.tar.gz 845881 BLAKE2B 08255edc1407e5ef85895336b11496319695318fce265565728ad75175b5e1dfab98f696fee2d27e60c48e862f721fad4c53118cc70b807353fff5f97ed72ac2 SHA512 72420e16c7cfe9687e030331838666dabaa43d686bdad1d109431e44db99070a2cf6dd64b59e3275019abedd6612f6008c798a79275e7225b6b122fb9f644660 DIST rocm-clr-5.7.1.tar.gz 2008647 BLAKE2B 3db0760d6f83504e60caf88a2dd5e0bc02c7db9d6f263ad0eb2cfc79aa0f88a3699c412844a0158a796d9d02e79660287e791edad787d814eefffea4fd2298b4 SHA512 d79323481d82fc02c12a32cdcc0d14437d512af023e7737db0387b7eecb27fe6e4ae7c71d6adce57932a04bb24c880440d9dc10aeb5af11a4f2ca64d44330965 -DIST rocm-clr-6.0.0.tar.gz 1983453 BLAKE2B 2cf6ec7c3b0ec5dedeea94ff54af30662b781fc2eee22e3315094af61dc9d331eba33c1d9d463295848c5724e515a3137f9b189c1261273afad1a5f9d32226c2 SHA512 12e77a121150d8c25121b98bd7c6233c2568f9f4130bdbe6bc3ab225f14b8bea6a6bdc4ed497c0f999d3d3daabdca0de8caaa1b69911c11974b5d6f951734433 +DIST rocm-clr-6.1.1.tar.gz 2031034 BLAKE2B b0485bb015d31986f4988d1db0c029c826856e50b5bb1b58fac2097c14b3966668f1b8d41ec198889e27ac860497a8b3c081ec31d52390d5c9ff5db092bf7cce SHA512 86925e8b9a9e77b06a57daefbc7279887b4ef7c6a79c3717bc2f2d3bf29926281c60063fd17e21c65d7def520d9f579bf88f69051d053a38750ba968f69ca3fc 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 @@ -60,10 +70,10 @@ DIST rocm-opencl-runtime-5.3.3.tar.gz 1007773 BLAKE2B a3f600a68183337f92b152a123 DIST rocm-opencl-runtime-5.4.3.tar.gz 1005268 BLAKE2B f9398e4c2b0f045f1b5d8df9f31b7f2bef6a9201885aa6ee5fc5d71632cfde26a078d9a5ea38c3da12d3c187faf04c7bdcf1a8ecb9927cdba56b1efdfcdc44ee SHA512 f65d4622ce8721a6b91ab5b5b306d142ba507d3e631ac3ab0b76c5bc6d8d18455e02debd954c82e7eb609f232b509f1ec1a013dc2fad467c2c2ad31fdf15755d DIST rocm-opencl-runtime-5.5.1.tar.gz 991802 BLAKE2B 07d955b4a76b11296259287f5878cadc2438350a3abcdb5bd693c02790ff4c330b1d0a2a87f8de5334b3e3459c26b3fdf695886502ec5d2c373d807c242c8f93 SHA512 06786e818002dc43f64e4b0aaae0a0a2bcdad7acdb4662e1215d43277b107d65fb9a7f7441c31e3378c380cac860b1cd2eaefb5753246beffa4d9c10efced85e DIST rocm-tracer-5.1.3.tar.gz 511617 BLAKE2B 4142979b3b7d649798a7ac0b2a04b42aa7fbcbf82f2cf51b0e5363ec0da538046d6e59283d0ce1bfd341317bf24ac2f694d5c8a7d1f132f9b21caea5caf7eda3 SHA512 e73b0c921ffbdcac571d8b0825de39bd8a4fd5f2720ecdd0c189951db85efb607a0b1cd7a9bb02b3dbf329b277cb5e197525216a8e8927eea4e6ce290b7e7c7b -EBUILD hip-5.1.3-r4.ebuild 6638 BLAKE2B 4ccc536736e737f0066ab4f200a5ea76a9f16edef0db0eefa36573bc4c9d3ea26ca04e6ad3cd4fd5d4dcbd7437177957b6cdd23307249525340bfcc7ae3ed9c6 SHA512 235042a89298d383a4a33ac437f510036d922f049ff0e02990167165e448dd88b615d6be7dd84c67d644f5fbcab5f9a71a9b7393fffa1b406095bae91a5087ed -EBUILD hip-5.3.3-r3.ebuild 5346 BLAKE2B 4f5c0570e8a4ff65ac0b11bc555e2f81f7c6e56cc3ff86de894536b3b0597c049216a9d4184e25471999c4cf73b8f774daf1bb46d613c830bcc0d8c445f85b74 SHA512 9a54281155f14f467286d132ec405b90703b94760b8f4e268aed77b4a47d8a195febef3200068d0e5905cf7078fb92e2252b6ab7a3b86e40d330449315c0cf4d -EBUILD hip-5.4.3.ebuild 5239 BLAKE2B 74d5423c5f7c01f15c5583b2c53420b1780fa7fdb11581fef2f0570be11a2047a43881a13b41b333905faaafab7dee15e1fb4af96703829cdab7d547e2cb5796 SHA512 7b2f5abfbc2ded1751b3d32349eb81715468125e9a9cc64522b725ed9a92f0dbf6e575fd1b84ab5234532badbf3a6b0c4d3a5b375384665ab413b22c54a5ee3e -EBUILD hip-5.5.1.ebuild 5244 BLAKE2B aa1f937c5f2651ad3e79898ffc427696253c619583cd1450f1a3e7b9a7448e0d750f5df72a87458dfe6107f2f8846bc2b9b064d54b0b849fc3812a4f268c4af1 SHA512 94cad30f1f0e3e376a5902c83a151d3fe2a7b72b45747672e96b9d13dedadc7184c8f714789ff3e436133ffb8a7d58e8194471c843c694d3d39c348fd7d5a3ab -EBUILD hip-5.7.1-r2.ebuild 5350 BLAKE2B d8dcd223e711f9ba0b61822761d2805a0e54ef50a048bdd16170cfc64f00bb6bd3f0d018984201f0dc5c383badb2574174419f8c42c5cee006cca93047a77054 SHA512 f88b8f32d37bc13e78e4fe452012af44dd7aa09b6a67a3c1243632127510381ebb2293947a708043e47defcd53607a744102260e0f4602579024ef50ed6189b9 -EBUILD hip-6.0.0.ebuild 4818 BLAKE2B d98c4b514dbdeacbc633fe6b8347f228238b8e56c2854790991cd2ab8fb685417fd32795c4246bd4fdf8bb2497be3133373fdf505b1583955fc4a1acf07f658d SHA512 2260791ffbab2f527e9a3f390de477e98f4f1eccc8e8e709d2b4d57ee055b07d1ea53f34a849851d0f1909bb3649f7b14769f6da08a7de323f52e6f6967cbdbd -MISC metadata.xml 729 BLAKE2B 92e36c42f6d8335e5a8e3a86b591ff9e6306e0d187644620fab7f8f7ddd00156ee91ff49184ffbe379e509f2096c51c421575a69de7abea3c0b372fdcec52ccb SHA512 84fc8234a5fdf54bf43228c2144d809a461862fb45fea24bf366ee5937df3882c3332429938792981e37dbb4cda6e5d7e05ac5deaded34d8bcce1eb53df8d0fd +EBUILD hip-5.1.3-r4.ebuild 6650 BLAKE2B 83eb1cbf369f7b5112de88334b340ff89486c093da946218eae42cd7bef7a3982e6da08ebdb8d12e79f60b2920f8680f555dc16fc75d99a41b7a9d1f42b2aada SHA512 e60014a38997e93f13d73fc52e77408b61414eef90263f3ff19025d42efe324b8e5a2fb50b6aa830ded6e764273ccea007341918de48e3bf4e728b525e42bbbc +EBUILD hip-5.3.3-r3.ebuild 5396 BLAKE2B 1303346f578f16525415144781dbde4838da758888346136fb4f88f53e6b1abcc43bfbde7f9b16bbf00eb26b7409564948949d82981bee30b177c1265acfdd8b SHA512 39c9dbfee84aea0c60e5ae000ea6ce72a8112b0ad95e41ccca2d74180f52f7aca2eb017344e66c4e17fba3d0cd412c7024ccaeaad2947e1849edffa57293c6b5 +EBUILD hip-5.4.3.ebuild 5263 BLAKE2B 4fd371749bfe8d1359941be7f71962e9157efab0410a457691609cddd400ae1046b687dcacf7238090864f9082c52a1ad76df59e50c7fb4a767cafdb3c6bd1c9 SHA512 1bd49dcbd11405933b75db6369e9c803a007bdc3393bc2bdf8a858e883e9d1d9ec98add9c6e64341b53af7ef943e9de0ecce8d94cfdf7df49d08f2260a3d2cb7 +EBUILD hip-5.5.1.ebuild 5269 BLAKE2B 29d0f7303267e6baec24ea65b24b1b4e1d62255312496f962e7ef81a4da3fd8fe67fac9f87d61bd11de14c0bd8497749183c7a702fed187b54e6b34a5a590b77 SHA512 49a5cbae272cafe9f5b696ddca3099932a50671d2d59d589252834cc7ecb01eccb8efac0a3b39f646e38017e009ffcbfaac7b2f4d59443a68845d4be97f6b361 +EBUILD hip-5.7.1-r2.ebuild 5452 BLAKE2B ff7f44547964dabff96ed68e60d0928512d208b37a446053bc93052aea809914fe4c49430958b7c26900015886b7be0b7c9e6bea4aed91377d83b19f5ba63754 SHA512 a0d0786e8f5e75b4450b90a53131c2580810afcb51d8df618d253c2968b8da3ab1641df9142d8f13db93ed773dcb7e2b746eaab9f42a4f49f820819d5cdb64fb +EBUILD hip-6.1.1.ebuild 6598 BLAKE2B 01a40b98c8739f976e8b2f81d3fe5dd5ee970cb38ea97317ec18722db9483ced21c8116eb92e206250d8f4209187a78619b2f4f854edb5fb139c884e501e8dbe SHA512 ad283051ed13122d4e2402102cd12abfbcbca996d532398577b74eadc1f17875a26806a9254e4733d9b3c290193eed92ac712c911805cc89dfe6fe4b6c14cb59 +MISC metadata.xml 1076 BLAKE2B 816a3628360882d89e2bc64f7b5be6442ad4fb0866b6a8291c4701a03e626d9482b93980b34e5ab21c37bda025359978b471d09e2d4817ceeb209d83afaecbfe SHA512 009079d56a9fb1c3212dc4e67dd88bc16bbc6350bb832912543b2a1e6747c77d13021e7a94da9a4c9371722828214b308246e7ad58406276126cdf6e44281506 diff --git a/dev-util/hip/files/0001-SWDEV-316128-HIP-surface-API-support.patch b/dev-util/hip/files/hip-5.1.3-0001-SWDEV-316128-HIP-surface-API-support.patch index 14af91f9055b..14af91f9055b 100644 --- a/dev-util/hip/files/0001-SWDEV-316128-HIP-surface-API-support.patch +++ b/dev-util/hip/files/hip-5.1.3-0001-SWDEV-316128-HIP-surface-API-support.patch diff --git a/dev-util/hip/files/0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch b/dev-util/hip/files/hip-5.3.3-0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch index 9dbfe8a55395..9dbfe8a55395 100644 --- a/dev-util/hip/files/0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch +++ b/dev-util/hip/files/hip-5.3.3-0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch diff --git a/dev-util/hip/files/0001-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch b/dev-util/hip/files/hip-5.3.3-0002-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch index b9a1329e5931..b9a1329e5931 100644 --- a/dev-util/hip/files/0001-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch +++ b/dev-util/hip/files/hip-5.3.3-0002-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch diff --git a/dev-util/hip/files/0002-SWDEV-355608-Remove-clang-include-path-2996.patch b/dev-util/hip/files/hip-5.3.3-0003-SWDEV-355608-Remove-clang-include-path-2996.patch index 6d64ad8c9fd8..6d64ad8c9fd8 100644 --- a/dev-util/hip/files/0002-SWDEV-355608-Remove-clang-include-path-2996.patch +++ b/dev-util/hip/files/hip-5.3.3-0003-SWDEV-355608-Remove-clang-include-path-2996.patch diff --git a/dev-util/hip/files/0003-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch b/dev-util/hip/files/hip-5.3.3-0004-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch index f92cce4cf8d8..f92cce4cf8d8 100644 --- a/dev-util/hip/files/0003-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch +++ b/dev-util/hip/files/hip-5.3.3-0004-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch diff --git a/dev-util/hip/files/hip-5.7.1-extend-isa-compatibility-check.patch b/dev-util/hip/files/hip-5.7.1-extend-isa-compatibility-check.patch index 7853de693cde..25bdfba07fd2 100644 --- a/dev-util/hip/files/hip-5.7.1-extend-isa-compatibility-check.patch +++ b/dev-util/hip/files/hip-5.7.1-extend-isa-compatibility-check.patch @@ -42,7 +42,7 @@ https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/master/debian/patches/0026 +} + +static bool isGfx1010EquivalentProcessor(const std::string& processor) { -+ return matches(GfxPattern{"gfx101", "02"}, processor); ++ return matches(GfxPattern{"gfx101", "0"}, processor); +} + +static bool isGfx1010SupersetProcessor(const std::string& processor) { @@ -181,7 +181,7 @@ https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/master/debian/patches/0026 } --- a/rocclr/device/device.cpp +++ b/rocclr/device/device.cpp -@@ -232,10 +232,49 @@ std::string Isa::isaName() const { +@@ -234,10 +234,49 @@ std::string Isa::isaName() const { return std::string(hsaIsaNamePrefix) + targetId(); } @@ -211,7 +211,7 @@ https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/master/debian/patches/0026 + } + } else if (codeObjectIsa.versionMajor() == 10) { + if (codeObjectIsa.versionMinor() == 1) { -+ const std::array<uint32_t, 2> gfx1010_equivalent = { 0, 2 }; ++ const std::array<uint32_t, 1> gfx1010_equivalent = { 0 }; + const std::array<uint32_t, 4> gfx1010_superset = { 0, 1, 2, 3 }; + if (Contains(gfx1010_equivalent, codeObjectIsa.versionStepping()) && + Contains(gfx1010_superset, agentIsa.versionStepping())) { diff --git a/dev-util/hip/files/hip-6.0.2-install.patch b/dev-util/hip/files/hip-6.0.2-install.patch new file mode 100644 index 000000000000..e2fc3a8852cb --- /dev/null +++ b/dev-util/hip/files/hip-6.0.2-install.patch @@ -0,0 +1,23 @@ +diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt +index 7ad30019d..e79ea0714 100755 +--- a/hipamd/CMakeLists.txt ++++ b/hipamd/CMakeLists.txt +@@ -398,18 +398,7 @@ if (NOT ${HIPCC_BIN_DIR} STREQUAL "") + set(hipcc_bin ${hipcc_bin}.exe) + set(hipconfig_bin ${hipconfig_bin}.exe) + endif() +- if(EXISTS ${hipcc_bin} AND EXISTS ${hipconfig_bin}) +- install(PROGRAMS ${hipcc_bin} DESTINATION bin) +- install(PROGRAMS ${hipconfig_bin} DESTINATION bin) +- endif() + endif() +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.pl DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.pl DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipvars.pm DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.bat DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.bat DESTINATION bin) + endif() + + ############################# diff --git a/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check-v2.patch b/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check-v2.patch new file mode 100644 index 000000000000..d6e95c994c8f --- /dev/null +++ b/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check-v2.patch @@ -0,0 +1,35 @@ +From e188c092a987c45caf2ea4651686ea631ca47c3d Mon Sep 17 00:00:00 2001 +From: Paul Zander <negril.nx+gentoo@gmail.com> +Date: Tue, 25 Jun 2024 15:22:33 +0200 +Subject: [PATCH] prepare usage of old patch + +Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> +--- + hipamd/src/hip_code_object.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/hipamd/src/hip_code_object.cpp b/hipamd/src/hip_code_object.cpp +index 6b3a6d0..fef89df 100644 +--- a/hipamd/src/hip_code_object.cpp ++++ b/hipamd/src/hip_code_object.cpp +@@ -410,7 +410,7 @@ static bool isCodeObjectCompatibleWithDevice(std::string co_triple_target_id, + if (co_triple_target_id == agent_triple_target_id) return true; + + // Parse code object triple target id +- if (!consume(co_triple_target_id, std::string(kAmdgcnTargetTriple) + '-')) { ++ if (!consume(co_triple_target_id, std::string(AMDGCN_TARGET_TRIPLE) + '-')) { + return false; + } + +@@ -423,7 +423,7 @@ static bool isCodeObjectCompatibleWithDevice(std::string co_triple_target_id, + if (!co_triple_target_id.empty()) return false; + + // Parse agent isa triple target id +- if (!consume(agent_triple_target_id, std::string(kAmdgcnTargetTriple) + '-')) { ++ if (!consume(agent_triple_target_id, std::string(AMDGCN_TARGET_TRIPLE) + '-')) { + return false; + } + +-- +2.45.2 + diff --git a/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check.patch b/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check.patch new file mode 100644 index 000000000000..40ccf6fdc089 --- /dev/null +++ b/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check.patch @@ -0,0 +1,236 @@ +Combined with matching changes within rocr-runtime ebuild, this patch allows +to load compatible kernels whenever possible. +For example if AMDGPU_TARGETS is set to gfx1030 and some application +was started on gfx1036, it loads gfx1030 kernel. + +Author: Cordell Bloor <cgmb@slerp.xyz> +https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/master/debian/patches/0025-improve-rocclr-isa-compatibility-check.patch +https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/master/debian/patches/0026-extend-hip-isa-compatibility-check.patch +--- a/hipamd/src/hip_code_object.cpp ++++ b/hipamd/src/hip_code_object.cpp +@@ -390,47 +390,123 @@ static bool getTripleTargetID(std::string bundled_co_entry_id, const void* code_ + return true; + } + +-static bool isCodeObjectCompatibleWithDevice(std::string co_triple_target_id, +- std::string agent_triple_target_id) { ++struct GfxPattern { ++ std::string root; ++ std::string suffixes; ++}; ++ ++static bool matches(const GfxPattern& p, const std::string& s) { ++ if (p.root.size() + 1 != s.size()) { ++ return false; ++ } ++ if (0 != std::memcmp(p.root.data(), s.data(), p.root.size())) { ++ return false; ++ } ++ return p.suffixes.find(s[p.root.size()]) != std::string::npos; ++} ++ ++static bool isGfx900EquivalentProcessor(const std::string& processor) { ++ return matches(GfxPattern{"gfx90", "029c"}, processor); ++} ++ ++static bool isGfx900SupersetProcessor(const std::string& processor) { ++ return matches(GfxPattern{"gfx90", "0269c"}, processor); ++} ++ ++static bool isGfx1030EquivalentProcessor(const std::string& processor) { ++ return matches(GfxPattern{"gfx103", "0123456"}, processor); ++} ++ ++static bool isGfx1010EquivalentProcessor(const std::string& processor) { ++ return matches(GfxPattern{"gfx101", "0"}, processor); ++} ++ ++static bool isGfx1010SupersetProcessor(const std::string& processor) { ++ return matches(GfxPattern{"gfx101", "0123"}, processor); ++} ++ ++enum CompatibilityScore { ++ CS_EXACT_MATCH = 1 << 4, ++ CS_PROCESSOR_MATCH = 1 << 3, ++ CS_PROCESSOR_COMPATIBLE = 1 << 2, ++ CS_XNACK_SPECIALIZED = 1 << 1, ++ CS_SRAM_ECC_SPECIALIZED = 1 << 0, ++ CS_INCOMPATIBLE = 0, ++}; ++ ++static int getProcessorCompatibilityScore(const std::string& co_processor, ++ const std::string& agent_processor) { ++ if (co_processor == agent_processor) ++ return CS_PROCESSOR_MATCH; ++ ++ if (isGfx900SupersetProcessor(agent_processor)) ++ return isGfx900EquivalentProcessor(co_processor) ? CS_PROCESSOR_COMPATIBLE : CS_INCOMPATIBLE; ++ ++ if (isGfx1010SupersetProcessor(agent_processor)) ++ return isGfx1010EquivalentProcessor(co_processor) ? CS_PROCESSOR_COMPATIBLE : CS_INCOMPATIBLE; ++ ++ if (isGfx1030EquivalentProcessor(agent_processor)) ++ return isGfx1030EquivalentProcessor(co_processor) ? CS_PROCESSOR_COMPATIBLE : CS_INCOMPATIBLE; ++ ++ return CS_INCOMPATIBLE; ++} ++ ++static int getCompatiblityScore(std::string co_triple_target_id, ++ std::string agent_triple_target_id) { + // Primitive Check +- if (co_triple_target_id == agent_triple_target_id) return true; ++ if (co_triple_target_id == agent_triple_target_id) return CS_EXACT_MATCH; + + // Parse code object triple target id + if (!consume(co_triple_target_id, std::string(kAmdgcnTargetTriple) + '-')) { +- return false; ++ return CS_INCOMPATIBLE; + } + + std::string co_processor; + char co_sram_ecc, co_xnack; + if (!getTargetIDValue(co_triple_target_id, co_processor, co_sram_ecc, co_xnack)) { +- return false; ++ return CS_INCOMPATIBLE; + } + +- if (!co_triple_target_id.empty()) return false; ++ if (!co_triple_target_id.empty()) return CS_INCOMPATIBLE; + + // Parse agent isa triple target id + if (!consume(agent_triple_target_id, std::string(kAmdgcnTargetTriple) + '-')) { +- return false; ++ return CS_INCOMPATIBLE; + } + + std::string agent_isa_processor; + char isa_sram_ecc, isa_xnack; + if (!getTargetIDValue(agent_triple_target_id, agent_isa_processor, isa_sram_ecc, isa_xnack)) { +- return false; ++ return CS_INCOMPATIBLE; + } + +- if (!agent_triple_target_id.empty()) return false; ++ if (!agent_triple_target_id.empty()) return CS_INCOMPATIBLE; + + // Check for compatibility +- if (agent_isa_processor != co_processor) return false; +- if (co_sram_ecc != ' ') { +- if (co_sram_ecc != isa_sram_ecc) return false; ++ int processor_score = getProcessorCompatibilityScore(co_processor, agent_isa_processor); ++ if (processor_score == CS_INCOMPATIBLE) { ++ return CS_INCOMPATIBLE; + } +- if (co_xnack != ' ') { +- if (co_xnack != isa_xnack) return false; ++ ++ int xnack_bonus; ++ if (co_xnack == ' ') { ++ xnack_bonus = 0; ++ } else if (co_xnack == isa_xnack) { ++ xnack_bonus = CS_XNACK_SPECIALIZED; ++ } else { ++ return CS_INCOMPATIBLE; + } + +- return true; ++ int sram_ecc_bonus; ++ if (co_sram_ecc == ' ') { ++ sram_ecc_bonus = 0; ++ } else if (co_sram_ecc == isa_sram_ecc) { ++ sram_ecc_bonus = CS_SRAM_ECC_SPECIALIZED; ++ } else { ++ return CS_INCOMPATIBLE; ++ } ++ ++ return processor_score + xnack_bonus + sram_ecc_bonus; + } + + // This will be moved to COMGR eventually +@@ -483,6 +559,7 @@ hipError_t CodeObject::extractCodeObjectFromFatBinary( + for (size_t i = 0; i < agent_triple_target_ids.size(); i++) { + code_objs.push_back(std::make_pair(nullptr, 0)); + } ++ std::vector<int> compatibility_score(agent_triple_target_ids.size()); + + const auto obheader = reinterpret_cast<const __ClangOffloadBundleHeader*>(data); + const auto* desc = &obheader->desc[0]; +@@ -495,17 +572,19 @@ hipError_t CodeObject::extractCodeObjectFromFatBinary( + reinterpret_cast<const void*>(reinterpret_cast<uintptr_t>(obheader) + desc->offset); + const size_t image_size = desc->size; + +- if (num_code_objs == 0) break; + std::string bundleEntryId{desc->bundleEntryId, desc->bundleEntryIdSize}; + + std::string co_triple_target_id; + if (!getTripleTargetID(bundleEntryId, image, co_triple_target_id)) continue; + + for (size_t dev = 0; dev < agent_triple_target_ids.size(); ++dev) { +- if (code_objs[dev].first) continue; +- if (isCodeObjectCompatibleWithDevice(co_triple_target_id, agent_triple_target_ids[dev])) { ++ if (compatibility_score[dev] >= CS_PROCESSOR_MATCH) continue; ++ int score = getCompatiblityScore(co_triple_target_id, agent_triple_target_ids[dev]); ++ if (score > compatibility_score[dev]) { ++ compatibility_score[dev] = score; ++ if (!code_objs[dev].first) ++ --num_code_objs; + code_objs[dev] = std::make_pair(image, image_size); +- --num_code_objs; + } + } + } +--- a/rocclr/device/device.cpp ++++ b/rocclr/device/device.cpp +@@ -232,10 +232,49 @@ std::string Isa::isaName() const { + return std::string(hsaIsaNamePrefix) + targetId(); + } + ++template <class T, std::size_t N> ++static bool Contains(const std::array<T, N>& arr, const T& value) { ++ return std::find(std::begin(arr), std::end(arr), value) != std::end(arr); ++} ++ ++static bool IsVersionCompatible(const Isa &codeObjectIsa, ++ const Isa &agentIsa) { ++ if (codeObjectIsa.versionMajor() == agentIsa.versionMajor() && ++ codeObjectIsa.versionMinor() == agentIsa.versionMinor()) { ++ ++ if (codeObjectIsa.versionStepping() == agentIsa.versionStepping()) { ++ return true; // exact match ++ } ++ ++ // The code object and the agent may sometimes be compatible if ++ // they differ only by stepping version. ++ if (codeObjectIsa.versionMajor() == 9 && ++ codeObjectIsa.versionMinor() == 0) { ++ const std::array<uint32_t, 4> gfx900_equivalent = { 0, 2, 9, 12 }; ++ const std::array<uint32_t, 5> gfx900_superset = { 0, 2, 6, 9, 12 }; ++ if (Contains(gfx900_equivalent, codeObjectIsa.versionStepping()) && ++ Contains(gfx900_superset, agentIsa.versionStepping())) { ++ return true; // gfx900 compatible object and agent ++ } ++ } else if (codeObjectIsa.versionMajor() == 10) { ++ if (codeObjectIsa.versionMinor() == 1) { ++ const std::array<uint32_t, 1> gfx1010_equivalent = { 0 }; ++ const std::array<uint32_t, 4> gfx1010_superset = { 0, 1, 2, 3 }; ++ if (Contains(gfx1010_equivalent, codeObjectIsa.versionStepping()) && ++ Contains(gfx1010_superset, agentIsa.versionStepping())) { ++ return true; // gfx1010 compatible object and agent ++ } ++ } else if (codeObjectIsa.versionMinor() == 3) { ++ return true; // gfx1030 compatible object and agent ++ } ++ } ++ } ++ ++ return false; ++} ++ + bool Isa::isCompatible(const Isa &codeObjectIsa, const Isa &agentIsa) { +- if (codeObjectIsa.versionMajor() != agentIsa.versionMajor() || +- codeObjectIsa.versionMinor() != agentIsa.versionMinor() || +- codeObjectIsa.versionStepping() != agentIsa.versionStepping()) ++ if (!IsVersionCompatible(codeObjectIsa, agentIsa)) + return false; + + assert(codeObjectIsa.isSrameccSupported() == agentIsa.isSrameccSupported() && diff --git a/dev-util/hip/files/hip-6.1.0-install.patch b/dev-util/hip/files/hip-6.1.0-install.patch new file mode 100644 index 000000000000..416663f6ea48 --- /dev/null +++ b/dev-util/hip/files/hip-6.1.0-install.patch @@ -0,0 +1,20 @@ +These files already installed by hipcc, which is a runtime dep +--- a/hipamd/CMakeLists.txt ++++ b/hipamd/CMakeLists.txt +@@ -401,16 +401,7 @@ if (NOT ${HIPCC_BIN_DIR} STREQUAL "") + set(hipcc_bin ${hipcc_bin}.exe) + set(hipconfig_bin ${hipconfig_bin}.exe) + endif() +- if(EXISTS ${hipcc_bin} AND EXISTS ${hipconfig_bin}) +- install(PROGRAMS ${hipcc_bin} DESTINATION bin) +- install(PROGRAMS ${hipconfig_bin} DESTINATION bin) +- endif() + endif() +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.pl DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.pl DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipvars.pm DESTINATION bin) + if(WIN32) + install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.bat DESTINATION bin) + install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.bat DESTINATION bin)
\ No newline at end of file diff --git a/dev-util/hip/files/hip-6.1.1-fix-musl.patch b/dev-util/hip/files/hip-6.1.1-fix-musl.patch new file mode 100644 index 000000000000..424cd0dde119 --- /dev/null +++ b/dev-util/hip/files/hip-6.1.1-fix-musl.patch @@ -0,0 +1,24 @@ +Fix "basename" and "__cpu_mask" definitions for musl + +Upstream PR: https://github.com/ROCm/clr/pull/83 +--- a/rocclr/os/os.hpp ++++ b/rocclr/os/os.hpp +@@ -29,6 +29,7 @@ + + #if defined(__linux__) + #include <sched.h> ++#include <libgen.h> + #endif + + #ifdef _WIN32 +@@ -377,6 +378,10 @@ ALWAYSINLINE address Os::currentStackPtr() { + + #if defined(__linux__) + ++#ifndef __GLIBC__ ++typedef unsigned long int __cpu_mask; ++#endif ++ + inline void Os::ThreadAffinityMask::init() { CPU_ZERO(&mask_); } + + inline void Os::ThreadAffinityMask::set(uint cpu) { CPU_SET(cpu, &mask_); } diff --git a/dev-util/hip/files/hip-test-5.7.1-remove-incompatible-flag.patch b/dev-util/hip/files/hip-test-5.7.1-remove-incompatible-flag.patch new file mode 100644 index 000000000000..02aa12f1fe42 --- /dev/null +++ b/dev-util/hip/files/hip-test-5.7.1-remove-incompatible-flag.patch @@ -0,0 +1,28 @@ +https://github.com/ROCm/hip-tests/pull/443 + +From cb0140843a162f69c454e91cd994524423b39b8c Mon Sep 17 00:00:00 2001 +From: Yiyang Wu <xgreenlandforwyy@gmail.com> +Date: Sun, 10 Dec 2023 21:57:14 +0800 +Subject: [PATCH] -fallow-half-arguments-and-returns is not recognized by clang + +Reference: https://reviews.llvm.org/D145345 +Issue: https://github.com/ROCm/HIP/issues/3178 +Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> +--- + catch/unit/deviceLib/CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/catch/unit/deviceLib/CMakeLists.txt b/catch/unit/deviceLib/CMakeLists.txt +index 0645def..3662cbd 100644 +--- catch/unit/deviceLib/CMakeLists.txt ++++ catch/unit/deviceLib/CMakeLists.txt +@@ -171,7 +171,6 @@ if(${ARCH_CHECK} GREATER_EQUAL 0) + set_source_files_properties(unsafeAtomicAdd_NonCoherent_withunsafeflag.cc PROPERTIES COMPILE_OPTIONS "-munsafe-fp-atomics") + set_source_files_properties(unsafeAtomicAdd_Coherent_withnounsafeflag.cc PROPERTIES COMPILE_OPTIONS "-mno-unsafe-fp-atomics") + set_source_files_properties(unsafeAtomicAdd_NonCoherent_withnounsafeflag.cc PROPERTIES COMPILE_OPTIONS "-mno-unsafe-fp-atomics") +- set_source_files_properties(hipMathFunctions.cc PROPERTIES COMPILE_FLAGS "-Xclang -fallow-half-arguments-and-returns") + file(GLOB AtomicAdd_files *AtomicAdd_*_*.cc) + set_property(SOURCE ${AtomicAdd_files} PROPERTY COMPILE_FLAGS --save-temps) + file(GLOB unsafeAtomicAdd_files *unsafeAtomicAdd_*_*.cc) +-- +2.42.0 diff --git a/dev-util/hip/files/hip-test-6.0.2-hipcc-system-install.patch b/dev-util/hip/files/hip-test-6.0.2-hipcc-system-install.patch new file mode 100644 index 000000000000..bf143939d13e --- /dev/null +++ b/dev-util/hip/files/hip-test-6.0.2-hipcc-system-install.patch @@ -0,0 +1,43 @@ +In Gentoo rocm_agent_enumerator is installed by rocminfo and is in PATH. + +Index: catch/CMakeLists.txt +=================================================================== +--- catch.orig/CMakeLists.txt ++++ catch/CMakeLists.txt +@@ -55,9 +55,9 @@ endif() + message(STATUS "HIP_PATH: ${HIP_PATH}") + message(STATUS "ROCM_PATH: ${ROCM_PATH}") + +-set(CMAKE_CXX_COMPILER "${HIP_PATH}/bin/hipcc${EXT}") +-set(CMAKE_C_COMPILER "${HIP_PATH}/bin/hipcc${EXT}") +-set(HIPCONFIG_EXECUTABLE "${HIP_PATH}/bin/hipconfig${EXT}") ++set(CMAKE_CXX_COMPILER "hipcc${EXT}") ++set(CMAKE_C_COMPILER "hipcc${EXT}") ++set(HIPCONFIG_EXECUTABLE "hipconfig${EXT}") + execute_process(COMMAND ${HIPCONFIG_EXECUTABLE} --version + OUTPUT_VARIABLE HIP_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE) +@@ -183,9 +183,8 @@ message(STATUS "CMAKE HIP ARCHITECTURES: + # OFFLOAD_ARCH_STR + # rocm_agent_enumerator + if(NOT DEFINED OFFLOAD_ARCH_STR +- AND EXISTS "${ROCM_PATH}/bin/rocm_agent_enumerator" + AND HIP_PLATFORM STREQUAL "amd" AND UNIX) +- execute_process(COMMAND "${ROCM_PATH}/bin/rocm_agent_enumerator" ++ execute_process(COMMAND "rocm_agent_enumerator" + OUTPUT_VARIABLE HIP_GPU_ARCH + RESULT_VARIABLE ROCM_AGENT_ENUM_RESULT + OUTPUT_STRIP_TRAILING_WHITESPACE) +Index: catch/hipTestMain/hip_test_context.cc +=================================================================== +--- catch.orig/hipTestMain/hip_test_context.cc ++++ catch/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<char, 1024> buffer; + std::string result; + std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose); diff --git a/dev-util/hip/files/hip-test-6.1.0-disable-hipKerArgOptimization.patch b/dev-util/hip/files/hip-test-6.1.0-disable-hipKerArgOptimization.patch new file mode 100644 index 000000000000..cb65ebae62be --- /dev/null +++ b/dev-util/hip/files/hip-test-6.1.0-disable-hipKerArgOptimization.patch @@ -0,0 +1,24 @@ +Those tests requires >=clang-18 to support -amdgpu-kernarg-preload-count +index afdf8c4..28b0198 100644 +--- a/unit/module/CMakeLists.txt ++++ b/unit/module/CMakeLists.txt +@@ -41,9 +41,6 @@ add_custom_target(copyKernel.s + -I${CMAKE_CURRENT_SOURCE_DIR}/../../include --rocm-path=${ROCM_PATH}) + + if(UNIX) +-set(TEST_SRC +- ${TEST_SRC} +- hipKerArgOptimization.cc) + + add_custom_target(copiousArgKernel.code + COMMAND ${CMAKE_CXX_COMPILER} --genco ${OFFLOAD_ARCH_STR} +@@ -106,8 +103,4 @@ hip_add_exe_to_target(NAME ModuleTest + TEST_TARGET_NAME build_tests COMMON_SHARED_SRC ${COMMON_SHARED_SRC}) + + add_dependencies(build_tests copyKernel.code copyKernel.s) +-if(UNIX) +-add_dependencies(build_tests copiousArgKernel.code copiousArgKernel0.code copiousArgKernel1.code copiousArgKernel2.code +-copiousArgKernel3.code copiousArgKernel16.code copiousArgKernel17.code) + endif() +-endif() +\ No newline at end of file diff --git a/dev-util/hip/files/hip-test-6.1.1-fix-musl.patch b/dev-util/hip/files/hip-test-6.1.1-fix-musl.patch new file mode 100644 index 000000000000..c3f3e45efe4d --- /dev/null +++ b/dev-util/hip/files/hip-test-6.1.1-fix-musl.patch @@ -0,0 +1,159 @@ +Fix musl errors: +* reinterpret_cast from 'std::nullptr_t' to 'void **' is not allowed +* error.h is GNU extension + +Upstream PR: https://github.com/ROCm/hip-tests/pull/463 +--- a/unit/rtc/headers/printf_common.h ++++ b/unit/rtc/headers/printf_common.h +@@ -30,7 +30,6 @@ THE SOFTWARE. + #if defined(_WIN32) + #include <io.h> + #else +-#include <error.h> + #include <unistd.h> + #endif + +@@ -110,7 +109,7 @@ struct CaptureStream { + saved_fd = dup(orig_fd); + + if ((temp_fd = mkstemp(tempname)) == -1) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + } +@@ -118,11 +117,11 @@ struct CaptureStream { + void Begin() { + fflush(nullptr); + if (dup2(temp_fd, orig_fd) == -1) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + if (close(temp_fd) != 0) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + } +@@ -130,11 +129,11 @@ struct CaptureStream { + void End() { + fflush(nullptr); + if (dup2(saved_fd, orig_fd) == -1) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + if (close(saved_fd) != 0) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + } +@@ -148,7 +147,7 @@ struct CaptureStream { + + ~CaptureStream() { + if (remove(tempname) != 0) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + } +--- a/unit/memory/hipMemRangeGetAttributes_old.cc ++++ b/unit/memory/hipMemRangeGetAttributes_old.cc +@@ -268,7 +268,7 @@ TEST_CASE("Unit_hipMemRangeGetAttributes_NegativeTst") { + // Passing NULL as first parameter + SECTION("Passing NULL as first parameter") { + if (!CheckError(hipMemRangeGetAttributes( +- reinterpret_cast<void**>(NULL), ++ static_cast<void**>(NULL), + reinterpret_cast<size_t*>(dataSizes), + AttrArr, 4, Hmm, MEM_SIZE), + __LINE__)) { +--- a/unit/occupancy/hipOccupancyMaxActiveBlocksPerMultiprocessor_old.cc ++++ b/unit/occupancy/hipOccupancyMaxActiveBlocksPerMultiprocessor_old.cc +@@ -40,7 +40,7 @@ TEST_CASE("Unit_hipOccupancyMaxActiveBlocksPerMultiprocessor_Negative") { + ret = hipOccupancyMaxActiveBlocksPerMultiprocessor(NULL, f1, blockSize, 0); + REQUIRE(ret != hipSuccess); + +- ret = hipOccupancyMaxActiveBlocksPerMultiprocessor(&numBlock, NULL, blockSize, 0); ++ ret = hipOccupancyMaxActiveBlocksPerMultiprocessor(&numBlock, static_cast<void*>(NULL), blockSize, 0); + REQUIRE(ret != hipSuccess); + + ret = hipOccupancyMaxActiveBlocksPerMultiprocessor(&numBlock, f1, 0, 0); +--- a/unit/occupancy/hipOccupancyMaxPotentialBlockSize_old.cc ++++ b/unit/occupancy/hipOccupancyMaxPotentialBlockSize_old.cc +@@ -37,7 +37,7 @@ TEST_CASE("Unit_hipOccupancyMaxPotentialBlockSize_Negative") { + + #ifndef __HIP_PLATFORM_NVIDIA__ + // nvcc doesnt support kernelfunc(NULL) for api +- ret = hipOccupancyMaxPotentialBlockSize(&gridSize, &blockSize, NULL, 0, 0); ++ ret = hipOccupancyMaxPotentialBlockSize(&gridSize, &blockSize, static_cast<void*>(NULL), 0, 0); + REQUIRE(ret != hipSuccess); + #endif + } +--- a/unit/occupancy/hipOccupancyMaxActiveBlocksPerMultiprocessor.cc ++++ b/unit/occupancy/hipOccupancyMaxActiveBlocksPerMultiprocessor.cc +@@ -48,7 +48,7 @@ TEST_CASE("Unit_hipOccupancyMaxActiveBlocksPerMultiprocessor_Negative_Parameters + blockSize); + + SECTION("Kernel function is NULL") { +- HIP_CHECK_ERROR(hipOccupancyMaxActiveBlocksPerMultiprocessor(&numBlocks, NULL, blockSize, 0), ++ HIP_CHECK_ERROR(hipOccupancyMaxActiveBlocksPerMultiprocessor(&numBlocks, static_cast<void*>(NULL), blockSize, 0), + hipErrorInvalidDeviceFunction); + } + } +--- a/unit/kernel/printf_common.h ++++ b/unit/kernel/printf_common.h +@@ -24,7 +24,6 @@ THE SOFTWARE. + #define _STRESSTEST_PRINTF_COMMON_H_ + + #include <errno.h> +-#include <error.h> + #include <stdio.h> + #include <stdlib.h> + #include <unistd.h> +@@ -47,17 +46,17 @@ struct CaptureStream { + saved_fd = dup(orig_fd); + + if ((temp_fd = mkstemp(tempname)) == -1) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + + fflush(nullptr); + if (dup2(temp_fd, orig_fd) == -1) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + if (close(temp_fd) != 0) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + } +@@ -67,11 +66,11 @@ struct CaptureStream { + return; + fflush(nullptr); + if (dup2(saved_fd, orig_fd) == -1) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + if (close(saved_fd) != 0) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + saved_fd = -1; +@@ -90,7 +89,7 @@ struct CaptureStream { + ~CaptureStream() { + restoreStream(); + if (remove(tempname) != 0) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + } diff --git a/dev-util/hip/hip-5.1.3-r4.ebuild b/dev-util/hip/hip-5.1.3-r4.ebuild index a8654a3e0568..764d4f49f49b 100644 --- a/dev-util/hip/hip-5.1.3-r4.ebuild +++ b/dev-util/hip/hip-5.1.3-r4.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -51,7 +51,7 @@ PATCHES=( "${FILESDIR}/${PN}-5.1.3-fix-hip_prof_gen.patch" "${FILESDIR}/${PN}-5.1.3-correct-sample-install-location.patch" "${FILESDIR}/${PN}-5.1.3-remove-cmake-doxygen-commands.patch" - "${FILESDIR}/0001-SWDEV-316128-HIP-surface-API-support.patch" + "${FILESDIR}/${PN}-5.1.3-0001-SWDEV-316128-HIP-surface-API-support.patch" "${FILESDIR}/${PN}-5.1.3-llvm-15-noinline-keyword.patch" ) diff --git a/dev-util/hip/hip-5.3.3-r3.ebuild b/dev-util/hip/hip-5.3.3-r3.ebuild index c03da0d6effc..fe717ad3b84c 100644 --- a/dev-util/hip/hip-5.3.3-r3.ebuild +++ b/dev-util/hip/hip-5.3.3-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -40,7 +40,7 @@ PATCHES=( "${FILESDIR}/${PN}-5.0.2-set-build-id.patch" "${FILESDIR}/${PN}-5.3.3-remove-cmake-doxygen-commands.patch" "${FILESDIR}/${PN}-5.3.3-disable-Werror.patch" - "${FILESDIR}/0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch" + "${FILESDIR}/${PN}-5.3.3-0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch" ) S="${WORKDIR}/hipamd-rocm-${PV}" @@ -78,9 +78,11 @@ src_prepare() { eapply "${FILESDIR}/${PN}-5.1.3-rocm-path.patch" eapply "${FILESDIR}/${PN}-5.1.3-fno-stack-protector.patch" eapply "${FILESDIR}/${PN}-5.3.3-correct-ldflag.patch" - eapply "${FILESDIR}/0001-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch" - eapply "${FILESDIR}/0002-SWDEV-355608-Remove-clang-include-path-2996.patch" - eapply "${FILESDIR}/0003-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch" + + eapply "${FILESDIR}/${PN}-5.3.3-0002-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch" + eapply "${FILESDIR}/${PN}-5.3.3-0003-SWDEV-355608-Remove-clang-include-path-2996.patch" + eapply "${FILESDIR}/${PN}-5.3.3-0004-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch" + eapply "${FILESDIR}/${PN}-5.4.3-fix-HIP_CLANG_PATH-detection.patch" # Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include" # which makes "stdlib.h" not found when using "#include_next" in header files; diff --git a/dev-util/hip/hip-5.4.3.ebuild b/dev-util/hip/hip-5.4.3.ebuild index 7798aab3e444..3eb09247c48f 100644 --- a/dev-util/hip/hip-5.4.3.ebuild +++ b/dev-util/hip/hip-5.4.3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -40,7 +40,7 @@ PATCHES=( "${FILESDIR}/${PN}-5.0.2-set-build-id.patch" "${FILESDIR}/${PN}-5.3.3-remove-cmake-doxygen-commands.patch" "${FILESDIR}/${PN}-5.3.3-disable-Werror.patch" - "${FILESDIR}/0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch" + "${FILESDIR}/${PN}-5.3.3-0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch" ) S="${WORKDIR}/hipamd-rocm-${PV}" @@ -80,7 +80,7 @@ src_prepare() { eapply "${FILESDIR}/${PN}-5.4.3-correct-ldflag.patch" eapply "${FILESDIR}/${PN}-5.4.3-clang-version.patch" eapply "${FILESDIR}/${PN}-5.4.3-clang-include.patch" - eapply "${FILESDIR}/0003-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch" + eapply "${FILESDIR}/${PN}-5.3.3-0004-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch" eapply "${FILESDIR}/${PN}-5.4.3-fix-HIP_CLANG_PATH-detection.patch" # Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include" diff --git a/dev-util/hip/hip-5.5.1.ebuild b/dev-util/hip/hip-5.5.1.ebuild index 276e8628ad9c..3bb5b6bb99c9 100644 --- a/dev-util/hip/hip-5.5.1.ebuild +++ b/dev-util/hip/hip-5.5.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -40,7 +40,7 @@ PATCHES=( "${FILESDIR}/${PN}-5.0.2-set-build-id.patch" "${FILESDIR}/${PN}-5.3.3-remove-cmake-doxygen-commands.patch" "${FILESDIR}/${PN}-5.5.1-disable-Werror.patch" - #"${FILESDIR}/0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch" + # "${FILESDIR}/${PN}-5.3.3-0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch" ) S="${WORKDIR}/hipamd-rocm-${PV}" @@ -80,7 +80,7 @@ src_prepare() { #eapply "${FILESDIR}/${PN}-5.4.3-correct-ldflag.patch" #eapply "${FILESDIR}/${PN}-5.4.3-clang-version.patch" #eapply "${FILESDIR}/${PN}-5.4.3-clang-include.patch" - #eapply "${FILESDIR}/0003-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch" + #eapply "${FILESDIR}/${PN}-5.3.3-0004-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch" eapply "${FILESDIR}/${PN}-5.4.3-fix-HIP_CLANG_PATH-detection.patch" # Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include" diff --git a/dev-util/hip/hip-5.7.1-r2.ebuild b/dev-util/hip/hip-5.7.1-r2.ebuild index c6c7376c0297..e5d5fee9a796 100644 --- a/dev-util/hip/hip-5.7.1-r2.ebuild +++ b/dev-util/hip/hip-5.7.1-r2.ebuild @@ -7,17 +7,17 @@ DOCS_BUILDER="doxygen" DOCS_DEPEND="media-gfx/graphviz" ROCM_SKIP_GLOBALS=1 -inherit cmake docs llvm rocm flag-o-matic +inherit cmake docs flag-o-matic llvm rocm LLVM_MAX_SLOT=17 TEST_PV=5.7.0 # No hip-test-5.7.1 release DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability" -HOMEPAGE="https://github.com/ROCm-Developer-Tools/hipamd" -SRC_URI="https://github.com/ROCm-Developer-Tools/clr/archive/refs/tags/rocm-${PV}.tar.gz -> rocm-clr-${PV}.tar.gz - https://github.com/ROCm-Developer-Tools/HIP/archive/refs/tags/rocm-${PV}.tar.gz -> hip-${PV}.tar.gz - test? ( https://github.com/ROCm-Developer-Tools/hip-tests/archive/refs/tags/rocm-${TEST_PV}.tar.gz )" +HOMEPAGE="https://github.com/ROCm/hipamd" +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 )" KEYWORDS="~amd64" LICENSE="MIT" @@ -27,7 +27,6 @@ RESTRICT="!test? ( test )" IUSE="debug test" DEPEND=" - dev-util/hipcc >=dev-util/rocminfo-5 sys-devel/clang:${LLVM_MAX_SLOT} dev-libs/rocm-comgr:${SLOT} @@ -35,7 +34,9 @@ DEPEND=" x11-base/xorg-proto virtual/opengl " +BDEPEND="test? ( =dev-util/hipcc-5* )" RDEPEND="${DEPEND} + =dev-util/hipcc-5* dev-perl/URI-Encode sys-devel/clang-runtime:= >=dev-libs/roct-thunk-interface-5" @@ -51,12 +52,12 @@ PATCHES=( ) S="${WORKDIR}/clr-rocm-${PV}/" +TEST_S="${WORKDIR}/hip-tests-rocm-${TEST_PV}/catch" hip_test_wrapper() { - local S="${WORKDIR}/hip-tests-rocm-${TEST_PV}/catch" - local CMAKE_USE_DIR="${S}" - local BUILD_DIR="${S}_build" - cd "${S}" || die + local CMAKE_USE_DIR="${TEST_S}" + local BUILD_DIR="${TEST_S}_build" + cd "${TEST_S}" || die $@ } @@ -66,8 +67,8 @@ src_prepare() { -e "s:#Set HIP_CLANG_PATH:set(HIP_CLANG_PATH \"$(get_llvm_prefix -d ${LLVM_MAX_SLOT})/bin\"):" \ -i "${WORKDIR}"/HIP-rocm-${PV}/cmake/FindHIP.cmake || die - # https://github.com/ROCm-Developer-Tools/HIP/commit/405d029422ba8bb6be5a233d5eebedd2ad2e8bd3 - # https://github.com/ROCm-Developer-Tools/clr/commit/ab6d34ae773f4d151e04170c0f4e46c1135ddf3e + # https://github.com/ROCm/HIP/commit/405d029422ba8bb6be5a233d5eebedd2ad2e8bd3 + # https://github.com/ROCm/clr/commit/ab6d34ae773f4d151e04170c0f4e46c1135ddf3e # Migrated to hip-test, but somehow the change is not applied to the tarball. rm -rf "${WORKDIR}"/HIP-rocm-${PV}/tests || die sed -e '/tests.*cmake/d' -i hipamd/CMakeLists.txt || die @@ -75,8 +76,11 @@ src_prepare() { cmake_src_prepare if use test; then - PATCHES=${FILESDIR}/hip-test-5.7.0-rocm_agent_enumerator-location.patch \ - hip_test_wrapper cmake_src_prepare + local PATCHES=( + "${FILESDIR}"/hip-test-5.7.0-rocm_agent_enumerator-location.patch \ + "${FILESDIR}"/hip-test-5.7.1-remove-incompatible-flag.patch + ) + hip_test_wrapper cmake_src_prepare fi } @@ -115,6 +119,7 @@ src_configure() { local mycmakeargs=( -DROCM_PATH="${BUILD_DIR}"/hipamd -DHIP_PLATFORM=amd + -DCMAKE_MODULE_PATH="${TEST_S}/external/Catch2/cmake/Catch2" ) hip_test_wrapper cmake_src_configure fi @@ -167,7 +172,7 @@ EOF rm "${ED}/usr/include/hip/hcc_detail" || die - # files already installed by hipcc, which is a build dep + # files already installed by hipcc, which is a runtime dep rm "${ED}/usr/bin/hipconfig.pl" || die rm "${ED}/usr/bin/hipcc.pl" || die rm "${ED}/usr/bin/hipcc" || die diff --git a/dev-util/hip/hip-6.0.0.ebuild b/dev-util/hip/hip-6.0.0.ebuild deleted file mode 100644 index ff53e07dc49a..000000000000 --- a/dev-util/hip/hip-6.0.0.ebuild +++ /dev/null @@ -1,164 +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 - -inherit cmake docs flag-o-matic llvm rocm - -LLVM_MAX_SLOT=17 - -TEST_PV=5.7.0 # No hip-test-5.7.1 release - -DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability" -HOMEPAGE="https://github.com/ROCm-Developer-Tools/hipamd" -SRC_URI="https://github.com/ROCm-Developer-Tools/clr/archive/refs/tags/rocm-${PV}.tar.gz -> rocm-clr-${PV}.tar.gz - https://github.com/ROCm-Developer-Tools/HIP/archive/refs/tags/rocm-${PV}.tar.gz -> hip-${PV}.tar.gz - test? ( https://github.com/ROCm-Developer-Tools/hip-tests/archive/refs/tags/rocm-${TEST_PV}.tar.gz )" - -KEYWORDS="~amd64" -LICENSE="MIT" -SLOT="0/$(ver_cut 1-2)" - -RESTRICT="!test? ( test )" -IUSE="debug test" - -DEPEND=" - dev-util/hipcc - >=dev-util/rocminfo-5 - sys-devel/clang:${LLVM_MAX_SLOT} - dev-libs/rocm-comgr:${SLOT} - >=dev-libs/rocr-runtime-5.6 - x11-base/xorg-proto - virtual/opengl -" -RDEPEND="${DEPEND} - dev-perl/URI-Encode - sys-devel/clang-runtime:= - >=dev-libs/roct-thunk-interface-5" - -PATCHES=( - "${FILESDIR}/${PN}-5.7.0-install.patch" - "${FILESDIR}/${PN}-5.7.1-fix-unaligned-access.patch" - "${FILESDIR}/${PN}-5.7.1-exec-stack.patch" - "${FILESDIR}/${PN}-5.7.1-disable-stack-protector.patch" - "${FILESDIR}/${PN}-5.7.1-no_asan_doc.patch" - "${FILESDIR}/${PN}-5.7.1-extend-isa-compatibility-check.patch" -) - -S="${WORKDIR}/clr-rocm-${PV}/" - -hip_test_wrapper() { - local S="${WORKDIR}/hip-tests-rocm-${TEST_PV}/catch" - local CMAKE_USE_DIR="${S}" - local BUILD_DIR="${S}_build" - cd "${S}" || die - $@ -} - -src_prepare() { - # hipamd is itself built by cmake, and should never provide a - # FindHIP.cmake module. - rm -r "${WORKDIR}"/HIP-rocm-${PV}/cmake/FindHIP* || die - - # https://github.com/ROCm-Developer-Tools/HIP/commit/405d029422ba8bb6be5a233d5eebedd2ad2e8bd3 - # https://github.com/ROCm-Developer-Tools/clr/commit/ab6d34ae773f4d151e04170c0f4e46c1135ddf3e - # Migrated to hip-test, but somehow the change is not applied to the tarball. - rm -rf "${WORKDIR}"/HIP-rocm-${PV}/tests || die - sed -e '/tests.*cmake/d' -i hipamd/CMakeLists.txt || die - - cmake_src_prepare - - if use test; then - PATCHES=${FILESDIR}/hip-test-5.7.0-rocm_agent_enumerator-location.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 $(tc-flags-CCLD -Wl,--undefined-version) - - local mycmakeargs=( - -DCMAKE_PREFIX_PATH="$(get_llvm_prefix "${LLVM_MAX_SLOT}")" - -DCMAKE_BUILD_TYPE=${buildtype} - -DCMAKE_SKIP_RPATH=ON - -DBUILD_HIPIFY_CLANG=OFF - -DHIP_PLATFORM=amd - -DHIP_COMMON_DIR="${WORKDIR}/HIP-rocm-${PV}" - -DROCM_PATH="${EPREFIX}/usr" - -DUSE_PROF_API=0 - -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF - -DCLR_BUILD_HIP=ON - -DHIPCC_BIN_DIR="${EPREFIX}/usr/bin" - -DOpenGL_GL_PREFERENCE="GLVND" - ) - - cmake_src_configure - - if use test; then - local mycmakeargs=( - -DROCM_PATH="${BUILD_DIR}"/hipamd - -DHIP_PLATFORM=amd - ) - 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 - - # files already installed by hipcc, which is a build dep - rm "${ED}/usr/bin/hipconfig.pl" || die - rm "${ED}/usr/bin/hipcc.pl" || die - rm "${ED}/usr/bin/hipcc" || die - rm "${ED}/usr/bin/hipcc.bin" || die - rm "${ED}/usr/bin/hipconfig" || die - rm "${ED}/usr/bin/hipconfig.bin" || die - rm "${ED}/usr/bin/hipvars.pm" || die -} diff --git a/dev-util/hip/hip-6.1.1.ebuild b/dev-util/hip/hip-6.1.1.ebuild new file mode 100644 index 000000000000..eab3697cf4ef --- /dev/null +++ b/dev-util/hip/hip-6.1.1.ebuild @@ -0,0 +1,238 @@ +# 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 ' + sys-devel/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} + sys-devel/clang-runtime:= + 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.0-disable-hipKerArgOptimization.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/metadata.xml b/dev-util/hip/metadata.xml index 21b0e03f6a41..8746df97725c 100644 --- a/dev-util/hip/metadata.xml +++ b/dev-util/hip/metadata.xml @@ -17,7 +17,17 @@ <email>gentoo@holzke.net</email> <name>Wilfried Holzke</name> </maintainer> + <maintainer type="person"> + <email>lockalsash@gmail.com</email> + <name>Sv. Lockal</name> + </maintainer> <upstream> - <remote-id type="github">ROCm-Developer-Tools/HIP</remote-id> + <remote-id type="github">ROCm/HIP</remote-id> </upstream> + <use> + <flag name="hip">Build HIP runtime</flag> + <flag name="opencl">Build OpenCL runtime</flag> + <flag name="video_cards_amdgpu">Build for AMD platform</flag> + <flag name="video_cards_nvidia">Build for Nvidia platform</flag> + </use> </pkgmetadata> |