From bba3f0490f6fab687f876d196b255a37f3f1eebd Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Fri, 14 Jan 2022 10:45:22 -0600 Subject: [PATCH 01/33] LB Julia to 1.7, upgrade to ROCm 4.2 --- Manifest.toml | 269 +++++++++++++++++++++---------------- Manifest.toml.gpuarrays-6 | 275 ++++++++++++++++++++++---------------- Manifest.toml.gpuarrays-7 | 274 +++++++++++++++++++++---------------- Project.toml | 10 +- src/device/gcn/atomics.jl | 2 + src/memory.jl | 2 +- src/queue.jl | 2 +- 7 files changed, 487 insertions(+), 347 deletions(-) diff --git a/Manifest.toml b/Manifest.toml index acbe5bd80..f786c4b48 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -1,382 +1,427 @@ # This file is machine-generated - editing it directly is not advised -[[AbstractFFTs]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "485ee0867925449198280d4af84bdb46a2a404d0" +manifest_format = "2.0" + +[[deps.AbstractFFTs]] +deps = ["ChainRulesCore", "LinearAlgebra"] +git-tree-sha1 = "6f1d9bc1c08f9f4a8fa92e3ea3cb50153a1b40d4" uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" -version = "1.0.1" +version = "1.1.0" -[[Adapt]] +[[deps.Adapt]] deps = ["LinearAlgebra"] -git-tree-sha1 = "84918055d15b3114ede17ac6a7182f68870c16f7" +git-tree-sha1 = "af92965fb30777147966f58acb05da51c5616b5f" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "3.3.1" +version = "3.3.3" -[[ArgTools]] +[[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -[[Artifacts]] +[[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -[[Base64]] +[[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -[[BinaryProvider]] +[[deps.BinaryProvider]] deps = ["Libdl", "Logging", "SHA"] git-tree-sha1 = "ecdec412a9abc8db54c0efc5548c64dfce072058" uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232" version = "0.5.10" -[[Bzip2_jll]] +[[deps.Bzip2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2" uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" version = "1.0.8+0" -[[CEnum]] +[[deps.CEnum]] git-tree-sha1 = "215a9aa4a1f23fbd05b92769fdd62559488d70e9" uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" version = "0.4.1" -[[ConstructionBase]] +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "926870acb6cbcf029396f2f2de030282b6bc1941" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.11.4" + +[[deps.Compat]] +deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] +git-tree-sha1 = "44c37b4636bc54afac5c574d2d02b625349d6582" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "3.41.0" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" + +[[deps.ConstructionBase]] deps = ["LinearAlgebra"] git-tree-sha1 = "f74e9d5388b8620b4cee35d4c5a618dd4dc547f4" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" version = "1.3.0" -[[Dates]] +[[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -[[Downloads]] +[[deps.DelimitedFiles]] +deps = ["Mmap"] +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[deps.Downloads]] deps = ["ArgTools", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -[[Elfutils_jll]] +[[deps.Elfutils_jll]] deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Pkg", "XZ_jll", "Zlib_jll", "argp_standalone_jll", "fts_jll", "obstack_jll"] git-tree-sha1 = "8f9fcde6d89b0a3ca51cb2028beab462705c5436" uuid = "ab5a07f8-06af-567f-a878-e8bb879eba5a" version = "0.182.0+0" -[[ExprTools]] -git-tree-sha1 = "b7e3d17636b348f005f11040025ae8c6f645fe92" +[[deps.ExprTools]] +git-tree-sha1 = "24565044e60bc48a7562e75bcf14f084901dc0b6" uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" -version = "0.1.6" +version = "0.1.7" -[[Future]] +[[deps.Future]] deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" -[[GPUArrays]] +[[deps.GPUArrays]] deps = ["Adapt", "LinearAlgebra", "Printf", "Random", "Serialization", "Statistics"] -git-tree-sha1 = "7772508f17f1d482fe0df72cabc5b55bec06bbe0" +git-tree-sha1 = "d9681e61fbce7dde48684b40bdb1a319c4083be7" uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" -version = "8.1.2" +version = "8.1.3" -[[GPUCompiler]] +[[deps.GPUCompiler]] deps = ["ExprTools", "InteractiveUtils", "LLVM", "Libdl", "Logging", "TimerOutputs", "UUIDs"] git-tree-sha1 = "77d915a0af27d474f0aaf12fcd46c400a552e84c" uuid = "61eb1bfa-7361-4325-ad38-22787b887f55" version = "0.13.7" -[[HIP_jll]] +[[deps.HIP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "ROCmCompilerSupport_jll", "ROCmDeviceLibs_jll", "ROCmOpenCLRuntime_jll", "hsa_rocr_jll"] -git-tree-sha1 = "5097d8f7b6842156ab0928371b3d03fefd8decab" +git-tree-sha1 = "12e1b7b5ab18fc533a41a1001ac55e50c2d37a94" uuid = "2696aab5-0948-5276-aa9a-2a86a37016b8" -version = "4.0.0+1" +version = "4.2.0+0" -[[InteractiveUtils]] +[[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -[[JLLWrappers]] +[[deps.JLLWrappers]] deps = ["Preferences"] -git-tree-sha1 = "642a199af8b68253517b80bd3bfd17eb4e84df6e" +git-tree-sha1 = "22df5b96feef82434b07327e2d3c770a9b21e023" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.3.0" +version = "1.4.0" -[[LLVM]] +[[deps.LLVM]] deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Printf", "Unicode"] git-tree-sha1 = "46092047ca4edc10720ecab437c42283cd7c44f3" uuid = "929cbde3-209d-540e-8aea-75f648917ca0" version = "4.6.0" -[[LLVMExtra_jll]] +[[deps.LLVMExtra_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "6a2af408fe809c4f1a54d2b3f188fdd3698549d6" +git-tree-sha1 = "62115afed394c016c2d3096c5b85c407b48be96b" uuid = "dad2f222-ce93-54a1-a47d-0025e8a3acab" -version = "0.0.11+0" +version = "0.0.13+1" -[[LibCURL]] +[[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -[[LibCURL_jll]] +[[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -[[LibGit2]] +[[deps.LibGit2]] deps = ["Base64", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -[[LibSSH2_jll]] +[[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -[[Libdl]] +[[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -[[Libgcrypt_jll]] +[[deps.Libgcrypt_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"] git-tree-sha1 = "64613c82a59c120435c067c2b809fc61cf5166ae" uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" version = "1.8.7+0" -[[Libglvnd_jll]] +[[deps.Libglvnd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"] git-tree-sha1 = "7739f837d6447403596a75d19ed01fd08d6f56bf" uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" version = "1.3.0+3" -[[Libgpg_error_jll]] +[[deps.Libgpg_error_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "c333716e46366857753e273ce6a69ee0945a6db9" uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" version = "1.42.0+0" -[[Libiconv_jll]] +[[deps.Libiconv_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "42b62845d70a619f063a7da093d995ec8e15e778" uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" version = "1.16.1+1" -[[LinearAlgebra]] -deps = ["Libdl"] +[[deps.LinearAlgebra]] +deps = ["Libdl", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -[[Logging]] +[[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -[[MacroTools]] +[[deps.MacroTools]] deps = ["Markdown", "Random"] git-tree-sha1 = "3d3e902b31198a27340d0bf00d6ac452866021cf" uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" version = "0.5.9" -[[Markdown]] +[[deps.Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -[[MbedTLS_jll]] +[[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -[[MozillaCACerts_jll]] +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -[[NUMA_jll]] -deps = ["Libdl", "Pkg"] -git-tree-sha1 = "778f9bd14400cff2c32ed357e12766ac0e3d766e" +[[deps.NUMA_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3da12251003f08e819c907c645879c362206f5b4" uuid = "7f51dc2b-bb24-59f8-b771-bb1490e4195d" -version = "2.0.13+1" +version = "2.0.14+0" -[[NetworkOptions]] +[[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -[[Pkg]] +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" + +[[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -[[Preferences]] +[[deps.Preferences]] deps = ["TOML"] -git-tree-sha1 = "00cfd92944ca9c760982747e9a1d0d5d86ab1e5a" +git-tree-sha1 = "2cf929d64681236a2e074ffafb8d568733d2e6af" uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.2.2" +version = "1.2.3" -[[Printf]] +[[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -[[REPL]] +[[deps.REPL]] deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" -[[ROCmCompilerSupport_jll]] +[[deps.ROCmCompilerSupport_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "ROCmDeviceLibs_jll", "hsa_rocr_jll"] -git-tree-sha1 = "56ddcfb5d8b60c9f8c1bc619886f8d363fd1926d" +git-tree-sha1 = "9fde5de64e9ffdb687ee694fcf49bce3cd5cfd5f" uuid = "8fbdd1d2-db62-5cd0-981e-905da1486e17" -version = "4.0.0+1" +version = "4.2.0+0" -[[ROCmDeviceLibs_jll]] +[[deps.ROCmDeviceLibs_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] -git-tree-sha1 = "d764f0f28b5af89aa004871a6a38e5d061f77257" +git-tree-sha1 = "8f034123ed944497b8177e63963a034eeb4e62fa" uuid = "873c0968-716b-5aa7-bb8d-d1e2e2aeff2d" -version = "4.0.0+0" +version = "4.2.0+0" -[[ROCmOpenCLRuntime_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg", "ROCmCompilerSupport_jll", "ROCmDeviceLibs_jll", "Xorg_libX11_jll", "Xorg_xorgproto_jll", "hsa_rocr_jll"] -git-tree-sha1 = "f9e3e2cb40a7990535efa7da9b9dd0e0b458a973" +[[deps.ROCmOpenCLRuntime_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg", "ROCmCompilerSupport_jll", "ROCmDeviceLibs_jll", "Xorg_libX11_jll", "Xorg_xorgproto_jll", "hsa_rocr_jll", "hsakmt_roct_jll"] +git-tree-sha1 = "6760fbfbf0657e672cb980417ddf5c5c510ee305" uuid = "10ae2a08-2eea-53f8-8c20-eec175020e9f" -version = "4.0.0+1" +version = "4.2.0+1" -[[Random]] -deps = ["Serialization"] +[[deps.Random]] +deps = ["SHA", "Serialization"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -[[Requires]] +[[deps.Requires]] deps = ["UUIDs"] -git-tree-sha1 = "4036a3bd08ac7e968e27c203d45f5fff15020621" +git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.1.3" +version = "1.3.0" -[[SHA]] +[[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -[[Serialization]] +[[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -[[Setfield]] +[[deps.Setfield]] deps = ["ConstructionBase", "Future", "MacroTools", "Requires"] git-tree-sha1 = "fca29e68c5062722b5b4435594c3d1ba557072a3" uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" version = "0.7.1" -[[Sockets]] +[[deps.SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -[[SparseArrays]] +[[deps.SparseArrays]] deps = ["LinearAlgebra", "Random"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -[[Statistics]] +[[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -[[TOML]] +[[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -[[Tar]] +[[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -[[TimerOutputs]] +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.TimerOutputs]] deps = ["ExprTools", "Printf"] -git-tree-sha1 = "7cb456f358e8f9d102a8b25e8dfedf58fa5689bc" +git-tree-sha1 = "a5aed757f65c8a1c64503bc4035f704d24c749bf" uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" -version = "0.5.13" +version = "0.5.14" -[[UUIDs]] +[[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -[[Unicode]] +[[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -[[XML2_jll]] +[[deps.XML2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"] git-tree-sha1 = "1acf5bdf07aa0907e0a37d3718bb88d4b687b74a" uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" version = "2.9.12+0" -[[XSLT_jll]] +[[deps.XSLT_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"] git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" uuid = "aed1982a-8fda-507f-9586-7b0439959a61" version = "1.1.34+0" -[[XZ_jll]] +[[deps.XZ_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "a921669cd9a45c23031fd4eb904f5cc3d20de415" uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" version = "5.2.5+2" -[[Xorg_libX11_jll]] +[[deps.Xorg_libX11_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] git-tree-sha1 = "5be649d550f3f4b95308bf0183b82e2582876527" uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" version = "1.6.9+4" -[[Xorg_libXau_jll]] +[[deps.Xorg_libXau_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "4e490d5c960c314f33885790ed410ff3a94ce67e" uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" version = "1.0.9+4" -[[Xorg_libXdmcp_jll]] +[[deps.Xorg_libXdmcp_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "4fe47bd2247248125c428978740e18a681372dd4" uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" version = "1.1.3+4" -[[Xorg_libXext_jll]] +[[deps.Xorg_libXext_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] git-tree-sha1 = "b7c0aa8c376b31e4852b360222848637f481f8c3" uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" version = "1.3.4+4" -[[Xorg_libpthread_stubs_jll]] +[[deps.Xorg_libpthread_stubs_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "6783737e45d3c59a4a4c4091f5f88cdcf0908cbb" uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" version = "0.1.0+3" -[[Xorg_libxcb_jll]] +[[deps.Xorg_libxcb_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] git-tree-sha1 = "daf17f441228e7a3833846cd048892861cff16d6" uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" version = "1.13.0+3" -[[Xorg_xorgproto_jll]] +[[deps.Xorg_xorgproto_jll]] deps = ["Libdl", "Pkg"] git-tree-sha1 = "9a9eb8ce756fe0bca01b4be16da770e18d264972" uuid = "c4d99508-4286-5418-9131-c86396af500b" version = "2019.2.0+2" -[[Xorg_xtrans_jll]] +[[deps.Xorg_xtrans_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "79c31e7844f6ecf779705fbc12146eb190b7d845" uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" version = "1.4.0+3" -[[Zlib_jll]] +[[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -[[argp_standalone_jll]] +[[deps.argp_standalone_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "feaf9f6293003c2bf53056fd6930d677ed340b34" uuid = "c53206cc-00f7-50bf-ad1e-3ae1f6e49bc3" version = "1.3.1+0" -[[fts_jll]] +[[deps.fts_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "78732b942383d2cb521df8a1a0814911144e663d" uuid = "d65627f6-89bd-53e8-8ab5-8b75ff535eee" version = "1.2.7+1" -[[hsa_rocr_jll]] +[[deps.hsa_rocr_jll]] deps = ["Artifacts", "Elfutils_jll", "JLLWrappers", "Libdl", "NUMA_jll", "Pkg", "Zlib_jll", "hsakmt_roct_jll"] -git-tree-sha1 = "df8d73efec8b1e53ad527d208f5343c0368f0fcd" +git-tree-sha1 = "f0562c2ab47dbe4da3ddaa5a9f8cbff9374dfee5" uuid = "dd59ff1a-a01a-568d-8b29-0669330f116a" -version = "4.0.0+0" +version = "4.2.0+1" -[[hsakmt_roct_jll]] +[[deps.hsakmt_roct_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "NUMA_jll", "Pkg"] git-tree-sha1 = "ea54f6be23c6d25613a0872ec23dc5a0b77b4a00" uuid = "1cecccd7-a9b6-5045-9cdc-a44c19b16d76" version = "4.2.0+0" -[[nghttp2_jll]] +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" + +[[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -[[obstack_jll]] +[[deps.obstack_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "1c4a6b66e934fc6db4649cb2910c72f53bbfea7e" uuid = "c88a4935-d25e-5644-aacc-5db6f1b8ef79" version = "1.2.2+0" -[[p7zip_jll]] +[[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" diff --git a/Manifest.toml.gpuarrays-6 b/Manifest.toml.gpuarrays-6 index 749a1feb6..b8603e25b 100644 --- a/Manifest.toml.gpuarrays-6 +++ b/Manifest.toml.gpuarrays-6 @@ -1,382 +1,429 @@ # This file is machine-generated - editing it directly is not advised -[[AbstractFFTs]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "485ee0867925449198280d4af84bdb46a2a404d0" +julia_version = "1.7.1" +manifest_format = "2.0" + +[[deps.AbstractFFTs]] +deps = ["ChainRulesCore", "LinearAlgebra"] +git-tree-sha1 = "6f1d9bc1c08f9f4a8fa92e3ea3cb50153a1b40d4" uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" -version = "1.0.1" +version = "1.1.0" -[[Adapt]] +[[deps.Adapt]] deps = ["LinearAlgebra"] -git-tree-sha1 = "84918055d15b3114ede17ac6a7182f68870c16f7" +git-tree-sha1 = "af92965fb30777147966f58acb05da51c5616b5f" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "3.3.1" +version = "3.3.3" -[[ArgTools]] +[[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -[[Artifacts]] +[[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -[[Base64]] +[[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -[[BinaryProvider]] +[[deps.BinaryProvider]] deps = ["Libdl", "Logging", "SHA"] git-tree-sha1 = "ecdec412a9abc8db54c0efc5548c64dfce072058" uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232" version = "0.5.10" -[[Bzip2_jll]] +[[deps.Bzip2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2" uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" version = "1.0.8+0" -[[CEnum]] +[[deps.CEnum]] git-tree-sha1 = "215a9aa4a1f23fbd05b92769fdd62559488d70e9" uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" version = "0.4.1" -[[ConstructionBase]] +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "926870acb6cbcf029396f2f2de030282b6bc1941" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.11.4" + +[[deps.Compat]] +deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] +git-tree-sha1 = "44c37b4636bc54afac5c574d2d02b625349d6582" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "3.41.0" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" + +[[deps.ConstructionBase]] deps = ["LinearAlgebra"] git-tree-sha1 = "f74e9d5388b8620b4cee35d4c5a618dd4dc547f4" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" version = "1.3.0" -[[Dates]] +[[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -[[Downloads]] +[[deps.DelimitedFiles]] +deps = ["Mmap"] +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[deps.Downloads]] deps = ["ArgTools", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -[[Elfutils_jll]] +[[deps.Elfutils_jll]] deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Pkg", "XZ_jll", "Zlib_jll", "argp_standalone_jll", "fts_jll", "obstack_jll"] git-tree-sha1 = "8f9fcde6d89b0a3ca51cb2028beab462705c5436" uuid = "ab5a07f8-06af-567f-a878-e8bb879eba5a" version = "0.182.0+0" -[[ExprTools]] -git-tree-sha1 = "b7e3d17636b348f005f11040025ae8c6f645fe92" +[[deps.ExprTools]] +git-tree-sha1 = "24565044e60bc48a7562e75bcf14f084901dc0b6" uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" -version = "0.1.6" +version = "0.1.7" -[[Future]] +[[deps.Future]] deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" -[[GPUArrays]] +[[deps.GPUArrays]] deps = ["AbstractFFTs", "Adapt", "LinearAlgebra", "Printf", "Random", "Serialization", "Statistics"] git-tree-sha1 = "df5b8569904c5c10e84c640984cfff054b18c086" +pinned = true uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" version = "6.4.1" -[[GPUCompiler]] +[[deps.GPUCompiler]] deps = ["ExprTools", "InteractiveUtils", "LLVM", "Libdl", "Logging", "TimerOutputs", "UUIDs"] -git-tree-sha1 = "4ed2616d5e656c8716736b64da86755467f26cf5" +git-tree-sha1 = "2cac236070c2c4b36de54ae9146b55ee2c34ac7a" uuid = "61eb1bfa-7361-4325-ad38-22787b887f55" -version = "0.12.9" +version = "0.13.10" -[[HIP_jll]] +[[deps.HIP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "ROCmCompilerSupport_jll", "ROCmDeviceLibs_jll", "ROCmOpenCLRuntime_jll", "hsa_rocr_jll"] -git-tree-sha1 = "5097d8f7b6842156ab0928371b3d03fefd8decab" +git-tree-sha1 = "12e1b7b5ab18fc533a41a1001ac55e50c2d37a94" uuid = "2696aab5-0948-5276-aa9a-2a86a37016b8" -version = "4.0.0+1" +version = "4.2.0+0" -[[InteractiveUtils]] +[[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -[[JLLWrappers]] +[[deps.JLLWrappers]] deps = ["Preferences"] -git-tree-sha1 = "642a199af8b68253517b80bd3bfd17eb4e84df6e" +git-tree-sha1 = "22df5b96feef82434b07327e2d3c770a9b21e023" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.3.0" +version = "1.4.0" -[[LLVM]] +[[deps.LLVM]] deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Printf", "Unicode"] -git-tree-sha1 = "46092047ca4edc10720ecab437c42283cd7c44f3" +git-tree-sha1 = "f8dcd7adfda0dddaf944e62476d823164cccc217" uuid = "929cbde3-209d-540e-8aea-75f648917ca0" -version = "4.6.0" +version = "4.7.1" -[[LLVMExtra_jll]] +[[deps.LLVMExtra_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "9436f02a0c9f726d914cc6539f87850701be18fc" +git-tree-sha1 = "62115afed394c016c2d3096c5b85c407b48be96b" uuid = "dad2f222-ce93-54a1-a47d-0025e8a3acab" -version = "0.0.12+0" +version = "0.0.13+1" -[[LibCURL]] +[[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -[[LibCURL_jll]] +[[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -[[LibGit2]] +[[deps.LibGit2]] deps = ["Base64", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -[[LibSSH2_jll]] +[[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -[[Libdl]] +[[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -[[Libgcrypt_jll]] +[[deps.Libgcrypt_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"] git-tree-sha1 = "64613c82a59c120435c067c2b809fc61cf5166ae" uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" version = "1.8.7+0" -[[Libglvnd_jll]] +[[deps.Libglvnd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"] git-tree-sha1 = "7739f837d6447403596a75d19ed01fd08d6f56bf" uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" version = "1.3.0+3" -[[Libgpg_error_jll]] +[[deps.Libgpg_error_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "c333716e46366857753e273ce6a69ee0945a6db9" uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" version = "1.42.0+0" -[[Libiconv_jll]] +[[deps.Libiconv_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "42b62845d70a619f063a7da093d995ec8e15e778" uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" version = "1.16.1+1" -[[LinearAlgebra]] -deps = ["Libdl"] +[[deps.LinearAlgebra]] +deps = ["Libdl", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -[[Logging]] +[[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -[[MacroTools]] +[[deps.MacroTools]] deps = ["Markdown", "Random"] git-tree-sha1 = "3d3e902b31198a27340d0bf00d6ac452866021cf" uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" version = "0.5.9" -[[Markdown]] +[[deps.Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -[[MbedTLS_jll]] +[[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -[[MozillaCACerts_jll]] +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -[[NUMA_jll]] -deps = ["Libdl", "Pkg"] -git-tree-sha1 = "778f9bd14400cff2c32ed357e12766ac0e3d766e" +[[deps.NUMA_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3da12251003f08e819c907c645879c362206f5b4" uuid = "7f51dc2b-bb24-59f8-b771-bb1490e4195d" -version = "2.0.13+1" +version = "2.0.14+0" -[[NetworkOptions]] +[[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -[[Pkg]] +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" + +[[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -[[Preferences]] +[[deps.Preferences]] deps = ["TOML"] -git-tree-sha1 = "00cfd92944ca9c760982747e9a1d0d5d86ab1e5a" +git-tree-sha1 = "2cf929d64681236a2e074ffafb8d568733d2e6af" uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.2.2" +version = "1.2.3" -[[Printf]] +[[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -[[REPL]] +[[deps.REPL]] deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" -[[ROCmCompilerSupport_jll]] +[[deps.ROCmCompilerSupport_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "ROCmDeviceLibs_jll", "hsa_rocr_jll"] -git-tree-sha1 = "56ddcfb5d8b60c9f8c1bc619886f8d363fd1926d" +git-tree-sha1 = "9fde5de64e9ffdb687ee694fcf49bce3cd5cfd5f" uuid = "8fbdd1d2-db62-5cd0-981e-905da1486e17" -version = "4.0.0+1" +version = "4.2.0+0" -[[ROCmDeviceLibs_jll]] +[[deps.ROCmDeviceLibs_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] -git-tree-sha1 = "d764f0f28b5af89aa004871a6a38e5d061f77257" +git-tree-sha1 = "8f034123ed944497b8177e63963a034eeb4e62fa" uuid = "873c0968-716b-5aa7-bb8d-d1e2e2aeff2d" -version = "4.0.0+0" +version = "4.2.0+0" -[[ROCmOpenCLRuntime_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg", "ROCmCompilerSupport_jll", "ROCmDeviceLibs_jll", "Xorg_libX11_jll", "Xorg_xorgproto_jll", "hsa_rocr_jll"] -git-tree-sha1 = "f9e3e2cb40a7990535efa7da9b9dd0e0b458a973" +[[deps.ROCmOpenCLRuntime_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg", "ROCmCompilerSupport_jll", "ROCmDeviceLibs_jll", "Xorg_libX11_jll", "Xorg_xorgproto_jll", "hsa_rocr_jll", "hsakmt_roct_jll"] +git-tree-sha1 = "6760fbfbf0657e672cb980417ddf5c5c510ee305" uuid = "10ae2a08-2eea-53f8-8c20-eec175020e9f" -version = "4.0.0+1" +version = "4.2.0+1" -[[Random]] -deps = ["Serialization"] +[[deps.Random]] +deps = ["SHA", "Serialization"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -[[Requires]] +[[deps.Requires]] deps = ["UUIDs"] -git-tree-sha1 = "4036a3bd08ac7e968e27c203d45f5fff15020621" +git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.1.3" +version = "1.3.0" -[[SHA]] +[[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -[[Serialization]] +[[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -[[Setfield]] +[[deps.Setfield]] deps = ["ConstructionBase", "Future", "MacroTools", "Requires"] git-tree-sha1 = "fca29e68c5062722b5b4435594c3d1ba557072a3" uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" version = "0.7.1" -[[Sockets]] +[[deps.SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -[[SparseArrays]] +[[deps.SparseArrays]] deps = ["LinearAlgebra", "Random"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -[[Statistics]] +[[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -[[TOML]] +[[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -[[Tar]] +[[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -[[TimerOutputs]] +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.TimerOutputs]] deps = ["ExprTools", "Printf"] -git-tree-sha1 = "7cb456f358e8f9d102a8b25e8dfedf58fa5689bc" +git-tree-sha1 = "a5aed757f65c8a1c64503bc4035f704d24c749bf" uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" -version = "0.5.13" +version = "0.5.14" -[[UUIDs]] +[[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -[[Unicode]] +[[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -[[XML2_jll]] +[[deps.XML2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"] git-tree-sha1 = "1acf5bdf07aa0907e0a37d3718bb88d4b687b74a" uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" version = "2.9.12+0" -[[XSLT_jll]] +[[deps.XSLT_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"] git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" uuid = "aed1982a-8fda-507f-9586-7b0439959a61" version = "1.1.34+0" -[[XZ_jll]] +[[deps.XZ_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "a921669cd9a45c23031fd4eb904f5cc3d20de415" uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" version = "5.2.5+2" -[[Xorg_libX11_jll]] +[[deps.Xorg_libX11_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] git-tree-sha1 = "5be649d550f3f4b95308bf0183b82e2582876527" uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" version = "1.6.9+4" -[[Xorg_libXau_jll]] +[[deps.Xorg_libXau_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "4e490d5c960c314f33885790ed410ff3a94ce67e" uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" version = "1.0.9+4" -[[Xorg_libXdmcp_jll]] +[[deps.Xorg_libXdmcp_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "4fe47bd2247248125c428978740e18a681372dd4" uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" version = "1.1.3+4" -[[Xorg_libXext_jll]] +[[deps.Xorg_libXext_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] git-tree-sha1 = "b7c0aa8c376b31e4852b360222848637f481f8c3" uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" version = "1.3.4+4" -[[Xorg_libpthread_stubs_jll]] +[[deps.Xorg_libpthread_stubs_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "6783737e45d3c59a4a4c4091f5f88cdcf0908cbb" uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" version = "0.1.0+3" -[[Xorg_libxcb_jll]] +[[deps.Xorg_libxcb_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] git-tree-sha1 = "daf17f441228e7a3833846cd048892861cff16d6" uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" version = "1.13.0+3" -[[Xorg_xorgproto_jll]] +[[deps.Xorg_xorgproto_jll]] deps = ["Libdl", "Pkg"] git-tree-sha1 = "9a9eb8ce756fe0bca01b4be16da770e18d264972" uuid = "c4d99508-4286-5418-9131-c86396af500b" version = "2019.2.0+2" -[[Xorg_xtrans_jll]] +[[deps.Xorg_xtrans_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "79c31e7844f6ecf779705fbc12146eb190b7d845" uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" version = "1.4.0+3" -[[Zlib_jll]] +[[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -[[argp_standalone_jll]] +[[deps.argp_standalone_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "feaf9f6293003c2bf53056fd6930d677ed340b34" uuid = "c53206cc-00f7-50bf-ad1e-3ae1f6e49bc3" version = "1.3.1+0" -[[fts_jll]] +[[deps.fts_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "78732b942383d2cb521df8a1a0814911144e663d" uuid = "d65627f6-89bd-53e8-8ab5-8b75ff535eee" version = "1.2.7+1" -[[hsa_rocr_jll]] +[[deps.hsa_rocr_jll]] deps = ["Artifacts", "Elfutils_jll", "JLLWrappers", "Libdl", "NUMA_jll", "Pkg", "Zlib_jll", "hsakmt_roct_jll"] -git-tree-sha1 = "df8d73efec8b1e53ad527d208f5343c0368f0fcd" +git-tree-sha1 = "f0562c2ab47dbe4da3ddaa5a9f8cbff9374dfee5" uuid = "dd59ff1a-a01a-568d-8b29-0669330f116a" -version = "4.0.0+0" +version = "4.2.0+1" -[[hsakmt_roct_jll]] +[[deps.hsakmt_roct_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "NUMA_jll", "Pkg"] git-tree-sha1 = "ea54f6be23c6d25613a0872ec23dc5a0b77b4a00" uuid = "1cecccd7-a9b6-5045-9cdc-a44c19b16d76" version = "4.2.0+0" -[[nghttp2_jll]] +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" + +[[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -[[obstack_jll]] +[[deps.obstack_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "1c4a6b66e934fc6db4649cb2910c72f53bbfea7e" uuid = "c88a4935-d25e-5644-aacc-5db6f1b8ef79" version = "1.2.2+0" -[[p7zip_jll]] +[[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" diff --git a/Manifest.toml.gpuarrays-7 b/Manifest.toml.gpuarrays-7 index 55a5ff98e..554380138 100644 --- a/Manifest.toml.gpuarrays-7 +++ b/Manifest.toml.gpuarrays-7 @@ -1,382 +1,428 @@ # This file is machine-generated - editing it directly is not advised -[[AbstractFFTs]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "485ee0867925449198280d4af84bdb46a2a404d0" +manifest_format = "2.0" + +[[deps.AbstractFFTs]] +deps = ["ChainRulesCore", "LinearAlgebra"] +git-tree-sha1 = "6f1d9bc1c08f9f4a8fa92e3ea3cb50153a1b40d4" uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" -version = "1.0.1" +version = "1.1.0" -[[Adapt]] +[[deps.Adapt]] deps = ["LinearAlgebra"] -git-tree-sha1 = "84918055d15b3114ede17ac6a7182f68870c16f7" +git-tree-sha1 = "af92965fb30777147966f58acb05da51c5616b5f" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "3.3.1" +version = "3.3.3" -[[ArgTools]] +[[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -[[Artifacts]] +[[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -[[Base64]] +[[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -[[BinaryProvider]] +[[deps.BinaryProvider]] deps = ["Libdl", "Logging", "SHA"] git-tree-sha1 = "ecdec412a9abc8db54c0efc5548c64dfce072058" uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232" version = "0.5.10" -[[Bzip2_jll]] +[[deps.Bzip2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2" uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" version = "1.0.8+0" -[[CEnum]] +[[deps.CEnum]] git-tree-sha1 = "215a9aa4a1f23fbd05b92769fdd62559488d70e9" uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" version = "0.4.1" -[[ConstructionBase]] +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "926870acb6cbcf029396f2f2de030282b6bc1941" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.11.4" + +[[deps.Compat]] +deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] +git-tree-sha1 = "44c37b4636bc54afac5c574d2d02b625349d6582" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "3.41.0" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" + +[[deps.ConstructionBase]] deps = ["LinearAlgebra"] git-tree-sha1 = "f74e9d5388b8620b4cee35d4c5a618dd4dc547f4" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" version = "1.3.0" -[[Dates]] +[[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -[[Downloads]] +[[deps.DelimitedFiles]] +deps = ["Mmap"] +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[deps.Downloads]] deps = ["ArgTools", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -[[Elfutils_jll]] +[[deps.Elfutils_jll]] deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Pkg", "XZ_jll", "Zlib_jll", "argp_standalone_jll", "fts_jll", "obstack_jll"] git-tree-sha1 = "8f9fcde6d89b0a3ca51cb2028beab462705c5436" uuid = "ab5a07f8-06af-567f-a878-e8bb879eba5a" version = "0.182.0+0" -[[ExprTools]] -git-tree-sha1 = "b7e3d17636b348f005f11040025ae8c6f645fe92" +[[deps.ExprTools]] +git-tree-sha1 = "24565044e60bc48a7562e75bcf14f084901dc0b6" uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" -version = "0.1.6" +version = "0.1.7" -[[Future]] +[[deps.Future]] deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" -[[GPUArrays]] +[[deps.GPUArrays]] deps = ["AbstractFFTs", "Adapt", "LinearAlgebra", "Printf", "Random", "Serialization", "Statistics"] git-tree-sha1 = "ececbf05f8904c92814bdbd0aafd5540b0bf2e9a" +pinned = true uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" version = "7.0.1" -[[GPUCompiler]] +[[deps.GPUCompiler]] deps = ["ExprTools", "InteractiveUtils", "LLVM", "Libdl", "Logging", "TimerOutputs", "UUIDs"] -git-tree-sha1 = "4ed2616d5e656c8716736b64da86755467f26cf5" +git-tree-sha1 = "2cac236070c2c4b36de54ae9146b55ee2c34ac7a" uuid = "61eb1bfa-7361-4325-ad38-22787b887f55" -version = "0.12.9" +version = "0.13.10" -[[HIP_jll]] +[[deps.HIP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "ROCmCompilerSupport_jll", "ROCmDeviceLibs_jll", "ROCmOpenCLRuntime_jll", "hsa_rocr_jll"] -git-tree-sha1 = "5097d8f7b6842156ab0928371b3d03fefd8decab" +git-tree-sha1 = "12e1b7b5ab18fc533a41a1001ac55e50c2d37a94" uuid = "2696aab5-0948-5276-aa9a-2a86a37016b8" -version = "4.0.0+1" +version = "4.2.0+0" -[[InteractiveUtils]] +[[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -[[JLLWrappers]] +[[deps.JLLWrappers]] deps = ["Preferences"] -git-tree-sha1 = "642a199af8b68253517b80bd3bfd17eb4e84df6e" +git-tree-sha1 = "22df5b96feef82434b07327e2d3c770a9b21e023" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.3.0" +version = "1.4.0" -[[LLVM]] +[[deps.LLVM]] deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Printf", "Unicode"] -git-tree-sha1 = "46092047ca4edc10720ecab437c42283cd7c44f3" +git-tree-sha1 = "f8dcd7adfda0dddaf944e62476d823164cccc217" uuid = "929cbde3-209d-540e-8aea-75f648917ca0" -version = "4.6.0" +version = "4.7.1" -[[LLVMExtra_jll]] +[[deps.LLVMExtra_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "9436f02a0c9f726d914cc6539f87850701be18fc" +git-tree-sha1 = "62115afed394c016c2d3096c5b85c407b48be96b" uuid = "dad2f222-ce93-54a1-a47d-0025e8a3acab" -version = "0.0.12+0" +version = "0.0.13+1" -[[LibCURL]] +[[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -[[LibCURL_jll]] +[[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -[[LibGit2]] +[[deps.LibGit2]] deps = ["Base64", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -[[LibSSH2_jll]] +[[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -[[Libdl]] +[[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -[[Libgcrypt_jll]] +[[deps.Libgcrypt_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"] git-tree-sha1 = "64613c82a59c120435c067c2b809fc61cf5166ae" uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" version = "1.8.7+0" -[[Libglvnd_jll]] +[[deps.Libglvnd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"] git-tree-sha1 = "7739f837d6447403596a75d19ed01fd08d6f56bf" uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" version = "1.3.0+3" -[[Libgpg_error_jll]] +[[deps.Libgpg_error_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "c333716e46366857753e273ce6a69ee0945a6db9" uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" version = "1.42.0+0" -[[Libiconv_jll]] +[[deps.Libiconv_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "42b62845d70a619f063a7da093d995ec8e15e778" uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" version = "1.16.1+1" -[[LinearAlgebra]] -deps = ["Libdl"] +[[deps.LinearAlgebra]] +deps = ["Libdl", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -[[Logging]] +[[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -[[MacroTools]] +[[deps.MacroTools]] deps = ["Markdown", "Random"] git-tree-sha1 = "3d3e902b31198a27340d0bf00d6ac452866021cf" uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" version = "0.5.9" -[[Markdown]] +[[deps.Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -[[MbedTLS_jll]] +[[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -[[MozillaCACerts_jll]] +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -[[NUMA_jll]] -deps = ["Libdl", "Pkg"] -git-tree-sha1 = "778f9bd14400cff2c32ed357e12766ac0e3d766e" +[[deps.NUMA_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3da12251003f08e819c907c645879c362206f5b4" uuid = "7f51dc2b-bb24-59f8-b771-bb1490e4195d" -version = "2.0.13+1" +version = "2.0.14+0" -[[NetworkOptions]] +[[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -[[Pkg]] +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" + +[[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -[[Preferences]] +[[deps.Preferences]] deps = ["TOML"] -git-tree-sha1 = "00cfd92944ca9c760982747e9a1d0d5d86ab1e5a" +git-tree-sha1 = "2cf929d64681236a2e074ffafb8d568733d2e6af" uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.2.2" +version = "1.2.3" -[[Printf]] +[[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -[[REPL]] +[[deps.REPL]] deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" -[[ROCmCompilerSupport_jll]] +[[deps.ROCmCompilerSupport_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "ROCmDeviceLibs_jll", "hsa_rocr_jll"] -git-tree-sha1 = "56ddcfb5d8b60c9f8c1bc619886f8d363fd1926d" +git-tree-sha1 = "9fde5de64e9ffdb687ee694fcf49bce3cd5cfd5f" uuid = "8fbdd1d2-db62-5cd0-981e-905da1486e17" -version = "4.0.0+1" +version = "4.2.0+0" -[[ROCmDeviceLibs_jll]] +[[deps.ROCmDeviceLibs_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] -git-tree-sha1 = "d764f0f28b5af89aa004871a6a38e5d061f77257" +git-tree-sha1 = "8f034123ed944497b8177e63963a034eeb4e62fa" uuid = "873c0968-716b-5aa7-bb8d-d1e2e2aeff2d" -version = "4.0.0+0" +version = "4.2.0+0" -[[ROCmOpenCLRuntime_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg", "ROCmCompilerSupport_jll", "ROCmDeviceLibs_jll", "Xorg_libX11_jll", "Xorg_xorgproto_jll", "hsa_rocr_jll"] -git-tree-sha1 = "f9e3e2cb40a7990535efa7da9b9dd0e0b458a973" +[[deps.ROCmOpenCLRuntime_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg", "ROCmCompilerSupport_jll", "ROCmDeviceLibs_jll", "Xorg_libX11_jll", "Xorg_xorgproto_jll", "hsa_rocr_jll", "hsakmt_roct_jll"] +git-tree-sha1 = "6760fbfbf0657e672cb980417ddf5c5c510ee305" uuid = "10ae2a08-2eea-53f8-8c20-eec175020e9f" -version = "4.0.0+1" +version = "4.2.0+1" -[[Random]] -deps = ["Serialization"] +[[deps.Random]] +deps = ["SHA", "Serialization"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -[[Requires]] +[[deps.Requires]] deps = ["UUIDs"] -git-tree-sha1 = "4036a3bd08ac7e968e27c203d45f5fff15020621" +git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.1.3" +version = "1.3.0" -[[SHA]] +[[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -[[Serialization]] +[[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -[[Setfield]] +[[deps.Setfield]] deps = ["ConstructionBase", "Future", "MacroTools", "Requires"] git-tree-sha1 = "fca29e68c5062722b5b4435594c3d1ba557072a3" uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" version = "0.7.1" -[[Sockets]] +[[deps.SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -[[SparseArrays]] +[[deps.SparseArrays]] deps = ["LinearAlgebra", "Random"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -[[Statistics]] +[[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -[[TOML]] +[[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -[[Tar]] +[[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -[[TimerOutputs]] +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.TimerOutputs]] deps = ["ExprTools", "Printf"] -git-tree-sha1 = "7cb456f358e8f9d102a8b25e8dfedf58fa5689bc" +git-tree-sha1 = "a5aed757f65c8a1c64503bc4035f704d24c749bf" uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" -version = "0.5.13" +version = "0.5.14" -[[UUIDs]] +[[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -[[Unicode]] +[[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -[[XML2_jll]] +[[deps.XML2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"] git-tree-sha1 = "1acf5bdf07aa0907e0a37d3718bb88d4b687b74a" uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" version = "2.9.12+0" -[[XSLT_jll]] +[[deps.XSLT_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"] git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" uuid = "aed1982a-8fda-507f-9586-7b0439959a61" version = "1.1.34+0" -[[XZ_jll]] +[[deps.XZ_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "a921669cd9a45c23031fd4eb904f5cc3d20de415" uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" version = "5.2.5+2" -[[Xorg_libX11_jll]] +[[deps.Xorg_libX11_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] git-tree-sha1 = "5be649d550f3f4b95308bf0183b82e2582876527" uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" version = "1.6.9+4" -[[Xorg_libXau_jll]] +[[deps.Xorg_libXau_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "4e490d5c960c314f33885790ed410ff3a94ce67e" uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" version = "1.0.9+4" -[[Xorg_libXdmcp_jll]] +[[deps.Xorg_libXdmcp_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "4fe47bd2247248125c428978740e18a681372dd4" uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" version = "1.1.3+4" -[[Xorg_libXext_jll]] +[[deps.Xorg_libXext_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] git-tree-sha1 = "b7c0aa8c376b31e4852b360222848637f481f8c3" uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" version = "1.3.4+4" -[[Xorg_libpthread_stubs_jll]] +[[deps.Xorg_libpthread_stubs_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "6783737e45d3c59a4a4c4091f5f88cdcf0908cbb" uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" version = "0.1.0+3" -[[Xorg_libxcb_jll]] +[[deps.Xorg_libxcb_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] git-tree-sha1 = "daf17f441228e7a3833846cd048892861cff16d6" uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" version = "1.13.0+3" -[[Xorg_xorgproto_jll]] +[[deps.Xorg_xorgproto_jll]] deps = ["Libdl", "Pkg"] git-tree-sha1 = "9a9eb8ce756fe0bca01b4be16da770e18d264972" uuid = "c4d99508-4286-5418-9131-c86396af500b" version = "2019.2.0+2" -[[Xorg_xtrans_jll]] +[[deps.Xorg_xtrans_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "79c31e7844f6ecf779705fbc12146eb190b7d845" uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" version = "1.4.0+3" -[[Zlib_jll]] +[[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -[[argp_standalone_jll]] +[[deps.argp_standalone_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "feaf9f6293003c2bf53056fd6930d677ed340b34" uuid = "c53206cc-00f7-50bf-ad1e-3ae1f6e49bc3" version = "1.3.1+0" -[[fts_jll]] +[[deps.fts_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "78732b942383d2cb521df8a1a0814911144e663d" uuid = "d65627f6-89bd-53e8-8ab5-8b75ff535eee" version = "1.2.7+1" -[[hsa_rocr_jll]] +[[deps.hsa_rocr_jll]] deps = ["Artifacts", "Elfutils_jll", "JLLWrappers", "Libdl", "NUMA_jll", "Pkg", "Zlib_jll", "hsakmt_roct_jll"] -git-tree-sha1 = "df8d73efec8b1e53ad527d208f5343c0368f0fcd" +git-tree-sha1 = "f0562c2ab47dbe4da3ddaa5a9f8cbff9374dfee5" uuid = "dd59ff1a-a01a-568d-8b29-0669330f116a" -version = "4.0.0+0" +version = "4.2.0+1" -[[hsakmt_roct_jll]] +[[deps.hsakmt_roct_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "NUMA_jll", "Pkg"] git-tree-sha1 = "ea54f6be23c6d25613a0872ec23dc5a0b77b4a00" uuid = "1cecccd7-a9b6-5045-9cdc-a44c19b16d76" version = "4.2.0+0" -[[nghttp2_jll]] +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" + +[[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -[[obstack_jll]] +[[deps.obstack_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "1c4a6b66e934fc6db4649cb2910c72f53bbfea7e" uuid = "c88a4935-d25e-5644-aacc-5db6f1b8ef79" version = "1.2.2+0" -[[p7zip_jll]] +[[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" diff --git a/Project.toml b/Project.toml index a77faa173..c3068e5ef 100644 --- a/Project.toml +++ b/Project.toml @@ -31,11 +31,11 @@ BinaryProvider = "0.5" CEnum = "0.2, 0.3, 0.4" GPUArrays = "6, 7, 8" GPUCompiler = "0.12, 0.13" -HIP_jll = "4" -LLVM = "4" +HIP_jll = "4.2" +LLVM = "4.6" MacroTools = "0.5" -ROCmDeviceLibs_jll = "4" +ROCmDeviceLibs_jll = "4.2" Requires = "1" Setfield = "0.5, 0.6, 0.7" -hsa_rocr_jll = "4" -julia = "1.6" +hsa_rocr_jll = "4.2" +julia = "1.7" diff --git a/src/device/gcn/atomics.jl b/src/device/gcn/atomics.jl index f4c57a510..09de4d3c7 100644 --- a/src/device/gcn/atomics.jl +++ b/src/device/gcn/atomics.jl @@ -345,6 +345,7 @@ end Base.showerror(io::IO, err::AtomicError) = print(io, "AtomicError: ", err.msg) +#= """ @atomic a[I] = op(a[I], val) @atomic a[I] ...= val @@ -388,6 +389,7 @@ macro atomic(ex) $atomic_arrayset($array, $indices, $op, $val) end) end +=# # FIXME: make this respect the indexing style @inline atomic_arrayset(A::AbstractArray, Is::Tuple, op::Function, val) = diff --git a/src/memory.jl b/src/memory.jl index cdf11ed8a..39e7fe5d0 100644 --- a/src/memory.jl +++ b/src/memory.jl @@ -349,7 +349,7 @@ end ## type based function check_type(::Type{Buffer}, T) - if isa(T, UnionAll) || T.abstract || !isconcretetype(T) + if isa(T, UnionAll) || isabstracttype(T) || !isconcretetype(T) throw(ArgumentError("cannot represent abstract or non-leaf object")) end Base.datatype_pointerfree(T) || throw(ArgumentError("cannot handle non-ptrfree objects")) diff --git a/src/queue.jl b/src/queue.jl index 1cb06aa5a..2b243a92a 100644 --- a/src/queue.jl +++ b/src/queue.jl @@ -123,7 +123,7 @@ end "Kills all kernels executing on the given queue, and destroys the queue." function kill_queue!(queue::HSAQueue; force=false) - if !force && !replacefield!(queue, :active, true, false).success + if !force && !replacefield!(queue, :active, true, false, :acquire_release).success return false # We didn't destroy the queue end @static if VERSION >= v"1.7-" From b18ae5f73764fbcb0f63a676a7a912ebdf7ab3c7 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Fri, 14 Jan 2022 10:49:59 -0600 Subject: [PATCH 02/33] Update CI to 1.7 --- .buildkite/pipeline.yml | 14 +++++++------- .github/workflows/CompatHelper.yml | 2 +- .github/workflows/TagBot.yml | 8 ++++++-- ...ia-1.6-nightly.yml => ci-julia-1.7-nightly.yml} | 8 ++++---- 4 files changed, 18 insertions(+), 14 deletions(-) rename .github/workflows/{ci-julia-1.6-nightly.yml => ci-julia-1.7-nightly.yml} (90%) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 3a9c67e29..dcbe7a431 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,8 +1,8 @@ steps: - - label: "Julia 1.6 - GPUArrays 8" + - label: "Julia 1.7 - GPUArrays 8" plugins: - JuliaCI/julia#v1: - version: 1.6-nightly + version: 1.7-nightly - JuliaCI/julia-test#v1.4: - JuliaCI/julia-coverage#v1: codecov: true @@ -14,10 +14,10 @@ steps: env: JULIA_AMDGPU_HSA_MUST_LOAD: "1" - - label: "Julia 1.6 - GPUArrays 7" + - label: "Julia 1.7 - GPUArrays 7" plugins: - JuliaCI/julia#v1: - version: 1.6-nightly + version: 1.7-nightly - JuliaCI/julia-test#v1.4: custom_manifest: Manifest.toml.gpuarrays-7 - JuliaCI/julia-coverage#v1: @@ -30,10 +30,10 @@ steps: env: JULIA_AMDGPU_HSA_MUST_LOAD: "1" - - label: "Julia 1.6 - GPUArrays 6" + - label: "Julia 1.7 - GPUArrays 6" plugins: - JuliaCI/julia#v1: - version: 1.6-nightly + version: 1.7-nightly - JuliaCI/julia-test#v1.4: custom_manifest: Manifest.toml.gpuarrays-6 - JuliaCI/julia-coverage#v1: @@ -49,7 +49,7 @@ steps: - label: "Documentation" plugins: - JuliaCI/julia#v1: - version: 1.6-nightly + version: 1.7-nightly command: | julia --project -e ' println("--- :julia: Instantiating project") diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index 07f1f44af..e7487db37 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -19,7 +19,7 @@ jobs: - uses: julia-actions/setup-julia@v1 with: # version: ${{ steps.julia_compat.outputs.version }} - version: "1.6-nightly" + version: "1.7-nightly" - name: Pkg.add("CompatHelper") run: julia -e 'using Pkg; Pkg.add("CompatHelper")' - name: CompatHelper.main() diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index d77d3a0c3..5a00d3a72 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -1,9 +1,13 @@ name: TagBot on: - schedule: - - cron: 0 * * * * + issue_comment: + types: + - created + workflow_dispatch: + jobs: TagBot: + if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' runs-on: ubuntu-latest steps: - uses: JuliaRegistries/TagBot@v1 diff --git a/.github/workflows/ci-julia-1.6-nightly.yml b/.github/workflows/ci-julia-1.7-nightly.yml similarity index 90% rename from .github/workflows/ci-julia-1.6-nightly.yml rename to .github/workflows/ci-julia-1.7-nightly.yml index 7019d1814..1af6f9238 100644 --- a/.github/workflows/ci-julia-1.6-nightly.yml +++ b/.github/workflows/ci-julia-1.7-nightly.yml @@ -1,4 +1,4 @@ -name: CI (Julia 1.6-nightly) +name: CI (Julia 1.7-nightly) on: push: branches: @@ -9,14 +9,14 @@ defaults: run: shell: bash jobs: - CI-julia-1-6-nightly: - name: CI-julia-1-6-nightly + CI-julia-1-7-nightly: + name: CI-julia-1-7-nightly runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: version: - - '1.6-nightly' + - '1.7-nightly' os: - ubuntu-latest - macOS-latest From 2bf5bd65159646e34a52cb79da59f69ec4c9647c Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Fri, 14 Jan 2022 11:00:23 -0600 Subject: [PATCH 03/33] Remove use of Base.unsafe_length --- src/array.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/array.jl b/src/array.jl index 73dca797f..f9ae89dee 100644 --- a/src/array.jl +++ b/src/array.jl @@ -235,8 +235,8 @@ ROCIndexStyle(i1::Colon, I...) = ROCIndexStyle(I...) rocviewlength() = () @inline rocviewlength(::Real, I...) = rocviewlength(I...) # skip scalar -@inline rocviewlength(i1::AbstractUnitRange, I...) = (Base.unsafe_length(i1), rocviewlength(I...)...) -@inline rocviewlength(i1::AbstractUnitRange, ::Base.ScalarIndex...) = (Base.unsafe_length(i1),) +@inline rocviewlength(i1::AbstractUnitRange, I...) = (length(i1), rocviewlength(I...)...) +@inline rocviewlength(i1::AbstractUnitRange, ::Base.ScalarIndex...) = (length(i1),) @inline function Base.view(A::ROCArray, I::Vararg{Any,N}) where {N} J = to_indices(A, I) From 89c70e5d3f3a12379386e39cc7adb01dcb9bb3b0 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Sun, 16 Jan 2022 19:45:47 -0600 Subject: [PATCH 04/33] Add rocRAND_jll support --- Manifest.toml | 13 +++++++++++++ Manifest.toml.gpuarrays-6 | 12 ++++++++++++ Manifest.toml.gpuarrays-7 | 13 +++++++++++++ Project.toml | 2 ++ deps/build.jl | 27 +++++++++++++++++++++++++-- deps/loaddeps.jl | 11 ++++++++++- src/AMDGPU.jl | 9 +++++++++ 7 files changed, 84 insertions(+), 3 deletions(-) diff --git a/Manifest.toml b/Manifest.toml index f786c4b48..f0e8e1e53 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -1,5 +1,6 @@ # This file is machine-generated - editing it directly is not advised +julia_version = "1.7.1" manifest_format = "2.0" [[deps.AbstractFFTs]] @@ -425,3 +426,15 @@ version = "1.2.2+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" + +[[deps.rocRAND_jll]] +deps = ["Artifacts", "HIP_jll", "JLLWrappers", "Libdl", "Pkg", "ROCmCompilerSupport_jll", "ROCmOpenCLRuntime_jll", "hsa_rocr_jll", "rocminfo_jll"] +git-tree-sha1 = "8bc31c5b67e1e81fdbdc11a2dc1acf4912ea8200" +uuid = "a6151927-a32b-54c0-bc8c-bbd7b3f1a996" +version = "4.2.0+0" + +[[deps.rocminfo_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "hsa_rocr_jll"] +git-tree-sha1 = "a53235bdb4691d40584383f423e0adb47b18a79d" +uuid = "5a766526-3cf8-5128-8c31-4f7b7ad60f0e" +version = "4.0.0+0" diff --git a/Manifest.toml.gpuarrays-6 b/Manifest.toml.gpuarrays-6 index b8603e25b..f0f1f5e00 100644 --- a/Manifest.toml.gpuarrays-6 +++ b/Manifest.toml.gpuarrays-6 @@ -427,3 +427,15 @@ version = "1.2.2+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" + +[[deps.rocRAND_jll]] +deps = ["Artifacts", "HIP_jll", "JLLWrappers", "Libdl", "Pkg", "ROCmCompilerSupport_jll", "ROCmOpenCLRuntime_jll", "hsa_rocr_jll", "rocminfo_jll"] +git-tree-sha1 = "8bc31c5b67e1e81fdbdc11a2dc1acf4912ea8200" +uuid = "a6151927-a32b-54c0-bc8c-bbd7b3f1a996" +version = "4.2.0+0" + +[[deps.rocminfo_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "hsa_rocr_jll"] +git-tree-sha1 = "a53235bdb4691d40584383f423e0adb47b18a79d" +uuid = "5a766526-3cf8-5128-8c31-4f7b7ad60f0e" +version = "4.0.0+0" diff --git a/Manifest.toml.gpuarrays-7 b/Manifest.toml.gpuarrays-7 index 554380138..e17816325 100644 --- a/Manifest.toml.gpuarrays-7 +++ b/Manifest.toml.gpuarrays-7 @@ -1,5 +1,6 @@ # This file is machine-generated - editing it directly is not advised +julia_version = "1.7.1" manifest_format = "2.0" [[deps.AbstractFFTs]] @@ -426,3 +427,15 @@ version = "1.2.2+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" + +[[deps.rocRAND_jll]] +deps = ["Artifacts", "HIP_jll", "JLLWrappers", "Libdl", "Pkg", "ROCmCompilerSupport_jll", "ROCmOpenCLRuntime_jll", "hsa_rocr_jll", "rocminfo_jll"] +git-tree-sha1 = "8bc31c5b67e1e81fdbdc11a2dc1acf4912ea8200" +uuid = "a6151927-a32b-54c0-bc8c-bbd7b3f1a996" +version = "4.2.0+0" + +[[deps.rocminfo_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "hsa_rocr_jll"] +git-tree-sha1 = "a53235bdb4691d40584383f423e0adb47b18a79d" +uuid = "5a766526-3cf8-5128-8c31-4f7b7ad60f0e" +version = "4.0.0+0" diff --git a/Project.toml b/Project.toml index c3068e5ef..dccba150e 100644 --- a/Project.toml +++ b/Project.toml @@ -23,6 +23,7 @@ Requires = "ae029012-a4dd-5104-9daa-d747884805df" Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" hsa_rocr_jll = "dd59ff1a-a01a-568d-8b29-0669330f116a" +rocRAND_jll = "a6151927-a32b-54c0-bc8c-bbd7b3f1a996" [compat] AbstractFFTs = "0.5, 1.0" @@ -36,6 +37,7 @@ LLVM = "4.6" MacroTools = "0.5" ROCmDeviceLibs_jll = "4.2" Requires = "1" +rocRAND_jll = "4.2" Setfield = "0.5, 0.6, 0.7" hsa_rocr_jll = "4.2" julia = "1.7" diff --git a/deps/build.jl b/deps/build.jl index caa84d092..c9141c45f 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -146,7 +146,8 @@ function main() :librocsparse => nothing, :librocalution => nothing, :librocfft => nothing, - :librocrand => nothing, + :rocrand_configured => false, + :rocrand_build_reason => false, :libmiopen => nothing, ) write_ext(config, config_path) @@ -283,7 +284,7 @@ function main() config[:device_libs_configured] = true ### Find external HIP-based libraries - for name in ("rocblas", "rocsparse", "rocalution", "rocfft", "rocrand", "MIOpen") + for name in ("rocblas", "rocsparse", "rocalution", "rocfft", "MIOpen") lib = Symbol("lib$(lowercase(name))") config[lib] = find_roc_library("lib$name") if config[lib] === nothing @@ -291,6 +292,28 @@ function main() # TODO: Save build reason? end end + if use_artifacts + try + @eval using rocRAND_jll + config[:rocrand_configured] = true + catch err + iob = IOBuffer() + println(iob, "`using rocRAND_jll` failed:") + Base.showerror(iob, err) + Base.show_backtrace(iob, catch_backtrace()) + config[:rocrand_build_reason] = String(take!(iob)) + write_ext(config, config_path) + return + end + else + lib = :librocrand + config[lib] = find_roc_library("librocrand") + if config[lib] === nothing + build_warning("Could not find library 'librocrand'") + else + config[:rocrand_configured] = true + end + end config[:configured] = true diff --git a/deps/loaddeps.jl b/deps/loaddeps.jl index 0cb8e5f37..1a2c04010 100644 --- a/deps/loaddeps.jl +++ b/deps/loaddeps.jl @@ -14,6 +14,8 @@ catch err @eval const hip_build_reason = "Build did not occur" @eval const device_libs_configured = false @eval const device_libs_build_reason = "Build did not occur" + @eval const rocrand_configured = false + @eval const rocrand_build_reason = "Build did not occur" else rethrow(err) end @@ -21,7 +23,8 @@ end # HSA runtime and ROCm External Libraries ## copied from CUDAdrv/src/CUDAdrv.jl -if !parse(Bool, get(ENV, "JULIA_AMDGPU_DISABLE_ARTIFACTS", "false")) +const use_artifacts = !parse(Bool, get(ENV, "JULIA_AMDGPU_DISABLE_ARTIFACTS", "false")) +if use_artifacts if hsa_configured using hsa_rocr_jll end @@ -31,6 +34,9 @@ if !parse(Bool, get(ENV, "JULIA_AMDGPU_DISABLE_ARTIFACTS", "false")) if device_libs_configured using ROCmDeviceLibs_jll end + if rocrand_configured + using rocRAND_jll + end end # Default (non-functional) values for critical variables, @@ -50,3 +56,6 @@ if device_libs_configured && device_libs_downloaded elseif !device_libs_configured const device_libs_path = "" end +if !rocrand_configured + const librocrand = nothing +end diff --git a/src/AMDGPU.jl b/src/AMDGPU.jl index bc3677a3b..3387a27ae 100644 --- a/src/AMDGPU.jl +++ b/src/AMDGPU.jl @@ -230,6 +230,15 @@ function __init__() """ end + # Check whether external libraries are available + if use_artifacts && !rocrand_configured + @warn """ + rocRAND failed to load, RNG functionality will be unavailable. + Please run Pkg.build("AMDGPU") and reload AMDGPU. + Reason: $rocrand_build_reason + """ + end + # Load optional OpenCL integrations @require OpenCL="08131aa3-fb12-5dee-8b74-c09406e224a2" include("opencl.jl") From 607a5dff88576e0544888a85df6b6886933daa49 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Thu, 16 Dec 2021 10:44:41 -0600 Subject: [PATCH 05/33] Search for device libs relative to LD_LIBRARY_PATH --- deps/build.jl | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/deps/build.jl b/deps/build.jl index c9141c45f..4b5ff7ef8 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -108,6 +108,25 @@ function find_ld_lld() return "" end +function find_device_libs() + if isdir("/opt/rocm/amdgcn/bitcode") + return "/opt/rocm/amdgcn/bitcode" + end + paths = split(get(ENV, "LD_LIBRARY_PATH", ""), ":") + paths = filter(path->path != "", paths) + paths = map(Base.Filesystem.abspath, paths) + for path in paths + bitcode_path = joinpath(path, "../amdgcn/bitcode/") + if ispath(bitcode_path) + if isfile(joinpath(bitcode_path, "ocml.bc")) || + isfile(joinpath(bitcode_path, "ocml.amdgcn.bc")) + return bitcode_path + end + end + end + return nothing +end + function find_roc_library(name::String) lib = Libdl.find_library(Symbol(name)) lib == "" && return nothing @@ -276,12 +295,15 @@ function main() device_libs_downloaded = false else #include("download_device_libs.jl") - device_libs_path = "/opt/rocm/amdgcn/bitcode" + device_libs_path = find_device_libs() device_libs_downloaded = true + if device_libs_path === nothing + config[:device_libs_build_reason] = "Couldn't find bitcode files in /opt/rocm or relative to entries in LD_LIBRARY_PATH" + end end config[:device_libs_path] = device_libs_path config[:device_libs_downloaded] = device_libs_downloaded - config[:device_libs_configured] = true + config[:device_libs_configured] = device_libs_path !== nothing ### Find external HIP-based libraries for name in ("rocblas", "rocsparse", "rocalution", "rocfft", "MIOpen") From 78bc27f7d6332eb655ee2429f99fe746566d955e Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Thu, 16 Dec 2021 11:09:33 -0600 Subject: [PATCH 06/33] Search [HIP_]DEVICE_LIB_PATH for device libs --- deps/build.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/deps/build.jl b/deps/build.jl index 4b5ff7ef8..d202d084d 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -109,9 +109,18 @@ function find_ld_lld() end function find_device_libs() + # The canonical location if isdir("/opt/rocm/amdgcn/bitcode") return "/opt/rocm/amdgcn/bitcode" end + + # Might be set by tools like Spack or the user + hip_devlibs_path = get(ENV, "HIP_DEVICE_LIB_PATH", "") + hip_devlibs_path !== "" && return hip_devlibs_path + devlibs_path = get(ENV, "DEVICE_LIB_PATH", "") + devlibs_path !== "" && return devlibs_path + + # Search relative to LD_LIBRARY_PATH entries paths = split(get(ENV, "LD_LIBRARY_PATH", ""), ":") paths = filter(path->path != "", paths) paths = map(Base.Filesystem.abspath, paths) From ce94add0b4658d984394c2f816f2319b713453bf Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Fri, 28 Jan 2022 08:50:13 -0600 Subject: [PATCH 07/33] CI: Add job with artifacts disabled --- .buildkite/pipeline.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index dcbe7a431..b21e70d6f 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -46,6 +46,22 @@ steps: env: JULIA_AMDGPU_HSA_MUST_LOAD: "1" + - label: "Julia 1.7 - GPUArrays 8 - No artifacts" + plugins: + - JuliaCI/julia#v1: + version: 1.7-nightly + - JuliaCI/julia-test#v1.4: + - JuliaCI/julia-coverage#v1: + codecov: true + agents: + queue: "juliagpu" + rocm: "*" + if: build.message !~ /\[skip tests\]/ + timeout_in_minutes: 120 + env: + JULIA_AMDGPU_HSA_MUST_LOAD: "1" + JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" + - label: "Documentation" plugins: - JuliaCI/julia#v1: From 738245c3e1fe4b7caaa30b024de855754a647210 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Sat, 29 Jan 2022 07:52:03 -0600 Subject: [PATCH 08/33] Remove <1.7 support code --- src/array.jl | 6 ------ src/queue.jl | 48 +++++++++++------------------------------------- 2 files changed, 11 insertions(+), 43 deletions(-) diff --git a/src/array.jl b/src/array.jl index f9ae89dee..64604bf4b 100644 --- a/src/array.jl +++ b/src/array.jl @@ -287,12 +287,6 @@ function Base.reshape(a::ROCArray{T,M}, dims::NTuple{N,Int}) where {T,N,M} return b end -# allow missing dimensions with Colon() -if VERSION < v"1.6.0-DEV.1358" - Base.reshape(parent::ROCArray, dims::Tuple{Vararg{Union{Int,Colon}}}) = - Base.reshape(parent, Base._reshape_uncolon(parent, dims)) -end - ## fft diff --git a/src/queue.jl b/src/queue.jl index 2b243a92a..054a7c0b1 100644 --- a/src/queue.jl +++ b/src/queue.jl @@ -1,37 +1,15 @@ # Utilities for working with HSA queues -@static if VERSION >= v"1.7-" - """ - An HSA queue. - Each queue is uniquely associated with an agent. - """ - mutable struct HSAQueue - agent::HSAAgent - queue::Ptr{HSA.Queue} - status::HSA.Status - cond::Base.AsyncCondition - @atomic active::Bool - end -else - """ - An HSA queue. - Each queue is uniquely associated with an agent. - """ - mutable struct HSAQueue - agent::HSAAgent - queue::Ptr{HSA.Queue} - status::HSA.Status - cond::Base.AsyncCondition - active::Bool - end - @inline function replacefield!(value, name::Symbol, expected, desired) - y = getfield(value, name) - ok = y === expected - if ok - setfield!(value, name, desired) - end - return (; old=y, success=ok) - end +""" +An HSA queue. +Each queue is uniquely associated with an agent. +""" +mutable struct HSAQueue + agent::HSAAgent + queue::Ptr{HSA.Queue} + status::HSA.Status + cond::Base.AsyncCondition + @atomic active::Bool end const QUEUES = Dict{Ptr{HSA.Queue},WeakRef}() const DEFAULT_QUEUES = IdDict{HSAAgent,HSAQueue}() @@ -126,11 +104,7 @@ function kill_queue!(queue::HSAQueue; force=false) if !force && !replacefield!(queue, :active, true, false, :acquire_release).success return false # We didn't destroy the queue end - @static if VERSION >= v"1.7-" - @atomic queue.active = false - else - queue.active = false - end + @atomic queue.active = false lock(RT_LOCK) do delete!(QUEUES, queue.queue) From 8aa55eae98ba30e469f23506565657d2b1968a27 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Mon, 7 Feb 2022 08:38:07 -0600 Subject: [PATCH 09/33] Make HIP dependency optional We can run without it for many things, and since it often blocks usage of certain cards due to questionable behavior in its library initializer, it is worth not requiring that HIP be available. Fix hipStream_t type in rocBLAS wrapper Add rocSOLVER stubs --- deps/build.jl | 88 ++++++++++++++++++------------------ src/AMDGPU.jl | 27 +++++------ src/blas/librocblas_types.jl | 2 +- src/sync.jl | 8 ++-- src/utils.jl | 9 ++-- 5 files changed, 68 insertions(+), 66 deletions(-) diff --git a/deps/build.jl b/deps/build.jl index d202d084d..a6d5217ee 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -171,6 +171,7 @@ function main() :device_libs_configured => false, :device_libs_build_reason => "unknown", :librocblas => nothing, + :librocsolver => nothing, :librocsparse => nothing, :librocalution => nothing, :librocfft => nothing, @@ -247,33 +248,6 @@ function main() config[:libhsaruntime_version] = libhsaruntime_version config[:hsa_configured] = true - ### Find HIP - libhip_path = nothing - if use_artifacts - try - @eval using HIP_jll - catch err - iob = IOBuffer() - println(iob, "`using HIP_jll` failed:") - Base.showerror(iob, err) - Base.show_backtrace(iob, catch_backtrace()) - config[:hip_build_reason] = String(take!(iob)) - write_ext(config, config_path) - return - end - libhip_path = HIP_jll.libamdhip64 - else - libhip_path = Libdl.find_library(["libamdhip64", "libhip_hcc"]) - end - if libhip_path === nothing - build_warning("Could not find HIP runtime library") - config[:hip_build_reason] = "HIP runtime library not found" - write_ext(config, config_path) - return - end - config[:libhip_path] = libhip_path - config[:hip_configured] = true - ### Find ld.lld ld_path = find_ld_lld() if ld_path == "" @@ -314,36 +288,60 @@ function main() config[:device_libs_downloaded] = device_libs_downloaded config[:device_libs_configured] = device_libs_path !== nothing - ### Find external HIP-based libraries - for name in ("rocblas", "rocsparse", "rocalution", "rocfft", "MIOpen") - lib = Symbol("lib$(lowercase(name))") - config[lib] = find_roc_library("lib$name") - if config[lib] === nothing - build_warning("Could not find library '$name'") - # TODO: Save build reason? - end - end + ### Find HIP + libhip_path = nothing if use_artifacts try - @eval using rocRAND_jll - config[:rocrand_configured] = true + @eval using HIP_jll catch err iob = IOBuffer() - println(iob, "`using rocRAND_jll` failed:") + println(iob, "`using HIP_jll` failed:") Base.showerror(iob, err) Base.show_backtrace(iob, catch_backtrace()) - config[:rocrand_build_reason] = String(take!(iob)) + config[:hip_build_reason] = String(take!(iob)) write_ext(config, config_path) return end + libhip_path = HIP_jll.libamdhip64 else - lib = :librocrand - config[lib] = find_roc_library("librocrand") - if config[lib] === nothing - build_warning("Could not find library 'librocrand'") + libhip_path = Libdl.find_library(["libamdhip64", "libhip_hcc"]) + end + if libhip_path !== nothing && !isempty(libhip_path) + config[:libhip_path] = libhip_path + config[:hip_configured] = true + + ### Find external HIP-based libraries + for name in ("rocblas", "rocsolver", "rocsparse", "rocalution", "rocfft", "MIOpen") + lib = Symbol("lib$(lowercase(name))") + config[lib] = find_roc_library("lib$name") + if config[lib] === nothing + build_warning("Could not find library '$name'") + # TODO: Save build reason? + end + end + if use_artifacts + try + @eval using rocRAND_jll + config[:rocrand_configured] = true + catch err + iob = IOBuffer() + println(iob, "`using rocRAND_jll` failed:") + Base.showerror(iob, err) + Base.show_backtrace(iob, catch_backtrace()) + config[:rocrand_build_reason] = String(take!(iob)) + end else - config[:rocrand_configured] = true + lib = :librocrand + config[lib] = find_roc_library("librocrand") + if config[lib] === nothing + build_warning("Could not find library 'librocrand'") + else + config[:rocrand_configured] = true + end end + else + build_warning("Could not find HIP runtime library") + config[:hip_build_reason] = "HIP runtime library not found" end config[:configured] = true diff --git a/src/AMDGPU.jl b/src/AMDGPU.jl index 3387a27ae..89b0494d8 100644 --- a/src/AMDGPU.jl +++ b/src/AMDGPU.jl @@ -107,13 +107,12 @@ end # Load binary dependencies include(joinpath(dirname(@__DIR__), "deps", "loaddeps.jl")) -# Load HIP +# Load HIP and ROCm external libraries const libhip = "libamdhip64.so" -include(joinpath(@__DIR__, "hip", "HIP.jl")) - -# Load ROCm external libraries if hip_configured +include(joinpath(@__DIR__, "hip", "HIP.jl")) librocblas !== nothing && include(joinpath(@__DIR__, "blas", "rocBLAS.jl")) +#librocsolver !== nothing && include("solver/rocSOLVER.jl") librocfft !== nothing && include(joinpath(@__DIR__, "fft", "rocFFT.jl")) #librocsparse !== nothing && include("sparse/rocSPARSE.jl") #librocalution !== nothing && include("solver/rocALUTION.jl") @@ -131,6 +130,7 @@ function check_library(name, path) end end check_library("rocBLAS", librocblas) +check_library("rocSOLVER", librocsolver) check_library("rocSPARSE", librocsparse) check_library("rocALUTION", librocalution) check_library("rocFFT", librocfft) @@ -211,22 +211,23 @@ function __init__() """ end - if hip_configured - push!(Libdl.DL_LOAD_PATH, dirname(libhip_path)) - else + # Check whether device intrinsics are available + if !device_libs_configured @warn """ - HIP library has not been built, runtime functionality will be unavailable. + ROCm-Device-Libs were not found, device intrinsics will be unavailable. Please run Pkg.build("AMDGPU") and reload AMDGPU. - Reason: $hip_build_reason + Reason: $device_libs_build_reason """ end - # Check whether device intrinsics are available - if !device_libs_configured + # Check whether HIP is available + if hip_configured + push!(Libdl.DL_LOAD_PATH, dirname(libhip_path)) + else @warn """ - ROCm-Device-Libs were not found, device intrinsics will be unavailable. + HIP library has not been built, HIP integration will be unavailable. Please run Pkg.build("AMDGPU") and reload AMDGPU. - Reason: $device_libs_build_reason + Reason: $hip_build_reason """ end diff --git a/src/blas/librocblas_types.jl b/src/blas/librocblas_types.jl index d1e120c91..245e2023f 100644 --- a/src/blas/librocblas_types.jl +++ b/src/blas/librocblas_types.jl @@ -3,7 +3,7 @@ using CEnum # HACK: a shim -const hipStream_t = Nothing +const hipStream_t = Ptr{Cvoid} const rocblas_int = Int32 const rocblas_long = Int64 diff --git a/src/sync.jl b/src/sync.jl index e8204dd26..0eab3ba2e 100644 --- a/src/sync.jl +++ b/src/sync.jl @@ -14,9 +14,11 @@ function wait!(ss::SyncState) # FIXME: Use barrier_and on dedicated queue foreach(wait, ss.signals) empty!(ss.signals) - foreach(HIP.hipStreamSynchronize, ss.streams) - empty!(ss.streams) - HIP.hipStreamSynchronize(C_NULL) # FIXME: This shouldn't be necessary + if hip_configured + foreach(HIP.hipStreamSynchronize, ss.streams) + empty!(ss.streams) + HIP.hipStreamSynchronize(C_NULL) # FIXME: This shouldn't be necessary + end nothing end mark!(ss::SyncState, signal::HSAStatusSignal) = push!(ss.signals, signal) diff --git a/src/utils.jl b/src/utils.jl index b82c4373e..8e7a94636 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -8,16 +8,17 @@ function versioninfo(io::IO=stdout) if lld_configured println("- Path: $ld_lld_path") end - println("HIP Runtime ($(hip_configured ? "ready" : "MISSING"))") - if hip_configured - # TODO: println("- Version: $(libhip_version)") - end println("ROCm-Device-Libs ($(device_libs_configured ? "ready" : "MISSING"))") if device_libs_configured # TODO: println("- Version: $(device_libs_version)") println("- Downloaded: $(repr(device_libs_downloaded))") end + println("HIP Runtime ($(hip_configured ? "ready" : "MISSING"))") + if hip_configured + # TODO: println("- Version: $(libhip_version)") + end println("rocBLAS ($(librocblas !== nothing ? "ready" : "MISSING"))") + println("rocSOLVER ($(librocsolver !== nothing ? "ready" : "MISSING"))") println("rocFFT ($(librocfft !== nothing ? "ready" : "MISSING"))") println("rocRAND ($(librocrand !== nothing ? "ready" : "MISSING"))") println("rocSPARSE ($(librocsparse !== nothing ? "ready" : "MISSING"))") From 9576e196953883734555e0e26306edc966c8f916 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Mon, 7 Feb 2022 08:35:47 -0600 Subject: [PATCH 10/33] Use method overlay tables Switch from pow to ^ Add ExprTools and SpecialFunctions as deps Remove @require ForwardDiff code --- Manifest.toml | 49 +++++++++++++++++- Manifest.toml.gpuarrays-6 | 45 +++++++++++++++++ Manifest.toml.gpuarrays-7 | 45 +++++++++++++++++ Project.toml | 6 ++- src/AMDGPU.jl | 6 +-- src/broadcast.jl | 99 ++----------------------------------- src/compiler.jl | 4 ++ src/device/gcn/helpers.jl | 22 +++++++++ src/device/gcn/math.jl | 47 +++++++++++++----- src/device/gcn/wavefront.jl | 2 +- src/execution.jl | 3 +- src/forwarddiff.jl | 87 -------------------------------- src/mapreduce.jl | 3 -- 13 files changed, 212 insertions(+), 206 deletions(-) delete mode 100644 src/forwarddiff.jl diff --git a/Manifest.toml b/Manifest.toml index f0e8e1e53..68e05e5af 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -47,6 +47,12 @@ git-tree-sha1 = "926870acb6cbcf029396f2f2de030282b6bc1941" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" version = "1.11.4" +[[deps.ChangesOfVariables]] +deps = ["ChainRulesCore", "LinearAlgebra", "Test"] +git-tree-sha1 = "bf98fa45a0a4cee295de98d4c1462be26345b9a1" +uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" +version = "0.1.2" + [[deps.Compat]] deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] git-tree-sha1 = "44c37b4636bc54afac5c574d2d02b625349d6582" @@ -75,6 +81,12 @@ uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.8.6" + [[deps.Downloads]] deps = ["ArgTools", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" @@ -86,9 +98,9 @@ uuid = "ab5a07f8-06af-567f-a878-e8bb879eba5a" version = "0.182.0+0" [[deps.ExprTools]] -git-tree-sha1 = "24565044e60bc48a7562e75bcf14f084901dc0b6" +git-tree-sha1 = "56559bbef6ca5ea0c0818fa5c90320398a6fbf8d" uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" -version = "0.1.7" +version = "0.1.8" [[deps.Future]] deps = ["Random"] @@ -116,6 +128,17 @@ version = "4.2.0+0" deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +[[deps.InverseFunctions]] +deps = ["Test"] +git-tree-sha1 = "a7254c0acd8e62f1ac75ad24d5db43f5f19f3c65" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.2" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "7fd44fd4ff43fc60815f8e764c0f352b83c49151" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.1.1" + [[deps.JLLWrappers]] deps = ["Preferences"] git-tree-sha1 = "22df5b96feef82434b07327e2d3c770a9b21e023" @@ -181,6 +204,12 @@ version = "1.16.1+1" deps = ["Libdl", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +[[deps.LogExpFunctions]] +deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "e5718a00af0ab9756305a0392832c8952c7426c1" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.6" + [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" @@ -217,6 +246,16 @@ uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.5+0" + [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" @@ -286,6 +325,12 @@ uuid = "6462fe0b-24de-5631-8697-dd941f90decc" deps = ["LinearAlgebra", "Random"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +[[deps.SpecialFunctions]] +deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "e6bf188613555c78062842777b116905a9f9dd49" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.1.0" + [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" diff --git a/Manifest.toml.gpuarrays-6 b/Manifest.toml.gpuarrays-6 index f0f1f5e00..76a056a6e 100644 --- a/Manifest.toml.gpuarrays-6 +++ b/Manifest.toml.gpuarrays-6 @@ -47,6 +47,12 @@ git-tree-sha1 = "926870acb6cbcf029396f2f2de030282b6bc1941" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" version = "1.11.4" +[[deps.ChangesOfVariables]] +deps = ["ChainRulesCore", "LinearAlgebra", "Test"] +git-tree-sha1 = "bf98fa45a0a4cee295de98d4c1462be26345b9a1" +uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" +version = "0.1.2" + [[deps.Compat]] deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] git-tree-sha1 = "44c37b4636bc54afac5c574d2d02b625349d6582" @@ -75,6 +81,12 @@ uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.8.6" + [[deps.Downloads]] deps = ["ArgTools", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" @@ -117,6 +129,17 @@ version = "4.2.0+0" deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +[[deps.InverseFunctions]] +deps = ["Test"] +git-tree-sha1 = "a7254c0acd8e62f1ac75ad24d5db43f5f19f3c65" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.2" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "7fd44fd4ff43fc60815f8e764c0f352b83c49151" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.1.1" + [[deps.JLLWrappers]] deps = ["Preferences"] git-tree-sha1 = "22df5b96feef82434b07327e2d3c770a9b21e023" @@ -182,6 +205,12 @@ version = "1.16.1+1" deps = ["Libdl", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +[[deps.LogExpFunctions]] +deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "e5718a00af0ab9756305a0392832c8952c7426c1" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.6" + [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" @@ -218,6 +247,16 @@ uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.5+0" + [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" @@ -287,6 +326,12 @@ uuid = "6462fe0b-24de-5631-8697-dd941f90decc" deps = ["LinearAlgebra", "Random"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +[[deps.SpecialFunctions]] +deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "a4116accb1c84f0a8e1b9932d873654942b2364b" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.1.1" + [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" diff --git a/Manifest.toml.gpuarrays-7 b/Manifest.toml.gpuarrays-7 index e17816325..c66e04b43 100644 --- a/Manifest.toml.gpuarrays-7 +++ b/Manifest.toml.gpuarrays-7 @@ -47,6 +47,12 @@ git-tree-sha1 = "926870acb6cbcf029396f2f2de030282b6bc1941" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" version = "1.11.4" +[[deps.ChangesOfVariables]] +deps = ["ChainRulesCore", "LinearAlgebra", "Test"] +git-tree-sha1 = "bf98fa45a0a4cee295de98d4c1462be26345b9a1" +uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" +version = "0.1.2" + [[deps.Compat]] deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] git-tree-sha1 = "44c37b4636bc54afac5c574d2d02b625349d6582" @@ -75,6 +81,12 @@ uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.8.6" + [[deps.Downloads]] deps = ["ArgTools", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" @@ -117,6 +129,17 @@ version = "4.2.0+0" deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +[[deps.InverseFunctions]] +deps = ["Test"] +git-tree-sha1 = "a7254c0acd8e62f1ac75ad24d5db43f5f19f3c65" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.2" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "7fd44fd4ff43fc60815f8e764c0f352b83c49151" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.1.1" + [[deps.JLLWrappers]] deps = ["Preferences"] git-tree-sha1 = "22df5b96feef82434b07327e2d3c770a9b21e023" @@ -182,6 +205,12 @@ version = "1.16.1+1" deps = ["Libdl", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +[[deps.LogExpFunctions]] +deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "e5718a00af0ab9756305a0392832c8952c7426c1" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.6" + [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" @@ -218,6 +247,16 @@ uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.5+0" + [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" @@ -287,6 +326,12 @@ uuid = "6462fe0b-24de-5631-8697-dd941f90decc" deps = ["LinearAlgebra", "Random"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +[[deps.SpecialFunctions]] +deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "a4116accb1c84f0a8e1b9932d873654942b2364b" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.1.1" + [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" diff --git a/Project.toml b/Project.toml index dccba150e..d5322529f 100644 --- a/Project.toml +++ b/Project.toml @@ -8,6 +8,7 @@ AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c" Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232" CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82" +ExprTools = "e2ba6199-217a-4e67-a87a-7c52f15ade04" GPUArrays = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" GPUCompiler = "61eb1bfa-7361-4325-ad38-22787b887f55" HIP_jll = "2696aab5-0948-5276-aa9a-2a86a37016b8" @@ -21,6 +22,7 @@ ROCmDeviceLibs_jll = "873c0968-716b-5aa7-bb8d-d1e2e2aeff2d" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Requires = "ae029012-a4dd-5104-9daa-d747884805df" Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46" +SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" hsa_rocr_jll = "dd59ff1a-a01a-568d-8b29-0669330f116a" rocRAND_jll = "a6151927-a32b-54c0-bc8c-bbd7b3f1a996" @@ -30,6 +32,7 @@ AbstractFFTs = "0.5, 1.0" Adapt = "3.0" BinaryProvider = "0.5" CEnum = "0.2, 0.3, 0.4" +ExprTools = "0.1" GPUArrays = "6, 7, 8" GPUCompiler = "0.12, 0.13" HIP_jll = "4.2" @@ -37,7 +40,8 @@ LLVM = "4.6" MacroTools = "0.5" ROCmDeviceLibs_jll = "4.2" Requires = "1" -rocRAND_jll = "4.2" +SpecialFunctions = "2" Setfield = "0.5, 0.6, 0.7" hsa_rocr_jll = "4.2" julia = "1.7" +rocRAND_jll = "4.2" diff --git a/src/AMDGPU.jl b/src/AMDGPU.jl index 89b0494d8..7725e8857 100644 --- a/src/AMDGPU.jl +++ b/src/AMDGPU.jl @@ -54,6 +54,9 @@ include("runtime.jl") include("statussignal.jl") include("sync.jl") +const ci_cache = GPUCompiler.CodeCache() +Base.Experimental.@MethodTable(method_table) + # Device sources must load _before_ the compiler infrastructure # because of generated functions. include(joinpath("device", "tools.jl")) @@ -242,9 +245,6 @@ function __init__() # Load optional OpenCL integrations @require OpenCL="08131aa3-fb12-5dee-8b74-c09406e224a2" include("opencl.jl") - - # Load optional @requires packages - @require ForwardDiff="f6369f11-7733-5829-9624-2563aa707210" include("forwarddiff.jl") end end # module diff --git a/src/broadcast.jl b/src/broadcast.jl index edfe94814..fbdcc232c 100644 --- a/src/broadcast.jl +++ b/src/broadcast.jl @@ -14,99 +14,6 @@ Base.similar(bc::Broadcasted{ROCArrayStyle{N}}, ::Type{T}) where {N,T} = Base.similar(bc::Broadcasted{ROCArrayStyle{N}}, ::Type{T}, dims...) where {N,T} = ROCArray{T}(undef, dims...) - -## replace base functions with libdevice alternatives - -rocfunc(f) = f -rocfunc(::Type{T}) where T = (x...) -> T(x...) # broadcasting type ctors isn't GPU compatible - -Broadcast.broadcasted(::ROCArrayStyle{N}, f, args...) where {N} = - Broadcasted{ROCArrayStyle{N}}(rocfunc(f), args, nothing) - -const device_intrinsics = :[ - cos, cospi, sin, sinpi, tan, acos, asin, atan, - cosh, sinh, tanh, acosh, asinh, atanh, - log, log10, log1p, log2, logb, ilogb, - exp, exp2, exp10, expm1, ldexp, - erf, erfinv, erfc, erfcinv, erfcx, - brev, clz, ffs, byte_perm, popc, - isfinite, isinf, isnan, nearbyint, - nextafter, signbit, copysign, abs, - sqrt, rsqrt, cbrt, rcbrt, pow, - ceil, floor, saturate, - lgamma, tgamma, - j0, j1, jn, y0, y1, yn, - normcdf, normcdfinv, hypot, - fma, sad, dim, mul24, mul64hi, hadd, rhadd, scalbn].args - -for f in device_intrinsics - isdefined(Base, f) || continue - @eval rocfunc(::typeof(Base.$f)) = $f -end - -# broadcast ^ - -rocliteral_pow(::typeof(^), x::T, ::Val{0}) where {T<:Real} = one(x) -rocliteral_pow(::typeof(^), x::T, ::Val{1}) where {T<:Real} = x -rocliteral_pow(::typeof(^), x::T, ::Val{2}) where {T<:Real} = x * x -rocliteral_pow(::typeof(^), x::T, ::Val{3}) where {T<:Real} = x * x * x -rocliteral_pow(::typeof(^), x::T, ::Val{p}) where {T<:Real,p} = pow(x, Int32(p)) - -rocfunc(::typeof(Base.literal_pow)) = rocliteral_pow -rocfunc(::typeof(Base.:(^))) = pow - -using MacroTools - -const _rocfuncs = [copy(device_intrinsics); :^] -rocfuncs() = (global _rocfuncs; _rocfuncs) - -_rocint(x::Int) = Int32(x) -_rocint(x::Expr) = x.head == :call && x.args[1] == :Int32 && x.args[2] isa Int ? Int32(x.args[2]) : x -_rocint(x) = x - -function _rocpowliteral(x::Expr) - if x.head == :call && x.args[1] == :(AMDGPU.rocfunc(^)) && x.args[3] isa Int32 - num = x.args[3] - if 0 <= num <= 3 - sym = gensym(:x) - new_x = Expr(:block, :($sym = $(x.args[2]))) - - if iszero(num) - push!(new_x.args, :(one($sym))) - else - unroll = Expr(:call, :*) - for x = one(num):num - push!(unroll.args, sym) - end - push!(new_x.args, unroll) - end - - x = new_x - end - end - x -end -_rocpowliteral(x) = x - -function replace_device(ex) - global _rocfuncs - MacroTools.postwalk(ex) do x - x = x in _rocfuncs ? :(AMDGPU.rocfunc($x)) : x - x = _rocint(x) - x = _rocpowliteral(x) - x - end -end - -macro rocfunc(ex) - global _rocfuncs - def = MacroTools.splitdef(ex) - f = def[:name] - def[:name] = Symbol(:cu, f) - def[:body] = replace_device(def[:body]) - push!(_rocfuncs, f) - quote - $(esc(MacroTools.combinedef(def))) - AMDGPU.rocfunc(::typeof($(esc(f)))) = $(esc(def[:name])) - end -end +# broadcasting type ctors isn't GPU compatible +Broadcast.broadcasted(::ROCArrayStyle{N}, f::Type{T}, args...) where {N, T} = + Broadcasted{ROCArrayStyle{N}}((x...) -> T(x...), args, nothing) diff --git a/src/compiler.jl b/src/compiler.jl index 4ac7725d6..b6483682d 100644 --- a/src/compiler.jl +++ b/src/compiler.jl @@ -36,3 +36,7 @@ function GPUCompiler.link_libraries!(job::ROCCompilerJob, mod::LLVM.Module, link_device_libs!(job.target, mod) end + +GPUCompiler.ci_cache(::ROCCompilerJob) = ci_cache + +GPUCompiler.method_table(::ROCCompilerJob) = method_table diff --git a/src/device/gcn/helpers.jl b/src/device/gcn/helpers.jl index 9880838bf..8645770c3 100644 --- a/src/device/gcn/helpers.jl +++ b/src/device/gcn/helpers.jl @@ -61,3 +61,25 @@ GCNIntrinsic(jlname, rocname=jlname; isbroken=false, isinverted=false, inp_args=(), out_arg=(), roclib=:ocml, suffix=fntypes[first(inp_args)], tobool=false) = GCNIntrinsic(jlname, rocname, isbroken, isinverted, inp_args, out_arg, roclib, suffix, tobool) +import ExprTools + +macro device_override(ex) + esc(quote + $GPUCompiler.@override($method_table, $ex) + end) +end + +macro device_function(ex) + ex = macroexpand(__module__, ex) + def = ExprTools.splitdef(ex) + + # generate a function that errors + def[:body] = quote + error("This function is not intended for use on the CPU") + end + + esc(quote + $(ExprTools.combinedef(def)) + @device_override $ex + end) +end diff --git a/src/device/gcn/math.jl b/src/device/gcn/math.jl index da0f57cb1..420a952b1 100644 --- a/src/device/gcn/math.jl +++ b/src/device/gcn/math.jl @@ -1,3 +1,7 @@ +import Base: FastMath + +import SpecialFunctions + const MATH_INTRINSICS = GCNIntrinsic[] for jltype in (Float16, Float32, Float64) @@ -41,9 +45,9 @@ for jltype in (Float16, Float32, Float64) # TODO: abs(::Union{Int32,Int64}) # Multi-argument functions - push!(MATH_INTRINSICS, GCNIntrinsic(:pow; inp_args=(jltype,jltype), out_arg=jltype)) - push!(MATH_INTRINSICS, GCNIntrinsic(:pow, :pown; inp_args=(jltype,Union{UInt32,Int32}), out_arg=jltype)) - # TODO: push!(MATH_INTRINSICS, GCNIntrinsic(:pow, :pown; inp_args=(jltype,Union{UInt32,Int32}), out_arg=jltype)) + push!(MATH_INTRINSICS, GCNIntrinsic(:^, :pow; inp_args=(jltype,jltype), out_arg=jltype)) + push!(MATH_INTRINSICS, GCNIntrinsic(:^, :pown; inp_args=(jltype,Union{UInt32,Int32}), out_arg=jltype)) + # TODO: push!(MATH_INTRINSICS, GCNIntrinsic(:^, :pown; inp_args=(jltype,Union{UInt32,Int32}), out_arg=jltype)) # TODO: :sincos, :frexp, :ldexp, :copysign, #push!(MATH_INTRINSICS, GCNIntrinsic(:ldexp; inp_args=(jltype,), out_arg=(jltype, Int32), isinverted=true)) @@ -64,32 +68,51 @@ for intr in MATH_INTRINSICS inp_vars = [gensym() for _ in 1:length(intr.inp_args)] inp_expr = [:($(inp_vars[idx])::$arg) for (idx,arg) in enumerate(intr.inp_args)] libname = Symbol("__$(intr.roclib)_$(intr.rocname)_$(intr.suffix)") - @eval @inline function $(intr.jlname)($(inp_expr...)) + mod = if isdefined(Base, intr.jlname) + Base + elseif isdefined(FastMath, intr.jlname) + FastMath + elseif isdefined(SpecialFunctions, intr.jlname) + SpecialFunctions + else + nothing + end + ex = quote y = _intr($(Val(libname)), $(intr.out_arg), $(inp_expr...)) y = $(intr.isinverted ? :(1-y) : :y) y = $(intr.tobool ? :(y != zero(y)) : :y) return y end + if mod !== nothing + @eval @device_override function $mod.$(intr.jlname)($(inp_expr...)) + $ex + end + else + @eval @device_function function $(intr.jlname)($(inp_expr...)) + $ex + end + end end # ocml_sin seems broken for F16 (see #177) -sin(x::Float16) = sin(Float32(x)) +@device_override Base.sin(x::Float16) = sin(Float32(x)) -hypot(x::T, y::T) where T <: Integer = hypot(float(x), float(y)) -abs(z::Complex) = hypot(real(z), imag(z)) +@device_override Base.hypot(x::T, y::T) where T <: Integer = hypot(float(x), float(y)) +@device_override Base.abs(z::Complex) = hypot(real(z), imag(z)) +# FIXME abs(i::Integer) = Base.abs(i) -@inline function pow(x::T, y::Int64) where T<:Union{Float16, Float32,Float64} +@device_override @inline function Base.:(^)(x::T, y::Int64) where T<:Union{Float16, Float32,Float64} y == -1 && return inv(x) y == 0 && return one(x) y == 1 && return x y == 2 && return x*x y == 3 && return x*x*x - pow(x, T(y)) + x ^ T(y) end -pow(x::Integer, p::Union{Float16, Float32, Float64}) = pow(convert(typeof(p), x), p) -@inline function pow(x::Integer, p::Integer) +@device_override Base.:(^)(x::Integer, p::Union{Float16, Float32, Float64}) = convert(typeof(p), x) ^ p +@device_override @inline function Base.:(^)(x::Integer, p::Integer) p < 0 && throw("Negative integer power not supported") p == 0 && return one(x) p == 1 && return x @@ -111,4 +134,4 @@ pow(x::Integer, p::Union{Float16, Float32, Float64}) = pow(convert(typeof(p), x) y *= x end return y -end \ No newline at end of file +end diff --git a/src/device/gcn/wavefront.jl b/src/device/gcn/wavefront.jl index 348be3032..8982d5d6b 100644 --- a/src/device/gcn/wavefront.jl +++ b/src/device/gcn/wavefront.jl @@ -53,7 +53,7 @@ for intr in WAVEFRONT_INTRINSICS inp_vars = [gensym() for _ in 1:length(intr.inp_args)] inp_expr = [:($(inp_vars[idx])::$arg) for (idx,arg) in enumerate(intr.inp_args)] libname = Symbol("__$(intr.roclib)_$(intr.rocname)_$(intr.suffix)") - @eval @inline function $(intr.jlname)($(inp_expr...)) + @eval @device_function function $(intr.jlname)($(inp_expr...)) y = _intr($(Val(libname)), $(intr.out_arg), $(inp_expr...)) return $(intr.isinverted ? :(1-y) : :y) end diff --git a/src/execution.jl b/src/execution.jl index 234d9cf90..321ddce84 100644 --- a/src/execution.jl +++ b/src/execution.jl @@ -280,7 +280,8 @@ AbstractKernel args = (:F, (:( args[$i] ) for i in 1:length(args))...) # filter out ghost arguments that shouldn't be passed - to_pass = map(!isghosttype, sig.parameters) + predicate = dt -> isghosttype(dt) || Core.Compiler.isconstType(dt) + to_pass = map(!predicate, sig.parameters) call_t = Type[x[1] for x in zip(sig.parameters, to_pass) if x[2]] call_args = Union{Expr,Symbol}[x[1] for x in zip(args, to_pass) if x[2]] diff --git a/src/forwarddiff.jl b/src/forwarddiff.jl deleted file mode 100644 index 9365b37fd..000000000 --- a/src/forwarddiff.jl +++ /dev/null @@ -1,87 +0,0 @@ -# ForwardDiff integration - -byhand = [:exp2, :log2, :exp10, :log10, :abs] - -for f in device_intrinsics - if haskey(ForwardDiff.DiffRules.DEFINED_DIFFRULES, (:Base,f,1)) - f ∈ byhand && continue - diffrule = ForwardDiff.DiffRules.DEFINED_DIFFRULES[(:Base,f,1)] - ForwardDiff.DiffRules.DEFINED_DIFFRULES[(:AMDGPU,f,1)] = - (args...) -> replace_device(diffrule(args...)) - eval(ForwardDiff.unary_dual_definition(:AMDGPU, f)) - end -end - -# byhand: exp2 -ForwardDiff.DiffRules.DEFINED_DIFFRULES[(:AMDGPU, :exp2, 1)] = x -> - :((AMDGPU.rocfunc(exp2))(x) * (AMDGPU.rocfunc(log))(oftype(x, 2))) -eval(ForwardDiff.unary_dual_definition(:AMDGPU, :exp2)) - -# byhand: log2 -ForwardDiff.DiffRules.DEFINED_DIFFRULES[(:AMDGPU, :log2, 1)] = x -> - :(inv(x) / (AMDGPU.rocfunc(log))(oftype(x, 2))) -eval(ForwardDiff.unary_dual_definition(:AMDGPU, :log2)) - -# byhand: exp10 -ForwardDiff.DiffRules.DEFINED_DIFFRULES[(:AMDGPU, :exp10, 1)] = x -> - :((AMDGPU.rocfunc(exp10))(x) * (AMDGPU.rocfunc(log))(oftype(x, 10))) -eval(ForwardDiff.unary_dual_definition(:AMDGPU, :exp10)) - -# byhand: log10 -ForwardDiff.DiffRules.DEFINED_DIFFRULES[(:AMDGPU, :log10, 1)] = x -> - :(inv(x) / (AMDGPU.rocfunc(log))(oftype(x, 10))) -eval(ForwardDiff.unary_dual_definition(:AMDGPU, :log10)) - -# byhand: abs -ForwardDiff.DiffRules.DEFINED_DIFFRULES[(:AMDGPU, :abs, 1)] = x -> - :(signbit(x) ? -one(x) : one(x)) -eval(ForwardDiff.unary_dual_definition(:AMDGPU, :abs)) - - -ForwardDiff.DiffRules.DEFINED_DIFFRULES[(:AMDGPU, :pow, 2)] = (x, y) -> - replace_device.(ForwardDiff.DiffRules.DEFINED_DIFFRULES[(:Base, :^, 2)](x, y)) - -@eval begin - ForwardDiff.@define_binary_dual_op( - AMDGPU.pow, - begin - vx = ForwardDiff.value(x) - vy = ForwardDiff.value(y) - expv = (AMDGPU.pow)(vx, vy) - - powval = vy * AMDGPU.pow(vx , vy - Int32(1)) - - py = ForwardDiff.partials(y) - px = ForwardDiff.partials(x) - - cond = all(py.values) do x - x == zero(x) - end - - if cond - logval = one(expv) - else - logval = expv * AMDGPU.log(vx) - end - - new_partials = powval * px + logval * py - return ForwardDiff.Dual{Txy}(expv, new_partials) - end, - begin - v = ForwardDiff.value(x) - expv = (AMDGPU.pow)(v, y) - if y == zero(y) - new_partials = zero(ForwardDiff.partials(x)) - else - new_partials = ForwardDiff.partials(x) * y * (AMDGPU.pow)(v, y - Int32(1)) - end - return ForwardDiff.Dual{Tx}(expv, new_partials) - end, - begin - v = ForwardDiff.value(y) - expv = (AMDGPU.pow)(x, v) - deriv = expv*AMDGPU.log(x) - return ForwardDiff.Dual{Ty}(expv, deriv * ForwardDiff.partials(y)) - end - ) -end diff --git a/src/mapreduce.jl b/src/mapreduce.jl index f80f0bcb6..2eda075e1 100644 --- a/src/mapreduce.jl +++ b/src/mapreduce.jl @@ -90,9 +90,6 @@ function GPUArrays.mapreducedim!(f::F, op::OP, R::ROCArray{T}, Base.check_reducedims(R, A) length(A) == 0 && return R # isempty(::Broadcasted) iterates - f = rocfunc(f) - op = rocfunc(op) - # add singleton dimensions to the output container, if needed if ndims(R) < ndims(A) dims = Base.fill_to_length(size(R), 1, Val(ndims(A))) From fd46ad9f8c82b857aa702630fb0c2dbdda43fcb7 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Tue, 8 Feb 2022 16:04:37 -0600 Subject: [PATCH 11/33] Allow SpecialFunctions 1.x --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index d5322529f..736ad3fb5 100644 --- a/Project.toml +++ b/Project.toml @@ -40,7 +40,7 @@ LLVM = "4.6" MacroTools = "0.5" ROCmDeviceLibs_jll = "4.2" Requires = "1" -SpecialFunctions = "2" +SpecialFunctions = "1, 2" Setfield = "0.5, 0.6, 0.7" hsa_rocr_jll = "4.2" julia = "1.7" From 3108774397414aa5e1e18543d531b44d1bd9bb34 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Tue, 8 Feb 2022 16:05:04 -0600 Subject: [PATCH 12/33] Promote HSAQueue to RuntimeQueue in roccall --- src/execution.jl | 3 +++ src/runtime.jl | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/execution.jl b/src/execution.jl index 321ddce84..777a6675d 100644 --- a/src/execution.jl +++ b/src/execution.jl @@ -317,6 +317,9 @@ end @inline function roccall(kernel::HostKernel, tt, args...; config=nothing, signal, device=nothing, kwargs...) device = something(device, default_device()) queue = get(kwargs, :queue, default_queue(device)) + if queue isa HSAQueue + queue = RuntimeQueue(queue) + end if config !== nothing roccall(kernel.fun, tt, args...; kwargs..., config(kernel)..., queue=queue, signal=signal) else diff --git a/src/runtime.jl b/src/runtime.jl index d24ac69e0..a8295bce0 100644 --- a/src/runtime.jl +++ b/src/runtime.jl @@ -46,7 +46,11 @@ get_global(exe::RuntimeExecutable, sym::Symbol) = get_global(exe.exe, sym) create_event(::typeof(HSA_rt), exe::RuntimeExecutable{<:HSAExecutable}; queue=default_queue(), kwargs...) = + create_event(HSA_rt, exe, queue; kwargs...) +create_event(::typeof(HSA_rt), exe::RuntimeExecutable{<:HSAExecutable}, queue::RuntimeQueue; kwargs...) = HSAStatusSignal(HSASignal(), exe.exe, queue.queue) +create_event(::typeof(HSA_rt), exe::RuntimeExecutable{<:HSAExecutable}, queue::HSAQueue; kwargs...) = + HSAStatusSignal(HSASignal(), exe.exe, queue) struct RuntimeKernel{K} kernel::K From 0c9e5c8b293bc59fb3156e5e241708151d591414 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Fri, 11 Feb 2022 07:49:04 -0600 Subject: [PATCH 13/33] Try to improve power wrappers --- src/device/gcn/math.jl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/device/gcn/math.jl b/src/device/gcn/math.jl index 420a952b1..8d718f524 100644 --- a/src/device/gcn/math.jl +++ b/src/device/gcn/math.jl @@ -47,7 +47,6 @@ for jltype in (Float16, Float32, Float64) # Multi-argument functions push!(MATH_INTRINSICS, GCNIntrinsic(:^, :pow; inp_args=(jltype,jltype), out_arg=jltype)) push!(MATH_INTRINSICS, GCNIntrinsic(:^, :pown; inp_args=(jltype,Union{UInt32,Int32}), out_arg=jltype)) - # TODO: push!(MATH_INTRINSICS, GCNIntrinsic(:^, :pown; inp_args=(jltype,Union{UInt32,Int32}), out_arg=jltype)) # TODO: :sincos, :frexp, :ldexp, :copysign, #push!(MATH_INTRINSICS, GCNIntrinsic(:ldexp; inp_args=(jltype,), out_arg=(jltype, Int32), isinverted=true)) @@ -102,16 +101,22 @@ end # FIXME abs(i::Integer) = Base.abs(i) -@device_override @inline function Base.:(^)(x::T, y::Int64) where T<:Union{Float16, Float32,Float64} +# Non-matching types +@device_override @inline function Base.:(^)(x::T, y::S) where {T<:Union{Float16, Float32,Float64}, S<:Union{Int64,UInt64}} y == -1 && return inv(x) y == 0 && return one(x) y == 1 && return x y == 2 && return x*x y == 3 && return x*x*x + if S === Int64 && typemin(Int32) <= y <= typemax(Int32) + return x ^ unsafe_trunc(Int32, y) + elseif S === UInt64 && typemin(UInt32) <= y <= typemax(UInt32) + return x ^ unsafe_trunc(UInt32, y) + end x ^ T(y) end +@device_override Base.:(^)(x::Integer, p::T) where T<:Union{Float16, Float32, Float64} = T(x) ^ p -@device_override Base.:(^)(x::Integer, p::Union{Float16, Float32, Float64}) = convert(typeof(p), x) ^ p @device_override @inline function Base.:(^)(x::Integer, p::Integer) p < 0 && throw("Negative integer power not supported") p == 0 && return one(x) From 551d491b2469e05d9cbba8bbc9d0b94cc6fc63d9 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Sun, 13 Feb 2022 12:13:54 -0600 Subject: [PATCH 14/33] Remove compat hacks --- src/AMDGPU.jl | 1 - src/compat.jl | 83 --------------------------------------------------- 2 files changed, 84 deletions(-) delete mode 100644 src/compat.jl diff --git a/src/AMDGPU.jl b/src/AMDGPU.jl index 7725e8857..b63dcc6e0 100644 --- a/src/AMDGPU.jl +++ b/src/AMDGPU.jl @@ -84,7 +84,6 @@ include("broadcast.jl") #include("matmul.jl") include("mapreduce.jl") #include("gpuarray_interface.jl") -include("compat.jl") allowscalar(x::Bool) = GPUArrays.allowscalar(x) diff --git a/src/compat.jl b/src/compat.jl deleted file mode 100644 index 35eebebbb..000000000 --- a/src/compat.jl +++ /dev/null @@ -1,83 +0,0 @@ -# Hacks that can be ripped out once we support device overrides - -function LinearAlgebra.norm(v::ROCArray{T}, p::Real=2) where {T} - if p == Inf - maximum(abs.(v)) - elseif p == -Inf - minimum(abs.(v)) - else - mapreduce(x->AMDGPU.pow(AMDGPU.abs(x), p), +, v; init=zero(T))^(1/p) - end -end - -@inline function ssqs(x::T, y::T) where T<:Real - k::Int = 0 - ρ = x*x + y*y - if isfinite(ρ) && (isinf(x) || isinf(y)) - ρ = convert(T, Inf) - elseif isinf(ρ) || (ρ==0 && (x!=0 || y!=0)) || ρ length(a) && return - @inbounds a[idx + 1] = Z1 - return - end - gpu_call(ROCArrayBackend(), _randn!_kernel, (A, rng.state); elements) - A -end From 4f7c99b1bb7353fcba8296203797fa17585e6ea3 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Sun, 13 Feb 2022 12:14:14 -0600 Subject: [PATCH 15/33] math: Fix some intrinsics and ForwardDiff tests --- src/device/gcn/math.jl | 11 ++++++----- test/external/forwarddiff.jl | 28 +++++++++++++++------------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/src/device/gcn/math.jl b/src/device/gcn/math.jl index 8d718f524..72e113152 100644 --- a/src/device/gcn/math.jl +++ b/src/device/gcn/math.jl @@ -16,11 +16,7 @@ for jltype in (Float16, Float32, Float64) :erf, :erfinv, :erfc, :erfcinv, :erfcx, # TODO: :brev, :clz, :ffs, :byte_perm, :popc, :isnormal, :nearbyint, :nextafter, - :tgamma, :j0, :j1, :y0, :y1) - - intrinsic == :expm1 && jltype == Float16 && continue - intrinsic == :erfinv && jltype == Float16 && continue - intrinsic == :erfcinv && jltype == Float16 && continue + :tgamma, :lgamma, :lgamma_r) if intrinsic == :sin && jltype == Float16 continue # FIXME: https://github.com/JuliaGPU/AMDGPU.jl/issues/177 @@ -30,6 +26,11 @@ for jltype in (Float16, Float32, Float64) push!(MATH_INTRINSICS, GCNIntrinsic(intrinsic, inp_args=(jltype,), out_arg=jltype)) end + push!(MATH_INTRINSICS, GCNIntrinsic(:besselj0, :j0; inp_args=(jltype,), out_arg=jltype)) + push!(MATH_INTRINSICS, GCNIntrinsic(:besselj1, :j1; inp_args=(jltype,), out_arg=jltype)) + push!(MATH_INTRINSICS, GCNIntrinsic(:bessely0, :y0; inp_args=(jltype,), out_arg=jltype)) + push!(MATH_INTRINSICS, GCNIntrinsic(:bessely1, :y1; inp_args=(jltype,), out_arg=jltype)) + push!(MATH_INTRINSICS, GCNIntrinsic(:sin_fast, :native_sin; inp_args=(jltype,), out_arg=jltype)) push!(MATH_INTRINSICS, GCNIntrinsic(:cos_fast, :native_cos; inp_args=(jltype,), out_arg=jltype)) push!(MATH_INTRINSICS, GCNIntrinsic(:sqrt_fast, :native_sqrt; inp_args=(jltype,), out_arg=jltype)) diff --git a/test/external/forwarddiff.jl b/test/external/forwarddiff.jl index 148dabcd8..4a15857dc 100644 --- a/test/external/forwarddiff.jl +++ b/test/external/forwarddiff.jl @@ -1,5 +1,6 @@ using ForwardDiff using ForwardDiff: Dual +using SpecialFunctions function test_derivative(f, x::T) where T buf = ROCArray(zeros(T)) @@ -15,14 +16,17 @@ end testf(rocf, f, x) = test_derivative(rocf, x) ≈ ForwardDiff.derivative(f, x) @testset "UNARY" begin - fs = filter(x->x[1] ==:AMDGPU && x[3] == 1, keys(ForwardDiff.DiffRules.DEFINED_DIFFRULES)) + fs = filter(x->x[3] == 1, keys(ForwardDiff.DiffRules.DEFINED_DIFFRULES)) - nonneg = [:log, :log1p, :log10, :log2, :sqrt, :acosh] + nonneg = [:log, :log1p, :log10, :log2, :sqrt, :asin, :acosh, :erfcinv] for (m, fn, _) ∈ fs fn == :abs && continue # FIXME - rocf = @eval $m.$fn + startswith(string(fn), "bessel") && continue # need besselj/bessely + startswith(string(fn), "lgamma") && continue # throws + any(intr->intr.jlname==fn, AMDGPU.MATH_INTRINSICS) || continue + rocf = @eval $fn f = @eval $fn x32 = rand(Float32) @@ -52,18 +56,16 @@ end y64 = rand(Float64) y = Int32(7) - @test testf(x->AMDGPU.pow(x, Int32(7)), x->x^y, x32) - #= FIXME - @test testf(x->AMDGPU.pow(x, y), x->x^y, x64) - @test testf(x->AMDGPU.pow(x, y32), x->x^y32, x32) - @test testf(x->AMDGPU.pow(x, y64), x->x^y64, x64) + @test testf(x->x^y, x->x^y, x32) + @test testf(x->x^y, x->x^y, x64) + @test testf(x->x^y32, x->x^y32, x32) + @test testf(x->x^y64, x->x^y64, x64) - @test testf(y->AMDGPU.pow(x32, y), y->x32^y, y32) - @test testf(y->AMDGPU.pow(x64, y), y->x64^y, y64) - =# + @test testf(y->x32^y, y->x32^y, y32) + @test testf(y->x64^y, y->x64^y, y64) - @test testf(x->AMDGPU.pow(x, x), x->x^x, x32) - @test testf(x->AMDGPU.pow(x, x), x->x^x, x64) + @test testf(x->x^x, x->x^x, x32) + @test testf(x->x^x, x->x^x, x64) end @testset "LITERAL_POW" begin From 1f4b629ec0703e66bb93a5be220593296729412f Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Mon, 14 Feb 2022 06:58:11 -0600 Subject: [PATCH 16/33] Use LLVM_jll for ld.lld --- Manifest.toml | 12 +++++++++++- Manifest.toml.gpuarrays-6 | 12 +++++++++++- Manifest.toml.gpuarrays-7 | 12 +++++++++++- Project.toml | 4 +++- deps/build.jl | 34 ++++++++++++++++++++++++++-------- deps/loaddeps.jl | 6 ++++++ src/runtime.jl | 6 +++++- src/utils.jl | 2 +- 8 files changed, 74 insertions(+), 14 deletions(-) diff --git a/Manifest.toml b/Manifest.toml index 68e05e5af..a8bf31b54 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.7.1" +julia_version = "1.7.2" manifest_format = "2.0" [[deps.AbstractFFTs]] @@ -157,6 +157,12 @@ git-tree-sha1 = "62115afed394c016c2d3096c5b85c407b48be96b" uuid = "dad2f222-ce93-54a1-a47d-0025e8a3acab" version = "0.0.13+1" +[[deps.LLVM_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll", "libLLVM_jll"] +git-tree-sha1 = "7e83922273e29dd33e8f320f6401ca547554787a" +uuid = "86de99a1-58d6-5da7-8064-bd56ce2e322c" +version = "12.0.1+4" + [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" @@ -454,6 +460,10 @@ git-tree-sha1 = "ea54f6be23c6d25613a0872ec23dc5a0b77b4a00" uuid = "1cecccd7-a9b6-5045-9cdc-a44c19b16d76" version = "4.2.0+0" +[[deps.libLLVM_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8f36deef-c2a5-5394-99ed-8e07531fb29a" + [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" diff --git a/Manifest.toml.gpuarrays-6 b/Manifest.toml.gpuarrays-6 index 76a056a6e..c725e2f67 100644 --- a/Manifest.toml.gpuarrays-6 +++ b/Manifest.toml.gpuarrays-6 @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.7.1" +julia_version = "1.7.2" manifest_format = "2.0" [[deps.AbstractFFTs]] @@ -158,6 +158,12 @@ git-tree-sha1 = "62115afed394c016c2d3096c5b85c407b48be96b" uuid = "dad2f222-ce93-54a1-a47d-0025e8a3acab" version = "0.0.13+1" +[[deps.LLVM_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll", "libLLVM_jll"] +git-tree-sha1 = "7e83922273e29dd33e8f320f6401ca547554787a" +uuid = "86de99a1-58d6-5da7-8064-bd56ce2e322c" +version = "12.0.1+4" + [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" @@ -455,6 +461,10 @@ git-tree-sha1 = "ea54f6be23c6d25613a0872ec23dc5a0b77b4a00" uuid = "1cecccd7-a9b6-5045-9cdc-a44c19b16d76" version = "4.2.0+0" +[[deps.libLLVM_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8f36deef-c2a5-5394-99ed-8e07531fb29a" + [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" diff --git a/Manifest.toml.gpuarrays-7 b/Manifest.toml.gpuarrays-7 index c66e04b43..0b24ac22f 100644 --- a/Manifest.toml.gpuarrays-7 +++ b/Manifest.toml.gpuarrays-7 @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.7.1" +julia_version = "1.7.2" manifest_format = "2.0" [[deps.AbstractFFTs]] @@ -158,6 +158,12 @@ git-tree-sha1 = "62115afed394c016c2d3096c5b85c407b48be96b" uuid = "dad2f222-ce93-54a1-a47d-0025e8a3acab" version = "0.0.13+1" +[[deps.LLVM_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll", "libLLVM_jll"] +git-tree-sha1 = "7e83922273e29dd33e8f320f6401ca547554787a" +uuid = "86de99a1-58d6-5da7-8064-bd56ce2e322c" +version = "12.0.1+4" + [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" @@ -455,6 +461,10 @@ git-tree-sha1 = "ea54f6be23c6d25613a0872ec23dc5a0b77b4a00" uuid = "1cecccd7-a9b6-5045-9cdc-a44c19b16d76" version = "4.2.0+0" +[[deps.libLLVM_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8f36deef-c2a5-5394-99ed-8e07531fb29a" + [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" diff --git a/Project.toml b/Project.toml index 736ad3fb5..12c991222 100644 --- a/Project.toml +++ b/Project.toml @@ -13,6 +13,7 @@ GPUArrays = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" GPUCompiler = "61eb1bfa-7361-4325-ad38-22787b887f55" HIP_jll = "2696aab5-0948-5276-aa9a-2a86a37016b8" LLVM = "929cbde3-209d-540e-8aea-75f648917ca0" +LLVM_jll = "86de99a1-58d6-5da7-8064-bd56ce2e322c" Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" @@ -37,11 +38,12 @@ GPUArrays = "6, 7, 8" GPUCompiler = "0.12, 0.13" HIP_jll = "4.2" LLVM = "4.6" +LLVM_jll = "12, 13" MacroTools = "0.5" ROCmDeviceLibs_jll = "4.2" Requires = "1" -SpecialFunctions = "1, 2" Setfield = "0.5, 0.6, 0.7" +SpecialFunctions = "1, 2" hsa_rocr_jll = "4.2" julia = "1.7" rocRAND_jll = "4.2" diff --git a/deps/build.jl b/deps/build.jl index a6d5217ee..64556511d 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -164,6 +164,7 @@ function main() :build_reason => "unknown", :lld_configured => false, :lld_build_reason => "unknown", + :lld_artifact => false, :hsa_configured => false, :hsa_build_reason => "unknown", :hip_configured => false, @@ -249,15 +250,32 @@ function main() config[:hsa_configured] = true ### Find ld.lld - ld_path = find_ld_lld() - if ld_path == "" - build_warning("Could not find ld.lld, please install it with your package manager") - config[:lld_build_reason] = "ld.lld executable not found" - write_ext(config, config_path) - return + ld_path = nothing + if use_artifacts + try + @eval using LLVM_jll + catch err + iob = IOBuffer() + println(iob, "`using LLVM_jll` failed:") + Base.showerror(iob, err) + Base.show_backtrace(iob, catch_backtrace()) + config[:ld_lld_build_reason] = String(take!(iob)) + end + ld_path = LLVM_jll.lld_path + config[:lld_artifact] = true + else + ld_path = find_ld_lld() + if ld_path == "" + build_warning("Could not find ld.lld, please install it with your package manager") + config[:lld_build_reason] = "ld.lld executable not found" + write_ext(config, config_path) + return + end + end + if ld_path !== nothing + config[:ld_lld_path] = ld_path + config[:lld_configured] = true end - config[:ld_lld_path] = ld_path - config[:lld_configured] = true ### Find/download device-libs device_libs_path = nothing diff --git a/deps/loaddeps.jl b/deps/loaddeps.jl index 1a2c04010..e2c2b70fd 100644 --- a/deps/loaddeps.jl +++ b/deps/loaddeps.jl @@ -28,6 +28,9 @@ if use_artifacts if hsa_configured using hsa_rocr_jll end + if lld_configured + using LLVM_jll + end if hip_configured using HIP_jll end @@ -45,6 +48,9 @@ if !hsa_configured const libhsaruntime_version = v"0.0" const libhsaruntime_path = nothing end +if !lld_configured + ld_lld_path = "" +end if !hip_configured const libhip_path = nothing end diff --git a/src/runtime.jl b/src/runtime.jl index a8295bce0..820393d67 100644 --- a/src/runtime.jl +++ b/src/runtime.jl @@ -34,7 +34,11 @@ function create_executable(::typeof(HSA_rt), device, entry, obj; globals=()) write(io_o, obj) flush(io_o) path_exe = path_o*".exe" - run(`$ld_lld_path -shared -o $path_exe $path_o`) + if lld_artifact + run(`$(LLVM_jll.lld()) -flavor gnu -shared -o $path_exe $path_o`) + else + run(`$ld_lld_path -shared -o $path_exe $path_o`) + end path_exe end data = read(path_exe) diff --git a/src/utils.jl b/src/utils.jl index 8e7a94636..fd105a275 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -34,7 +34,7 @@ function versioninfo(io::IO=stdout) end function has_rocm_gpu() - if !AMDGPU.hsa_configured + if !AMDGPU.hsa_configured return false else return length(AMDGPU.get_agents(:gpu)) > 0 From 4ff5fc64078eb245ee8853048cf446ed410cff5a Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Mon, 14 Feb 2022 10:28:54 -0600 Subject: [PATCH 17/33] tests/math: Update for method overlays --- test/device/math.jl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/device/math.jl b/test/device/math.jl index ce29dabfc..b4f4dee43 100644 --- a/test/device/math.jl +++ b/test/device/math.jl @@ -1,3 +1,5 @@ +using Base.FastMath + @testset "Math Intrinsics" begin for intr in AMDGPU.MATH_INTRINSICS jlintr = intr.jlname @@ -5,14 +7,18 @@ @test_skip "$jlintr()" continue end - modname = (isdefined(Base, jlintr) ? Base : SpecialFunctions) + modname = (isdefined(Base, jlintr) ? Base : + isdefined(Base.FastMath, jlintr) ? Base.FastMath : + isdefined(SpecialFunctions, jlintr) ? SpecialFunctions : + nothing) + modname !== nothing || continue # FIXME: Handle all input and output args T = intr.inp_args[1] intr_kern = Symbol("intr_$(jlintr)_$T") @eval begin function $intr_kern(out, a) i = threadIdx().x - out[i] = AMDGPU.$jlintr(a[i]) + out[i] = $jlintr(a[i]) return nothing end dims = (8,) From 306e8ae7cb83fabb8750c2d4724de47cf837a476 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Mon, 14 Feb 2022 10:46:28 -0600 Subject: [PATCH 18/33] versioninfo: Add more paths --- src/utils.jl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/utils.jl b/src/utils.jl index fd105a275..a2e8dccb7 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -1,6 +1,7 @@ function versioninfo(io::IO=stdout) println("HSA Runtime ($(hsa_configured ? "ready" : "MISSING"))") if hsa_configured + println("- Path: $libhsaruntime_path") println("- Version: $(libhsaruntime_version)") println("- Initialized: $(repr(HSA_REFCOUNT[] > 0))") end @@ -10,20 +11,43 @@ function versioninfo(io::IO=stdout) end println("ROCm-Device-Libs ($(device_libs_configured ? "ready" : "MISSING"))") if device_libs_configured + println("- Path: $device_libs_path") # TODO: println("- Version: $(device_libs_version)") println("- Downloaded: $(repr(device_libs_downloaded))") end println("HIP Runtime ($(hip_configured ? "ready" : "MISSING"))") if hip_configured + println("- Path: $libhip_path") # TODO: println("- Version: $(libhip_version)") end println("rocBLAS ($(librocblas !== nothing ? "ready" : "MISSING"))") + if librocblas !== nothing + println("- Path: $(Libdl.dlpath(librocblas))") + end println("rocSOLVER ($(librocsolver !== nothing ? "ready" : "MISSING"))") + if librocsolver !== nothing + println("- Path: $(Libdl.dlpath(librocsolver))") + end println("rocFFT ($(librocfft !== nothing ? "ready" : "MISSING"))") + if librocfft !== nothing + println("- Path: $(Libdl.dlpath(librocfft))") + end println("rocRAND ($(librocrand !== nothing ? "ready" : "MISSING"))") + if librocrand !== nothing + println("- Path: $(Libdl.dlpath(librocrand))") + end println("rocSPARSE ($(librocsparse !== nothing ? "ready" : "MISSING"))") + if librocsparse !== nothing + println("- Path: $(Libdl.dlpath(librocsparse))") + end println("rocALUTION ($(librocalution !== nothing ? "ready" : "MISSING"))") + if librocalution !== nothing + println("- Path: $(Libdl.dlpath(librocalution))") + end println("MIOpen ($(libmiopen !== nothing ? "ready" : "MISSING"))") + if libmiopen !== nothing + println("- Path: $(Libdl.dlpath(libmiopen))") + end if hsa_configured && HSA_REFCOUNT[] > 0 println("HSA Agents ($(length(agents()))):") From 51716f2b30d5737ec5a8cab528ed491245e927fd Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Mon, 14 Feb 2022 10:50:47 -0600 Subject: [PATCH 19/33] agents: Better error message with no agents found Add set_default_agent!(::HSAAgent) method --- src/agent.jl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/agent.jl b/src/agent.jl index c316c764f..cdac26303 100644 --- a/src/agent.jl +++ b/src/agent.jl @@ -111,11 +111,19 @@ end get_agents(kind::Symbol) = filter(agent->device_type(agent)==kind, get_agents()) -get_default_agent() = DEFAULT_AGENT[] +function get_default_agent() + if !isassigned(DEFAULT_AGENT) + error("No GPU agents detected!\nPlease consider rebuilding AMDGPU") + end + DEFAULT_AGENT[] +end function set_default_agent!(kind::Symbol) DEFAULT_AGENT[] = first(get_agents(kind)) end set_default_agent!() = set_default_agent!(:gpu) +function set_default_agent!(agent::HSAAgent) + DEFAULT_AGENT[] = agent +end function get_name(agent::HSAAgent) #len = Ref(0) From 87cba2435203886ab1b9fe04ab84a5fc54eadb01 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Mon, 14 Feb 2022 12:37:20 -0600 Subject: [PATCH 20/33] Disable lgamma_r, improve math tests --- src/device/gcn/math.jl | 3 ++- test/device/math.jl | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/device/gcn/math.jl b/src/device/gcn/math.jl index 72e113152..2e22a7e71 100644 --- a/src/device/gcn/math.jl +++ b/src/device/gcn/math.jl @@ -16,7 +16,8 @@ for jltype in (Float16, Float32, Float64) :erf, :erfinv, :erfc, :erfcinv, :erfcx, # TODO: :brev, :clz, :ffs, :byte_perm, :popc, :isnormal, :nearbyint, :nextafter, - :tgamma, :lgamma, :lgamma_r) + :tgamma, :lgamma) + # FIXME: :lgamma_r segfaults on GPU if intrinsic == :sin && jltype == Float16 continue # FIXME: https://github.com/JuliaGPU/AMDGPU.jl/issues/177 diff --git a/test/device/math.jl b/test/device/math.jl index b4f4dee43..86c444f97 100644 --- a/test/device/math.jl +++ b/test/device/math.jl @@ -3,7 +3,11 @@ using Base.FastMath @testset "Math Intrinsics" begin for intr in AMDGPU.MATH_INTRINSICS jlintr = intr.jlname - if intr.isbroken || !(isdefined(Base, jlintr) || isdefined(SpecialFunctions, jlintr)) || length(intr.inp_args) != 1 + if intr.isbroken || + !isdefined(Base, jlintr) || + !isdefined(Base.FastMath, jlintr) || + !isdefined(SpecialFunctions, jlintr) || + length(intr.inp_args) != 1 @test_skip "$jlintr()" continue end From ff38a5f713f50be372ae75b54f3edb5345afc287 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Mon, 14 Feb 2022 12:37:35 -0600 Subject: [PATCH 21/33] tests: Don't require HIP --- test/runtests.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 0a64927a3..251a5d175 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,5 +1,8 @@ using AMDGPU -using AMDGPU: HSA, AS, HIP +using AMDGPU: HSA, AS +if AMDGPU.hip_configured +using AMDGPU: HIP +end using GPUCompiler using LinearAlgebra using LLVM, LLVM.Interop From 67a1c94562d824ceb6ac8c23addc81c8092aff15 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Mon, 14 Feb 2022 13:54:59 -0600 Subject: [PATCH 22/33] tests: Don't force ROCArray external lib tests --- test/runtests.jl | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 251a5d175..6f64d8f4b 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -69,15 +69,32 @@ if AMDGPU.configured TestSuite.test(ROCArray) end @testset "ROCm External Libraries" begin - if parse(Bool, get(ENV, "CI", "false")) + CI = parse(Bool, get(ENV, "CI", "false")) + if CI @test isdefined(AMDGPU, :rocBLAS) @test isdefined(AMDGPU, :rocFFT) @test isdefined(AMDGPU, :rocRAND) end - isdefined(AMDGPU, :rocBLAS) ? include("rocarray/blas.jl") : @test_skip "rocBLAS" - isdefined(AMDGPU, :rocFFT) ? include("rocarray/fft.jl") : @test_skip "rocFFT" - isdefined(AMDGPU, :rocRAND) ? include("rocarray/random.jl") : @test_skip "rocRAND" - include("rocarray/nmf.jl") + if isdefined(AMDGPU, :rocBLAS) + include("rocarray/blas.jl") + else + @test_skip "rocBLAS" + end + if isdefined(AMDGPU, :rocFFT) + include("rocarray/fft.jl") + else + @test_skip "rocFFT" + end + if isdefined(AMDGPU, :rocRAND) + include("rocarray/random.jl") + else + @test_skip "rocRAND" + end + if isdefined(AMDGPU, :rocBLAS) + include("rocarray/nmf.jl") + else + @test_skip "NMF" + end end end @testset "External Packages" begin From ec307be07e0788abacbb0cda25c53a5a3ecbacbe Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Mon, 14 Feb 2022 15:32:35 -0600 Subject: [PATCH 23/33] build: Fix non-artifact HSA search --- deps/build.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/build.jl b/deps/build.jl index 64556511d..d70b46bd7 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -216,7 +216,7 @@ function main() end libhsaruntime_path = hsa_rocr_jll.libhsa_runtime64 else - libhsaruntime_path = find_hsa_library("libhsa-runtime64.so.1", roc_dirs) + libhsaruntime_path = find_hsa_library("libhsa-runtime64", roc_dirs) end if libhsaruntime_path === nothing build_warning("Could not find HSA runtime library v1") From f7d9bbc30bab9aed17dc27cce7365146c253f29c Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Mon, 14 Feb 2022 15:37:01 -0600 Subject: [PATCH 24/33] CI: Use Julia 1.8 for no-artifact job --- .buildkite/pipeline.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index b21e70d6f..e8fdc8dd0 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -14,12 +14,11 @@ steps: env: JULIA_AMDGPU_HSA_MUST_LOAD: "1" - - label: "Julia 1.7 - GPUArrays 7" + - label: "Julia 1.8 - GPUArrays 8 - No artifacts" plugins: - JuliaCI/julia#v1: - version: 1.7-nightly + version: 1.8-nightly - JuliaCI/julia-test#v1.4: - custom_manifest: Manifest.toml.gpuarrays-7 - JuliaCI/julia-coverage#v1: codecov: true agents: @@ -29,13 +28,14 @@ steps: timeout_in_minutes: 120 env: JULIA_AMDGPU_HSA_MUST_LOAD: "1" + JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" - - label: "Julia 1.7 - GPUArrays 6" + - label: "Julia 1.7 - GPUArrays 7" plugins: - JuliaCI/julia#v1: version: 1.7-nightly - JuliaCI/julia-test#v1.4: - custom_manifest: Manifest.toml.gpuarrays-6 + custom_manifest: Manifest.toml.gpuarrays-7 - JuliaCI/julia-coverage#v1: codecov: true agents: @@ -46,11 +46,12 @@ steps: env: JULIA_AMDGPU_HSA_MUST_LOAD: "1" - - label: "Julia 1.7 - GPUArrays 8 - No artifacts" + - label: "Julia 1.7 - GPUArrays 6" plugins: - JuliaCI/julia#v1: version: 1.7-nightly - JuliaCI/julia-test#v1.4: + custom_manifest: Manifest.toml.gpuarrays-6 - JuliaCI/julia-coverage#v1: codecov: true agents: @@ -60,7 +61,6 @@ steps: timeout_in_minutes: 120 env: JULIA_AMDGPU_HSA_MUST_LOAD: "1" - JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" - label: "Documentation" plugins: From a00a20c4c1af59672005626d53f72983bdb483f0 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Mon, 14 Feb 2022 15:50:08 -0600 Subject: [PATCH 25/33] build: Improve library detection --- deps/build.jl | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/deps/build.jl b/deps/build.jl index d70b46bd7..892e334d2 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -55,24 +55,39 @@ function find_roc_paths() paths = map(Base.Filesystem.abspath, paths) push!(paths, "/opt/rocm/hsa/lib") # shim for Ubuntu rocm packages... paths = filter(isdir, paths) - @show paths + println("ROCm library search paths:") + for path in paths + println("- "*path) + end return paths end -function find_hsa_library(lib, dirs) +function find_rocm_library(lib, dirs, ext="so") + println("Searching for $lib.$ext") path = Libdl.find_library(lib) if path != "" + println("- $path: true") return Libdl.dlpath(path) end for dir in dirs files = readdir(dir) for file in files - @info "$file: $(basename(file) == lib * ".so.1")" - if basename(file) == lib * ".so.1" + println("- $file: $(basename(file) == lib * ".$ext")") + if basename(file) == lib * ".$ext" return joinpath(dir, file) end end end + return "" +end +function find_rocm_library(libs::Vector, dirs) + for lib in libs + path = find_rocm_library(lib, dirs) + if path != "" + return path + end + end + return "" end function find_ld_lld() @@ -216,7 +231,7 @@ function main() end libhsaruntime_path = hsa_rocr_jll.libhsa_runtime64 else - libhsaruntime_path = find_hsa_library("libhsa-runtime64", roc_dirs) + libhsaruntime_path = find_rocm_library("libhsa-runtime64", roc_dirs, "so.1") end if libhsaruntime_path === nothing build_warning("Could not find HSA runtime library v1") @@ -322,7 +337,7 @@ function main() end libhip_path = HIP_jll.libamdhip64 else - libhip_path = Libdl.find_library(["libamdhip64", "libhip_hcc"]) + libhip_path = find_rocm_library(["libamdhip64", "libhip_hcc"], roc_dirs) end if libhip_path !== nothing && !isempty(libhip_path) config[:libhip_path] = libhip_path From 0180050893971e7f65f62a88ab0c866447c2b534 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Mon, 14 Feb 2022 16:00:54 -0600 Subject: [PATCH 26/33] init: Ensure core and HIP load when requested --- .buildkite/pipeline.yml | 12 ++++++++---- src/AMDGPU.jl | 39 +++++++++++++++++++++++++++++---------- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index e8fdc8dd0..2a8b7dadf 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -12,7 +12,8 @@ steps: if: build.message !~ /\[skip tests\]/ timeout_in_minutes: 120 env: - JULIA_AMDGPU_HSA_MUST_LOAD: "1" + JULIA_AMDGPU_CORE_MUST_LOAD: "1" + JULIA_AMDGPU_HIP_MUST_LOAD: "1" - label: "Julia 1.8 - GPUArrays 8 - No artifacts" plugins: @@ -27,7 +28,8 @@ steps: if: build.message !~ /\[skip tests\]/ timeout_in_minutes: 120 env: - JULIA_AMDGPU_HSA_MUST_LOAD: "1" + JULIA_AMDGPU_CORE_MUST_LOAD: "1" + JULIA_AMDGPU_HIP_MUST_LOAD: "1" JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" - label: "Julia 1.7 - GPUArrays 7" @@ -44,7 +46,8 @@ steps: if: build.message !~ /\[skip tests\]/ timeout_in_minutes: 120 env: - JULIA_AMDGPU_HSA_MUST_LOAD: "1" + JULIA_AMDGPU_CORE_MUST_LOAD: "1" + JULIA_AMDGPU_HIP_MUST_LOAD: "1" - label: "Julia 1.7 - GPUArrays 6" plugins: @@ -60,7 +63,8 @@ steps: if: build.message !~ /\[skip tests\]/ timeout_in_minutes: 120 env: - JULIA_AMDGPU_HSA_MUST_LOAD: "1" + JULIA_AMDGPU_CORE_MUST_LOAD: "1" + JULIA_AMDGPU_HIP_MUST_LOAD: "1" - label: "Documentation" plugins: diff --git a/src/AMDGPU.jl b/src/AMDGPU.jl index b63dcc6e0..5d6aeac03 100644 --- a/src/AMDGPU.jl +++ b/src/AMDGPU.jl @@ -143,6 +143,17 @@ end # hip_configured # Utilities include("utils.jl") +function print_build_diagnostics() + println("Diagnostics:") + println("-- deps/build.log") + println(String(read(joinpath(@__DIR__, "..", "deps", "build.log")))) + println("-- deps/ext.jl") + println(String(read(joinpath(@__DIR__, "..", "deps", "ext.jl")))) + println("-- permissions") + run(`ls -lah /dev/kfd`) + run(`ls -lah /dev/dri`) + run(`id`) +end function __init__() if !configured && build_reason != "unknown" if build_reason == "Build did not occur" @@ -191,16 +202,9 @@ function __init__() Reason: $hsa_build_reason """ - if parse(Bool, get(ENV, "JULIA_AMDGPU_HSA_MUST_LOAD", "0")) - println("Diagnostics:") - println("-- deps/build.log") - println(String(read(joinpath(@__DIR__, "..", "deps", "build.log")))) - println("-- deps/ext.jl") - println(String(read(joinpath(@__DIR__, "..", "deps", "ext.jl")))) - println("-- permissions") - run(`ls -lah /dev/kfd`) - run(`ls -lah /dev/dri`) - run(`id`) + if parse(Bool, get(ENV, "JULIA_AMDGPU_CORE_MUST_LOAD", "0")) + print_build_diagnostics() + error("Failed to load HSA runtime, but HSA must load, bailing out") end end @@ -211,6 +215,11 @@ function __init__() Please run Pkg.build("AMDGPU") and reload AMDGPU. Reason: $lld_build_reason """ + + if parse(Bool, get(ENV, "JULIA_AMDGPU_CORE_MUST_LOAD", "0")) + print_build_diagnostics() + error("Failed to find ld.lld, but ld.lld must exist, bailing out") + end end # Check whether device intrinsics are available @@ -220,6 +229,11 @@ function __init__() Please run Pkg.build("AMDGPU") and reload AMDGPU. Reason: $device_libs_build_reason """ + + if parse(Bool, get(ENV, "JULIA_AMDGPU_CORE_MUST_LOAD", "0")) + print_build_diagnostics() + error("Failed to find Device Libs, but Device Libs must exist, bailing out") + end end # Check whether HIP is available @@ -231,6 +245,11 @@ function __init__() Please run Pkg.build("AMDGPU") and reload AMDGPU. Reason: $hip_build_reason """ + + if parse(Bool, get(ENV, "JULIA_AMDGPU_HIP_MUST_LOAD", "0")) + print_build_diagnostics() + error("Failed to load HIP runtime, but HIP must load, bailing out") + end end # Check whether external libraries are available From 0800b54ccfa8968b3273e878fdf53beaaddbd3a4 Mon Sep 17 00:00:00 2001 From: Julian Samaroo Date: Mon, 14 Feb 2022 16:01:35 -0600 Subject: [PATCH 27/33] sync: Test hip_configured statically Co-authored-by: Valentin Churavy --- src/sync.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sync.jl b/src/sync.jl index 0eab3ba2e..d3eb1c1f6 100644 --- a/src/sync.jl +++ b/src/sync.jl @@ -14,7 +14,7 @@ function wait!(ss::SyncState) # FIXME: Use barrier_and on dedicated queue foreach(wait, ss.signals) empty!(ss.signals) - if hip_configured + @static if hip_configured foreach(HIP.hipStreamSynchronize, ss.streams) empty!(ss.streams) HIP.hipStreamSynchronize(C_NULL) # FIXME: This shouldn't be necessary From ab17d247bf20f740163213f8cb963728e19f557c Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Mon, 14 Feb 2022 16:03:04 -0600 Subject: [PATCH 28/33] build: Check devlibs path vars before default path --- deps/build.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/deps/build.jl b/deps/build.jl index 892e334d2..f5d1e93f6 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -124,17 +124,17 @@ function find_ld_lld() end function find_device_libs() - # The canonical location - if isdir("/opt/rocm/amdgcn/bitcode") - return "/opt/rocm/amdgcn/bitcode" - end - # Might be set by tools like Spack or the user hip_devlibs_path = get(ENV, "HIP_DEVICE_LIB_PATH", "") hip_devlibs_path !== "" && return hip_devlibs_path devlibs_path = get(ENV, "DEVICE_LIB_PATH", "") devlibs_path !== "" && return devlibs_path + # The canonical location + if isdir("/opt/rocm/amdgcn/bitcode") + return "/opt/rocm/amdgcn/bitcode" + end + # Search relative to LD_LIBRARY_PATH entries paths = split(get(ENV, "LD_LIBRARY_PATH", ""), ":") paths = filter(path->path != "", paths) From 8341b4b722e612cc8775d4721fdf8f9ebd519edb Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Mon, 14 Feb 2022 16:05:00 -0600 Subject: [PATCH 29/33] init: Load deps vars before sync --- src/AMDGPU.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AMDGPU.jl b/src/AMDGPU.jl index 5d6aeac03..146e26483 100644 --- a/src/AMDGPU.jl +++ b/src/AMDGPU.jl @@ -30,6 +30,9 @@ const libhsaruntime = "libhsa-runtime64.so.1" include(joinpath(@__DIR__, "hsa", "HSA.jl")) import .HSA: Agent, Queue, Executable, Status, Signal +# Load binary dependencies +include(joinpath(dirname(@__DIR__), "deps", "loaddeps.jl")) + struct Adaptor end const RT_LOCK = Threads.ReentrantLock() @@ -106,9 +109,6 @@ function hsaunref!() =# end -# Load binary dependencies -include(joinpath(dirname(@__DIR__), "deps", "loaddeps.jl")) - # Load HIP and ROCm external libraries const libhip = "libamdhip64.so" if hip_configured From 15096c76b055b83ff14d6f0de9fef61a4b28fa69 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Mon, 14 Feb 2022 16:08:04 -0600 Subject: [PATCH 30/33] build: Search /opt/rocm/lib --- deps/build.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/build.jl b/deps/build.jl index f5d1e93f6..811ff4903 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -53,7 +53,7 @@ function find_roc_paths() paths = split(get(ENV, "LD_LIBRARY_PATH", ""), ":") paths = filter(path->path != "", paths) paths = map(Base.Filesystem.abspath, paths) - push!(paths, "/opt/rocm/hsa/lib") # shim for Ubuntu rocm packages... + push!(paths, "/opt/rocm/lib") # shim for Ubuntu rocm packages... paths = filter(isdir, paths) println("ROCm library search paths:") for path in paths From 00956a7c60d62aa190dda56771d6bdf4e4e922f8 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Mon, 14 Feb 2022 17:08:38 -0600 Subject: [PATCH 31/33] build: Improve library detection v2 --- deps/build.jl | 34 +++++++++++++++++----------------- deps/loaddeps.jl | 9 ++++++++- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/deps/build.jl b/deps/build.jl index 811ff4903..9f6d69a58 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -72,8 +72,9 @@ function find_rocm_library(lib, dirs, ext="so") for dir in dirs files = readdir(dir) for file in files - println("- $file: $(basename(file) == lib * ".$ext")") - if basename(file) == lib * ".$ext" + matched = startswith(basename(file), lib*".$ext") + println("- $file: $matched") + if matched return joinpath(dir, file) end end @@ -151,12 +152,6 @@ function find_device_libs() return nothing end -function find_roc_library(name::String) - lib = Libdl.find_library(Symbol(name)) - lib == "" && return nothing - return Libdl.dlpath(lib) -end - ## main const config_path = joinpath(@__DIR__, "ext.jl") @@ -191,6 +186,7 @@ function main() :librocsparse => nothing, :librocalution => nothing, :librocfft => nothing, + :librocrand => nothing, :rocrand_configured => false, :rocrand_build_reason => false, :libmiopen => nothing, @@ -233,7 +229,7 @@ function main() else libhsaruntime_path = find_rocm_library("libhsa-runtime64", roc_dirs, "so.1") end - if libhsaruntime_path === nothing + if isempty(something(libhsaruntime_path, "")) build_warning("Could not find HSA runtime library v1") config[:hsa_build_reason] = "HSA runtime library v1 not found" write_ext(config, config_path) @@ -339,22 +335,26 @@ function main() else libhip_path = find_rocm_library(["libamdhip64", "libhip_hcc"], roc_dirs) end - if libhip_path !== nothing && !isempty(libhip_path) + if !isempty(something(libhip_path, "")) config[:libhip_path] = libhip_path config[:hip_configured] = true ### Find external HIP-based libraries for name in ("rocblas", "rocsolver", "rocsparse", "rocalution", "rocfft", "MIOpen") lib = Symbol("lib$(lowercase(name))") - config[lib] = find_roc_library("lib$name") - if config[lib] === nothing + path = find_rocm_library("lib$name", roc_dirs) + if !isempty(something(path, "")) + config[lib] = path + else build_warning("Could not find library '$name'") # TODO: Save build reason? end end + lib = :librocrand if use_artifacts try @eval using rocRAND_jll + config[lib] = rocRAND_jll.librocrand config[:rocrand_configured] = true catch err iob = IOBuffer() @@ -364,12 +364,12 @@ function main() config[:rocrand_build_reason] = String(take!(iob)) end else - lib = :librocrand - config[lib] = find_roc_library("librocrand") - if config[lib] === nothing - build_warning("Could not find library 'librocrand'") - else + path = find_rocm_library("librocrand", roc_dirs) + if !isempty(something(path, "")) + config[lib] = path config[:rocrand_configured] = true + else + build_warning("Could not find library 'librocrand'") end end else diff --git a/deps/loaddeps.jl b/deps/loaddeps.jl index e2c2b70fd..35beb9438 100644 --- a/deps/loaddeps.jl +++ b/deps/loaddeps.jl @@ -16,6 +16,13 @@ catch err @eval const device_libs_build_reason = "Build did not occur" @eval const rocrand_configured = false @eval const rocrand_build_reason = "Build did not occur" + @eval const librocblas = nothing + @eval const librocsolver = nothing + @eval const librocsparse = nothing + @eval const librocrand = nothing + @eval const librocfft = nothing + @eval const librocalution = nothing + @eval const libmiopen = nothing else rethrow(err) end @@ -49,7 +56,7 @@ if !hsa_configured const libhsaruntime_path = nothing end if !lld_configured - ld_lld_path = "" + const ld_lld_path = "" end if !hip_configured const libhip_path = nothing From 577f663b74d7d6a091f04da0a6a31782d4893902 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Mon, 14 Feb 2022 20:00:29 -0600 Subject: [PATCH 32/33] rocblas: Use absolute path --- src/blas/librocblas.jl | 48 ++++++++++++++++++++---------------------- src/blas/rocBLAS.jl | 2 +- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src/blas/librocblas.jl b/src/blas/librocblas.jl index 456525ebd..736bf3f15 100644 --- a/src/blas/librocblas.jl +++ b/src/blas/librocblas.jl @@ -1,56 +1,54 @@ # generated by hand ;( -const librocblas = "librocblas" - function rocblas_get_version_string() vec = zeros(UInt8, 64) str = reinterpret(Cstring, pointer(vec)) - ccall((:rocblas_get_version_string, "librocblas"), rocblas_status_t, (Cstring, Csize_t), str, 64) + ccall((:rocblas_get_version_string, librocblas), rocblas_status_t, (Cstring, Csize_t), str, 64) return unsafe_string(str) end function rocblas_pointer_to_mode(ptr) - ccall((:rocblas_pointer_to_mode, "librocblas"), rocblas_pointer_mode_t, (Ptr{Cvoid},), ptr) + ccall((:rocblas_pointer_to_mode, librocblas), rocblas_pointer_mode_t, (Ptr{Cvoid},), ptr) end function rocblas_create_handle() handle = Ref{rocblas_handle}() - ccall((:rocblas_create_handle, "librocblas"), rocblas_status_t, (Ptr{rocblas_handle},), handle) + ccall((:rocblas_create_handle, librocblas), rocblas_status_t, (Ptr{rocblas_handle},), handle) return handle[] end function rocblas_destroy_handle(handle) - ccall((:rocblas_destroy_handle, "librocblas"), rocblas_status_t, (rocblas_handle,), handle) + ccall((:rocblas_destroy_handle, librocblas), rocblas_status_t, (rocblas_handle,), handle) end function rocblas_add_stream(handle, stream) - ccall((:rocblas_add_stream, "librocblas"), rocblas_status_t, (rocblas_handle, hipStream_t), handle, stream) + ccall((:rocblas_add_stream, librocblas), rocblas_status_t, (rocblas_handle, hipStream_t), handle, stream) end function rocblas_set_stream(handle, stream) - ccall((:rocblas_set_stream, "librocblas"), rocblas_status_t, (rocblas_handle, hipStream_t), handle, stream) + ccall((:rocblas_set_stream, librocblas), rocblas_status_t, (rocblas_handle, hipStream_t), handle, stream) end function rocblas_get_stream(handle) stream = Ref{hipStream_t}() - ccall((:rocblas_get_stream, "librocblas"), rocblas_status_t, (rocblas_handle, Ptr{hipStream_t}), handle, stream) + ccall((:rocblas_get_stream, librocblas), rocblas_status_t, (rocblas_handle, Ptr{hipStream_t}), handle, stream) return stream[] end function rocblas_set_pointer_mode(handle, pointer_mode) - ccall((:rocblas_set_pointer_mode, "librocblas"), rocblas_status_t, (rocblas_handle, rocblas_pointer_mode_t), handle, pointer_mode) + ccall((:rocblas_set_pointer_mode, librocblas), rocblas_status_t, (rocblas_handle, rocblas_pointer_mode_t), handle, pointer_mode) end function rocblas_get_pointer_mode(handle) pointer_mode = Ref{rocblas_pointer_mode_t}() - ccall((:rocblas_get_pointer_mode, "librocblas"), rocblas_status_t, (rocblas_handle, Ptr{rocblas_pointer_mode_t}), handle, pointer_mode) + ccall((:rocblas_get_pointer_mode, librocblas), rocblas_status_t, (rocblas_handle, Ptr{rocblas_pointer_mode_t}), handle, pointer_mode) return pointer_mode[] end #= TODO: I don't know if these are really important... function rocblas_set_vector() - ccall((:rocblas_set_vector, "librocblas"), rocblas_status_t, n::rocblas_int_t, elem_size::rocblas_int_t, x::Ptr{Cvoid}, incx::rocblas_int_t, y::Ptr{Cvoid}, incy::rocblas_int_t) + ccall((:rocblas_set_vector, librocblas), rocblas_status_t, n::rocblas_int_t, elem_size::rocblas_int_t, x::Ptr{Cvoid}, incx::rocblas_int_t, y::Ptr{Cvoid}, incy::rocblas_int_t) end function rocblas_get_vector() - ccall((:rocblas_get_vector, "librocblas"), rocblas_status_t, n::rocblas_int_t, elem_size::rocblas_int_t, x::Ptr{Cvoid}, incx::rocblas_int_t, y::Ptr{Cvoid}, incy::rocblas_int_t) + ccall((:rocblas_get_vector, librocblas), rocblas_status_t, n::rocblas_int_t, elem_size::rocblas_int_t, x::Ptr{Cvoid}, incx::rocblas_int_t, y::Ptr{Cvoid}, incy::rocblas_int_t) end function rocblas_set_matrix() - ccall((:rocblas_set_matrix, "librocblas"), rocblas_status_t, rows::rocblas_int_t, cols::rocblas_int_t, elem_size::rocblas_int_t, a::Ptr{Cvoid}, lda::rocblas_int_t, b::Ptr{Cvoid}, ldb::rocblas_int_t) + ccall((:rocblas_set_matrix, librocblas), rocblas_status_t, rows::rocblas_int_t, cols::rocblas_int_t, elem_size::rocblas_int_t, a::Ptr{Cvoid}, lda::rocblas_int_t, b::Ptr{Cvoid}, ldb::rocblas_int_t) end function rocblas_get_matrix() - ccall((:rocblas_get_matrix, "librocblas"), rocblas_status_t, rows::rocblas_int_t, cols::rocblas_int_t, elem_size::rocblas_int_t, a::Ptr{Cvoid}, lda::rocblas_int_t, b::Ptr{Cvoid}, ldb::rocblas_int_t) + ccall((:rocblas_get_matrix, librocblas), rocblas_status_t, rows::rocblas_int_t, cols::rocblas_int_t, elem_size::rocblas_int_t, a::Ptr{Cvoid}, lda::rocblas_int_t, b::Ptr{Cvoid}, ldb::rocblas_int_t) end =# @@ -61,7 +59,7 @@ end function rocblas_dscal(handle, n, alpha::Cdouble, x::ROCArray, incx) ref_alpha = Ref(alpha) GC.@preserve ref_alpha begin - @check ccall((:rocblas_dscal, "librocblas"), + @check ccall((:rocblas_dscal, librocblas), rocblas_status_t, (rocblas_handle, rocblas_int, Ptr{Cdouble}, Ptr{Cdouble}, rocblas_int), handle, n, ref_alpha, pointer(x), incx) @@ -70,7 +68,7 @@ end function rocblas_sscal(handle, n, alpha::Cfloat, x::ROCArray, incx) ref_alpha = Ref(alpha) GC.@preserve ref_alpha begin - @check ccall((:rocblas_sscal, "librocblas"), + @check ccall((:rocblas_sscal, librocblas), rocblas_status_t, (rocblas_handle, rocblas_int, Ptr{Cfloat}, Ptr{Cfloat}, rocblas_int), handle, n, ref_alpha, pointer(x), incx) @@ -78,39 +76,39 @@ function rocblas_sscal(handle, n, alpha::Cfloat, x::ROCArray, incx) end function rocblas_dcopy(handle, n, x::ROCArray, incx, y::ROCArray, incy) - @check ccall((:rocblas_dcopy, "librocblas"), + @check ccall((:rocblas_dcopy, librocblas), rocblas_status_t, (rocblas_handle, rocblas_int, Ptr{Cdouble}, rocblas_int, Ptr{Cdouble}, rocblas_int), handle, n, pointer(x), incx, pointer(y), incy) end function rocblas_scopy(handle, n, x::ROCArray, incx, y::ROCArray, incy) - @check ccall((:rocblas_scopy, "librocblas"), + @check ccall((:rocblas_scopy, librocblas), rocblas_status_t, (rocblas_handle, rocblas_int, Ptr{Cfloat}, rocblas_int, Ptr{Cfloat}, rocblas_int), handle, n, pointer(x), incx, pointer(y), incy) end function rocblas_ddot(handle, n, x::ROCArray, incx, y::ROCArray, incy, result) - @check ccall((:rocblas_ddot, "librocblas"), + @check ccall((:rocblas_ddot, librocblas), rocblas_status_t, (rocblas_handle, rocblas_int, Ptr{Cdouble}, rocblas_int, Ptr{Cdouble}, rocblas_int, Ptr{Cdouble}), handle, n, pointer(x), incx, pointer(y), incy, result) end function rocblas_sdot(handle, n, x::ROCArray, incx, y::ROCArray, incy, result) - @check ccall((:rocblas_sdot, "librocblas"), + @check ccall((:rocblas_sdot, librocblas), rocblas_status_t, (rocblas_handle, rocblas_int, Ptr{Cfloat}, rocblas_int, Ptr{Cfloat}, rocblas_int, Ptr{Cfloat}), handle, n, pointer(x), incx, pointer(y), incy, result) end function rocblas_dswap(handle, n, x::ROCArray, incx, y::ROCArray, incy) - @check ccall((:rocblas_dswap, "librocblas"), + @check ccall((:rocblas_dswap, librocblas), rocblas_status_t, (rocblas_handle, rocblas_int, Ptr{Cdouble}, rocblas_int, Ptr{Cdouble}, rocblas_int), handle, n, pointer(x), incx, pointer(y), incy) end function rocblas_sswap(handle, n, x::ROCArray, incx, y::ROCArray, incy) - @check ccall((:rocblas_sswap, "librocblas"), + @check ccall((:rocblas_sswap, librocblas), rocblas_status_t, (rocblas_handle, rocblas_int, Ptr{Cfloat}, rocblas_int, Ptr{Cfloat}, rocblas_int), handle, n, pointer(x), incx, pointer(y), incy) @@ -122,7 +120,7 @@ function rocblas_dgemv(handle, trans::rocblas_operation_t, m::rocblas_int, n::ro ref_alpha = Ref(alpha) ref_beta = Ref(beta) GC.@preserve ref_alpha ref_beta begin - @check ccall((:rocblas_dgemv, "librocblas"), + @check ccall((:rocblas_dgemv, librocblas), rocblas_status_t, (rocblas_handle, rocblas_operation_t, rocblas_int, rocblas_int, Ptr{Cdouble}, Ptr{Cdouble}, rocblas_int, Ptr{Cdouble},rocblas_int, Ptr{Cdouble}, Ptr{Cdouble}, rocblas_int), handle, trans, m, n, ref_alpha, pointer(A), lda, pointer(x), incx, ref_beta, pointer(y), incy) @@ -132,7 +130,7 @@ function rocblas_sgemv(handle, trans::rocblas_operation_t, m::rocblas_int, n::ro ref_alpha = Ref(alpha) ref_beta = Ref(beta) GC.@preserve ref_alpha ref_beta begin - @check ccall((:rocblas_sgemv, "librocblas"), + @check ccall((:rocblas_sgemv, librocblas), rocblas_status_t, (rocblas_handle, rocblas_operation_t, rocblas_int, rocblas_int, Ptr{Cfloat}, Ptr{Cfloat}, rocblas_int, Ptr{Cfloat},rocblas_int, Ptr{Cfloat}, Ptr{Cfloat}, rocblas_int), handle, trans, m, n, ref_alpha, pointer(A), lda, pointer(x), incx, ref_beta, pointer(y), incy) diff --git a/src/blas/rocBLAS.jl b/src/blas/rocBLAS.jl index 4435eccc9..748b2f92a 100644 --- a/src/blas/rocBLAS.jl +++ b/src/blas/rocBLAS.jl @@ -1,7 +1,7 @@ module rocBLAS using ..AMDGPU -import AMDGPU: wait!, mark! +import AMDGPU: wait!, mark!, librocblas using LinearAlgebra From c22fd01aa82c693698fd7263df1bfa969d7f764c Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Mon, 14 Feb 2022 14:47:34 -0600 Subject: [PATCH 33/33] Bump to 0.3.0 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 12c991222..2142b0573 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "AMDGPU" uuid = "21141c5a-9bdb-4563-92ae-f87d6854732e" authors = ["Julian P Samaroo ", "Valentin Churavy "] -version = "0.2.17" +version = "0.3.0" [deps] AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"