@@ -4,7 +4,6 @@ export lld_artifact, lld_path, clang_path, clang_artifact, libhsaruntime, libdev
44export librocblas, librocsparse, librocsolver
55export librocrand, librocfft, libMIOpen_path
66
7- using LLD_jll
87using LazyArtifacts
98using Preferences
109using Libdl
@@ -13,29 +12,6 @@ Base.include(@__MODULE__, joinpath(@__DIR__, "..", "..", ".pkg", "platform_augme
1312
1413include (" utils.jl" )
1514
16- function get_artifact_library (pkg:: Symbol , libname:: Symbol ):: String
17- succ, res = safe_exec (" import $pkg ; println($pkg .$libname )" )
18- (succ && ispath (res)) || return " "
19- return res
20- end
21-
22- function get_ld_lld (rocm_path:: String ):: Tuple{String, Bool}
23- lld_path = find_ld_lld (rocm_path)
24- isempty (lld_path) || return (lld_path, false )
25- LLD_jll. is_available () || return (lld_path, false )
26- return (LLD_jll. lld_path, true )
27- end
28-
29- function get_clang (rocm_path:: String ):: Tuple{String, Bool}
30- clang_path = find_clang (rocm_path)
31- if isempty (clang_path)
32- # Not found, could use LLD_jll or something if it had clang, but it doesn't.
33- # So return empty
34- return (" " , false )
35- end
36- return (clang_path, true )
37- end
38-
3915function _hip_runtime_version ()
4016 v_ref = Ref {Cint} ()
4117 res = ccall ((:hipRuntimeGetVersion , libhip), UInt32, (Ptr{Cint},), v_ref)
5127global rel_libdir:: String = Sys. islinux () ? " " : " bin"
5228global libhsaruntime:: String = " "
5329global lld_path:: String = " "
54- global lld_artifact:: Bool = false
5530global clang_path:: String = " "
56- global clang_artifact:: Bool = false
5731global libhip:: String = " "
5832global libdevice_libs:: String = " "
5933global librocblas:: String = " "
@@ -87,14 +61,8 @@ function __init__()
8761 " "
8862
8963 # Linker.
90- lld_path, lld_artifact = get_ld_lld (rocm_path)
91- global lld_path = lld_path
92- global lld_artifact = lld_artifact
93-
94- # Clang
95- clang_path, clang_artifact = get_clang (rocm_path)
96- global clang_path = clang_path
97- global clang_artifact = clang_artifact
64+ global lld_path = find_ld_lld (rocm_path)
65+ global clang_path = find_clang (rocm_path)
9866 global libhip = find_rocm_library (Sys. islinux () ? " libamdhip64" : " amdhip64" ; rocm_path)
9967
10068 global libdevice_libs = find_device_libs (rocm_path)
0 commit comments