From 6fed33631b31a8c0827f495634e7f252a8d1e098 Mon Sep 17 00:00:00 2001 From: Simeon David Schaub Date: Sat, 15 Aug 2026 20:18:50 +0000 Subject: [PATCH 01/28] Refactor ROCm provisioning into ROCm_Runtime and ROCm_Runtime_Discovery subpackages By default the ROCm runtime (HIP, HSA) and vendor libraries (rocBLAS, rocSPARSE, rocSOLVER, rocRAND, rocFFT, hipTENSOR, MIOpen) now come from the new ROCm_Runtime subpackage, which ships AMD's TheRock distribution tarballs directly as lazy artifacts, selected by GPU architecture and ROCm version through platform augmentation. The former src/discovery/ code moves into the ROCm_Runtime_Discovery subpackage, which replicates ROCm_Runtime's API for a local ROCm installation; it is only loaded when that is requested through ROCm_Runtime's "local" preference, settable via the new AMDGPU.set_rocm_version!([version]; local_rocm) (mirroring CUDA.set_runtime_version!). hipTENSOR is part of the same TheRock tarballs (only for the CDNA bundles, gfx908/gfx90a/gfx94X/gfx950; TheRock excludes it on RDNA targets), so libhiptensor is provided by both packages alongside the other libraries. ld.lld now always comes from AMDGPU_LLVM_Backend_jll (it has to match the LLVM version device code is generated with), and the device bitcode libraries keep coming from ROCmDeviceLibs_jll until local ones can be downgraded. libMIOpen_path is renamed to libMIOpen for consistency with the provider packages. Also adds a manually-dispatched workflow to regenerate the Artifacts.toml hashes from repo.amd.com. Assisted-by: Claude Code (claude-fable-5) --- .github/workflows/rocm-artifact-hashes.yml | 53 ++ Project.toml | 10 +- ROCm_Runtime/.pkg/platform_augmentation.jl | 252 ++++++++++ ROCm_Runtime/.pkg/select_artifacts.jl | 134 ++++++ ROCm_Runtime/Artifacts.toml | 232 +++++++++ ROCm_Runtime/Project.toml | 15 + ROCm_Runtime/src/ROCm_Runtime.jl | 89 ++++ ROCm_Runtime_Discovery/Project.toml | 11 + .../src/ROCm_Runtime_Discovery.jl | 77 +++ .../src}/utils.jl | 28 -- docs/src/api/system.md | 11 + docs/src/install_tips.md | 22 +- src/AMDGPU.jl | 18 +- src/compiler/codegen.jl | 12 +- src/discovery/discovery.jl | 112 ----- src/dnn/MIOpen.jl | 2 +- src/dnn/libMIOpen.jl | 452 +++++++++--------- src/libs.jl | 118 +++++ src/precompile.jl | 6 +- src/utils.jl | 6 +- test/Project.toml | 2 + test/core/discovery_tests.jl | 4 +- 22 files changed, 1278 insertions(+), 388 deletions(-) create mode 100644 .github/workflows/rocm-artifact-hashes.yml create mode 100644 ROCm_Runtime/.pkg/platform_augmentation.jl create mode 100644 ROCm_Runtime/.pkg/select_artifacts.jl create mode 100644 ROCm_Runtime/Artifacts.toml create mode 100644 ROCm_Runtime/Project.toml create mode 100644 ROCm_Runtime/src/ROCm_Runtime.jl create mode 100644 ROCm_Runtime_Discovery/Project.toml create mode 100644 ROCm_Runtime_Discovery/src/ROCm_Runtime_Discovery.jl rename {src/discovery => ROCm_Runtime_Discovery/src}/utils.jl (85%) delete mode 100644 src/discovery/discovery.jl create mode 100644 src/libs.jl diff --git a/.github/workflows/rocm-artifact-hashes.yml b/.github/workflows/rocm-artifact-hashes.yml new file mode 100644 index 000000000..b65d58349 --- /dev/null +++ b/.github/workflows/rocm-artifact-hashes.yml @@ -0,0 +1,53 @@ +name: ROCm artifact hashes + +on: + workflow_dispatch: + +jobs: + hash-rocm-artifacts: + runs-on: ubuntu-latest + steps: + - uses: julia-actions/setup-julia@v2 + with: + version: "1.12" + - name: Download tarballs and compute hashes + shell: julia {0} + run: | + import Pkg + Pkg.add("ArtifactUtils") + using ArtifactUtils, Base.BinaryPlatforms + const rocm_version = "7.14.0" + const rocm_tag = "7.14" + + for rocm_arch in [ + "gfx908", + "gfx90a", + "gfx94X-dcgpu", + "gfx950-dcgpu", + "gfx101X-dgpu", + "gfx103X-all", + "gfx110X-all", + "gfx1150", + "gfx1151", + "gfx1152", + "gfx1153", + "gfx120X-all", + ] + @info "Linux, $rocm_arch" + platform = Platform("x86_64", "linux", Dict( + "libc" => "glibc", "rocm" => rocm_tag, + "rocm_arch" => replace(rocm_arch, "-" => "_"))) + add_artifact!("Artifacts.toml", "ROCm_Runtime", "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-$rocm_arch-$rocm_version.tar.gz"; lazy = true, platform) + + startswith(rocm_arch, "gfx9") && continue + @info "Windows, $rocm_arch" + platform = Platform("x86_64", "windows", Dict( + "rocm" => rocm_tag, + "rocm_arch" => replace(rocm_arch, "-" => "_"))) + add_artifact!("Artifacts.toml", "ROCm_Runtime", "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-windows-$rocm_arch-$rocm_version.tar.gz"; lazy = true, platform) + end + - name: Upload hash report + uses: actions/upload-artifact@v4 + with: + name: Artifacts.toml + path: Artifacts.toml diff --git a/Project.toml b/Project.toml index ad47f56c7..b18add29c 100644 --- a/Project.toml +++ b/Project.toml @@ -4,7 +4,7 @@ version = "2.8.0" authors = ["Julian P Samaroo ", "Valentin Churavy ", "Anton Smirnov "] [workspace] -projects = ["test", "docs", "perf"] +projects = ["test", "docs", "perf", "ROCm_Runtime", "ROCm_Runtime_Discovery"] [deps] AMDGPU_LLVM_Backend_jll = "cc5c0156-bd05-5a77-8a68-bb0aafb29019" @@ -28,6 +28,8 @@ Preferences = "21216c6a-2e73-6563-6e65-726566657250" PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" ROCmDeviceLibs_jll = "873c0968-716b-5aa7-bb8d-d1e2e2aeff2d" +ROCm_Runtime = "3129f4d2-de71-4ff3-9833-76037e3ea355" +ROCm_Runtime_Discovery = "0bf8d700-1fac-4a41-93ae-0195dedb3a15" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Random123 = "74087812-796a-5b5d-8853-05524746bad3" RandomNumbers = "e6cf234a-135c-5ec9-84dd-332b85af5143" @@ -36,6 +38,10 @@ StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" UnsafeAtomics = "013be700-e6cd-48c3-b4a1-df204f14c38f" +[sources] +ROCm_Runtime = {path = "ROCm_Runtime"} +ROCm_Runtime_Discovery = {path = "ROCm_Runtime_Discovery"} + [weakdeps] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" @@ -68,6 +74,8 @@ PrecompileTools = "1" Preferences = "1" PrettyTables = "3" ROCmDeviceLibs_jll = "=5.6.1, =6.2.1, =7.0.2" +ROCm_Runtime = "7.14" +ROCm_Runtime_Discovery = "0.1" Random123 = "1.6" RandomNumbers = "1.5" SparseMatricesCSR = "0.6.9" diff --git a/ROCm_Runtime/.pkg/platform_augmentation.jl b/ROCm_Runtime/.pkg/platform_augmentation.jl new file mode 100644 index 000000000..b2a6f765e --- /dev/null +++ b/ROCm_Runtime/.pkg/platform_augmentation.jl @@ -0,0 +1,252 @@ +const ROCm_Runtime_uuid = Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355") +const rocm_toolkits = VersionNumber[v"7.14.0"] +# Platform augmentation for ROCm_Runtime. +# +# Artifacts are selected based on two platform tags: +# - "rocm_arch": the GPU architecture family of the bundle (e.g. "gfx110x_all"), +# matched against the devices detected on the host; +# - "rocm": the major.minor version of the ROCm distribution the libraries were +# taken from, selectable through the "version" preference. + +using Base.BinaryPlatforms +using Base: thismajor, thisminor +using Libdl + +const preferences = Base.get_preferences(ROCm_Runtime_uuid) +foreach(pref -> Base.record_compiletime_preference(ROCm_Runtime_uuid, pref), + ("version", "local", "arch")) + +function load_preference(name, expected, parse) + haskey(preferences, name) || return missing + parsed = parse(preferences[name]) + parsed === nothing || return parsed + @error "ROCm $name preference is not valid; expected $expected, but got '$(preferences[name])'" + return missing +end +const local_preference = load_preference("local", "a boolean", + v -> v isa Bool ? v : v isa String ? tryparse(Bool, v) : nothing) +const version_preference = load_preference("version", "a version number", + v -> v isa String ? tryparse(VersionNumber, v) : nothing) +const arch_preference = load_preference("arch", "a string (e.g. 'gfx1100')", + v -> v isa String ? v : nothing) + + +## device detection + +function rocm_arch_string(target::Integer) + patch = string(target % 100, base = 16) + return "gfx$(div(target, 10000))$(div(target, 100) % 100)$(patch)" +end + +# marketing-name substrings => gfx architecture family, for hosts where we cannot +# query the driver for the real architecture (i.e. Windows) +const device_name_archs = [ + # STX Halo iGPUs: Radeon 8050S / 8060S Graphics + ["8050s", "8060s", "device 1586"] => "gfx1151", + # STX Point iGPUs: Radeon 880M / 890M Graphics + ["880m", "890m"] => "gfx1150", + # RDNA4: Radeon AI PRO R9700, RX 9070 XT/GRE, RX 9070, RX 9060 XT + ["r9700", "9060", "9070"] => "gfx120X", + # RDNA3: Radeon PRO V710/W7900/W7800/W7700, RX 7900 XTX/XT/GRE, RX 7800 XT, RX 7700 XT + ["7700", "7800", "7900", "v710"] => "gfx110X", + # RDNA2: RX 6800 XT/6800, RX 6700 XT/6700, RX 6600 XT/6600, RX 6500 XT/6500 + ["6800", "6700", "6600", "6500"] => "gfx103X", +] + +function rocm_arch_from_device_name(device_name::AbstractString) + name = lowercase(device_name) + occursin("radeon", name) || occursin("amd", name) || return "" + for (substrings, arch) in device_name_archs + any(s -> occursin(s, name), substrings) && return arch + end + return "" +end + +function rocm_arch_linux() + topology_root = "/sys/class/kfd/kfd/topology/nodes/" + isdir(topology_root) || return String[] + + arch = String[] + for dir in readdir(topology_root; join = true) + props = joinpath(dir, "properties") + isfile(props) || continue + + for s in eachline(props) + m = match(r"^gfx_target_version (\d+)$", s) + m === nothing && continue + + target = parse(Int, m[1]) + target == 0 && continue + + push!(arch, rocm_arch_string(target)) + end + end + return arch +end + +# XXX: Windows is vibe-coded and only tested at a surface level on wine +# Testers wanted! +function windows_video_device_names() + # DISPLAY_DEVICEW layout: DWORD cb; WCHAR DeviceName[32]; WCHAR DeviceString[128]; + # DWORD StateFlags; WCHAR DeviceID[128]; WCHAR DeviceKey[128] + sz = 4 + 2*32 + 2*128 + 4 + 2*128 + 2*128 + dd = Vector{UInt8}(undef, sz) + names = String[] + dev = 0 + while true + fill!(dd, 0) + dd[1:4] .= reinterpret(UInt8, UInt32[sz]) # cb = sizeof(DISPLAY_DEVICEW) + ok = ccall((:EnumDisplayDevicesW, "user32"), stdcall, Cint, + (Ptr{Cvoid}, Culong, Ptr{UInt8}, Culong), C_NULL, dev, dd, 0) + ok == 0 && break + state_flags = reinterpret(UInt32, dd[325:328])[1] + if state_flags & 0x00000008 == 0 # skip DISPLAY_DEVICE_MIRRORING_DRIVER pseudo-devices + device_string = reinterpret(UInt16, dd[69:324]) + len = something(findfirst(iszero, device_string), length(device_string) + 1) - 1 + push!(names, transcode(String, device_string[1:len])) + end + dev += 1 + end + return names +end + +function rocm_arch() + arch_preference !== missing && return split(arch_preference, ',') + + arch = if Sys.islinux() + rocm_arch_linux() + elseif Sys.iswindows() + map(rocm_arch_from_device_name, windows_video_device_names()) + else + String[] + end + filter!(!isempty, arch) + unique!(arch) + sort!(arch; rev = true) + return arch +end + + +## "rocm_arch" tag comparison + +function rocm_arch_comparison_strategy(a::String, b::String, a_requested::Bool, b_requested::Bool) + a == "none" && return false + b == "none" && return false + + a_arches = split(a, ',') + b_arches = split(b, ',') + for a_arch in a_arches + for b_arch in b_arches + rocm_arch_matches(a_arch, b_arch) && return true + rocm_arch_matches(b_arch, a_arch) && return true + end + end + return false +end + +function rocm_arch_core(arch::AbstractString) + return match(r"gfx(.*)", first(split(arch, r"[_-]", limit = 2)))[1] +end + +function rocm_arch_matches(pattern::AbstractString, arch::AbstractString) + pattern = rocm_arch_core(pattern) + arch = rocm_arch_core(arch) + + length(pattern) == length(arch) || return false + for (pattern_char, arch_char) in zip(pattern, arch) + if lowercase(pattern_char) == 'x' + isxdigit(arch_char) || lowercase(arch_char) == 'x' || return false + elseif pattern_char != arch_char + return false + end + end + return true +end + + +## "rocm" version tag + +# get the version of a local ROCm installation by querying the HIP runtime, if present +function get_hip_runtime_version() + libhip = Libdl.find_library(Sys.iswindows() ? ["amdhip64_7", "amdhip64_6", "amdhip64"] : + ["libamdhip64.so.7", "libamdhip64.so.6", "libamdhip64.so"]) + if libhip == "" + @debug "No system HIP runtime library found" + return nothing + end + @debug "Found HIP runtime library at '$libhip'" + + handle = Libdl.dlopen(libhip; throw_error=false) + handle === nothing && return nothing + hipRuntimeGetVersion = Libdl.dlsym(handle, "hipRuntimeGetVersion"; throw_error=false) + hipRuntimeGetVersion === nothing && return nothing + + version_ref = Ref{Cint}() + status = ccall(hipRuntimeGetVersion, Cint, (Ptr{Cint},), version_ref) + if status != 0 + @debug "Call to 'hipRuntimeGetVersion' failed with status $status" + return nothing + end + v = version_ref[] + major = v ÷ 10_000_000 + minor = (v ÷ 100_000) % 100 + patch = v % 100_000 + return VersionNumber(major, minor, patch) +end + +# returns the value for the "rocm" tag we should use in the platform ("$MAJOR.$MINOR"), +# or nothing if no compatible ROCm distribution is available. +function rocm_version_tag() + override = version_preference + + if local_preference === true + # the artifact selection below never matches when using a local ROCm + # (see `rocm_comparison_strategy`), so the tag value doesn't matter much, + # but try to still reflect the local version + if override === missing + version = get_hip_runtime_version() + version === nothing && return nothing + override = version + end + return "$(override.major).$(override.minor)" + end + + compatible_toolkits = override === missing ? rocm_toolkits : + filter(toolkit -> thisminor(toolkit) == thisminor(override), rocm_toolkits) + if isempty(compatible_toolkits) + @error "Requested ROCm version $override does not match any supported ROCm distribution ($(join(rocm_toolkits, ", ", " or ")))" + return nothing + end + + rocm_toolkit = thisminor(last(compatible_toolkits)) + @debug "Selected ROCm distribution: $rocm_toolkit" + return "$(rocm_toolkit.major).$(rocm_toolkit.minor)" +end + +function rocm_comparison_strategy(a::String, b::String, a_requested::Bool, b_requested::Bool) + # bail out from downloading artifacts if the user requested a local ROCm installation + local_preference === true && return false + + # the tag is known to exactly match one of the available distributions + return a == b +end + + +## entry point + +function augment_platform!(platform::Platform) + if !haskey(platform, "rocm_arch") + arch = rocm_arch() + platform["rocm_arch"] = isempty(arch) ? "none" : join(arch, ',') + end + BinaryPlatforms.set_compare_strategy!(platform, "rocm_arch", rocm_arch_comparison_strategy) + + if !haskey(platform, "rocm") + # XXX: use "none" when we couldn't select a distribution. + # we can't just leave off the platform tag or Pkg would select *any* artifact. + platform["rocm"] = something(rocm_version_tag(), "none") + end + BinaryPlatforms.set_compare_strategy!(platform, "rocm", rocm_comparison_strategy) + + return platform +end diff --git a/ROCm_Runtime/.pkg/select_artifacts.jl b/ROCm_Runtime/.pkg/select_artifacts.jl new file mode 100644 index 000000000..293cf9987 --- /dev/null +++ b/ROCm_Runtime/.pkg/select_artifacts.jl @@ -0,0 +1,134 @@ +push!(Base.LOAD_PATH, dirname(@__DIR__)) + +using TOML, Artifacts, Base.BinaryPlatforms +include("./platform_augmentation.jl") +artifacts_toml = joinpath(dirname(@__DIR__), "Artifacts.toml") + +# Update Base.parse to support riscv64, needed for Julia <1.12 +@static if !haskey(BinaryPlatforms.arch_mapping, "riscv64") + + BinaryPlatforms.arch_mapping["riscv64"] = "(rv64|riscv64)" + + function bbparse(::Type{Platform}, triplet::AbstractString; validate_strict::Bool = false) + arch_mapping = BinaryPlatforms.arch_mapping + os_mapping = BinaryPlatforms.os_mapping + libc_mapping = BinaryPlatforms.libc_mapping + call_abi_mapping = BinaryPlatforms.call_abi_mapping + libgfortran_version_mapping = BinaryPlatforms.libgfortran_version_mapping + cxxstring_abi_mapping = BinaryPlatforms.cxxstring_abi_mapping + libstdcxx_version_mapping = BinaryPlatforms.libstdcxx_version_mapping + + # Helper function to collapse dictionary of mappings down into a regex of + # named capture groups joined by "|" operators + c(mapping) = string("(",join(["(?<$k>$v)" for (k, v) in mapping], "|"), ")") + + # We're going to build a mondo regex here to parse everything: + triplet_regex = Regex(string( + "^", + # First, the core triplet; arch/os/libc/call_abi + c(arch_mapping), + c(os_mapping), + c(libc_mapping), + c(call_abi_mapping), + # Next, optional things, like libgfortran/libstdcxx/cxxstring abi + c(libgfortran_version_mapping), + c(cxxstring_abi_mapping), + c(libstdcxx_version_mapping), + # Finally, the catch-all for extended tags + "(?(?:-[^-]+\\+[^-]+)*)?", + "\$", + )) + + m = match(triplet_regex, triplet) + if m !== nothing + # Helper function to find the single named field within the giant regex + # that is not `nothing` for each mapping we give it. + get_field(m, mapping) = begin + for k in keys(mapping) + if m[k] !== nothing + # Convert our sentinel `nothing` values to actual `nothing` + if endswith(k, "_nothing") + return nothing + end + # Convert libgfortran/libstdcxx version numbers + if startswith(k, "libgfortran") + return VersionNumber(parse(Int,k[12:end])) + elseif startswith(k, "libstdcxx") + return VersionNumber(3, 4, parse(Int,m[k][11:end])) + else + return k + end + end + end + end + + # Extract the information we're interested in: + arch = get_field(m, arch_mapping) + os = get_field(m, os_mapping) + libc = get_field(m, libc_mapping) + call_abi = get_field(m, call_abi_mapping) + libgfortran_version = get_field(m, libgfortran_version_mapping) + libstdcxx_version = get_field(m, libstdcxx_version_mapping) + cxxstring_abi = get_field(m, cxxstring_abi_mapping) + function split_tags(tagstr) + tag_fields = filter(!isempty, split(tagstr, "-")) + if isempty(tag_fields) + return Pair{String,String}[] + end + return map(v -> Symbol(v[1]) => v[2], split.(tag_fields, "+")) + end + tags = split_tags(m["tags"]) + + # Special parsing of os version number, if any exists + function extract_os_version(os_name, pattern) + m_osvn = match(pattern, m[os_name]) + if m_osvn !== nothing + return VersionNumber(m_osvn.captures[1]) + end + return nothing + end + os_version = nothing + if os == "macos" + os_version = extract_os_version("macos", r".*darwin([\d.]+)"sa) + end + if os == "freebsd" + os_version = extract_os_version("freebsd", r".*freebsd([\d.]+)"sa) + end + if os == "openbsd" + os_version = extract_os_version("openbsd", r".*openbsd([\d.]+)"sa) + end + + return Platform( + arch, os; + validate_strict, + libc, + call_abi, + libgfortran_version, + cxxstring_abi, + libstdcxx_version, + os_version, + tags..., + ) + end + throw(ArgumentError("Platform `$(triplet)` is not an officially supported platform")) + end + +else + # riscv64 is supported, all is fine + + const bbparse = parse + +end + + +# Get "target triplet" from ARGS, if given (defaulting to the host triplet otherwise) +target_triplet = get(ARGS, 1, Base.BinaryPlatforms.host_triplet()) + +# Augment this platform object with any special tags we require +platform = augment_platform!(HostPlatform(bbparse(Platform, target_triplet))) + +# Select all downloadable artifacts that match that platform +artifacts = select_downloadable_artifacts(artifacts_toml; platform, include_lazy=true) + +# Output the result to `stdout` as a TOML dictionary +TOML.print(stdout, artifacts) diff --git a/ROCm_Runtime/Artifacts.toml b/ROCm_Runtime/Artifacts.toml new file mode 100644 index 000000000..f5a4f0787 --- /dev/null +++ b/ROCm_Runtime/Artifacts.toml @@ -0,0 +1,232 @@ +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "2ad0783e0d8f96e15cc91c08a5fd1afc81012044" +lazy = true +libc = "glibc" +os = "linux" +rocm = "7.14" +rocm_arch = "gfx908" + + [[ROCm_Runtime.download]] + sha256 = "1686270efa2e523889168ec6a4343f2e53f173d6026fdb9c6b308d99f99d99fa" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx908-7.14.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "6cd48e7425c8a2d0786a76910ec5cd995ce339df" +lazy = true +libc = "glibc" +os = "linux" +rocm = "7.14" +rocm_arch = "gfx90a" + + [[ROCm_Runtime.download]] + sha256 = "b1caebb79f542951114ef6478ea587a691d005cc13c2efadfec577bd82b6fc78" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx90a-7.14.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "cffed7643bd98c8c2be8aca8f2af2740919baa4c" +lazy = true +libc = "glibc" +os = "linux" +rocm = "7.14" +rocm_arch = "gfx94x_dcgpu" + + [[ROCm_Runtime.download]] + sha256 = "32e16dca7f8440a08a8d636a6a7db0034c61518f32ea915347b98d9f55199b0c" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx94X-dcgpu-7.14.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "4c83a0714d0377bc3410162422c615e3db0312cd" +lazy = true +libc = "glibc" +os = "linux" +rocm = "7.14" +rocm_arch = "gfx950_dcgpu" + + [[ROCm_Runtime.download]] + sha256 = "12afeccd06e6caf0699d86d688f16083aafa35474d0ec1d8063477fb5c119d49" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx950-dcgpu-7.14.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "80f47907c7eee68d84c4e0ab59e7ff2c49a2e414" +lazy = true +libc = "glibc" +os = "linux" +rocm = "7.14" +rocm_arch = "gfx101x_dgpu" + + [[ROCm_Runtime.download]] + sha256 = "fdb302ee45e9e3a6dcb6bab295fdf2e6a4c0f8b2c7a4937698b18178715822d9" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx101X-dgpu-7.14.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "819e3da69d2a73dad9b468a95bd0da508d34d9b8" +lazy = true +os = "windows" +rocm = "7.14" +rocm_arch = "gfx101x_dgpu" + + [[ROCm_Runtime.download]] + sha256 = "58b33f43d67dae68087cff37494c13267a7613eda6202e1ee904097643e5958d" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-windows-gfx101X-dgpu-7.14.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "41050555b43ef6fdfd8c0984835c37aa659595b2" +lazy = true +libc = "glibc" +os = "linux" +rocm = "7.14" +rocm_arch = "gfx103x_all" + + [[ROCm_Runtime.download]] + sha256 = "ce9a5be2b43ee1bdd85de3fa9ea3c3d5dcb6875445acf7281c3763a4ee783f19" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx103X-all-7.14.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "2174846a8ed3e2bd9818b1123a3c538710397211" +lazy = true +os = "windows" +rocm = "7.14" +rocm_arch = "gfx103x_all" + + [[ROCm_Runtime.download]] + sha256 = "93f5244854cd1bec2ea29bb977e448a2b79c7ee77609d253ab075ea24404462c" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-windows-gfx103X-all-7.14.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "630f182a18238591accf77eac78b012c54edc991" +lazy = true +libc = "glibc" +os = "linux" +rocm = "7.14" +rocm_arch = "gfx110x_all" + + [[ROCm_Runtime.download]] + sha256 = "e78a4445c52d879fbd0765f24e7fa9df1e262a8baf681b118a13e75340120127" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx110X-all-7.14.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "85b35df9b9350fc7b3e4250cacc092956e1b353a" +lazy = true +os = "windows" +rocm = "7.14" +rocm_arch = "gfx110x_all" + + [[ROCm_Runtime.download]] + sha256 = "3ce5d7fcd56f7b169ba9f95916553b7cd6bb0370d98b1c0ce572eb34874630d6" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-windows-gfx110X-all-7.14.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "a937f9dec93d4725a6a8e63d25a451462f3a6dd2" +lazy = true +libc = "glibc" +os = "linux" +rocm = "7.14" +rocm_arch = "gfx1150" + + [[ROCm_Runtime.download]] + sha256 = "d73f8e29a21d031051466dad88d5dba273582819521f5930d9f100a7e7dd0905" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx1150-7.14.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "3c9251ddc93dd54a384da0c4ffceb741492ddd28" +lazy = true +os = "windows" +rocm = "7.14" +rocm_arch = "gfx1150" + + [[ROCm_Runtime.download]] + sha256 = "5f990ab9a3ca55b39fe771c92877fc950ba7a1702004d27395b2b7bf8a7ec56d" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-windows-gfx1150-7.14.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "3b92bdbcfb9b33ab013fc7f6b4380f9e5ea426e0" +lazy = true +libc = "glibc" +os = "linux" +rocm = "7.14" +rocm_arch = "gfx1151" + + [[ROCm_Runtime.download]] + sha256 = "2567d5e34e470db104a62a02c36aa770cb0430175e48c1c46df0eefc05e1d77c" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx1151-7.14.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "f018d64189fe218dc83838acfc6e8d3cabc28064" +lazy = true +os = "windows" +rocm = "7.14" +rocm_arch = "gfx1151" + + [[ROCm_Runtime.download]] + sha256 = "6d962c8868388e3d81a504c3b58caada49d40fd7a67b52da73319159f1479fe7" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-windows-gfx1151-7.14.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "b14bbbec7bad73b6219f00e586939eebc85ea1a6" +lazy = true +libc = "glibc" +os = "linux" +rocm = "7.14" +rocm_arch = "gfx1152" + + [[ROCm_Runtime.download]] + sha256 = "390c87f4bcacf026578fbfb36267a23912524f023f77f7f9322ecaaf61d88b60" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx1152-7.14.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "9508c468d0a36f831a7abba11a839eced5dbd2fd" +lazy = true +os = "windows" +rocm = "7.14" +rocm_arch = "gfx1152" + + [[ROCm_Runtime.download]] + sha256 = "2966c84fcb14865e5700603d68267cf037b18cf65b862e642553f3a882ab4bee" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-windows-gfx1152-7.14.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "f1a466b893b71f2f3498d6f1455cd802912edb4f" +lazy = true +libc = "glibc" +os = "linux" +rocm = "7.14" +rocm_arch = "gfx1153" + + [[ROCm_Runtime.download]] + sha256 = "56dc233ace740364dca06ca12c22749a85e5f5f54ae3812ca24426d3c5eb787d" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx1153-7.14.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "9a18bc0d8e4d1b78d5deeab1e0ad131d7185ec72" +lazy = true +os = "windows" +rocm = "7.14" +rocm_arch = "gfx1153" + + [[ROCm_Runtime.download]] + sha256 = "465070a1004cbd6c6762f5e43ba96a5ce8c1a83a7c0fa6c4aad2d8563d82fc28" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-windows-gfx1153-7.14.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "d9c9fb1280e4e369cdde165ce7cad1784644cfef" +lazy = true +libc = "glibc" +os = "linux" +rocm = "7.14" +rocm_arch = "gfx120x_all" + + [[ROCm_Runtime.download]] + sha256 = "2a304d07b925c7e46e51fa8f719b195a9bfe2df2cc920d706f10a29d2d2471af" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx120X-all-7.14.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" +git-tree-sha1 = "9f1512af1b1bcbbd41cc144ed59ef01c318a5f6d" +lazy = true +os = "windows" +rocm = "7.14" +rocm_arch = "gfx120x_all" + + [[ROCm_Runtime.download]] + sha256 = "87091e92ff9fcc0a590193b9d42bd48cf8e9ce9df258efeb52de7d3c3e44d395" + url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-windows-gfx120X-all-7.14.0.tar.gz" diff --git a/ROCm_Runtime/Project.toml b/ROCm_Runtime/Project.toml new file mode 100644 index 000000000..f19763516 --- /dev/null +++ b/ROCm_Runtime/Project.toml @@ -0,0 +1,15 @@ +name = "ROCm_Runtime" +uuid = "3129f4d2-de71-4ff3-9833-76037e3ea355" +authors = ["Julian P Samaroo ", "Valentin Churavy ", "Anton Smirnov "] +version = "7.14.0" + +[deps] +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3" +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[compat] +Artifacts = "1" +LazyArtifacts = "1" +Libdl = "1" +julia = "1.10" diff --git a/ROCm_Runtime/src/ROCm_Runtime.jl b/ROCm_Runtime/src/ROCm_Runtime.jl new file mode 100644 index 000000000..d58b7d3fa --- /dev/null +++ b/ROCm_Runtime/src/ROCm_Runtime.jl @@ -0,0 +1,89 @@ +module ROCm_Runtime + +# Provides the ROCm runtime (HIP, HSA) and the vendor libraries by shipping +# AMD's TheRock distribution tarballs as lazy artifacts, selected by GPU +# architecture and ROCm version through platform augmentation (see `.pkg/`). +# The artifact is a complete ROCm root, laid out like a regular installation. +# +# Setting the "local" preference of this package switches AMDGPU.jl to a local +# ROCm installation instead (see `AMDGPU.set_rocm_version!`); no artifact is +# downloaded or resolved in that case. + +using Artifacts, LazyArtifacts, Libdl + +# preferences handling and platform selection, shared with Pkg's artifact +# selection hook (`.pkg/select_artifacts.jl`) +include(joinpath(@__DIR__, "..", ".pkg", "platform_augmentation.jl")) + +export libamdhip64, libhsa_runtime64, libhiprtc, libamd_comgr +export libMIOpen, libhipblaslt, libhiptensor, librocblas, librocfft, librocrand, librocsolver, librocsparse + +global artifact_dir::String = "" +global libamdhip64::String = "" +global libhsa_runtime64::String = "" +global libhiprtc::String = "" +global libamd_comgr::String = "" +global librocblas::String = "" +global librocsparse::String = "" +global librocsolver::String = "" +global librocrand::String = "" +global librocfft::String = "" +global libhipblaslt::String = "" +global libhiptensor::String = "" +global libMIOpen::String = "" + +is_available() = !isempty(artifact_dir) + +# Resolve the artifact for this host, or "" if no bundle matches (e.g. no +# supported GPU detected, or a local ROCm was requested). +function find_artifact_dir()::String + local_preference === true && return "" + dir = try + @artifact_str("ROCm_Runtime", augment_platform!(HostPlatform())) + catch err + @debug "Could not resolve the ROCm_Runtime artifact" exception=(err, catch_backtrace()) + return "" + end + # Windows bundles wrap everything in a top-level directory, Linux ones don't. + entries = readdir(dir) + if length(entries) == 1 && startswith(only(entries), "therock-dist-") + dir = joinpath(dir, only(entries)) + end + return dir +end + +# Locate a library in the artifact's library directory, matching both +# unversioned (`libfoo.so`) and versioned (`libfoo.so.N`) names. +function get_library(name::String)::String + libdir = joinpath(artifact_dir, Sys.iswindows() ? "bin" : "lib") + isdir(libdir) || return "" + for file in readdir(libdir) + if startswith(file, name) && occursin("." * Libdl.dlext, file) + return joinpath(libdir, file) + end + end + return "" +end + +function __init__() + global artifact_dir = find_artifact_dir() + is_available() || return + + lib_prefix = Sys.islinux() ? "lib" : "" + + global libamdhip64 = get_library(Sys.islinux() ? "libamdhip64" : "amdhip64") + global libhsa_runtime64 = Sys.islinux() ? get_library("libhsa-runtime64") : "" + global libhiprtc = get_library(lib_prefix * "hiprtc") + global libamd_comgr = get_library(lib_prefix * "amd_comgr") + + global librocblas = get_library(lib_prefix * "rocblas") + global librocsparse = get_library(lib_prefix * "rocsparse") + global librocsolver = get_library(lib_prefix * "rocsolver") + global librocrand = get_library(lib_prefix * "rocrand") + global librocfft = get_library(lib_prefix * "rocfft") + global libhipblaslt = get_library(lib_prefix * "hipblaslt") + global libhiptensor = get_library(lib_prefix * "hiptensor") + global libMIOpen = get_library(lib_prefix * "MIOpen") +end + +end diff --git a/ROCm_Runtime_Discovery/Project.toml b/ROCm_Runtime_Discovery/Project.toml new file mode 100644 index 000000000..51e46ffa2 --- /dev/null +++ b/ROCm_Runtime_Discovery/Project.toml @@ -0,0 +1,11 @@ +name = "ROCm_Runtime_Discovery" +uuid = "0bf8d700-1fac-4a41-93ae-0195dedb3a15" +authors = ["Julian P Samaroo ", "Valentin Churavy ", "Anton Smirnov "] +version = "0.1.0" + +[deps] +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[compat] +Libdl = "1" +julia = "1.10" diff --git a/ROCm_Runtime_Discovery/src/ROCm_Runtime_Discovery.jl b/ROCm_Runtime_Discovery/src/ROCm_Runtime_Discovery.jl new file mode 100644 index 000000000..bb6362b2f --- /dev/null +++ b/ROCm_Runtime_Discovery/src/ROCm_Runtime_Discovery.jl @@ -0,0 +1,77 @@ +module ROCm_Runtime_Discovery + +# Discovery of a local ROCm installation, as an alternative to the artifacts +# shipped by the ROCm_Runtime subpackage. +# +# This package replicates the API of ROCm_Runtime (the HIP/HSA runtime and +# the vendor libraries) for a local ROCm installation. It is only loaded when +# the user opts into that through the "local" preference of ROCm_Runtime; +# by default the artifacts are used instead. `ld.lld` is not discovered here: +# it is always provided by AMDGPU_LLVM_Backend_jll. + +using Libdl + +# same names as ROCm_Runtime ... +export libamdhip64, libhsa_runtime64 +export libMIOpen, libhipblaslt, libhiptensor, librocblas, librocfft, librocrand, librocsolver, librocsparse +# ... plus the local device bitcode libraries (unused for now: they first need +# to be downgraded to Julia's LLVM version, so the JLL ones are always used) +export libdevice_libs + +include("utils.jl") + +global rel_libdir::String = Sys.islinux() ? "" : "bin" + +global libhsa_runtime64::String = "" +global libamdhip64::String = "" +global libdevice_libs::String = "" +global librocblas::String = "" +global librocsparse::String = "" +global librocsolver::String = "" +global librocrand::String = "" +global librocfft::String = "" +global libhipblaslt::String = "" +global libhiptensor::String = "" +global libMIOpen::String = "" + +const available = Ref{Bool}(false) +is_available() = available[] + +function __init__() + rocm_path = find_roc_path() + lib_prefix = Sys.islinux() ? "lib" : "" + + try + global libhsa_runtime64 = Sys.islinux() ? + find_rocm_library("libhsa-runtime64"; rocm_path, ext="so.1") : + "" + + # HIP runtime. + global libamdhip64 = find_rocm_library(Sys.islinux() ? "libamdhip64" : "amdhip64"; rocm_path) + + # Device bitcode libraries. NOTE: AMDGPU.jl does not use these yet: + # they target a newer LLVM than Julia's and first need to be downgraded, + # so the JLL-provided device libraries are always used instead. + global libdevice_libs = find_device_libs(rocm_path) + + # HIP-based libraries. + global librocblas = find_rocm_library(lib_prefix * "rocblas"; rocm_path) + global librocsparse = find_rocm_library(lib_prefix * "rocsparse"; rocm_path) + global librocsolver = find_rocm_library(lib_prefix * "rocsolver"; rocm_path) + global librocrand = find_rocm_library(lib_prefix * "rocrand"; rocm_path) + global librocfft = find_rocm_library(lib_prefix * "rocfft"; rocm_path) + global libhipblaslt = find_rocm_library(lib_prefix * "hipblaslt"; rocm_path) + global libhiptensor = find_rocm_library(lib_prefix * "hiptensor"; rocm_path) + global libMIOpen = find_rocm_library(lib_prefix * "MIOpen"; rocm_path) + + available[] = !isempty(libamdhip64) + catch err + @error """ROCm discovery failed! + Discovered ROCm path: $rocm_path. + Use `ROCM_PATH` env variable to specify ROCm directory. + + """ exception=(err, catch_backtrace()) + end +end + +end diff --git a/src/discovery/utils.jl b/ROCm_Runtime_Discovery/src/utils.jl similarity index 85% rename from src/discovery/utils.jl rename to ROCm_Runtime_Discovery/src/utils.jl index 725363747..7e50e2da4 100644 --- a/src/discovery/utils.jl +++ b/ROCm_Runtime_Discovery/src/utils.jl @@ -172,31 +172,3 @@ function find_rocm_library(lib::String; rocm_path::String, ext::String = dlext): return "" end -function find_ld_lld(rocm_path::String)::String - lld_name = "ld.lld" * (Sys.iswindows() ? ".exe" : "") - - dirs = (joinpath(rocm_path,"llvm", "bin"), joinpath(rocm_path,"bin")) - hipconfig = Sys.which("hipconfig") - if !isnothing(hipconfig) - clang_path = read(`$hipconfig --hipclangpath`, String) - dirs = (dirs ..., clang_path) - end - for dir in dirs - exp_ld_path = joinpath(dir, lld_name) - ispath(exp_ld_path) || continue - try - tmpfile = tempname(;cleanup=false) - run(pipeline(`$exp_ld_path -v`; stdout=tmpfile)) - vstr = read(tmpfile, String) - rm(tmpfile) - # Match first version number in the output, e.g. "AMD LLD 15.0.0 ..." or "Ubuntu LLD 21.0.0 ..." - m = match(r"(\d+\.\d+(?:\.\d+)?)", vstr) - if m !== nothing && VersionNumber(m.captures[1]) >= v"6.0.0" - return exp_ld_path - end - catch - @warn "bindeps: Failed running ld.lld in $exp_ld_path" - end - end - return "" -end diff --git a/docs/src/api/system.md b/docs/src/api/system.md index fd8474850..a99051815 100644 --- a/docs/src/api/system.md +++ b/docs/src/api/system.md @@ -10,12 +10,23 @@ AMDGPU.functional AMDGPU.has_rocm_gpu ``` +## Choosing the ROCm provider + +By default the ROCm runtime and libraries come from downloaded artifacts; see +[Installation Info](@ref) for how to switch to a local ROCm installation. + +```@docs +AMDGPU.set_rocm_version! +AMDGPU.reset_rocm_version! +``` + ## Configuration preferences Several behaviours are configured through [Preferences.jl](https://github.com/JuliaPackaging/Preferences.jl) and persist across sessions (they are written to your project's `LocalPreferences.toml`): | Preference | Set via | Effect | |:--|:--|:--| +| `version` / `local` | `AMDGPU.set_rocm_version!` | Select the ROCm version, and whether to use downloaded artifacts or a local ROCm installation. | | `nonblocking_synchronize` | preference | Use non-blocking stream synchronization (default `true`); disable for slightly lower latency. See [Streams](@ref). | | `eager_gc` | `AMDGPU.eager_gc!(::Bool)` | Trigger GC before allocations under memory pressure. See [Memory Allocation and Intrinsics](@ref). | | `hard_memory_limit` | `AMDGPU.hard_memory_limit!("8 GiB")` | Hard cap on GPU memory, checked before every allocation. | diff --git a/docs/src/install_tips.md b/docs/src/install_tips.md index 838a13b3b..d03c955ba 100644 --- a/docs/src/install_tips.md +++ b/docs/src/install_tips.md @@ -1,6 +1,26 @@ # Installation Info -## ROCm system libraries +## ROCm libraries + +By default, AMDGPU.jl ships the ROCm runtime (HIP and HSA) and the vendor +libraries (rocBLAS, rocSPARSE, rocSOLVER, rocRAND, rocFFT, hipTENSOR, MIOpen) as lazy +artifacts through the `ROCm_Runtime` subpackage, which downloads AMD's TheRock +distribution tarball matching the GPUs detected on the host. `ld.lld` and the +device bitcode libraries always come from `AMDGPU_LLVM_Backend_jll` and +`ROCmDeviceLibs_jll`. No system-wide ROCm installation is needed in this mode. + +To use a local ROCm installation instead, set the `local` preference in the +active project and restart Julia: + +```julia +AMDGPU.set_rocm_version!(local_rocm=true) +``` + +The library locations are then discovered through the `ROCm_Runtime_Discovery` +package, as described below. Use `AMDGPU.reset_rocm_version!()` to go back to +the default artifact-based setup. + +## Local ROCm discovery On Linux, AMDGPU.jl queries the location of ROCm libraries through `rocminfo` by default. If not successful or on Windows, the following standard directories are searched: diff --git a/src/AMDGPU.jl b/src/AMDGPU.jl index d0bcf1550..23f2f4d08 100644 --- a/src/AMDGPU.jl +++ b/src/AMDGPU.jl @@ -56,8 +56,7 @@ end LockedObject(payload) = LockedObject(ReentrantLock(), payload) # Load binary dependencies. -include("discovery/discovery.jl") -using .ROCmDiscovery +include("libs.jl") include("utils.jl") @@ -154,6 +153,21 @@ function __init__() # Used to shutdown hostcalls if any is running. atexit(() -> begin Runtime.RT_EXITING[] = true end) + if Sys.islinux() && isdir("/sys/class/kfd/kfd/topology/nodes/") + for node_id in readdir("/sys/class/kfd/kfd/topology/nodes/") + node_name = readchomp(joinpath("/sys/class/kfd/kfd/topology/nodes/", node_id, "name")) + # CPU nodes don't have names. + isempty(node_name) && continue + + if node_name == "navy_flounder" + ENV["HSA_OVERRIDE_GFX_VERSION"] = "10.3.0" + break + end + end + end + + __init_libs__() + if haskey(ENV, "HIP_LAUNCH_BLOCKING") launch_blocking = parse(Bool, ENV["HIP_LAUNCH_BLOCKING"]) LAUNCH_BLOCKING[] = launch_blocking diff --git a/src/compiler/codegen.jl b/src/compiler/codegen.jl index 7f7d733d1..6139b001c 100644 --- a/src/compiler/codegen.jl +++ b/src/compiler/codegen.jl @@ -276,16 +276,8 @@ function compile_or_lookup(@nospecialize(job::CompilerJob))::HIPResults end function create_executable(obj) - # ROCm discovery does not run while generating package output. - use_precompile_lld = isempty(AMDGPU.lld_path) && - ccall(:jl_generating_output, Cint, ()) == 1 && - AMDGPU_LLVM_Backend_jll.is_available() - lld = if AMDGPU.lld_artifact || use_precompile_lld - `$(AMDGPU_LLVM_Backend_jll.lld()) -flavor gnu` - else - @assert !isempty(AMDGPU.lld_path) "ld.lld was not found; cannot link kernel" - `$(AMDGPU.lld_path)` - end + @assert AMDGPU_LLVM_Backend_jll.is_available() "ld.lld was not found; cannot link kernel" + lld = `$(AMDGPU_LLVM_Backend_jll.lld()) -flavor gnu` path_o = tempname(;cleanup=false) * ".obj" path_exe = tempname(;cleanup=false) * ".exe" diff --git a/src/discovery/discovery.jl b/src/discovery/discovery.jl deleted file mode 100644 index a708ebbbb..000000000 --- a/src/discovery/discovery.jl +++ /dev/null @@ -1,112 +0,0 @@ -module ROCmDiscovery - -export lld_artifact, lld_path, libhsaruntime, libdevice_libs, libhip -export librocblas, librocsparse, librocsolver -export librocrand, librocfft, libMIOpen_path -export libhiptensor - -using AMDGPU_LLVM_Backend_jll -using ROCmDeviceLibs_jll -using Preferences -using Libdl - -include("utils.jl") - -function get_artifact_library(pkg::Symbol, libname::Symbol)::String - succ, res = safe_exec("import $pkg; println($pkg.$libname)") - (succ && ispath(res)) || return "" - return res -end - -function get_ld_lld(rocm_path::String)::Tuple{String, Bool} - lld_path = find_ld_lld(rocm_path) - isempty(lld_path) || return (lld_path, false) - AMDGPU_LLVM_Backend_jll.is_available() || return (lld_path, false) - return (AMDGPU_LLVM_Backend_jll.lld_path, true) -end - -function get_device_libs(from_artifact::Bool; rocm_path::String) - if from_artifact && ROCmDeviceLibs_jll.is_available() - ROCmDeviceLibs_jll.bitcode_path - else - find_device_libs(rocm_path) - end -end - -function _hip_runtime_version() - v_ref = Ref{Cint}() - res = ccall((:hipRuntimeGetVersion, libhip), UInt32, (Ptr{Cint},), v_ref) - res > 0 && error("Failed to get HIP runtime version.") - - v = v_ref[] - major = v ÷ 10_000_000 - minor = (v ÷ 100_000) % 100 - patch = v % 100000 - VersionNumber(major, minor, patch) -end - -global rel_libdir::String = Sys.islinux() ? "" : "bin" -global libhsaruntime::String = "" -global lld_path::String = "" -global lld_artifact::Bool = false -global libhip::String = "" -global libdevice_libs::String = "" -global librocblas::String = "" -global librocsparse::String = "" -global librocsolver::String = "" -global librocrand::String = "" -global librocfft::String = "" -global libhiptensor::String = "" -global libMIOpen_path::String = "" - -function __init__() - - if Sys.islinux() && isdir("/sys/class/kfd/kfd/topology/nodes/") - for node_id in readdir("/sys/class/kfd/kfd/topology/nodes/") - node_name = readchomp(joinpath("/sys/class/kfd/kfd/topology/nodes/", node_id, "name")) - # CPU nodes don't have names. - isempty(node_name) && continue - - if node_name == "navy_flounder" - ENV["HSA_OVERRIDE_GFX_VERSION"] = "10.3.0" - break - end - end - end - - rocm_path = find_roc_path() - lib_prefix = Sys.islinux() ? "lib" : "" - - try - global libhsaruntime = Sys.islinux() ? - find_rocm_library("libhsa-runtime64"; rocm_path, ext="so.1") : - "" - - # Linker. - lld_path, lld_artifact = get_ld_lld(rocm_path) - global lld_path = lld_path - global lld_artifact = lld_artifact - global libhip = find_rocm_library(Sys.islinux() ? "libamdhip64" : "amdhip64"; rocm_path) - - # Always load artifact device libraries. - from_artifact = true - global libdevice_libs = get_device_libs(from_artifact; rocm_path) - - # HIP-based libraries. - global librocblas = find_rocm_library(lib_prefix * "rocblas"; rocm_path) - global librocsparse = find_rocm_library(lib_prefix * "rocsparse"; rocm_path) - global librocsolver = find_rocm_library(lib_prefix * "rocsolver"; rocm_path) - global librocrand = find_rocm_library(lib_prefix * "rocrand"; rocm_path) - global librocfft = find_rocm_library(lib_prefix * "rocfft"; rocm_path) - global libhiptensor = find_rocm_library(lib_prefix * "hiptensor"; rocm_path) - global libMIOpen_path = find_rocm_library(lib_prefix * "MIOpen"; rocm_path) - catch err - @error """ROCm discovery failed! - Discovered ROCm path: $rocm_path. - Use `ROCM_PATH` env variable to specify ROCm directory. - - """ exception=(err, catch_backtrace()) - end -end - -end diff --git a/src/dnn/MIOpen.jl b/src/dnn/MIOpen.jl index 9d7b34712..fe50328e8 100644 --- a/src/dnn/MIOpen.jl +++ b/src/dnn/MIOpen.jl @@ -4,7 +4,7 @@ using CEnum using ..AMDGPU import AMDGPU: ROCArray, LockedObject, HandleCache, HIP, library_state -import AMDGPU: libMIOpen_path +import AMDGPU: libMIOpen import AMDGPU: check, @check import .HIP: hipStream_t diff --git a/src/dnn/libMIOpen.jl b/src/dnn/libMIOpen.jl index a51b9c4d4..a6e3532a7 100644 --- a/src/dnn/libMIOpen.jl +++ b/src/dnn/libMIOpen.jl @@ -539,7 +539,7 @@ end end function miopenGetErrorString(error) - @check @ccall(libMIOpen_path.miopenGetErrorString(error::miopenStatus_t)::Ptr{Cchar}) + @check @ccall(libMIOpen.miopenGetErrorString(error::miopenStatus_t)::Ptr{Cchar}) end # typedef void * ( * miopenAllocatorFunction ) ( void * context , size_t sizeBytes ) @@ -549,41 +549,41 @@ const miopenAllocatorFunction = Ptr{Cvoid} const miopenDeallocatorFunction = Ptr{Cvoid} function miopenGetVersion(major, minor, patch) - @check @ccall(libMIOpen_path.miopenGetVersion(major::Ptr{Csize_t}, minor::Ptr{Csize_t}, + @check @ccall(libMIOpen.miopenGetVersion(major::Ptr{Csize_t}, minor::Ptr{Csize_t}, patch::Ptr{Csize_t})::miopenStatus_t) end function miopenCreate(handle) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreate(handle::Ptr{miopenHandle_t})::miopenStatus_t) + @check @ccall(libMIOpen.miopenCreate(handle::Ptr{miopenHandle_t})::miopenStatus_t) end function miopenCreateWithStream(handle, stream) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateWithStream(handle::Ptr{miopenHandle_t}, + @check @ccall(libMIOpen.miopenCreateWithStream(handle::Ptr{miopenHandle_t}, stream::miopenAcceleratorQueue_t)::miopenStatus_t) end function miopenDestroy(handle) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDestroy(handle::miopenHandle_t)::miopenStatus_t) + @check @ccall(libMIOpen.miopenDestroy(handle::miopenHandle_t)::miopenStatus_t) end function miopenSetStream(handle, streamID) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetStream(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenSetStream(handle::miopenHandle_t, streamID::miopenAcceleratorQueue_t)::miopenStatus_t) end function miopenGetStream(handle, streamID) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetStream(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenGetStream(handle::miopenHandle_t, streamID::Ptr{miopenAcceleratorQueue_t})::miopenStatus_t) end function miopenSetAllocator(handle, allocator, deallocator, allocatorContext) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetAllocator(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenSetAllocator(handle::miopenHandle_t, allocator::miopenAllocatorFunction, deallocator::miopenDeallocatorFunction, allocatorContext::Ptr{Cvoid})::miopenStatus_t) @@ -591,13 +591,13 @@ end function miopenGetKernelTime(handle, time) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetKernelTime(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenGetKernelTime(handle::miopenHandle_t, time::Ptr{Cfloat})::miopenStatus_t) end function miopenEnableProfiling(handle, enable) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenEnableProfiling(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenEnableProfiling(handle::miopenHandle_t, enable::Bool)::miopenStatus_t) end @@ -809,12 +809,12 @@ end function miopenCreateTensorDescriptor(tensorDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateTensorDescriptor(tensorDesc::Ptr{miopenTensorDescriptor_t})::miopenStatus_t) + @check @ccall(libMIOpen.miopenCreateTensorDescriptor(tensorDesc::Ptr{miopenTensorDescriptor_t})::miopenStatus_t) end function miopenSet4dTensorDescriptor(tensorDesc, dataType, n, c, h, w) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSet4dTensorDescriptor(tensorDesc::miopenTensorDescriptor_t, + @check @ccall(libMIOpen.miopenSet4dTensorDescriptor(tensorDesc::miopenTensorDescriptor_t, dataType::miopenDataType_t, n::Cint, c::Cint, h::Cint, w::Cint)::miopenStatus_t) @@ -823,7 +823,7 @@ end function miopenSetNdTensorDescriptorWithLayout(tensorDesc, dataType, tensorLayout, lens, num_lens) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetNdTensorDescriptorWithLayout(tensorDesc::miopenTensorDescriptor_t, + @check @ccall(libMIOpen.miopenSetNdTensorDescriptorWithLayout(tensorDesc::miopenTensorDescriptor_t, dataType::miopenDataType_t, tensorLayout::miopenTensorLayout_t, lens::Ptr{Cint}, @@ -833,7 +833,7 @@ end function miopenSet4dTensorDescriptorEx(tensorDesc, dataType, n, c, h, w, nStride, cStride, hStride, wStride) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSet4dTensorDescriptorEx(tensorDesc::miopenTensorDescriptor_t, + @check @ccall(libMIOpen.miopenSet4dTensorDescriptorEx(tensorDesc::miopenTensorDescriptor_t, dataType::miopenDataType_t, n::Cint, c::Cint, h::Cint, w::Cint, nStride::Cint, @@ -844,7 +844,7 @@ end function miopenGet4dTensorDescriptor(tensorDesc, dataType, n, c, h, w, nStride, cStride, hStride, wStride) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGet4dTensorDescriptor(tensorDesc::miopenTensorDescriptor_t, + @check @ccall(libMIOpen.miopenGet4dTensorDescriptor(tensorDesc::miopenTensorDescriptor_t, dataType::Ptr{miopenDataType_t}, n::Ptr{Cint}, c::Ptr{Cint}, h::Ptr{Cint}, w::Ptr{Cint}, @@ -856,7 +856,7 @@ end function miopenSetTensorDescriptor(tensorDesc, dataType, nbDims, dimsA, stridesA) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetTensorDescriptor(tensorDesc::miopenTensorDescriptor_t, + @check @ccall(libMIOpen.miopenSetTensorDescriptor(tensorDesc::miopenTensorDescriptor_t, dataType::miopenDataType_t, nbDims::Cint, dimsA::Ptr{Cint}, stridesA::Ptr{Cint})::miopenStatus_t) @@ -864,13 +864,13 @@ end function miopenGetTensorDescriptorSize(tensorDesc, size) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetTensorDescriptorSize(tensorDesc::miopenTensorDescriptor_t, + @check @ccall(libMIOpen.miopenGetTensorDescriptorSize(tensorDesc::miopenTensorDescriptor_t, size::Ptr{Cint})::miopenStatus_t) end function miopenGetTensorDescriptor(tensorDesc, dataType, dimsA, stridesA) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetTensorDescriptor(tensorDesc::miopenTensorDescriptor_t, + @check @ccall(libMIOpen.miopenGetTensorDescriptor(tensorDesc::miopenTensorDescriptor_t, dataType::Ptr{miopenDataType_t}, dimsA::Ptr{Cint}, stridesA::Ptr{Cint})::miopenStatus_t) @@ -878,23 +878,23 @@ end function miopenDestroyTensorDescriptor(tensorDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDestroyTensorDescriptor(tensorDesc::miopenTensorDescriptor_t)::miopenStatus_t) + @check @ccall(libMIOpen.miopenDestroyTensorDescriptor(tensorDesc::miopenTensorDescriptor_t)::miopenStatus_t) end function miopenCreateSeqTensorDescriptor(tensorDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateSeqTensorDescriptor(tensorDesc::Ptr{miopenSeqTensorDescriptor_t})::miopenStatus_t) + @check @ccall(libMIOpen.miopenCreateSeqTensorDescriptor(tensorDesc::Ptr{miopenSeqTensorDescriptor_t})::miopenStatus_t) end function miopenDestroySeqTensorDescriptor(tensorDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDestroySeqTensorDescriptor(tensorDesc::miopenSeqTensorDescriptor_t)::miopenStatus_t) + @check @ccall(libMIOpen.miopenDestroySeqTensorDescriptor(tensorDesc::miopenSeqTensorDescriptor_t)::miopenStatus_t) end function miopenOpTensor(handle, tensorOp, alpha1, aDesc, A, alpha2, bDesc, B, beta, cDesc, C) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenOpTensor(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenOpTensor(handle::miopenHandle_t, tensorOp::miopenTensorOp_t, alpha1::Ptr{Cvoid}, aDesc::miopenTensorDescriptor_t, @@ -907,7 +907,7 @@ end function miopenSetTensor(handle, yDesc, y, alpha) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetTensor(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenSetTensor(handle::miopenHandle_t, yDesc::miopenTensorDescriptor_t, y::Ptr{Cvoid}, alpha::Ptr{Cvoid})::miopenStatus_t) @@ -915,7 +915,7 @@ end function miopenScaleTensor(handle, yDesc, y, alpha) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenScaleTensor(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenScaleTensor(handle::miopenHandle_t, yDesc::miopenTensorDescriptor_t, y::Ptr{Cvoid}, alpha::Ptr{Cvoid})::miopenStatus_t) @@ -923,13 +923,13 @@ end function miopenGetTensorNumBytes(tensorDesc, numBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetTensorNumBytes(tensorDesc::miopenTensorDescriptor_t, + @check @ccall(libMIOpen.miopenGetTensorNumBytes(tensorDesc::miopenTensorDescriptor_t, numBytes::Ptr{Csize_t})::miopenStatus_t) end function miopenTransformTensor(handle, alpha, xDesc, x, beta, yDesc, y) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenTransformTensor(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenTransformTensor(handle::miopenHandle_t, alpha::Ptr{Cvoid}, xDesc::miopenTensorDescriptor_t, x::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -939,13 +939,13 @@ end function miopenCreateConvolutionDescriptor(convDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateConvolutionDescriptor(convDesc::Ptr{miopenConvolutionDescriptor_t})::miopenStatus_t) + @check @ccall(libMIOpen.miopenCreateConvolutionDescriptor(convDesc::Ptr{miopenConvolutionDescriptor_t})::miopenStatus_t) end function miopenInitConvolutionDescriptor(convDesc, c_mode, pad_h, pad_w, stride_h, stride_w, dilation_h, dilation_w) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenInitConvolutionDescriptor(convDesc::miopenConvolutionDescriptor_t, + @check @ccall(libMIOpen.miopenInitConvolutionDescriptor(convDesc::miopenConvolutionDescriptor_t, c_mode::miopenConvolutionMode_t, pad_h::Cint, pad_w::Cint, stride_h::Cint, @@ -957,7 +957,7 @@ end function miopenInitConvolutionNdDescriptor(convDesc, spatialDim, padA, strideA, dilationA, c_mode) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenInitConvolutionNdDescriptor(convDesc::miopenConvolutionDescriptor_t, + @check @ccall(libMIOpen.miopenInitConvolutionNdDescriptor(convDesc::miopenConvolutionDescriptor_t, spatialDim::Cint, padA::Ptr{Cint}, strideA::Ptr{Cint}, @@ -967,14 +967,14 @@ end function miopenGetConvolutionSpatialDim(convDesc, spatialDim) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetConvolutionSpatialDim(convDesc::miopenConvolutionDescriptor_t, + @check @ccall(libMIOpen.miopenGetConvolutionSpatialDim(convDesc::miopenConvolutionDescriptor_t, spatialDim::Ptr{Cint})::miopenStatus_t) end function miopenGetConvolutionDescriptor(convDesc, c_mode, pad_h, pad_w, stride_h, stride_w, dilation_h, dilation_w) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetConvolutionDescriptor(convDesc::miopenConvolutionDescriptor_t, + @check @ccall(libMIOpen.miopenGetConvolutionDescriptor(convDesc::miopenConvolutionDescriptor_t, c_mode::Ptr{miopenConvolutionMode_t}, pad_h::Ptr{Cint}, pad_w::Ptr{Cint}, @@ -987,7 +987,7 @@ end function miopenGetConvolutionNdDescriptor(convDesc, requestedSpatialDim, spatialDim, padA, strideA, dilationA, c_mode) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetConvolutionNdDescriptor(convDesc::miopenConvolutionDescriptor_t, + @check @ccall(libMIOpen.miopenGetConvolutionNdDescriptor(convDesc::miopenConvolutionDescriptor_t, requestedSpatialDim::Cint, spatialDim::Ptr{Cint}, padA::Ptr{Cint}, @@ -998,26 +998,26 @@ end function miopenGetConvolutionGroupCount(convDesc, groupCount) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetConvolutionGroupCount(convDesc::miopenConvolutionDescriptor_t, + @check @ccall(libMIOpen.miopenGetConvolutionGroupCount(convDesc::miopenConvolutionDescriptor_t, groupCount::Ptr{Cint})::miopenStatus_t) end function miopenSetConvolutionGroupCount(convDesc, groupCount) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetConvolutionGroupCount(convDesc::miopenConvolutionDescriptor_t, + @check @ccall(libMIOpen.miopenSetConvolutionGroupCount(convDesc::miopenConvolutionDescriptor_t, groupCount::Cint)::miopenStatus_t) end function miopenSetTransposeConvOutputPadding(convDesc, adj_h, adj_w) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetTransposeConvOutputPadding(convDesc::miopenConvolutionDescriptor_t, + @check @ccall(libMIOpen.miopenSetTransposeConvOutputPadding(convDesc::miopenConvolutionDescriptor_t, adj_h::Cint, adj_w::Cint)::miopenStatus_t) end function miopenSetTransposeConvNdOutputPadding(convDesc, spatialDim, adjA) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetTransposeConvNdOutputPadding(convDesc::miopenConvolutionDescriptor_t, + @check @ccall(libMIOpen.miopenSetTransposeConvNdOutputPadding(convDesc::miopenConvolutionDescriptor_t, spatialDim::Cint, adjA::Ptr{Cint})::miopenStatus_t) end @@ -1025,7 +1025,7 @@ end function miopenGetConvolutionForwardOutputDim(convDesc, inputTensorDesc, filterDesc, n, c, h, w) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetConvolutionForwardOutputDim(convDesc::miopenConvolutionDescriptor_t, + @check @ccall(libMIOpen.miopenGetConvolutionForwardOutputDim(convDesc::miopenConvolutionDescriptor_t, inputTensorDesc::miopenTensorDescriptor_t, filterDesc::miopenTensorDescriptor_t, n::Ptr{Cint}, @@ -1037,7 +1037,7 @@ end function miopenGetConvolutionNdForwardOutputDim(convDesc, inputTensorDesc, filterDesc, nDim, outputTensorDimA) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetConvolutionNdForwardOutputDim(convDesc::miopenConvolutionDescriptor_t, + @check @ccall(libMIOpen.miopenGetConvolutionNdForwardOutputDim(convDesc::miopenConvolutionDescriptor_t, inputTensorDesc::miopenTensorDescriptor_t, filterDesc::miopenTensorDescriptor_t, nDim::Ptr{Cint}, @@ -1046,32 +1046,32 @@ end function miopenDestroyConvolutionDescriptor(convDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDestroyConvolutionDescriptor(convDesc::miopenConvolutionDescriptor_t)::miopenStatus_t) + @check @ccall(libMIOpen.miopenDestroyConvolutionDescriptor(convDesc::miopenConvolutionDescriptor_t)::miopenStatus_t) end function miopenSetConvolutionAttribute(convDesc, attr, value) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetConvolutionAttribute(convDesc::miopenConvolutionDescriptor_t, + @check @ccall(libMIOpen.miopenSetConvolutionAttribute(convDesc::miopenConvolutionDescriptor_t, attr::miopenConvolutionAttrib_t, value::Cint)::miopenStatus_t) end function miopenGetConvolutionAttribute(convDesc, attr, value) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetConvolutionAttribute(convDesc::miopenConvolutionDescriptor_t, + @check @ccall(libMIOpen.miopenGetConvolutionAttribute(convDesc::miopenConvolutionDescriptor_t, attr::miopenConvolutionAttrib_t, value::Ptr{Cint})::miopenStatus_t) end function miopenSetConvolutionFindMode(convDesc, findMode) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetConvolutionFindMode(convDesc::miopenConvolutionDescriptor_t, + @check @ccall(libMIOpen.miopenSetConvolutionFindMode(convDesc::miopenConvolutionDescriptor_t, findMode::miopenConvolutionFindMode_t)::miopenStatus_t) end function miopenGetConvolutionFindMode(convDesc, findMode) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetConvolutionFindMode(convDesc::miopenConvolutionDescriptor_t, + @check @ccall(libMIOpen.miopenGetConvolutionFindMode(convDesc::miopenConvolutionDescriptor_t, findMode::Ptr{miopenConvolutionFindMode_t})::miopenStatus_t) end @@ -1150,7 +1150,7 @@ end function miopenConvolutionForwardGetSolutionCount(handle, wDesc, xDesc, convDesc, yDesc, solutionCount) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionForwardGetSolutionCount(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionForwardGetSolutionCount(handle::miopenHandle_t, wDesc::miopenTensorDescriptor_t, xDesc::miopenTensorDescriptor_t, convDesc::miopenConvolutionDescriptor_t, @@ -1161,7 +1161,7 @@ end function miopenConvolutionForwardGetSolution(handle, wDesc, xDesc, convDesc, yDesc, maxSolutionCount, solutionCount, solutions) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionForwardGetSolution(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionForwardGetSolution(handle::miopenHandle_t, wDesc::miopenTensorDescriptor_t, xDesc::miopenTensorDescriptor_t, convDesc::miopenConvolutionDescriptor_t, @@ -1174,7 +1174,7 @@ end function miopenConvolutionForwardGetSolutionWorkspaceSize(handle, wDesc, xDesc, convDesc, yDesc, solution_id, workSpaceSize) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionForwardGetSolutionWorkspaceSize(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionForwardGetSolutionWorkspaceSize(handle::miopenHandle_t, wDesc::miopenTensorDescriptor_t, xDesc::miopenTensorDescriptor_t, convDesc::miopenConvolutionDescriptor_t, @@ -1186,7 +1186,7 @@ end function miopenConvolutionForwardCompileSolution(handle, wDesc, xDesc, convDesc, yDesc, solution_id) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionForwardCompileSolution(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionForwardCompileSolution(handle::miopenHandle_t, wDesc::miopenTensorDescriptor_t, xDesc::miopenTensorDescriptor_t, convDesc::miopenConvolutionDescriptor_t, @@ -1197,7 +1197,7 @@ end function miopenConvolutionForwardImmediate(handle, wDesc, w, xDesc, x, convDesc, yDesc, y, workSpace, workSpaceSize, solution_id) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionForwardImmediate(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionForwardImmediate(handle::miopenHandle_t, wDesc::miopenTensorDescriptor_t, w::Ptr{Cvoid}, xDesc::miopenTensorDescriptor_t, @@ -1213,7 +1213,7 @@ end function miopenConvolutionBackwardDataGetSolutionCount(handle, dyDesc, wDesc, convDesc, dxDesc, solutionCount) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionBackwardDataGetSolutionCount(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionBackwardDataGetSolutionCount(handle::miopenHandle_t, dyDesc::miopenTensorDescriptor_t, wDesc::miopenTensorDescriptor_t, convDesc::miopenConvolutionDescriptor_t, @@ -1225,7 +1225,7 @@ function miopenConvolutionBackwardDataGetSolution(handle, dyDesc, wDesc, convDes maxSolutionCount, solutionCount, solutions) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionBackwardDataGetSolution(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionBackwardDataGetSolution(handle::miopenHandle_t, dyDesc::miopenTensorDescriptor_t, wDesc::miopenTensorDescriptor_t, convDesc::miopenConvolutionDescriptor_t, @@ -1239,7 +1239,7 @@ function miopenConvolutionBackwardDataGetSolutionWorkspaceSize(handle, dyDesc, w convDesc, dxDesc, solution_id, workSpaceSize) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionBackwardDataGetSolutionWorkspaceSize(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionBackwardDataGetSolutionWorkspaceSize(handle::miopenHandle_t, dyDesc::miopenTensorDescriptor_t, wDesc::miopenTensorDescriptor_t, convDesc::miopenConvolutionDescriptor_t, @@ -1251,7 +1251,7 @@ end function miopenConvolutionBackwardDataCompileSolution(handle, dyDesc, wDesc, convDesc, dxDesc, solution_id) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionBackwardDataCompileSolution(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionBackwardDataCompileSolution(handle::miopenHandle_t, dyDesc::miopenTensorDescriptor_t, wDesc::miopenTensorDescriptor_t, convDesc::miopenConvolutionDescriptor_t, @@ -1263,7 +1263,7 @@ function miopenConvolutionBackwardDataImmediate(handle, dyDesc, dy, wDesc, w, co dxDesc, dx, workSpace, workSpaceSize, solution_id) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionBackwardDataImmediate(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionBackwardDataImmediate(handle::miopenHandle_t, dyDesc::miopenTensorDescriptor_t, dy::Ptr{Cvoid}, wDesc::miopenTensorDescriptor_t, @@ -1279,7 +1279,7 @@ end function miopenConvolutionBackwardWeightsGetSolutionCount(handle, dyDesc, xDesc, convDesc, dwDesc, solutionCount) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionBackwardWeightsGetSolutionCount(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionBackwardWeightsGetSolutionCount(handle::miopenHandle_t, dyDesc::miopenTensorDescriptor_t, xDesc::miopenTensorDescriptor_t, convDesc::miopenConvolutionDescriptor_t, @@ -1291,7 +1291,7 @@ function miopenConvolutionBackwardWeightsGetSolution(handle, dyDesc, xDesc, conv dwDesc, maxSolutionCount, solutionCount, solutions) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionBackwardWeightsGetSolution(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionBackwardWeightsGetSolution(handle::miopenHandle_t, dyDesc::miopenTensorDescriptor_t, xDesc::miopenTensorDescriptor_t, convDesc::miopenConvolutionDescriptor_t, @@ -1306,7 +1306,7 @@ function miopenConvolutionBackwardWeightsGetSolutionWorkspaceSize(handle, dyDesc solution_id, workSpaceSize) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionBackwardWeightsGetSolutionWorkspaceSize(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionBackwardWeightsGetSolutionWorkspaceSize(handle::miopenHandle_t, dyDesc::miopenTensorDescriptor_t, xDesc::miopenTensorDescriptor_t, convDesc::miopenConvolutionDescriptor_t, @@ -1318,7 +1318,7 @@ end function miopenConvolutionBackwardWeightsCompileSolution(handle, dyDesc, xDesc, convDesc, dwDesc, solution_id) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionBackwardWeightsCompileSolution(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionBackwardWeightsCompileSolution(handle::miopenHandle_t, dyDesc::miopenTensorDescriptor_t, xDesc::miopenTensorDescriptor_t, convDesc::miopenConvolutionDescriptor_t, @@ -1330,7 +1330,7 @@ function miopenConvolutionBackwardWeightsImmediate(handle, dyDesc, dy, xDesc, x, dwDesc, dw, workSpace, workSpaceSize, solution_id) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionBackwardWeightsImmediate(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionBackwardWeightsImmediate(handle::miopenHandle_t, dyDesc::miopenTensorDescriptor_t, dy::Ptr{Cvoid}, xDesc::miopenTensorDescriptor_t, @@ -1346,7 +1346,7 @@ end function miopenConvolutionForwardGetWorkSpaceSize(handle, wDesc, xDesc, convDesc, yDesc, workSpaceSize) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionForwardGetWorkSpaceSize(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionForwardGetWorkSpaceSize(handle::miopenHandle_t, wDesc::miopenTensorDescriptor_t, xDesc::miopenTensorDescriptor_t, convDesc::miopenConvolutionDescriptor_t, @@ -1359,7 +1359,7 @@ function miopenFindConvolutionForwardAlgorithm(handle, xDesc, x, wDesc, w, convD perfResults, workSpace, workSpaceSize, exhaustiveSearch) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenFindConvolutionForwardAlgorithm(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenFindConvolutionForwardAlgorithm(handle::miopenHandle_t, xDesc::miopenTensorDescriptor_t, x::Ptr{Cvoid}, wDesc::miopenTensorDescriptor_t, @@ -1378,7 +1378,7 @@ end function miopenConvolutionForward(handle, alpha, xDesc, x, wDesc, w, convDesc, algo, beta, yDesc, y, workSpace, workSpaceSize) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionForward(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionForward(handle::miopenHandle_t, alpha::Ptr{Cvoid}, xDesc::miopenTensorDescriptor_t, x::Ptr{Cvoid}, @@ -1395,7 +1395,7 @@ end function miopenConvolutionForwardBias(handle, alpha, bDesc, b, beta, yDesc, y) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionForwardBias(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionForwardBias(handle::miopenHandle_t, alpha::Ptr{Cvoid}, bDesc::miopenTensorDescriptor_t, b::Ptr{Cvoid}, @@ -1407,7 +1407,7 @@ end function miopenConvolutionBackwardDataGetWorkSpaceSize(handle, dyDesc, wDesc, convDesc, dxDesc, workSpaceSize) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionBackwardDataGetWorkSpaceSize(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionBackwardDataGetWorkSpaceSize(handle::miopenHandle_t, dyDesc::miopenTensorDescriptor_t, wDesc::miopenTensorDescriptor_t, convDesc::miopenConvolutionDescriptor_t, @@ -1421,7 +1421,7 @@ function miopenFindConvolutionBackwardDataAlgorithm(handle, dyDesc, dy, wDesc, w workSpace, workSpaceSize, exhaustiveSearch) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenFindConvolutionBackwardDataAlgorithm(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenFindConvolutionBackwardDataAlgorithm(handle::miopenHandle_t, dyDesc::miopenTensorDescriptor_t, dy::Ptr{Cvoid}, wDesc::miopenTensorDescriptor_t, @@ -1440,7 +1440,7 @@ end function miopenConvolutionBackwardData(handle, alpha, dyDesc, dy, wDesc, w, convDesc, algo, beta, dxDesc, dx, workSpace, workSpaceSize) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionBackwardData(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionBackwardData(handle::miopenHandle_t, alpha::Ptr{Cvoid}, dyDesc::miopenTensorDescriptor_t, dy::Ptr{Cvoid}, @@ -1458,7 +1458,7 @@ end function miopenConvolutionBackwardWeightsGetWorkSpaceSize(handle, dyDesc, xDesc, convDesc, dwDesc, workSpaceSize) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionBackwardWeightsGetWorkSpaceSize(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionBackwardWeightsGetWorkSpaceSize(handle::miopenHandle_t, dyDesc::miopenTensorDescriptor_t, xDesc::miopenTensorDescriptor_t, convDesc::miopenConvolutionDescriptor_t, @@ -1472,7 +1472,7 @@ function miopenFindConvolutionBackwardWeightsAlgorithm(handle, dyDesc, dy, xDesc perfResults, workSpace, workSpaceSize, exhaustiveSearch) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenFindConvolutionBackwardWeightsAlgorithm(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenFindConvolutionBackwardWeightsAlgorithm(handle::miopenHandle_t, dyDesc::miopenTensorDescriptor_t, dy::Ptr{Cvoid}, xDesc::miopenTensorDescriptor_t, @@ -1491,7 +1491,7 @@ end function miopenConvolutionBackwardWeights(handle, alpha, dyDesc, dy, xDesc, x, convDesc, algo, beta, dwDesc, dw, workSpace, workSpaceSize) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionBackwardWeights(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionBackwardWeights(handle::miopenHandle_t, alpha::Ptr{Cvoid}, dyDesc::miopenTensorDescriptor_t, dy::Ptr{Cvoid}, @@ -1508,7 +1508,7 @@ end function miopenConvolutionBackwardBias(handle, alpha, dyDesc, dy, beta, dbDesc, db) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionBackwardBias(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionBackwardBias(handle::miopenHandle_t, alpha::Ptr{Cvoid}, dyDesc::miopenTensorDescriptor_t, dy::Ptr{Cvoid}, @@ -1519,37 +1519,37 @@ end function miopenCreatePoolingDescriptor(poolDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreatePoolingDescriptor(poolDesc::Ptr{miopenPoolingDescriptor_t})::miopenStatus_t) + @check @ccall(libMIOpen.miopenCreatePoolingDescriptor(poolDesc::Ptr{miopenPoolingDescriptor_t})::miopenStatus_t) end function miopenSetPoolingIndexType(poolDesc, index_type) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetPoolingIndexType(poolDesc::miopenPoolingDescriptor_t, + @check @ccall(libMIOpen.miopenSetPoolingIndexType(poolDesc::miopenPoolingDescriptor_t, index_type::miopenIndexType_t)::miopenStatus_t) end function miopenGetPoolingIndexType(poolDesc, index_type) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetPoolingIndexType(poolDesc::miopenPoolingDescriptor_t, + @check @ccall(libMIOpen.miopenGetPoolingIndexType(poolDesc::miopenPoolingDescriptor_t, index_type::Ptr{miopenIndexType_t})::miopenStatus_t) end function miopenSetPoolingWorkSpaceIndexMode(poolDesc, workspace_index) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetPoolingWorkSpaceIndexMode(poolDesc::miopenPoolingDescriptor_t, + @check @ccall(libMIOpen.miopenSetPoolingWorkSpaceIndexMode(poolDesc::miopenPoolingDescriptor_t, workspace_index::miopenPoolingWorkspaceIndexMode_t)::miopenStatus_t) end function miopenGetPoolingWorkSpaceIndexMode(poolDesc, workspace_index) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetPoolingWorkSpaceIndexMode(poolDesc::miopenPoolingDescriptor_t, + @check @ccall(libMIOpen.miopenGetPoolingWorkSpaceIndexMode(poolDesc::miopenPoolingDescriptor_t, workspace_index::Ptr{miopenPoolingWorkspaceIndexMode_t})::miopenStatus_t) end function miopenSet2dPoolingDescriptor(poolDesc, mode, windowHeight, windowWidth, pad_h, pad_w, stride_h, stride_w) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSet2dPoolingDescriptor(poolDesc::miopenPoolingDescriptor_t, + @check @ccall(libMIOpen.miopenSet2dPoolingDescriptor(poolDesc::miopenPoolingDescriptor_t, mode::miopenPoolingMode_t, windowHeight::Cint, windowWidth::Cint, @@ -1561,7 +1561,7 @@ end function miopenGet2dPoolingDescriptor(poolDesc, mode, windowHeight, windowWidth, pad_h, pad_w, stride_h, stride_w) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGet2dPoolingDescriptor(poolDesc::miopenPoolingDescriptor_t, + @check @ccall(libMIOpen.miopenGet2dPoolingDescriptor(poolDesc::miopenPoolingDescriptor_t, mode::Ptr{miopenPoolingMode_t}, windowHeight::Ptr{Cint}, windowWidth::Ptr{Cint}, @@ -1573,7 +1573,7 @@ end function miopenGetPoolingForwardOutputDim(poolDesc, tensorDesc, n, c, h, w) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetPoolingForwardOutputDim(poolDesc::miopenPoolingDescriptor_t, + @check @ccall(libMIOpen.miopenGetPoolingForwardOutputDim(poolDesc::miopenPoolingDescriptor_t, tensorDesc::miopenTensorDescriptor_t, n::Ptr{Cint}, c::Ptr{Cint}, @@ -1583,7 +1583,7 @@ end function miopenSetNdPoolingDescriptor(poolDesc, mode, nbDims, windowDimA, padA, stridesA) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetNdPoolingDescriptor(poolDesc::miopenPoolingDescriptor_t, + @check @ccall(libMIOpen.miopenSetNdPoolingDescriptor(poolDesc::miopenPoolingDescriptor_t, mode::miopenPoolingMode_t, nbDims::Cint, windowDimA::Ptr{Cint}, @@ -1594,7 +1594,7 @@ end function miopenGetNdPoolingDescriptor(poolDesc, nbDimsRequested, mode, nbDims, windowDimA, padA, stridesA) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetNdPoolingDescriptor(poolDesc::miopenPoolingDescriptor_t, + @check @ccall(libMIOpen.miopenGetNdPoolingDescriptor(poolDesc::miopenPoolingDescriptor_t, nbDimsRequested::Cint, mode::Ptr{miopenPoolingMode_t}, nbDims::Ptr{Cint}, @@ -1605,7 +1605,7 @@ end function miopenGetPoolingNdForwardOutputDim(poolDesc, tensorDesc, dims, tensorDimArr) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetPoolingNdForwardOutputDim(poolDesc::miopenPoolingDescriptor_t, + @check @ccall(libMIOpen.miopenGetPoolingNdForwardOutputDim(poolDesc::miopenPoolingDescriptor_t, tensorDesc::miopenTensorDescriptor_t, dims::Cint, tensorDimArr::Ptr{Cint})::miopenStatus_t) @@ -1613,13 +1613,13 @@ end function miopenPoolingGetWorkSpaceSize(yDesc, workSpaceSize) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenPoolingGetWorkSpaceSize(yDesc::miopenTensorDescriptor_t, + @check @ccall(libMIOpen.miopenPoolingGetWorkSpaceSize(yDesc::miopenTensorDescriptor_t, workSpaceSize::Ptr{Csize_t})::miopenStatus_t) end function miopenPoolingGetWorkSpaceSizeV2(poolDesc, yDesc, workSpaceSize) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenPoolingGetWorkSpaceSizeV2(poolDesc::miopenPoolingDescriptor_t, + @check @ccall(libMIOpen.miopenPoolingGetWorkSpaceSizeV2(poolDesc::miopenPoolingDescriptor_t, yDesc::miopenTensorDescriptor_t, workSpaceSize::Ptr{Csize_t})::miopenStatus_t) end @@ -1627,7 +1627,7 @@ end function miopenPoolingForward(handle, poolDesc, alpha, xDesc, x, beta, yDesc, y, do_backward, workSpace, workSpaceSize) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenPoolingForward(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenPoolingForward(handle::miopenHandle_t, poolDesc::miopenPoolingDescriptor_t, alpha::Ptr{Cvoid}, xDesc::miopenTensorDescriptor_t, @@ -1641,7 +1641,7 @@ end function miopenPoolingBackward(handle, poolDesc, alpha, yDesc, y, dyDesc, dy, xDesc, x, beta, dxDesc, dx, workSpace) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenPoolingBackward(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenPoolingBackward(handle::miopenHandle_t, poolDesc::miopenPoolingDescriptor_t, alpha::Ptr{Cvoid}, yDesc::miopenTensorDescriptor_t, @@ -1657,17 +1657,17 @@ end function miopenDestroyPoolingDescriptor(poolDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDestroyPoolingDescriptor(poolDesc::miopenPoolingDescriptor_t)::miopenStatus_t) + @check @ccall(libMIOpen.miopenDestroyPoolingDescriptor(poolDesc::miopenPoolingDescriptor_t)::miopenStatus_t) end function miopenCreateLRNDescriptor(lrnDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateLRNDescriptor(lrnDesc::Ptr{miopenLRNDescriptor_t})::miopenStatus_t) + @check @ccall(libMIOpen.miopenCreateLRNDescriptor(lrnDesc::Ptr{miopenLRNDescriptor_t})::miopenStatus_t) end function miopenSetLRNDescriptor(lrnDesc, mode, lrnN, lrnAlpha, lrnBeta, lrnK) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetLRNDescriptor(lrnDesc::miopenLRNDescriptor_t, + @check @ccall(libMIOpen.miopenSetLRNDescriptor(lrnDesc::miopenLRNDescriptor_t, mode::miopenLRNMode_t, lrnN::Cuint, lrnAlpha::Cdouble, lrnBeta::Cdouble, lrnK::Cdouble)::miopenStatus_t) @@ -1675,7 +1675,7 @@ end function miopenGetLRNDescriptor(lrnDesc, mode, lrnN, lrnAlpha, lrnBeta, lrnK) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetLRNDescriptor(lrnDesc::miopenLRNDescriptor_t, + @check @ccall(libMIOpen.miopenGetLRNDescriptor(lrnDesc::miopenLRNDescriptor_t, mode::Ptr{miopenLRNMode_t}, lrnN::Ptr{Cuint}, lrnAlpha::Ptr{Cdouble}, @@ -1685,14 +1685,14 @@ end function miopenLRNGetWorkSpaceSize(yDesc, workSpaceSize) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenLRNGetWorkSpaceSize(yDesc::miopenTensorDescriptor_t, + @check @ccall(libMIOpen.miopenLRNGetWorkSpaceSize(yDesc::miopenTensorDescriptor_t, workSpaceSize::Ptr{Csize_t})::miopenStatus_t) end function miopenLRNForward(handle, lrnDesc, alpha, xDesc, x, beta, yDesc, y, do_backward, workSpace) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenLRNForward(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenLRNForward(handle::miopenHandle_t, lrnDesc::miopenLRNDescriptor_t, alpha::Ptr{Cvoid}, xDesc::miopenTensorDescriptor_t, @@ -1705,7 +1705,7 @@ end function miopenLRNBackward(handle, lrnDesc, alpha, yDesc, y, dyDesc, dy, xDesc, x, beta, dxDesc, dx, workSpace) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenLRNBackward(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenLRNBackward(handle::miopenHandle_t, lrnDesc::miopenLRNDescriptor_t, alpha::Ptr{Cvoid}, yDesc::miopenTensorDescriptor_t, @@ -1721,12 +1721,12 @@ end function miopenDestroyLRNDescriptor(lrnDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDestroyLRNDescriptor(lrnDesc::miopenLRNDescriptor_t)::miopenStatus_t) + @check @ccall(libMIOpen.miopenDestroyLRNDescriptor(lrnDesc::miopenLRNDescriptor_t)::miopenStatus_t) end function miopenDeriveBNTensorDescriptor(derivedBnDesc, xDesc, bn_mode) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDeriveBNTensorDescriptor(derivedBnDesc::miopenTensorDescriptor_t, + @check @ccall(libMIOpen.miopenDeriveBNTensorDescriptor(derivedBnDesc::miopenTensorDescriptor_t, xDesc::miopenTensorDescriptor_t, bn_mode::miopenBatchNormMode_t)::miopenStatus_t) end @@ -1737,7 +1737,7 @@ function miopenBatchNormalizationForwardTraining(handle, bn_mode, alpha, beta, x resultRunningVariance, epsilon, resultSaveMean, resultSaveInvVariance) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenBatchNormalizationForwardTraining(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenBatchNormalizationForwardTraining(handle::miopenHandle_t, bn_mode::miopenBatchNormMode_t, alpha::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -1763,7 +1763,7 @@ function miopenBatchNormalizationForwardTraining_V2(handle, bn_mode, alpha, beta resultRunningVariance, epsilon, resultSaveMean, resultSaveInvVariance) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenBatchNormalizationForwardTraining_V2(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenBatchNormalizationForwardTraining_V2(handle::miopenHandle_t, bn_mode::miopenBatchNormMode_t, alpha::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -1795,7 +1795,7 @@ function miopenBatchNormalizationForwardTraining_V3(handle, bn_mode, alpha, beta nextResultRunningVariance, epsilon, resultSaveMean, resultSaveInvVariance) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenBatchNormalizationForwardTraining_V3(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenBatchNormalizationForwardTraining_V3(handle::miopenHandle_t, bn_mode::miopenBatchNormMode_t, alpha::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -1827,7 +1827,7 @@ function miopenBatchNormForwardTrainingActivation(handle, bn_mode, alpha, beta, resultSaveMean, resultSaveInvVariance, activDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenBatchNormForwardTrainingActivation(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenBatchNormForwardTrainingActivation(handle::miopenHandle_t, bn_mode::miopenBatchNormMode_t, alpha::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -1861,7 +1861,7 @@ function miopenBatchNormForwardTrainingActivation_V2(handle, bn_mode, alpha, bet resultSaveMean, resultSaveInvVariance, activDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenBatchNormForwardTrainingActivation_V2(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenBatchNormForwardTrainingActivation_V2(handle::miopenHandle_t, bn_mode::miopenBatchNormMode_t, alpha::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -1891,7 +1891,7 @@ function miopenBatchNormalizationForwardInference(handle, bn_mode, alpha, beta, bnBias, estimatedMean, estimatedVariance, epsilon) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenBatchNormalizationForwardInference(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenBatchNormalizationForwardInference(handle::miopenHandle_t, bn_mode::miopenBatchNormMode_t, alpha::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -1913,7 +1913,7 @@ function miopenBatchNormalizationForwardInference_V2(handle, bn_mode, alpha, bet bnBias, estimatedMean, estimatedVariance, epsilon) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenBatchNormalizationForwardInference_V2(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenBatchNormalizationForwardInference_V2(handle::miopenHandle_t, bn_mode::miopenBatchNormMode_t, alpha::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -1939,7 +1939,7 @@ function miopenBatchNormalizationForwardInferenceInvVariance(handle, bn_mode, al bnBias, estimatedMean, estimatedInvVariance) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenBatchNormalizationForwardInferenceInvVariance(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenBatchNormalizationForwardInferenceInvVariance(handle::miopenHandle_t, bn_mode::miopenBatchNormMode_t, alpha::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -1965,7 +1965,7 @@ function miopenBatchNormForwardInferenceActivationInvVariance(handle, bn_mode, a estimatedInvVariance, activDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenBatchNormForwardInferenceActivationInvVariance(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenBatchNormForwardInferenceActivationInvVariance(handle::miopenHandle_t, bn_mode::miopenBatchNormMode_t, alpha::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -1990,7 +1990,7 @@ function miopenBatchNormForwardInferenceActivation(handle, bn_mode, alpha, beta, bnBias, estimatedMean, estimatedVariance, epsilon, activDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenBatchNormForwardInferenceActivation(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenBatchNormForwardInferenceActivation(handle::miopenHandle_t, bn_mode::miopenBatchNormMode_t, alpha::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -2016,7 +2016,7 @@ function miopenBatchNormalizationBackward(handle, bn_mode, alphaDataDiff, betaDa resultBnScaleDiff, resultBnBiasDiff, epsilon, savedMean, savedInvVariance) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenBatchNormalizationBackward(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenBatchNormalizationBackward(handle::miopenHandle_t, bn_mode::miopenBatchNormMode_t, alphaDataDiff::Ptr{Cvoid}, betaDataDiff::Ptr{Cvoid}, @@ -2044,7 +2044,7 @@ function miopenBatchNormalizationBackward_V2(handle, bn_mode, alphaDataDiff, bet resultBnScaleDiff, resultBnBiasDiff, epsilon, savedMean, savedInvVariance) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenBatchNormalizationBackward_V2(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenBatchNormalizationBackward_V2(handle::miopenHandle_t, bn_mode::miopenBatchNormMode_t, alphaDataDiff::Ptr{Cvoid}, betaDataDiff::Ptr{Cvoid}, @@ -2075,7 +2075,7 @@ function miopenBatchNormBackwardActivation(handle, bn_mode, alphaDataDiff, betaD bnBias, resultBnScaleDiff, resultBnBiasDiff, epsilon, savedMean, savedInvVariance, activDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenBatchNormBackwardActivation(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenBatchNormBackwardActivation(handle::miopenHandle_t, bn_mode::miopenBatchNormMode_t, alphaDataDiff::Ptr{Cvoid}, betaDataDiff::Ptr{Cvoid}, @@ -2103,12 +2103,12 @@ end function miopenCreateActivationDescriptor(activDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateActivationDescriptor(activDesc::Ptr{miopenActivationDescriptor_t})::miopenStatus_t) + @check @ccall(libMIOpen.miopenCreateActivationDescriptor(activDesc::Ptr{miopenActivationDescriptor_t})::miopenStatus_t) end function miopenSetActivationDescriptor(activDesc, mode, activAlpha, activBeta, activGamma) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetActivationDescriptor(activDesc::miopenActivationDescriptor_t, + @check @ccall(libMIOpen.miopenSetActivationDescriptor(activDesc::miopenActivationDescriptor_t, mode::miopenActivationMode_t, activAlpha::Cdouble, activBeta::Cdouble, @@ -2117,7 +2117,7 @@ end function miopenGetActivationDescriptor(activDesc, mode, activAlpha, activBeta, activGamma) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetActivationDescriptor(activDesc::miopenActivationDescriptor_t, + @check @ccall(libMIOpen.miopenGetActivationDescriptor(activDesc::miopenActivationDescriptor_t, mode::Ptr{miopenActivationMode_t}, activAlpha::Ptr{Cdouble}, activBeta::Ptr{Cdouble}, @@ -2126,7 +2126,7 @@ end function miopenActivationForward(handle, activDesc, alpha, xDesc, x, beta, yDesc, y) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenActivationForward(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenActivationForward(handle::miopenHandle_t, activDesc::miopenActivationDescriptor_t, alpha::Ptr{Cvoid}, xDesc::miopenTensorDescriptor_t, @@ -2138,7 +2138,7 @@ end function miopenActivationBackward(handle, activDesc, alpha, yDesc, y, dyDesc, dy, xDesc, x, beta, dxDesc, dx) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenActivationBackward(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenActivationBackward(handle::miopenHandle_t, activDesc::miopenActivationDescriptor_t, alpha::Ptr{Cvoid}, yDesc::miopenTensorDescriptor_t, @@ -2153,12 +2153,12 @@ end function miopenDestroyActivationDescriptor(activDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDestroyActivationDescriptor(activDesc::miopenActivationDescriptor_t)::miopenStatus_t) + @check @ccall(libMIOpen.miopenDestroyActivationDescriptor(activDesc::miopenActivationDescriptor_t)::miopenStatus_t) end function miopenSoftmaxForward(handle, alpha, xDesc, x, beta, yDesc, y) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSoftmaxForward(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenSoftmaxForward(handle::miopenHandle_t, alpha::Ptr{Cvoid}, xDesc::miopenTensorDescriptor_t, x::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -2168,7 +2168,7 @@ end function miopenSoftmaxBackward(handle, alpha, yDesc, y, dyDesc, dy, beta, dxDesc, dx) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSoftmaxBackward(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenSoftmaxBackward(handle::miopenHandle_t, alpha::Ptr{Cvoid}, yDesc::miopenTensorDescriptor_t, y::Ptr{Cvoid}, @@ -2180,7 +2180,7 @@ end function miopenSoftmaxForward_V2(handle, alpha, xDesc, x, beta, yDesc, y, algorithm, mode) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSoftmaxForward_V2(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenSoftmaxForward_V2(handle::miopenHandle_t, alpha::Ptr{Cvoid}, xDesc::miopenTensorDescriptor_t, x::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -2193,7 +2193,7 @@ end function miopenSoftmaxBackward_V2(handle, alpha, yDesc, y, dyDesc, dy, beta, dxDesc, dx, algorithm, mode) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSoftmaxBackward_V2(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenSoftmaxBackward_V2(handle::miopenHandle_t, alpha::Ptr{Cvoid}, yDesc::miopenTensorDescriptor_t, y::Ptr{Cvoid}, @@ -2227,32 +2227,32 @@ end function miopenCreateFusionPlan(fusePlanDesc, fuseDirection, inputDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateFusionPlan(fusePlanDesc::Ptr{miopenFusionPlanDescriptor_t}, + @check @ccall(libMIOpen.miopenCreateFusionPlan(fusePlanDesc::Ptr{miopenFusionPlanDescriptor_t}, fuseDirection::miopenFusionDirection_t, inputDesc::miopenTensorDescriptor_t)::miopenStatus_t) end function miopenDestroyFusionPlan(fusePlanDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDestroyFusionPlan(fusePlanDesc::miopenFusionPlanDescriptor_t)::miopenStatus_t) + @check @ccall(libMIOpen.miopenDestroyFusionPlan(fusePlanDesc::miopenFusionPlanDescriptor_t)::miopenStatus_t) end function miopenCompileFusionPlan(handle, fusePlanDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCompileFusionPlan(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenCompileFusionPlan(handle::miopenHandle_t, fusePlanDesc::miopenFusionPlanDescriptor_t)::miopenStatus_t) end function miopenFusionPlanGetOp(fusePlanDesc, op_idx, op) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenFusionPlanGetOp(fusePlanDesc::miopenFusionPlanDescriptor_t, + @check @ccall(libMIOpen.miopenFusionPlanGetOp(fusePlanDesc::miopenFusionPlanDescriptor_t, op_idx::Cint, op::Ptr{miopenFusionOpDescriptor_t})::miopenStatus_t) end function miopenFusionPlanGetWorkSpaceSize(handle, fusePlanDesc, workSpaceSize, algo) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenFusionPlanGetWorkSpaceSize(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenFusionPlanGetWorkSpaceSize(handle::miopenHandle_t, fusePlanDesc::miopenFusionPlanDescriptor_t, workSpaceSize::Ptr{Csize_t}, algo::miopenConvFwdAlgorithm_t)::miopenStatus_t) @@ -2261,7 +2261,7 @@ end function miopenFusionPlanConvolutionGetAlgo(fusePlanDesc, requestAlgoCount, returnedAlgoCount, returnedAlgos) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenFusionPlanConvolutionGetAlgo(fusePlanDesc::miopenFusionPlanDescriptor_t, + @check @ccall(libMIOpen.miopenFusionPlanConvolutionGetAlgo(fusePlanDesc::miopenFusionPlanDescriptor_t, requestAlgoCount::Cint, returnedAlgoCount::Ptr{Cint}, returnedAlgos::Ptr{miopenConvFwdAlgorithm_t})::miopenStatus_t) @@ -2269,13 +2269,13 @@ end function miopenFusionPlanConvolutionSetAlgo(fusePlanDesc, algo) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenFusionPlanConvolutionSetAlgo(fusePlanDesc::miopenFusionPlanDescriptor_t, + @check @ccall(libMIOpen.miopenFusionPlanConvolutionSetAlgo(fusePlanDesc::miopenFusionPlanDescriptor_t, algo::miopenConvFwdAlgorithm_t)::miopenStatus_t) end function miopenCreateOpConvForward(fusePlanDesc, convOp, convDesc, wDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateOpConvForward(fusePlanDesc::miopenFusionPlanDescriptor_t, + @check @ccall(libMIOpen.miopenCreateOpConvForward(fusePlanDesc::miopenFusionPlanDescriptor_t, convOp::Ptr{miopenFusionOpDescriptor_t}, convDesc::miopenConvolutionDescriptor_t, wDesc::miopenTensorDescriptor_t)::miopenStatus_t) @@ -2283,21 +2283,21 @@ end function miopenCreateOpActivationForward(fusePlanDesc, activFwdOp, mode) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateOpActivationForward(fusePlanDesc::miopenFusionPlanDescriptor_t, + @check @ccall(libMIOpen.miopenCreateOpActivationForward(fusePlanDesc::miopenFusionPlanDescriptor_t, activFwdOp::Ptr{miopenFusionOpDescriptor_t}, mode::miopenActivationMode_t)::miopenStatus_t) end function miopenCreateOpActivationBackward(fusePlanDesc, activBwdOp, mode) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateOpActivationBackward(fusePlanDesc::miopenFusionPlanDescriptor_t, + @check @ccall(libMIOpen.miopenCreateOpActivationBackward(fusePlanDesc::miopenFusionPlanDescriptor_t, activBwdOp::Ptr{miopenFusionOpDescriptor_t}, mode::miopenActivationMode_t)::miopenStatus_t) end function miopenCreateOpBiasForward(fusePlanDesc, biasOp, bDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateOpBiasForward(fusePlanDesc::miopenFusionPlanDescriptor_t, + @check @ccall(libMIOpen.miopenCreateOpBiasForward(fusePlanDesc::miopenFusionPlanDescriptor_t, biasOp::Ptr{miopenFusionOpDescriptor_t}, bDesc::miopenTensorDescriptor_t)::miopenStatus_t) end @@ -2305,7 +2305,7 @@ end function miopenCreateOpBatchNormInference(fusePlanDesc, bnOp, bn_mode, bnScaleBiasMeanVarDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateOpBatchNormInference(fusePlanDesc::miopenFusionPlanDescriptor_t, + @check @ccall(libMIOpen.miopenCreateOpBatchNormInference(fusePlanDesc::miopenFusionPlanDescriptor_t, bnOp::Ptr{miopenFusionOpDescriptor_t}, bn_mode::miopenBatchNormMode_t, bnScaleBiasMeanVarDesc::miopenTensorDescriptor_t)::miopenStatus_t) @@ -2313,7 +2313,7 @@ end function miopenCreateOpBatchNormForward(fusePlanDesc, bnFwdOp, bn_mode, runningMeanVariance) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateOpBatchNormForward(fusePlanDesc::miopenFusionPlanDescriptor_t, + @check @ccall(libMIOpen.miopenCreateOpBatchNormForward(fusePlanDesc::miopenFusionPlanDescriptor_t, bnFwdOp::Ptr{miopenFusionOpDescriptor_t}, bn_mode::miopenBatchNormMode_t, runningMeanVariance::Bool)::miopenStatus_t) @@ -2321,24 +2321,24 @@ end function miopenCreateOpBatchNormBackward(fusePlanDesc, bnBwdOp, bn_mode) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateOpBatchNormBackward(fusePlanDesc::miopenFusionPlanDescriptor_t, + @check @ccall(libMIOpen.miopenCreateOpBatchNormBackward(fusePlanDesc::miopenFusionPlanDescriptor_t, bnBwdOp::Ptr{miopenFusionOpDescriptor_t}, bn_mode::miopenBatchNormMode_t)::miopenStatus_t) end function miopenCreateOperatorArgs(args) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateOperatorArgs(args::Ptr{miopenOperatorArgs_t})::miopenStatus_t) + @check @ccall(libMIOpen.miopenCreateOperatorArgs(args::Ptr{miopenOperatorArgs_t})::miopenStatus_t) end function miopenDestroyOperatorArgs(args) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDestroyOperatorArgs(args::miopenOperatorArgs_t)::miopenStatus_t) + @check @ccall(libMIOpen.miopenDestroyOperatorArgs(args::miopenOperatorArgs_t)::miopenStatus_t) end function miopenSetOpArgsConvForward(args, convOp, alpha, beta, w) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetOpArgsConvForward(args::miopenOperatorArgs_t, + @check @ccall(libMIOpen.miopenSetOpArgsConvForward(args::miopenOperatorArgs_t, convOp::miopenFusionOpDescriptor_t, alpha::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -2348,7 +2348,7 @@ end function miopenSetOpArgsActivForward(args, activFwdOp, alpha, beta, activAlpha, activBeta, activGamma) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetOpArgsActivForward(args::miopenOperatorArgs_t, + @check @ccall(libMIOpen.miopenSetOpArgsActivForward(args::miopenOperatorArgs_t, activFwdOp::miopenFusionOpDescriptor_t, alpha::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -2360,7 +2360,7 @@ end function miopenSetOpArgsActivBackward(args, activBwdOp, alpha, beta, y, reserved, activAlpha, activBeta, activGamma) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetOpArgsActivBackward(args::miopenOperatorArgs_t, + @check @ccall(libMIOpen.miopenSetOpArgsActivBackward(args::miopenOperatorArgs_t, activBwdOp::miopenFusionOpDescriptor_t, alpha::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -2374,7 +2374,7 @@ end function miopenSetOpArgsBatchNormInference(args, bnOp, alpha, beta, bnScale, bnBias, estimatedMean, estimatedVariance, epsilon) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetOpArgsBatchNormInference(args::miopenOperatorArgs_t, + @check @ccall(libMIOpen.miopenSetOpArgsBatchNormInference(args::miopenOperatorArgs_t, bnOp::miopenFusionOpDescriptor_t, alpha::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -2389,7 +2389,7 @@ function miopenSetOpArgsBatchNormForward(args, bnOp, alpha, beta, bnScale, bnBia savedMean, savedInvVariance, runningMean, runningVariance, expAvgFactor, epsilon) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetOpArgsBatchNormForward(args::miopenOperatorArgs_t, + @check @ccall(libMIOpen.miopenSetOpArgsBatchNormForward(args::miopenOperatorArgs_t, bnOp::miopenFusionOpDescriptor_t, alpha::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -2407,7 +2407,7 @@ function miopenSetOpArgsBatchNormBackward(args, bnOp, alpha, beta, x, bnScale, b resultBnScaleDiff, resultBnBiasDiff, savedMean, savedInvVariance) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetOpArgsBatchNormBackward(args::miopenOperatorArgs_t, + @check @ccall(libMIOpen.miopenSetOpArgsBatchNormBackward(args::miopenOperatorArgs_t, bnOp::miopenFusionOpDescriptor_t, alpha::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -2422,7 +2422,7 @@ end function miopenSetOpArgsBiasForward(args, biasOp, alpha, beta, bias) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetOpArgsBiasForward(args::miopenOperatorArgs_t, + @check @ccall(libMIOpen.miopenSetOpArgsBiasForward(args::miopenOperatorArgs_t, biasOp::miopenFusionOpDescriptor_t, alpha::Ptr{Cvoid}, beta::Ptr{Cvoid}, @@ -2432,7 +2432,7 @@ end function miopenExecuteFusionPlan(handle, fusePlanDesc, inputDesc, input, outputDesc, output, args) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenExecuteFusionPlan(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenExecuteFusionPlan(handle::miopenHandle_t, fusePlanDesc::miopenFusionPlanDescriptor_t, inputDesc::miopenTensorDescriptor_t, input::Ptr{Cvoid}, @@ -2444,7 +2444,7 @@ end function miopenExecuteFusionPlan_v2(handle, fusePlanDesc, inputDesc, input, outputDesc, output, args, workspace, workspaceSize) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenExecuteFusionPlan_v2(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenExecuteFusionPlan_v2(handle::miopenHandle_t, fusePlanDesc::miopenFusionPlanDescriptor_t, inputDesc::miopenTensorDescriptor_t, input::Ptr{Cvoid}, @@ -2460,7 +2460,7 @@ function miopenConvolutionBiasActivationForward(handle, alpha1, xDesc, x, wDesc, workspaceSizeInBytes, alpha2, zDesc, z, biasDesc, bias, activationDesc, yDesc, y) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenConvolutionBiasActivationForward(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenConvolutionBiasActivationForward(handle::miopenHandle_t, alpha1::Ptr{Cvoid}, xDesc::miopenTensorDescriptor_t, x::Ptr{Cvoid}, @@ -2531,13 +2531,13 @@ end function miopenCreateRNNDescriptor(rnnDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateRNNDescriptor(rnnDesc::Ptr{miopenRNNDescriptor_t})::miopenStatus_t) + @check @ccall(libMIOpen.miopenCreateRNNDescriptor(rnnDesc::Ptr{miopenRNNDescriptor_t})::miopenStatus_t) end function miopenGetRNNDescriptor(rnnDesc, rnnMode, algoMode, inputMode, dirMode, biasMode, hiddenSize, layer) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetRNNDescriptor(rnnDesc::miopenRNNDescriptor_t, + @check @ccall(libMIOpen.miopenGetRNNDescriptor(rnnDesc::miopenRNNDescriptor_t, rnnMode::Ptr{miopenRNNMode_t}, algoMode::Ptr{miopenRNNAlgo_t}, inputMode::Ptr{miopenRNNInputMode_t}, @@ -2550,7 +2550,7 @@ end function miopenGetRNNDescriptor_V2(rnnDesc, hiddenSize, layer, dropoutDesc, inputMode, dirMode, rnnMode, biasMode, algoMode, dataType) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetRNNDescriptor_V2(rnnDesc::miopenRNNDescriptor_t, + @check @ccall(libMIOpen.miopenGetRNNDescriptor_V2(rnnDesc::miopenRNNDescriptor_t, hiddenSize::Ptr{Cint}, layer::Ptr{Cint}, dropoutDesc::Ptr{miopenDropoutDescriptor_t}, @@ -2564,13 +2564,13 @@ end function miopenDestroyRNNDescriptor(rnnDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDestroyRNNDescriptor(rnnDesc::miopenRNNDescriptor_t)::miopenStatus_t) + @check @ccall(libMIOpen.miopenDestroyRNNDescriptor(rnnDesc::miopenRNNDescriptor_t)::miopenStatus_t) end function miopenSetRNNDescriptor(rnnDesc, hsize, nlayers, inMode, direction, rnnMode, biasMode, algo, dataType) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetRNNDescriptor(rnnDesc::miopenRNNDescriptor_t, + @check @ccall(libMIOpen.miopenSetRNNDescriptor(rnnDesc::miopenRNNDescriptor_t, hsize::Cint, nlayers::Cint, inMode::miopenRNNInputMode_t, direction::miopenRNNDirectionMode_t, @@ -2583,7 +2583,7 @@ end function miopenSetRNNDescriptor_V2(rnnDesc, hsize, nlayers, dropoutDesc, inMode, direction, rnnMode, biasMode, algo, dataType) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetRNNDescriptor_V2(rnnDesc::miopenRNNDescriptor_t, + @check @ccall(libMIOpen.miopenSetRNNDescriptor_V2(rnnDesc::miopenRNNDescriptor_t, hsize::Cint, nlayers::Cint, dropoutDesc::miopenDropoutDescriptor_t, inMode::miopenRNNInputMode_t, @@ -2598,7 +2598,7 @@ function miopenSetRNNDataSeqTensorDescriptor(seqTensorDesc, dataType, layout, maxSequenceLen, batchSize, vectorSize, sequenceLenArray, paddingMarker) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetRNNDataSeqTensorDescriptor(seqTensorDesc::miopenSeqTensorDescriptor_t, + @check @ccall(libMIOpen.miopenSetRNNDataSeqTensorDescriptor(seqTensorDesc::miopenSeqTensorDescriptor_t, dataType::miopenDataType_t, layout::miopenRNNBaseLayout_t, maxSequenceLen::Cint, @@ -2613,7 +2613,7 @@ function miopenGetRNNDataSeqTensorDescriptor(seqTensorDesc, dataType, layout, sequenceLenArrayLimit, sequenceLenArray, paddingMarker) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetRNNDataSeqTensorDescriptor(seqTensorDesc::miopenSeqTensorDescriptor_t, + @check @ccall(libMIOpen.miopenGetRNNDataSeqTensorDescriptor(seqTensorDesc::miopenSeqTensorDescriptor_t, dataType::Ptr{miopenDataType_t}, layout::Ptr{miopenRNNBaseLayout_t}, maxSequenceLen::Ptr{Cint}, @@ -2626,7 +2626,7 @@ end function miopenGetRNNWorkspaceSize(handle, rnnDesc, sequenceLen, xDesc, numBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetRNNWorkspaceSize(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenGetRNNWorkspaceSize(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, sequenceLen::Cint, xDesc::Ptr{miopenTensorDescriptor_t}, @@ -2635,7 +2635,7 @@ end function miopenGetRNNTrainingReserveSize(handle, rnnDesc, sequenceLen, xDesc, numBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetRNNTrainingReserveSize(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenGetRNNTrainingReserveSize(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, sequenceLen::Cint, xDesc::Ptr{miopenTensorDescriptor_t}, @@ -2645,7 +2645,7 @@ end function miopenGetRNNTempSpaceSizes(handle, rnnDesc, xDesc, fwdMode, workSpaceSize, reserveSpaceSize) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetRNNTempSpaceSizes(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenGetRNNTempSpaceSizes(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, xDesc::miopenSeqTensorDescriptor_t, fwdMode::miopenRNNFWDMode_t, @@ -2655,7 +2655,7 @@ end function miopenGetRNNParamsSize(handle, rnnDesc, xDesc, numBytes, dtype) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetRNNParamsSize(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenGetRNNParamsSize(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, xDesc::miopenTensorDescriptor_t, numBytes::Ptr{Csize_t}, @@ -2664,7 +2664,7 @@ end function miopenGetRNNParamsDescriptor(handle, rnnDesc, xDesc, wDesc, dtype) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetRNNParamsDescriptor(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenGetRNNParamsDescriptor(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, xDesc::miopenTensorDescriptor_t, wDesc::miopenTensorDescriptor_t, @@ -2673,7 +2673,7 @@ end function miopenGetRNNInputTensorSize(handle, rnnDesc, seqLen, xDesc, numBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetRNNInputTensorSize(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenGetRNNInputTensorSize(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, seqLen::Cint, xDesc::Ptr{miopenTensorDescriptor_t}, @@ -2682,7 +2682,7 @@ end function miopenGetRNNHiddenTensorSize(handle, rnnDesc, seqLen, xDesc, numBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetRNNHiddenTensorSize(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenGetRNNHiddenTensorSize(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, seqLen::Cint, xDesc::Ptr{miopenTensorDescriptor_t}, @@ -2691,7 +2691,7 @@ end function miopenGetRNNLayerParamSize(handle, rnnDesc, layer, xDesc, paramID, numBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetRNNLayerParamSize(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenGetRNNLayerParamSize(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, layer::Cint, xDesc::miopenTensorDescriptor_t, @@ -2701,7 +2701,7 @@ end function miopenGetRNNLayerBiasSize(handle, rnnDesc, layer, biasID, numBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetRNNLayerBiasSize(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenGetRNNLayerBiasSize(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, layer::Cint, biasID::Cint, numBytes::Ptr{Csize_t})::miopenStatus_t) @@ -2710,7 +2710,7 @@ end function miopenGetRNNLayerParam(handle, rnnDesc, layer, xDesc, wDesc, w, paramID, paramDesc, layerParam) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetRNNLayerParam(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenGetRNNLayerParam(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, layer::Cint, xDesc::miopenTensorDescriptor_t, @@ -2723,7 +2723,7 @@ end function miopenGetRNNLayerBias(handle, rnnDesc, layer, xDesc, wDesc, w, biasID, biasDesc, layerBias) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetRNNLayerBias(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenGetRNNLayerBias(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, layer::Cint, xDesc::miopenTensorDescriptor_t, @@ -2736,7 +2736,7 @@ end function miopenGetRNNLayerParamOffset(rnnDesc, layer, xDesc, paramID, paramDesc, layerParamOffset) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetRNNLayerParamOffset(rnnDesc::miopenRNNDescriptor_t, + @check @ccall(libMIOpen.miopenGetRNNLayerParamOffset(rnnDesc::miopenRNNDescriptor_t, layer::Cint, xDesc::miopenTensorDescriptor_t, paramID::Cint, @@ -2747,7 +2747,7 @@ end function miopenGetRNNLayerBiasOffset(rnnDesc, layer, xDesc, biasID, biasDesc, layerBiasOffset) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetRNNLayerBiasOffset(rnnDesc::miopenRNNDescriptor_t, + @check @ccall(libMIOpen.miopenGetRNNLayerBiasOffset(rnnDesc::miopenRNNDescriptor_t, layer::Cint, xDesc::miopenTensorDescriptor_t, biasID::Cint, @@ -2758,7 +2758,7 @@ end function miopenSetRNNLayerParam(handle, rnnDesc, layer, xDesc, wDesc, w, paramID, paramDesc, layerParam) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetRNNLayerParam(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenSetRNNLayerParam(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, layer::Cint, xDesc::miopenTensorDescriptor_t, @@ -2771,7 +2771,7 @@ end function miopenSetRNNLayerBias(handle, rnnDesc, layer, xDesc, wDesc, w, biasID, biasDesc, layerBias) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetRNNLayerBias(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenSetRNNLayerBias(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, layer::Cint, xDesc::miopenTensorDescriptor_t, @@ -2783,13 +2783,13 @@ end function miopenSetRNNPaddingMode(rnnDesc, paddingMode) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetRNNPaddingMode(rnnDesc::miopenRNNDescriptor_t, + @check @ccall(libMIOpen.miopenSetRNNPaddingMode(rnnDesc::miopenRNNDescriptor_t, paddingMode::miopenRNNPaddingMode_t)::miopenStatus_t) end function miopenGetRNNPaddingMode(rnnDesc, paddingMode) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetRNNPaddingMode(rnnDesc::miopenRNNDescriptor_t, + @check @ccall(libMIOpen.miopenGetRNNPaddingMode(rnnDesc::miopenRNNDescriptor_t, paddingMode::Ptr{miopenRNNPaddingMode_t})::miopenStatus_t) end @@ -2797,7 +2797,7 @@ function miopenRNNForward(handle, rnnDesc, fwdMode, xDesc, x, hDesc, hx, hy, cDe yDesc, y, w, weightSpaceSize, workSpace, workSpaceNumBytes, reserveSpace, reserveSpaceNumBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenRNNForward(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenRNNForward(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, fwdMode::miopenRNNFWDMode_t, xDesc::miopenSeqTensorDescriptor_t, @@ -2819,7 +2819,7 @@ function miopenRNNBackwardSeqData(handle, rnnDesc, yDesc, y, dy, hDesc, hx, dhy, cx, dcy, dcx, xDesc, dx, w, weightSpaceSize, workSpace, workSpaceNumBytes, reserveSpace, reserveSpaceNumBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenRNNBackwardSeqData(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenRNNBackwardSeqData(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, yDesc::miopenSeqTensorDescriptor_t, y::Ptr{Cvoid}, dy::Ptr{Cvoid}, @@ -2843,7 +2843,7 @@ function miopenRNNBackwardWeightsSeqTensor(handle, rnnDesc, xDesc, x, hDesc, hx, workSpaceNumBytes, reserveSpace, reserveSpaceNumBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenRNNBackwardWeightsSeqTensor(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenRNNBackwardWeightsSeqTensor(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, xDesc::miopenSeqTensorDescriptor_t, x::Ptr{Cvoid}, @@ -2864,7 +2864,7 @@ function miopenRNNForwardTraining(handle, rnnDesc, sequenceLen, xDesc, x, hxDesc workSpace, workSpaceNumBytes, reserveSpace, reserveSpaceNumBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenRNNForwardTraining(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenRNNForwardTraining(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, sequenceLen::Cint, xDesc::Ptr{miopenTensorDescriptor_t}, @@ -2892,7 +2892,7 @@ function miopenRNNBackwardData(handle, rnnDesc, sequenceLen, yDesc, y, dyDesc, d dx, dhxDesc, dhx, dcxDesc, dcx, workSpace, workSpaceNumBytes, reserveSpace, reserveSpaceNumBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenRNNBackwardData(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenRNNBackwardData(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, sequenceLen::Cint, yDesc::Ptr{miopenTensorDescriptor_t}, @@ -2925,7 +2925,7 @@ function miopenRNNBackwardWeights(handle, rnnDesc, sequenceLen, xDesc, x, hxDesc y, dwDesc, dw, workSpace, workSpaceNumBytes, reserveSpace, reserveSpaceNumBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenRNNBackwardWeights(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenRNNBackwardWeights(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, sequenceLen::Cint, xDesc::Ptr{miopenTensorDescriptor_t}, @@ -2946,7 +2946,7 @@ function miopenRNNForwardInference(handle, rnnDesc, sequenceLen, xDesc, x, hxDes cxDesc, cx, wDesc, w, yDesc, y, hyDesc, hy, cyDesc, cy, workSpace, workSpaceNumBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenRNNForwardInference(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenRNNForwardInference(handle::miopenHandle_t, rnnDesc::miopenRNNDescriptor_t, sequenceLen::Cint, xDesc::Ptr{miopenTensorDescriptor_t}, @@ -2973,13 +2973,13 @@ end function miopenCreateCTCLossDescriptor(ctcLossDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateCTCLossDescriptor(ctcLossDesc::Ptr{miopenCTCLossDescriptor_t})::miopenStatus_t) + @check @ccall(libMIOpen.miopenCreateCTCLossDescriptor(ctcLossDesc::Ptr{miopenCTCLossDescriptor_t})::miopenStatus_t) end function miopenGetCTCLossDescriptor(ctcLossDesc, dataType, blank_label_id, apply_softmax_layer) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetCTCLossDescriptor(ctcLossDesc::miopenCTCLossDescriptor_t, + @check @ccall(libMIOpen.miopenGetCTCLossDescriptor(ctcLossDesc::miopenCTCLossDescriptor_t, dataType::Ptr{miopenDataType_t}, blank_label_id::Ptr{Cint}, apply_softmax_layer::Ptr{Bool})::miopenStatus_t) @@ -2987,13 +2987,13 @@ end function miopenDestroyCTCLossDescriptor(ctcLossDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDestroyCTCLossDescriptor(ctcLossDesc::miopenCTCLossDescriptor_t)::miopenStatus_t) + @check @ccall(libMIOpen.miopenDestroyCTCLossDescriptor(ctcLossDesc::miopenCTCLossDescriptor_t)::miopenStatus_t) end function miopenSetCTCLossDescriptor(ctcLossDesc, dataType, blank_label_id, apply_softmax_layer) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetCTCLossDescriptor(ctcLossDesc::miopenCTCLossDescriptor_t, + @check @ccall(libMIOpen.miopenSetCTCLossDescriptor(ctcLossDesc::miopenCTCLossDescriptor_t, dataType::miopenDataType_t, blank_label_id::Cint, apply_softmax_layer::Bool)::miopenStatus_t) @@ -3003,7 +3003,7 @@ function miopenGetCTCLossWorkspaceSize(handle, probsDesc, gradientsDesc, labels, labelLengths, inputLengths, algo, ctcLossDesc, workSpaceSize) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetCTCLossWorkspaceSize(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenGetCTCLossWorkspaceSize(handle::miopenHandle_t, probsDesc::miopenTensorDescriptor_t, gradientsDesc::miopenTensorDescriptor_t, labels::Ptr{Cint}, @@ -3018,7 +3018,7 @@ function miopenCTCLoss(handle, probsDesc, probs, labels, labelLengths, inputLeng gradientsDesc, gradients, algo, ctcLossDesc, workSpace, workSpaceSize) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCTCLoss(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenCTCLoss(handle::miopenHandle_t, probsDesc::miopenTensorDescriptor_t, probs::Ptr{Cvoid}, labels::Ptr{Cint}, labelLengths::Ptr{Cint}, @@ -3037,30 +3037,30 @@ end function miopenCreateDropoutDescriptor(dropoutDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateDropoutDescriptor(dropoutDesc::Ptr{miopenDropoutDescriptor_t})::miopenStatus_t) + @check @ccall(libMIOpen.miopenCreateDropoutDescriptor(dropoutDesc::Ptr{miopenDropoutDescriptor_t})::miopenStatus_t) end function miopenDestroyDropoutDescriptor(dropoutDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDestroyDropoutDescriptor(dropoutDesc::miopenDropoutDescriptor_t)::miopenStatus_t) + @check @ccall(libMIOpen.miopenDestroyDropoutDescriptor(dropoutDesc::miopenDropoutDescriptor_t)::miopenStatus_t) end function miopenDropoutGetReserveSpaceSize(xDesc, reserveSpaceSizeInBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDropoutGetReserveSpaceSize(xDesc::miopenTensorDescriptor_t, + @check @ccall(libMIOpen.miopenDropoutGetReserveSpaceSize(xDesc::miopenTensorDescriptor_t, reserveSpaceSizeInBytes::Ptr{Csize_t})::miopenStatus_t) end function miopenDropoutGetStatesSize(handle, stateSizeInBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDropoutGetStatesSize(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenDropoutGetStatesSize(handle::miopenHandle_t, stateSizeInBytes::Ptr{Csize_t})::miopenStatus_t) end function miopenGetDropoutDescriptor(dropoutDesc, handle, dropout, states, seed, use_mask, state_evo, rng_mode) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetDropoutDescriptor(dropoutDesc::miopenDropoutDescriptor_t, + @check @ccall(libMIOpen.miopenGetDropoutDescriptor(dropoutDesc::miopenDropoutDescriptor_t, handle::miopenHandle_t, dropout::Ptr{Cfloat}, states::Ptr{Ptr{Cvoid}}, @@ -3074,7 +3074,7 @@ function miopenRestoreDropoutDescriptor(dropoutDesc, handle, dropout, states, stateSizeInBytes, seed, use_mask, state_evo, rng_mode) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenRestoreDropoutDescriptor(dropoutDesc::miopenDropoutDescriptor_t, + @check @ccall(libMIOpen.miopenRestoreDropoutDescriptor(dropoutDesc::miopenDropoutDescriptor_t, handle::miopenHandle_t, dropout::Cfloat, states::Ptr{Cvoid}, @@ -3088,7 +3088,7 @@ end function miopenSetDropoutDescriptor(dropoutDesc, handle, dropout, states, stateSizeInBytes, seed, use_mask, state_evo, rng_mode) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetDropoutDescriptor(dropoutDesc::miopenDropoutDescriptor_t, + @check @ccall(libMIOpen.miopenSetDropoutDescriptor(dropoutDesc::miopenDropoutDescriptor_t, handle::miopenHandle_t, dropout::Cfloat, states::Ptr{Cvoid}, @@ -3101,7 +3101,7 @@ end function miopenDropoutForward(handle, dropoutDesc, noise_shape, xDesc, x, yDesc, y, reserveSpace, reserveSpaceSizeInBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDropoutForward(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenDropoutForward(handle::miopenHandle_t, dropoutDesc::miopenDropoutDescriptor_t, noise_shape::miopenTensorDescriptor_t, xDesc::miopenTensorDescriptor_t, @@ -3115,7 +3115,7 @@ end function miopenDropoutBackward(handle, dropoutDesc, noise_shape, dyDesc, dy, dxDesc, dx, reserveSpace, reserveSpaceSizeInBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDropoutBackward(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenDropoutBackward(handle::miopenHandle_t, dropoutDesc::miopenDropoutDescriptor_t, noise_shape::miopenTensorDescriptor_t, dyDesc::miopenTensorDescriptor_t, @@ -3128,19 +3128,19 @@ end function miopenCreateReduceTensorDescriptor(reduceTensorDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateReduceTensorDescriptor(reduceTensorDesc::Ptr{miopenReduceTensorDescriptor_t})::miopenStatus_t) + @check @ccall(libMIOpen.miopenCreateReduceTensorDescriptor(reduceTensorDesc::Ptr{miopenReduceTensorDescriptor_t})::miopenStatus_t) end function miopenDestroyReduceTensorDescriptor(reduceTensorDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDestroyReduceTensorDescriptor(reduceTensorDesc::miopenReduceTensorDescriptor_t)::miopenStatus_t) + @check @ccall(libMIOpen.miopenDestroyReduceTensorDescriptor(reduceTensorDesc::miopenReduceTensorDescriptor_t)::miopenStatus_t) end function miopenSetReduceTensorDescriptor(reduceTensorDesc, reduceTensorOp, reduceTensorCompType, reduceTensorNanOpt, reduceTensorIndices, reduceTensorIndicesType) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetReduceTensorDescriptor(reduceTensorDesc::miopenReduceTensorDescriptor_t, + @check @ccall(libMIOpen.miopenSetReduceTensorDescriptor(reduceTensorDesc::miopenReduceTensorDescriptor_t, reduceTensorOp::miopenReduceTensorOp_t, reduceTensorCompType::miopenDataType_t, reduceTensorNanOpt::miopenNanPropagation_t, @@ -3152,7 +3152,7 @@ function miopenGetReduceTensorDescriptor(reduceTensorDesc, reduceTensorOp, reduceTensorCompType, reduceTensorNanOpt, reduceTensorIndices, reduceTensorIndicesType) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetReduceTensorDescriptor(reduceTensorDesc::miopenReduceTensorDescriptor_t, + @check @ccall(libMIOpen.miopenGetReduceTensorDescriptor(reduceTensorDesc::miopenReduceTensorDescriptor_t, reduceTensorOp::Ptr{miopenReduceTensorOp_t}, reduceTensorCompType::Ptr{miopenDataType_t}, reduceTensorNanOpt::Ptr{miopenNanPropagation_t}, @@ -3162,7 +3162,7 @@ end function miopenGetReductionIndicesSize(handle, reduceTensorDesc, aDesc, cDesc, sizeInBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetReductionIndicesSize(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenGetReductionIndicesSize(handle::miopenHandle_t, reduceTensorDesc::miopenReduceTensorDescriptor_t, aDesc::miopenTensorDescriptor_t, cDesc::miopenTensorDescriptor_t, @@ -3172,7 +3172,7 @@ end function miopenGetReductionWorkspaceSize(handle, reduceTensorDesc, aDesc, cDesc, sizeInBytes) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetReductionWorkspaceSize(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenGetReductionWorkspaceSize(handle::miopenHandle_t, reduceTensorDesc::miopenReduceTensorDescriptor_t, aDesc::miopenTensorDescriptor_t, cDesc::miopenTensorDescriptor_t, @@ -3183,7 +3183,7 @@ function miopenReduceTensor(handle, reduceTensorDesc, indices, indicesSizeInByte workspace, workspaceSizeInBytes, alpha, aDesc, A, beta, cDesc, C) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenReduceTensor(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenReduceTensor(handle::miopenHandle_t, reduceTensorDesc::miopenReduceTensorDescriptor_t, indices::Ptr{Cvoid}, indicesSizeInBytes::Csize_t, @@ -3256,7 +3256,7 @@ end function miopenCreateConvProblem(problem, operatorDesc, direction) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateConvProblem(problem::Ptr{miopenProblem_t}, + @check @ccall(libMIOpen.miopenCreateConvProblem(problem::Ptr{miopenProblem_t}, operatorDesc::miopenConvolutionDescriptor_t, direction::miopenProblemDirection_t)::miopenStatus_t) end @@ -3268,36 +3268,36 @@ end function miopenCreateMhaProblem(problem, operatorDesc, direction) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateMhaProblem(problem::Ptr{miopenProblem_t}, + @check @ccall(libMIOpen.miopenCreateMhaProblem(problem::Ptr{miopenProblem_t}, operatorDesc::miopenMhaDescriptor_t, direction::miopenProblemDirection_t)::miopenStatus_t) end function miopenCreateMhaDescriptor(mhaDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateMhaDescriptor(mhaDesc::Ptr{miopenMhaDescriptor_t})::miopenStatus_t) + @check @ccall(libMIOpen.miopenCreateMhaDescriptor(mhaDesc::Ptr{miopenMhaDescriptor_t})::miopenStatus_t) end function miopenSetMhaDescriptor(mhaDesc, scale) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetMhaDescriptor(mhaDesc::miopenMhaDescriptor_t, + @check @ccall(libMIOpen.miopenSetMhaDescriptor(mhaDesc::miopenMhaDescriptor_t, scale::Cfloat)::miopenStatus_t) end function miopenGetMhaDescriptor(mhaDesc, scale) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetMhaDescriptor(mhaDesc::miopenMhaDescriptor_t, + @check @ccall(libMIOpen.miopenGetMhaDescriptor(mhaDesc::miopenMhaDescriptor_t, scale::Ptr{Cfloat})::miopenStatus_t) end function miopenCreateSoftmaxDescriptor(softmaxDesc) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateSoftmaxDescriptor(softmaxDesc::Ptr{miopenSoftmaxDescriptor_t})::miopenStatus_t) + @check @ccall(libMIOpen.miopenCreateSoftmaxDescriptor(softmaxDesc::Ptr{miopenSoftmaxDescriptor_t})::miopenStatus_t) end function miopenSetSoftmaxDescriptor(softmaxDesc, alpha, beta, algorithm, mode) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetSoftmaxDescriptor(softmaxDesc::miopenSoftmaxDescriptor_t, + @check @ccall(libMIOpen.miopenSetSoftmaxDescriptor(softmaxDesc::miopenSoftmaxDescriptor_t, alpha::Cfloat, beta::Cfloat, algorithm::miopenSoftmaxAlgorithm_t, mode::miopenSoftmaxMode_t)::miopenStatus_t) @@ -3305,7 +3305,7 @@ end function miopenGetSoftmaxDescriptor(softmaxDesc, alpha, beta, algorithm, mode) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetSoftmaxDescriptor(softmaxDesc::miopenSoftmaxDescriptor_t, + @check @ccall(libMIOpen.miopenGetSoftmaxDescriptor(softmaxDesc::miopenSoftmaxDescriptor_t, alpha::Ptr{Cfloat}, beta::Ptr{Cfloat}, algorithm::Ptr{miopenSoftmaxAlgorithm_t}, @@ -3314,12 +3314,12 @@ end function miopenDestroyProblem(problem) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDestroyProblem(problem::miopenProblem_t)::miopenStatus_t) + @check @ccall(libMIOpen.miopenDestroyProblem(problem::miopenProblem_t)::miopenStatus_t) end function miopenSetProblemTensorDescriptor(problem, id, descriptor) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetProblemTensorDescriptor(problem::miopenProblem_t, + @check @ccall(libMIOpen.miopenSetProblemTensorDescriptor(problem::miopenProblem_t, id::miopenTensorArgumentId_t, descriptor::miopenTensorDescriptor_t)::miopenStatus_t) end @@ -3331,49 +3331,49 @@ const miopenFindOptions_t = Ptr{miopenFindOptions} function miopenCreateFindOptions(options) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenCreateFindOptions(options::Ptr{miopenFindOptions_t})::miopenStatus_t) + @check @ccall(libMIOpen.miopenCreateFindOptions(options::Ptr{miopenFindOptions_t})::miopenStatus_t) end function miopenDestroyFindOptions(options) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDestroyFindOptions(options::miopenFindOptions_t)::miopenStatus_t) + @check @ccall(libMIOpen.miopenDestroyFindOptions(options::miopenFindOptions_t)::miopenStatus_t) end function miopenSetFindOptionTuning(options, value) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetFindOptionTuning(options::miopenFindOptions_t, + @check @ccall(libMIOpen.miopenSetFindOptionTuning(options::miopenFindOptions_t, value::Cint)::miopenStatus_t) end function miopenSetFindOptionResultsOrder(options, value) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetFindOptionResultsOrder(options::miopenFindOptions_t, + @check @ccall(libMIOpen.miopenSetFindOptionResultsOrder(options::miopenFindOptions_t, value::miopenFindResultsOrder_t)::miopenStatus_t) end function miopenSetFindOptionWorkspaceLimit(options, value) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetFindOptionWorkspaceLimit(options::miopenFindOptions_t, + @check @ccall(libMIOpen.miopenSetFindOptionWorkspaceLimit(options::miopenFindOptions_t, value::Csize_t)::miopenStatus_t) end function miopenSetFindOptionPreallocatedWorkspace(options, buffer, size) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetFindOptionPreallocatedWorkspace(options::miopenFindOptions_t, + @check @ccall(libMIOpen.miopenSetFindOptionPreallocatedWorkspace(options::miopenFindOptions_t, buffer::Ptr{Cvoid}, size::Csize_t)::miopenStatus_t) end function miopenSetFindOptionPreallocatedTensor(options, id, buffer) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetFindOptionPreallocatedTensor(options::miopenFindOptions_t, + @check @ccall(libMIOpen.miopenSetFindOptionPreallocatedTensor(options::miopenFindOptions_t, id::miopenTensorArgumentId_t, buffer::Ptr{Cvoid})::miopenStatus_t) end function miopenSetFindOptionAttachBinaries(options, attach) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetFindOptionAttachBinaries(options::miopenFindOptions_t, + @check @ccall(libMIOpen.miopenSetFindOptionAttachBinaries(options::miopenFindOptions_t, attach::Cuint)::miopenStatus_t) end @@ -3385,7 +3385,7 @@ const miopenSolution_t = Ptr{miopenSolution} function miopenFindSolutions(handle, problem, options, solutions, numSolutions, maxSolutions) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenFindSolutions(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenFindSolutions(handle::miopenHandle_t, problem::miopenProblem_t, options::miopenFindOptions_t, solutions::Ptr{miopenSolution_t}, @@ -3401,7 +3401,7 @@ end function miopenRunSolution(handle, solution, nInputs, tensors, workspace, workspaceSize) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenRunSolution(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenRunSolution(handle::miopenHandle_t, solution::miopenSolution_t, nInputs::Csize_t, tensors::Ptr{miopenTensorArgument_t}, @@ -3411,49 +3411,49 @@ end function miopenDestroySolution(solution) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenDestroySolution(solution::miopenSolution_t)::miopenStatus_t) + @check @ccall(libMIOpen.miopenDestroySolution(solution::miopenSolution_t)::miopenStatus_t) end function miopenLoadSolution(solution, data, size) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenLoadSolution(solution::Ptr{miopenSolution_t}, + @check @ccall(libMIOpen.miopenLoadSolution(solution::Ptr{miopenSolution_t}, data::Ptr{Cchar}, size::Csize_t)::miopenStatus_t) end function miopenSaveSolution(solution, data) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSaveSolution(solution::miopenSolution_t, + @check @ccall(libMIOpen.miopenSaveSolution(solution::miopenSolution_t, data::Ptr{Cchar})::miopenStatus_t) end function miopenGetSolutionSize(solution, size) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetSolutionSize(solution::miopenSolution_t, + @check @ccall(libMIOpen.miopenGetSolutionSize(solution::miopenSolution_t, size::Ptr{Csize_t})::miopenStatus_t) end function miopenGetSolutionWorkspaceSize(solution, workspaceSize) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetSolutionWorkspaceSize(solution::miopenSolution_t, + @check @ccall(libMIOpen.miopenGetSolutionWorkspaceSize(solution::miopenSolution_t, workspaceSize::Ptr{Csize_t})::miopenStatus_t) end function miopenGetSolutionTime(solution, time) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetSolutionTime(solution::miopenSolution_t, + @check @ccall(libMIOpen.miopenGetSolutionTime(solution::miopenSolution_t, time::Ptr{Cfloat})::miopenStatus_t) end function miopenGetSolutionSolverId(solution, solverId) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetSolutionSolverId(solution::miopenSolution_t, + @check @ccall(libMIOpen.miopenGetSolutionSolverId(solution::miopenSolution_t, solverId::Ptr{UInt64})::miopenStatus_t) end function miopenGetSolverIdConvAlgorithm(solverId, result) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetSolverIdConvAlgorithm(solverId::UInt64, + @check @ccall(libMIOpen.miopenGetSolverIdConvAlgorithm(solverId::UInt64, result::Ptr{miopenConvAlgorithm_t})::miopenStatus_t) end @@ -3474,13 +3474,13 @@ end function miopenSetTuningPolicy(handle, newValue) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenSetTuningPolicy(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenSetTuningPolicy(handle::miopenHandle_t, newValue::miopenTuningPolicy_t)::miopenStatus_t) end function miopenGetTuningPolicy(handle, value) AMDGPU.prepare_state() - @check @ccall(libMIOpen_path.miopenGetTuningPolicy(handle::miopenHandle_t, + @check @ccall(libMIOpen.miopenGetTuningPolicy(handle::miopenHandle_t, value::Ptr{miopenTuningPolicy_t})::miopenStatus_t) end diff --git a/src/libs.jl b/src/libs.jl new file mode 100644 index 000000000..31293be74 --- /dev/null +++ b/src/libs.jl @@ -0,0 +1,118 @@ +# Selection of the ROCm library provider. +# +# By default the ROCm runtime (HIP, HSA) and the vendor libraries (rocBLAS et +# al.) come from the ROCm_Runtime subpackage, which ships AMD's TheRock +# distribution as lazy artifacts. Setting its "local" preference (see +# `AMDGPU.set_rocm_version!`) switches them to a local ROCm installation, +# discovered through ROCm_Runtime_Discovery; that package is not loaded at all +# otherwise. +# +# `ld.lld` and the device libraries always come from their JLLs: `ld.lld` has +# to match the LLVM version device code is generated with, and local device +# libraries target a newer LLVM than Julia's and would need to be downgraded. + +import AMDGPU_LLVM_Backend_jll +import ROCmDeviceLibs_jll +import ROCm_Runtime + +const local_rocm = ROCm_Runtime.local_preference === true +if local_rocm + import ROCm_Runtime_Discovery +end + +global libhsaruntime::String = "" +global libhip::String = "" +global lld_path::String = "" +global libdevice_libs::String = "" +global librocblas::String = "" +global librocsparse::String = "" +global librocsolver::String = "" +global librocrand::String = "" +global librocfft::String = "" +global libMIOpen::String = "" + +function __init_libs__() + if local_rocm + global libhip = ROCm_Runtime_Discovery.libamdhip64 + global libhsaruntime = ROCm_Runtime_Discovery.libhsa_runtime64 + global librocblas = ROCm_Runtime_Discovery.librocblas + global librocsparse = ROCm_Runtime_Discovery.librocsparse + global librocsolver = ROCm_Runtime_Discovery.librocsolver + global librocrand = ROCm_Runtime_Discovery.librocrand + global librocfft = ROCm_Runtime_Discovery.librocfft + global libMIOpen = ROCm_Runtime_Discovery.libMIOpen + elseif ROCm_Runtime.is_available() + global libhip = ROCm_Runtime.libamdhip64 + global libhsaruntime = Sys.islinux() ? + ROCm_Runtime.libhsa_runtime64 : "" + global librocblas = ROCm_Runtime.librocblas + global librocsparse = ROCm_Runtime.librocsparse + global librocsolver = ROCm_Runtime.librocsolver + global librocrand = ROCm_Runtime.librocrand + global librocfft = ROCm_Runtime.librocfft + global libMIOpen = ROCm_Runtime.libMIOpen + end + + if AMDGPU_LLVM_Backend_jll.is_available() + global lld_path = AMDGPU_LLVM_Backend_jll.lld_path + end + + if ROCmDeviceLibs_jll.is_available() + global libdevice_libs = ROCmDeviceLibs_jll.bitcode_path + end +end + +""" + AMDGPU.set_rocm_version!([version::VersionNumber]; [local_rocm::Bool]) + +Configure the active project to use a specific ROCm version from a specific +source. + +If `local_rocm` is set, the ROCm runtime and libraries will be used from the +local system, otherwise they will be downloaded from an artifact source. In the +case of a local ROCm, `version` informs AMDGPU.jl which version that is (this +may be useful if auto-detection fails). In the case of artifact sources, +`version` controls which version will be downloaded and used. + +When not specifying either the `version` or the `local_rocm` argument, the +default behavior will be used, which is to use the most recent compatible +artifacts. Note that this will override any preferences that may be configured +in a higher-up depot; to clear preferences nondestructively, use +[`AMDGPU.reset_rocm_version!`](@ref) instead. +""" +function set_rocm_version!(version::Union{Nothing,VersionNumber}=nothing; + local_rocm::Union{Nothing,Bool}=nothing) + Preferences.set_preferences!(ROCm_Runtime, + "version" => isnothing(version) ? nothing : "$(version.major).$(version.minor)"; + force=true) + Preferences.set_preferences!(ROCm_Runtime, + "local" => isnothing(local_rocm) ? nothing : string(local_rocm); + force=true) + + io = IOBuffer() + print(io, "Configured the active project to use ") + if version !== nothing + print(io, "ROCm $(version.major).$(version.minor)") + else + print(io, "the default ROCm") + end + if local_rocm !== nothing + print(io, local_rocm ? " from the local system" : " from artifact sources") + end + print(io, "; please re-start Julia for this to take effect.") + @info String(take!(io)) +end + +""" + AMDGPU.reset_rocm_version!() + +Reset the ROCm version preferences in the active project to the default, which +is to use the most recent compatible artifacts, unless a higher-up depot has +configured a different preference. To force use of the default behavior for the +local project, use [`AMDGPU.set_rocm_version!`](@ref) with no arguments. +""" +function reset_rocm_version!() + Preferences.delete_preferences!(ROCm_Runtime, "version"; force=true) + Preferences.delete_preferences!(ROCm_Runtime, "local"; force=true) + @info "Reset ROCm version preference, please re-start Julia for this to take effect." +end diff --git a/src/precompile.jl b/src/precompile.jl index e9d859bb9..748976959 100644 --- a/src/precompile.jl +++ b/src/precompile.jl @@ -56,13 +56,13 @@ if :AMDGPU in LLVM.backends() # attach its artifact to the package-image CI. Compiler.compile_or_lookup(job) - # The compile above runs during precompilation, when ROCm - # discovery (`__init__`) has NOT run, so `libdevice_libs` is + # The compile above runs during precompilation, when + # `__init_libs__` has NOT run, so `libdevice_libs` is # empty. That poisons the `DEVICE_LIBS` cache with empty entries # (e.g. an `ocml` `DevLib` with no path), which would be baked # into the precompile image and prevent device-library linking # at runtime (`unsupported call to __ocml_*`). Reset it so it is - # repopulated correctly once discovery has run. + # repopulated correctly once `__init_libs__` has run. empty!(Compiler.DEVICE_LIBS) end end diff --git a/src/utils.jl b/src/utils.jl index 65e21a952..b5b3ae3e7 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -43,6 +43,8 @@ diagnostic when something is missing or not working. """ function versioninfo(io::IO=stdout) println(io, "AMDGPU versioninfo") + println(io, "ROCm provider: ", local_rocm ? + "local ROCm installation" : "downloaded artifacts") _status(st::Bool) = st ? "+" : "-" _libpath(p::String) = isempty(p) ? "-" : p _ver(lib::Symbol, ver_fn) = functional(lib) ? "$(ver_fn())" : "-" @@ -66,7 +68,7 @@ function versioninfo(io::IO=stdout) _status(functional(:rocrand)) "rocRAND" _ver(:rocrand, rocRAND.version) _libpath(librocrand); _status(functional(:rocfft)) "rocFFT" _ver(:rocfft, rocFFT.version) _libpath(librocfft); _status(functional(:hiptensor)) "hipTENSOR" _ver(:hiptensor, hipTENSOR.version) _libpath(libhiptensor); - _status(functional(:MIOpen)) "MIOpen" _ver(:MIOpen, MIOpen.version) _libpath(libMIOpen_path); + _status(functional(:MIOpen)) "MIOpen" _ver(:MIOpen, MIOpen.version) _libpath(libMIOpen); ] PrettyTables.pretty_table(io, data; column_labels=[ @@ -164,7 +166,7 @@ function functional(component::Symbol) false end elseif component == :MIOpen - return !isempty(libMIOpen_path) + return !isempty(libMIOpen) elseif component == :all for component in ( :hip, :lld, :device_libs, :rocblas, :rocsolver, diff --git a/test/Project.toml b/test/Project.toml index 8a24df04d..91dfda111 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -16,6 +16,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" ParallelTestRunner = "d3525ed8-44d0-4b2c-a655-542cee43accc" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" +ROCm_Runtime_Discovery = "0bf8d700-1fac-4a41-93ae-0195dedb3a15" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" SparseMatricesCSR = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1" @@ -27,3 +28,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [sources] AMDGPU = {path = ".."} +ROCm_Runtime_Discovery = {path = "../ROCm_Runtime_Discovery"} diff --git a/test/core/discovery_tests.jl b/test/core/discovery_tests.jl index 814556773..2ac9b2d3e 100644 --- a/test/core/discovery_tests.jl +++ b/test/core/discovery_tests.jl @@ -1,5 +1,5 @@ using Test -using AMDGPU +import ROCm_Runtime_Discovery # Pure-filesystem tests for ROCm library discovery against synthetic trees # (no real ROCm install or GPU needed). Two kinds of test live here: @@ -12,7 +12,7 @@ using AMDGPU # generation. When a future ROCm moves these, ADD the new # path (keep the old for back-compat) rather than editing # in place. -const Disc = AMDGPU.ROCmDiscovery +const Disc = ROCm_Runtime_Discovery # The `core-*` fallback and the `libamdhip64` naming are Linux-specific. if Sys.islinux() From 1865b03d1ad9d887fcf859b5a8fa7d3808caa162 Mon Sep 17 00:00:00 2001 From: Simeon David Schaub Date: Sat, 15 Aug 2026 20:57:27 +0000 Subject: [PATCH 02/28] Replace __init_libs__ with conditional using of the provider packages Both ROCm_Runtime and ROCm_Runtime_Discovery export the same library path globals, so AMDGPU can simply `using` whichever the "local" preference selects: the imported bindings alias the provider's globals and pick up the values assigned by its `__init__`, which runs before AMDGPU loads. AMDGPU's `libhip`/`libhsaruntime` names are renamed to the providers' `libamdhip64`/`libhsa_runtime64` so no aliasing layer is needed, and `lld_path`/`libdevice_libs` are imported directly from their JLLs, which are assumed to always be available. The discovery package gains libhiprtc and libamd_comgr lookups for API parity with ROCm_Runtime. As a side effect the device libraries are now available while AMDGPU itself precompiles (the JLL's `__init__` runs then), so the warming compile links them for real; the DEVICE_LIBS reset stays to keep absolute artifact paths and bitcode blobs out of the package image. Assisted-by: Claude Code (claude-fable-5) --- .../src/ROCm_Runtime_Discovery.jl | 14 +- src/AMDGPU.jl | 4 +- src/hip/HIP.jl | 2 +- src/hip/error.jl | 2 +- src/hip/libhip.jl | 1132 ++++++++--------- src/hsa/libHSA.jl | 430 +++---- src/libs.jl | 52 +- src/precompile.jl | 13 +- src/utils.jl | 4 +- 9 files changed, 808 insertions(+), 845 deletions(-) diff --git a/ROCm_Runtime_Discovery/src/ROCm_Runtime_Discovery.jl b/ROCm_Runtime_Discovery/src/ROCm_Runtime_Discovery.jl index bb6362b2f..69e8fd23e 100644 --- a/ROCm_Runtime_Discovery/src/ROCm_Runtime_Discovery.jl +++ b/ROCm_Runtime_Discovery/src/ROCm_Runtime_Discovery.jl @@ -11,12 +11,9 @@ module ROCm_Runtime_Discovery using Libdl -# same names as ROCm_Runtime ... -export libamdhip64, libhsa_runtime64 +# same names as ROCm_Runtime +export libamdhip64, libhsa_runtime64, libhiprtc, libamd_comgr export libMIOpen, libhipblaslt, libhiptensor, librocblas, librocfft, librocrand, librocsolver, librocsparse -# ... plus the local device bitcode libraries (unused for now: they first need -# to be downgraded to Julia's LLVM version, so the JLL ones are always used) -export libdevice_libs include("utils.jl") @@ -24,6 +21,11 @@ global rel_libdir::String = Sys.islinux() ? "" : "bin" global libhsa_runtime64::String = "" global libamdhip64::String = "" +global libhiprtc::String = "" +global libamd_comgr::String = "" +# The local device bitcode libraries are discovered but unexported and unused +# for now: they first need to be downgraded to Julia's LLVM version, so the +# ROCmDeviceLibs_jll ones are always used instead. global libdevice_libs::String = "" global librocblas::String = "" global librocsparse::String = "" @@ -48,6 +50,8 @@ function __init__() # HIP runtime. global libamdhip64 = find_rocm_library(Sys.islinux() ? "libamdhip64" : "amdhip64"; rocm_path) + global libhiprtc = find_rocm_library((Sys.islinux() ? "lib" : "") * "hiprtc"; rocm_path) + global libamd_comgr = find_rocm_library((Sys.islinux() ? "lib" : "") * "amd_comgr"; rocm_path) # Device bitcode libraries. NOTE: AMDGPU.jl does not use these yet: # they target a newer LLVM than Julia's and first need to be downgraded, diff --git a/src/AMDGPU.jl b/src/AMDGPU.jl index 23f2f4d08..cc409217e 100644 --- a/src/AMDGPU.jl +++ b/src/AMDGPU.jl @@ -166,8 +166,6 @@ function __init__() end end - __init_libs__() - if haskey(ENV, "HIP_LAUNCH_BLOCKING") launch_blocking = parse(Bool, ENV["HIP_LAUNCH_BLOCKING"]) LAUNCH_BLOCKING[] = launch_blocking @@ -183,7 +181,7 @@ function __init__() return end - if !isempty(libhsaruntime) + if !isempty(libhsa_runtime64) status = HSA.init() status == HSA.STATUS_SUCCESS ? atexit(() -> HSA.shut_down()) : diff --git a/src/hip/HIP.jl b/src/hip/HIP.jl index 58309497a..79c660ce6 100644 --- a/src/hip/HIP.jl +++ b/src/hip/HIP.jl @@ -8,7 +8,7 @@ import Preferences import PrettyTables import ..AMDGPU -import ..AMDGPU.libhip +import ..AMDGPU.libamdhip64 import .AMDGPU: @check, check import GPUToolbox: @gcsafe_ccall, @checked diff --git a/src/hip/error.jl b/src/hip/error.jl index 68b907e9d..1745bb145 100644 --- a/src/hip/error.jl +++ b/src/hip/error.jl @@ -153,7 +153,7 @@ Consume any sticky HIP error on the current context without throwing, logging it at the `@debug` level if one was present. """ function clear_last_error() - err = @gcsafe_ccall libhip.hipGetLastError()::hipError_t + err = @gcsafe_ccall libamdhip64.hipGetLastError()::hipError_t if err != hipSuccess @debug "Cleared sticky HIP error before library call" error=HIPError(err) end diff --git a/src/hip/libhip.jl b/src/hip/libhip.jl index 5dd75b342..983f7c4d9 100644 --- a/src/hip/libhip.jl +++ b/src/hip/libhip.jl @@ -340,12 +340,12 @@ end end @checked function hipGetDevicePropertiesR0600(prop, deviceId) - @gcsafe_ccall(libhip.hipGetDevicePropertiesR0600(prop::Ptr{hipDeviceProp_tR0600}, + @gcsafe_ccall(libamdhip64.hipGetDevicePropertiesR0600(prop::Ptr{hipDeviceProp_tR0600}, deviceId::Cint)::hipError_t) end @checked function hipChooseDeviceR0600(device, prop) - @gcsafe_ccall(libhip.hipChooseDeviceR0600(device::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipChooseDeviceR0600(device::Ptr{Cint}, prop::Ptr{hipDeviceProp_tR0600})::hipError_t) end @@ -1263,18 +1263,18 @@ end @checked function make_hipPitchedPtr(d, p, xsz, ysz) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_hipPitchedPtr(d::Ptr{Cvoid}, p::Csize_t, xsz::Csize_t, + @gcsafe_ccall(libamdhip64.make_hipPitchedPtr(d::Ptr{Cvoid}, p::Csize_t, xsz::Csize_t, ysz::Csize_t)::hipPitchedPtr) end @checked function make_hipPos(x, y, z) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_hipPos(x::Csize_t, y::Csize_t, z::Csize_t)::hipPos) + @gcsafe_ccall(libamdhip64.make_hipPos(x::Csize_t, y::Csize_t, z::Csize_t)::hipPos) end @checked function make_hipExtent(w, h, d) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_hipExtent(w::Csize_t, h::Csize_t, + @gcsafe_ccall(libamdhip64.make_hipExtent(w::Csize_t, h::Csize_t, d::Csize_t)::hipExtent) end @@ -1584,257 +1584,257 @@ end @checked function make_uchar1(x) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_uchar1(x::Cuchar)::uchar1) + @gcsafe_ccall(libamdhip64.make_uchar1(x::Cuchar)::uchar1) end @checked function make_uchar2(x, y) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_uchar2(x::Cuchar, y::Cuchar)::uchar2) + @gcsafe_ccall(libamdhip64.make_uchar2(x::Cuchar, y::Cuchar)::uchar2) end @checked function make_uchar3(x, y, z) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_uchar3(x::Cuchar, y::Cuchar, z::Cuchar)::uchar3) + @gcsafe_ccall(libamdhip64.make_uchar3(x::Cuchar, y::Cuchar, z::Cuchar)::uchar3) end @checked function make_uchar4(x, y, z, w) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_uchar4(x::Cuchar, y::Cuchar, z::Cuchar, + @gcsafe_ccall(libamdhip64.make_uchar4(x::Cuchar, y::Cuchar, z::Cuchar, w::Cuchar)::uchar4) end @checked function make_char1(x) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_char1(x::Int8)::char1) + @gcsafe_ccall(libamdhip64.make_char1(x::Int8)::char1) end @checked function make_char2(x, y) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_char2(x::Int8, y::Int8)::char2) + @gcsafe_ccall(libamdhip64.make_char2(x::Int8, y::Int8)::char2) end @checked function make_char3(x, y, z) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_char3(x::Int8, y::Int8, z::Int8)::char3) + @gcsafe_ccall(libamdhip64.make_char3(x::Int8, y::Int8, z::Int8)::char3) end @checked function make_char4(x, y, z, w) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_char4(x::Int8, y::Int8, z::Int8, w::Int8)::char4) + @gcsafe_ccall(libamdhip64.make_char4(x::Int8, y::Int8, z::Int8, w::Int8)::char4) end @checked function make_ushort1(x) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_ushort1(x::Cushort)::ushort1) + @gcsafe_ccall(libamdhip64.make_ushort1(x::Cushort)::ushort1) end @checked function make_ushort2(x, y) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_ushort2(x::Cushort, y::Cushort)::ushort2) + @gcsafe_ccall(libamdhip64.make_ushort2(x::Cushort, y::Cushort)::ushort2) end @checked function make_ushort3(x, y, z) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_ushort3(x::Cushort, y::Cushort, z::Cushort)::ushort3) + @gcsafe_ccall(libamdhip64.make_ushort3(x::Cushort, y::Cushort, z::Cushort)::ushort3) end @checked function make_ushort4(x, y, z, w) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_ushort4(x::Cushort, y::Cushort, z::Cushort, + @gcsafe_ccall(libamdhip64.make_ushort4(x::Cushort, y::Cushort, z::Cushort, w::Cushort)::ushort4) end @checked function make_short1(x) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_short1(x::Cshort)::short1) + @gcsafe_ccall(libamdhip64.make_short1(x::Cshort)::short1) end @checked function make_short2(x, y) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_short2(x::Cshort, y::Cshort)::short2) + @gcsafe_ccall(libamdhip64.make_short2(x::Cshort, y::Cshort)::short2) end @checked function make_short3(x, y, z) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_short3(x::Cshort, y::Cshort, z::Cshort)::short3) + @gcsafe_ccall(libamdhip64.make_short3(x::Cshort, y::Cshort, z::Cshort)::short3) end @checked function make_short4(x, y, z, w) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_short4(x::Cshort, y::Cshort, z::Cshort, + @gcsafe_ccall(libamdhip64.make_short4(x::Cshort, y::Cshort, z::Cshort, w::Cshort)::short4) end @checked function make_uint1(x) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_uint1(x::Cuint)::uint1) + @gcsafe_ccall(libamdhip64.make_uint1(x::Cuint)::uint1) end @checked function make_uint2(x, y) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_uint2(x::Cuint, y::Cuint)::uint2) + @gcsafe_ccall(libamdhip64.make_uint2(x::Cuint, y::Cuint)::uint2) end @checked function make_uint3(x, y, z) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_uint3(x::Cuint, y::Cuint, z::Cuint)::uint3) + @gcsafe_ccall(libamdhip64.make_uint3(x::Cuint, y::Cuint, z::Cuint)::uint3) end @checked function make_uint4(x, y, z, w) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_uint4(x::Cuint, y::Cuint, z::Cuint, w::Cuint)::uint4) + @gcsafe_ccall(libamdhip64.make_uint4(x::Cuint, y::Cuint, z::Cuint, w::Cuint)::uint4) end @checked function make_int1(x) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_int1(x::Cint)::int1) + @gcsafe_ccall(libamdhip64.make_int1(x::Cint)::int1) end @checked function make_int2(x, y) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_int2(x::Cint, y::Cint)::int2) + @gcsafe_ccall(libamdhip64.make_int2(x::Cint, y::Cint)::int2) end @checked function make_int3(x, y, z) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_int3(x::Cint, y::Cint, z::Cint)::int3) + @gcsafe_ccall(libamdhip64.make_int3(x::Cint, y::Cint, z::Cint)::int3) end @checked function make_int4(x, y, z, w) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_int4(x::Cint, y::Cint, z::Cint, w::Cint)::int4) + @gcsafe_ccall(libamdhip64.make_int4(x::Cint, y::Cint, z::Cint, w::Cint)::int4) end @checked function make_float1(x) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_float1(x::Cfloat)::float1) + @gcsafe_ccall(libamdhip64.make_float1(x::Cfloat)::float1) end @checked function make_float2(x, y) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_float2(x::Cfloat, y::Cfloat)::float2) + @gcsafe_ccall(libamdhip64.make_float2(x::Cfloat, y::Cfloat)::float2) end @checked function make_float3(x, y, z) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_float3(x::Cfloat, y::Cfloat, z::Cfloat)::float3) + @gcsafe_ccall(libamdhip64.make_float3(x::Cfloat, y::Cfloat, z::Cfloat)::float3) end @checked function make_float4(x, y, z, w) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_float4(x::Cfloat, y::Cfloat, z::Cfloat, + @gcsafe_ccall(libamdhip64.make_float4(x::Cfloat, y::Cfloat, z::Cfloat, w::Cfloat)::float4) end @checked function make_double1(x) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_double1(x::Cdouble)::double1) + @gcsafe_ccall(libamdhip64.make_double1(x::Cdouble)::double1) end @checked function make_double2(x, y) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_double2(x::Cdouble, y::Cdouble)::double2) + @gcsafe_ccall(libamdhip64.make_double2(x::Cdouble, y::Cdouble)::double2) end @checked function make_double3(x, y, z) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_double3(x::Cdouble, y::Cdouble, z::Cdouble)::double3) + @gcsafe_ccall(libamdhip64.make_double3(x::Cdouble, y::Cdouble, z::Cdouble)::double3) end @checked function make_double4(x, y, z, w) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_double4(x::Cdouble, y::Cdouble, z::Cdouble, + @gcsafe_ccall(libamdhip64.make_double4(x::Cdouble, y::Cdouble, z::Cdouble, w::Cdouble)::double4) end @checked function make_ulong1(x) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_ulong1(x::Culong)::ulong1) + @gcsafe_ccall(libamdhip64.make_ulong1(x::Culong)::ulong1) end @checked function make_ulong2(x, y) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_ulong2(x::Culong, y::Culong)::ulong2) + @gcsafe_ccall(libamdhip64.make_ulong2(x::Culong, y::Culong)::ulong2) end @checked function make_ulong3(x, y, z) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_ulong3(x::Culong, y::Culong, z::Culong)::ulong3) + @gcsafe_ccall(libamdhip64.make_ulong3(x::Culong, y::Culong, z::Culong)::ulong3) end @checked function make_ulong4(x, y, z, w) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_ulong4(x::Culong, y::Culong, z::Culong, + @gcsafe_ccall(libamdhip64.make_ulong4(x::Culong, y::Culong, z::Culong, w::Culong)::ulong4) end @checked function make_long1(x) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_long1(x::Clong)::long1) + @gcsafe_ccall(libamdhip64.make_long1(x::Clong)::long1) end @checked function make_long2(x, y) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_long2(x::Clong, y::Clong)::long2) + @gcsafe_ccall(libamdhip64.make_long2(x::Clong, y::Clong)::long2) end @checked function make_long3(x, y, z) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_long3(x::Clong, y::Clong, z::Clong)::long3) + @gcsafe_ccall(libamdhip64.make_long3(x::Clong, y::Clong, z::Clong)::long3) end @checked function make_long4(x, y, z, w) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_long4(x::Clong, y::Clong, z::Clong, w::Clong)::long4) + @gcsafe_ccall(libamdhip64.make_long4(x::Clong, y::Clong, z::Clong, w::Clong)::long4) end @checked function make_ulonglong1(x) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_ulonglong1(x::Culonglong)::ulonglong1) + @gcsafe_ccall(libamdhip64.make_ulonglong1(x::Culonglong)::ulonglong1) end @checked function make_ulonglong2(x, y) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_ulonglong2(x::Culonglong, y::Culonglong)::ulonglong2) + @gcsafe_ccall(libamdhip64.make_ulonglong2(x::Culonglong, y::Culonglong)::ulonglong2) end @checked function make_ulonglong3(x, y, z) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_ulonglong3(x::Culonglong, y::Culonglong, + @gcsafe_ccall(libamdhip64.make_ulonglong3(x::Culonglong, y::Culonglong, z::Culonglong)::ulonglong3) end @checked function make_ulonglong4(x, y, z, w) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_ulonglong4(x::Culonglong, y::Culonglong, z::Culonglong, + @gcsafe_ccall(libamdhip64.make_ulonglong4(x::Culonglong, y::Culonglong, z::Culonglong, w::Culonglong)::ulonglong4) end @checked function make_longlong1(x) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_longlong1(x::Clonglong)::longlong1) + @gcsafe_ccall(libamdhip64.make_longlong1(x::Clonglong)::longlong1) end @checked function make_longlong2(x, y) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_longlong2(x::Clonglong, y::Clonglong)::longlong2) + @gcsafe_ccall(libamdhip64.make_longlong2(x::Clonglong, y::Clonglong)::longlong2) end @checked function make_longlong3(x, y, z) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_longlong3(x::Clonglong, y::Clonglong, + @gcsafe_ccall(libamdhip64.make_longlong3(x::Clonglong, y::Clonglong, z::Clonglong)::longlong3) end @checked function make_longlong4(x, y, z, w) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.make_longlong4(x::Clonglong, y::Clonglong, z::Clonglong, + @gcsafe_ccall(libamdhip64.make_longlong4(x::Clonglong, y::Clonglong, z::Clonglong, w::Clonglong)::longlong4) end @checked function hipCreateChannelDesc(x, y, z, w, f) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipCreateChannelDesc(x::Cint, y::Cint, z::Cint, w::Cint, + @gcsafe_ccall(libamdhip64.hipCreateChannelDesc(x::Cint, y::Cint, z::Cint, w::Cint, f::hipChannelFormatKind)::hipChannelFormatDesc) end @@ -2906,7 +2906,7 @@ const hipExternalSemaphoreWaitParams = hipExternalSemaphoreWaitParams_st @checked function __hipGetPCH(pch, size) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.__hipGetPCH(pch::Ptr{Cstring}, size::Ptr{Cuint})::Cvoid) + @gcsafe_ccall(libamdhip64.__hipGetPCH(pch::Ptr{Cstring}, size::Ptr{Cuint})::Cvoid) end @cenum hipGraphicsRegisterFlags::UInt32 begin @@ -3883,43 +3883,43 @@ end end @checked function hipInit(flags) - @gcsafe_ccall(libhip.hipInit(flags::Cuint)::hipError_t) + @gcsafe_ccall(libamdhip64.hipInit(flags::Cuint)::hipError_t) end @checked function hipDriverGetVersion(driverVersion) - @gcsafe_ccall(libhip.hipDriverGetVersion(driverVersion::Ptr{Cint})::hipError_t) + @gcsafe_ccall(libamdhip64.hipDriverGetVersion(driverVersion::Ptr{Cint})::hipError_t) end @checked function hipRuntimeGetVersion(runtimeVersion) - @gcsafe_ccall(libhip.hipRuntimeGetVersion(runtimeVersion::Ptr{Cint})::hipError_t) + @gcsafe_ccall(libamdhip64.hipRuntimeGetVersion(runtimeVersion::Ptr{Cint})::hipError_t) end @checked function hipDeviceGet(device, ordinal) - @gcsafe_ccall(libhip.hipDeviceGet(device::Ptr{hipDevice_t}, + @gcsafe_ccall(libamdhip64.hipDeviceGet(device::Ptr{hipDevice_t}, ordinal::Cint)::hipError_t) end @checked function hipDeviceComputeCapability(major, minor, device) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceComputeCapability(major::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipDeviceComputeCapability(major::Ptr{Cint}, minor::Ptr{Cint}, device::hipDevice_t)::hipError_t) end @checked function hipDeviceGetName(name, len, device) - @gcsafe_ccall(libhip.hipDeviceGetName(name::Cstring, len::Cint, + @gcsafe_ccall(libamdhip64.hipDeviceGetName(name::Cstring, len::Cint, device::hipDevice_t)::hipError_t) end @checked function hipDeviceGetUuid(uuid, device) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceGetUuid(uuid::Ptr{hipUUID}, + @gcsafe_ccall(libamdhip64.hipDeviceGetUuid(uuid::Ptr{hipUUID}, device::hipDevice_t)::hipError_t) end @checked function hipDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceGetP2PAttribute(value::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipDeviceGetP2PAttribute(value::Ptr{Cint}, attr::hipDeviceP2PAttr, srcDevice::Cint, dstDevice::Cint)::hipError_t) @@ -3927,308 +3927,308 @@ end @checked function hipDeviceGetPCIBusId(pciBusId, len, device) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceGetPCIBusId(pciBusId::Cstring, len::Cint, + @gcsafe_ccall(libamdhip64.hipDeviceGetPCIBusId(pciBusId::Cstring, len::Cint, device::Cint)::hipError_t) end @checked function hipDeviceGetByPCIBusId(device, pciBusId) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceGetByPCIBusId(device::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipDeviceGetByPCIBusId(device::Ptr{Cint}, pciBusId::Cstring)::hipError_t) end @checked function hipDeviceTotalMem(bytes, device) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceTotalMem(bytes::Ptr{Csize_t}, + @gcsafe_ccall(libamdhip64.hipDeviceTotalMem(bytes::Ptr{Csize_t}, device::hipDevice_t)::hipError_t) end @checked function hipDeviceSynchronize() AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceSynchronize()::hipError_t) + @gcsafe_ccall(libamdhip64.hipDeviceSynchronize()::hipError_t) end @checked function hipDeviceReset() AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceReset()::hipError_t) + @gcsafe_ccall(libamdhip64.hipDeviceReset()::hipError_t) end @checked function hipSetDevice(deviceId) - @gcsafe_ccall(libhip.hipSetDevice(deviceId::Cint)::hipError_t) + @gcsafe_ccall(libamdhip64.hipSetDevice(deviceId::Cint)::hipError_t) end @checked function hipSetValidDevices(device_arr, len) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipSetValidDevices(device_arr::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipSetValidDevices(device_arr::Ptr{Cint}, len::Cint)::hipError_t) end @checked function hipGetDevice(deviceId) - @gcsafe_ccall(libhip.hipGetDevice(deviceId::Ptr{Cint})::hipError_t) + @gcsafe_ccall(libamdhip64.hipGetDevice(deviceId::Ptr{Cint})::hipError_t) end @checked function hipGetDeviceCount(count) - @gcsafe_ccall(libhip.hipGetDeviceCount(count::Ptr{Cint})::hipError_t) + @gcsafe_ccall(libamdhip64.hipGetDeviceCount(count::Ptr{Cint})::hipError_t) end @checked function hipDeviceGetAttribute(pi, attr, deviceId) - @gcsafe_ccall(libhip.hipDeviceGetAttribute(pi::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipDeviceGetAttribute(pi::Ptr{Cint}, attr::hipDeviceAttribute_t, deviceId::Cint)::hipError_t) end @checked function hipDeviceGetDefaultMemPool(mem_pool, device) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceGetDefaultMemPool(mem_pool::Ptr{hipMemPool_t}, + @gcsafe_ccall(libamdhip64.hipDeviceGetDefaultMemPool(mem_pool::Ptr{hipMemPool_t}, device::Cint)::hipError_t) end @checked function hipDeviceSetMemPool(device, mem_pool) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceSetMemPool(device::Cint, + @gcsafe_ccall(libamdhip64.hipDeviceSetMemPool(device::Cint, mem_pool::hipMemPool_t)::hipError_t) end @checked function hipDeviceGetMemPool(mem_pool, device) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceGetMemPool(mem_pool::Ptr{hipMemPool_t}, + @gcsafe_ccall(libamdhip64.hipDeviceGetMemPool(mem_pool::Ptr{hipMemPool_t}, device::Cint)::hipError_t) end @checked function hipDeviceGetTexture1DLinearMaxWidth(max_width, desc, device) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceGetTexture1DLinearMaxWidth(max_width::Ptr{Csize_t}, + @gcsafe_ccall(libamdhip64.hipDeviceGetTexture1DLinearMaxWidth(max_width::Ptr{Csize_t}, desc::Ptr{hipChannelFormatDesc}, device::Cint)::hipError_t) end @checked function hipDeviceSetCacheConfig(cacheConfig) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceSetCacheConfig(cacheConfig::hipFuncCache_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipDeviceSetCacheConfig(cacheConfig::hipFuncCache_t)::hipError_t) end @checked function hipDeviceGetCacheConfig(cacheConfig) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceGetCacheConfig(cacheConfig::Ptr{hipFuncCache_t})::hipError_t) + @gcsafe_ccall(libamdhip64.hipDeviceGetCacheConfig(cacheConfig::Ptr{hipFuncCache_t})::hipError_t) end @checked function hipDeviceGetLimit(pValue, limit) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceGetLimit(pValue::Ptr{Csize_t}, + @gcsafe_ccall(libamdhip64.hipDeviceGetLimit(pValue::Ptr{Csize_t}, limit::hipLimit_t)::hipError_t) end @checked function hipDeviceSetLimit(limit, value) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceSetLimit(limit::hipLimit_t, + @gcsafe_ccall(libamdhip64.hipDeviceSetLimit(limit::hipLimit_t, value::Csize_t)::hipError_t) end @checked function hipDeviceGetSharedMemConfig(pConfig) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceGetSharedMemConfig(pConfig::Ptr{hipSharedMemConfig})::hipError_t) + @gcsafe_ccall(libamdhip64.hipDeviceGetSharedMemConfig(pConfig::Ptr{hipSharedMemConfig})::hipError_t) end @checked function hipGetDeviceFlags(flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGetDeviceFlags(flags::Ptr{Cuint})::hipError_t) + @gcsafe_ccall(libamdhip64.hipGetDeviceFlags(flags::Ptr{Cuint})::hipError_t) end @checked function hipDeviceSetSharedMemConfig(config) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceSetSharedMemConfig(config::hipSharedMemConfig)::hipError_t) + @gcsafe_ccall(libamdhip64.hipDeviceSetSharedMemConfig(config::hipSharedMemConfig)::hipError_t) end @checked function hipSetDeviceFlags(flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipSetDeviceFlags(flags::Cuint)::hipError_t) + @gcsafe_ccall(libamdhip64.hipSetDeviceFlags(flags::Cuint)::hipError_t) end @checked function hipExtGetLinkTypeAndHopCount(device1, device2, linktype, hopcount) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipExtGetLinkTypeAndHopCount(device1::Cint, device2::Cint, + @gcsafe_ccall(libamdhip64.hipExtGetLinkTypeAndHopCount(device1::Cint, device2::Cint, linktype::Ptr{UInt32}, hopcount::Ptr{UInt32})::hipError_t) end @checked function hipIpcGetMemHandle(handle, devPtr) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipIpcGetMemHandle(handle::Ptr{hipIpcMemHandle_t}, + @gcsafe_ccall(libamdhip64.hipIpcGetMemHandle(handle::Ptr{hipIpcMemHandle_t}, devPtr::Ptr{Cvoid})::hipError_t) end @checked function hipIpcOpenMemHandle(devPtr, handle, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipIpcOpenMemHandle(devPtr::Ptr{Ptr{Cvoid}}, + @gcsafe_ccall(libamdhip64.hipIpcOpenMemHandle(devPtr::Ptr{Ptr{Cvoid}}, handle::hipIpcMemHandle_t, flags::Cuint)::hipError_t) end @checked function hipIpcCloseMemHandle(devPtr) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipIpcCloseMemHandle(devPtr::Ptr{Cvoid})::hipError_t) + @gcsafe_ccall(libamdhip64.hipIpcCloseMemHandle(devPtr::Ptr{Cvoid})::hipError_t) end @checked function hipIpcGetEventHandle(handle, event) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipIpcGetEventHandle(handle::Ptr{hipIpcEventHandle_t}, + @gcsafe_ccall(libamdhip64.hipIpcGetEventHandle(handle::Ptr{hipIpcEventHandle_t}, event::hipEvent_t)::hipError_t) end @checked function hipIpcOpenEventHandle(event, handle) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipIpcOpenEventHandle(event::Ptr{hipEvent_t}, + @gcsafe_ccall(libamdhip64.hipIpcOpenEventHandle(event::Ptr{hipEvent_t}, handle::hipIpcEventHandle_t)::hipError_t) end @checked function hipFuncSetAttribute(func, attr, value) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipFuncSetAttribute(func::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipFuncSetAttribute(func::Ptr{Cvoid}, attr::hipFuncAttribute, value::Cint)::hipError_t) end @checked function hipKernelSetAttribute(attrib, value, kernel, dev) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipKernelSetAttribute(attrib::hipFunction_attribute, + @gcsafe_ccall(libamdhip64.hipKernelSetAttribute(attrib::hipFunction_attribute, value::Cint, kernel::hipKernel_t, dev::hipDevice_t)::hipError_t) end @checked function hipKernelGetFunction(pFunc, kernel) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipKernelGetFunction(pFunc::Ptr{hipFunction_t}, + @gcsafe_ccall(libamdhip64.hipKernelGetFunction(pFunc::Ptr{hipFunction_t}, kernel::hipKernel_t)::hipError_t) end @checked function hipFuncSetCacheConfig(func, config) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipFuncSetCacheConfig(func::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipFuncSetCacheConfig(func::Ptr{Cvoid}, config::hipFuncCache_t)::hipError_t) end @checked function hipFuncSetSharedMemConfig(func, config) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipFuncSetSharedMemConfig(func::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipFuncSetSharedMemConfig(func::Ptr{Cvoid}, config::hipSharedMemConfig)::hipError_t) end @checked function hipGetLastError() AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGetLastError()::hipError_t) + @gcsafe_ccall(libamdhip64.hipGetLastError()::hipError_t) end @checked function hipExtGetLastError() AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipExtGetLastError()::hipError_t) + @gcsafe_ccall(libamdhip64.hipExtGetLastError()::hipError_t) end @checked function hipPeekAtLastError() AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipPeekAtLastError()::hipError_t) + @gcsafe_ccall(libamdhip64.hipPeekAtLastError()::hipError_t) end @checked function hipGetErrorName(hip_error) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGetErrorName(hip_error::hipError_t)::Cstring) + @gcsafe_ccall(libamdhip64.hipGetErrorName(hip_error::hipError_t)::Cstring) end @checked function hipGetErrorString(hipError) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGetErrorString(hipError::hipError_t)::Cstring) + @gcsafe_ccall(libamdhip64.hipGetErrorString(hipError::hipError_t)::Cstring) end @checked function hipDrvGetErrorName(hipError, errorString) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDrvGetErrorName(hipError::hipError_t, + @gcsafe_ccall(libamdhip64.hipDrvGetErrorName(hipError::hipError_t, errorString::Ptr{Cstring})::hipError_t) end @checked function hipDrvGetErrorString(hipError, errorString) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDrvGetErrorString(hipError::hipError_t, + @gcsafe_ccall(libamdhip64.hipDrvGetErrorString(hipError::hipError_t, errorString::Ptr{Cstring})::hipError_t) end @checked function hipStreamCreate(stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamCreate(stream::Ptr{hipStream_t})::hipError_t) + @gcsafe_ccall(libamdhip64.hipStreamCreate(stream::Ptr{hipStream_t})::hipError_t) end @checked function hipStreamCreateWithFlags(stream, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamCreateWithFlags(stream::Ptr{hipStream_t}, + @gcsafe_ccall(libamdhip64.hipStreamCreateWithFlags(stream::Ptr{hipStream_t}, flags::Cuint)::hipError_t) end @checked function hipStreamCreateWithPriority(stream, flags, priority) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamCreateWithPriority(stream::Ptr{hipStream_t}, + @gcsafe_ccall(libamdhip64.hipStreamCreateWithPriority(stream::Ptr{hipStream_t}, flags::Cuint, priority::Cint)::hipError_t) end @checked function hipDeviceGetStreamPriorityRange(leastPriority, greatestPriority) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceGetStreamPriorityRange(leastPriority::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipDeviceGetStreamPriorityRange(leastPriority::Ptr{Cint}, greatestPriority::Ptr{Cint})::hipError_t) end @checked function hipStreamDestroy(stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamDestroy(stream::hipStream_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipStreamDestroy(stream::hipStream_t)::hipError_t) end @checked function hipStreamQuery(stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamQuery(stream::hipStream_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipStreamQuery(stream::hipStream_t)::hipError_t) end @checked function hipStreamSynchronize(stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamSynchronize(stream::hipStream_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipStreamSynchronize(stream::hipStream_t)::hipError_t) end @checked function hipStreamWaitEvent(stream, event, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamWaitEvent(stream::hipStream_t, event::hipEvent_t, + @gcsafe_ccall(libamdhip64.hipStreamWaitEvent(stream::hipStream_t, event::hipEvent_t, flags::Cuint)::hipError_t) end @checked function hipStreamGetFlags(stream, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamGetFlags(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamGetFlags(stream::hipStream_t, flags::Ptr{Cuint})::hipError_t) end @checked function hipStreamGetId(stream, streamId) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamGetId(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamGetId(stream::hipStream_t, streamId::Ptr{Culonglong})::hipError_t) end @checked function hipStreamGetPriority(stream, priority) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamGetPriority(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamGetPriority(stream::hipStream_t, priority::Ptr{Cint})::hipError_t) end @checked function hipStreamGetDevice(stream, device) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamGetDevice(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamGetDevice(stream::hipStream_t, device::Ptr{hipDevice_t})::hipError_t) end @checked function hipExtStreamCreateWithCUMask(stream, cuMaskSize, cuMask) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipExtStreamCreateWithCUMask(stream::Ptr{hipStream_t}, + @gcsafe_ccall(libamdhip64.hipExtStreamCreateWithCUMask(stream::Ptr{hipStream_t}, cuMaskSize::UInt32, cuMask::Ptr{UInt32})::hipError_t) end @checked function hipExtStreamGetCUMask(stream, cuMaskSize, cuMask) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipExtStreamGetCUMask(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipExtStreamGetCUMask(stream::hipStream_t, cuMaskSize::UInt32, cuMask::Ptr{UInt32})::hipError_t) end @@ -4238,7 +4238,7 @@ const hipStreamCallback_t = Ptr{Cvoid} @checked function hipStreamAddCallback(stream, callback, userData, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamAddCallback(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamAddCallback(stream::hipStream_t, callback::hipStreamCallback_t, userData::Ptr{Cvoid}, flags::Cuint)::hipError_t) @@ -4246,55 +4246,55 @@ end @checked function hipStreamSetAttribute(stream, attr, value) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamSetAttribute(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamSetAttribute(stream::hipStream_t, attr::hipLaunchAttributeID, value::Ptr{hipLaunchAttributeValue})::hipError_t) end @checked function hipStreamGetAttribute(stream, attr, value_out) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamGetAttribute(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamGetAttribute(stream::hipStream_t, attr::hipLaunchAttributeID, value_out::Ptr{hipLaunchAttributeValue})::hipError_t) end @checked function hipStreamCopyAttributes(dst, src) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamCopyAttributes(dst::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamCopyAttributes(dst::hipStream_t, src::hipStream_t)::hipError_t) end @checked function hipStreamWaitValue32(stream, ptr, value, flags, mask) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamWaitValue32(stream::hipStream_t, ptr::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipStreamWaitValue32(stream::hipStream_t, ptr::Ptr{Cvoid}, value::UInt32, flags::Cuint, mask::UInt32)::hipError_t) end @checked function hipStreamWaitValue64(stream, ptr, value, flags, mask) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamWaitValue64(stream::hipStream_t, ptr::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipStreamWaitValue64(stream::hipStream_t, ptr::Ptr{Cvoid}, value::UInt64, flags::Cuint, mask::UInt64)::hipError_t) end @checked function hipStreamWriteValue32(stream, ptr, value, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamWriteValue32(stream::hipStream_t, ptr::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipStreamWriteValue32(stream::hipStream_t, ptr::Ptr{Cvoid}, value::UInt32, flags::Cuint)::hipError_t) end @checked function hipStreamWriteValue64(stream, ptr, value, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamWriteValue64(stream::hipStream_t, ptr::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipStreamWriteValue64(stream::hipStream_t, ptr::Ptr{Cvoid}, value::UInt64, flags::Cuint)::hipError_t) end @checked function hipStreamBatchMemOp(stream, count, paramArray, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamBatchMemOp(stream::hipStream_t, count::Cuint, + @gcsafe_ccall(libamdhip64.hipStreamBatchMemOp(stream::hipStream_t, count::Cuint, paramArray::Ptr{hipStreamBatchMemOpParams}, flags::Cuint)::hipError_t) end @@ -4302,7 +4302,7 @@ end @checked function hipGraphAddBatchMemOpNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphAddBatchMemOpNode(phGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipGraphAddBatchMemOpNode(phGraphNode::Ptr{hipGraphNode_t}, hGraph::hipGraph_t, dependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, @@ -4311,91 +4311,91 @@ end @checked function hipGraphBatchMemOpNodeGetParams(hNode, nodeParams_out) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphBatchMemOpNodeGetParams(hNode::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphBatchMemOpNodeGetParams(hNode::hipGraphNode_t, nodeParams_out::Ptr{hipBatchMemOpNodeParams})::hipError_t) end @checked function hipGraphBatchMemOpNodeSetParams(hNode, nodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphBatchMemOpNodeSetParams(hNode::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphBatchMemOpNodeSetParams(hNode::hipGraphNode_t, nodeParams::Ptr{hipBatchMemOpNodeParams})::hipError_t) end @checked function hipGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExecBatchMemOpNodeSetParams(hGraphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphExecBatchMemOpNodeSetParams(hGraphExec::hipGraphExec_t, hNode::hipGraphNode_t, nodeParams::Ptr{hipBatchMemOpNodeParams})::hipError_t) end @checked function hipEventCreateWithFlags(event, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipEventCreateWithFlags(event::Ptr{hipEvent_t}, + @gcsafe_ccall(libamdhip64.hipEventCreateWithFlags(event::Ptr{hipEvent_t}, flags::Cuint)::hipError_t) end @checked function hipEventCreate(event) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipEventCreate(event::Ptr{hipEvent_t})::hipError_t) + @gcsafe_ccall(libamdhip64.hipEventCreate(event::Ptr{hipEvent_t})::hipError_t) end @checked function hipEventRecordWithFlags(event, stream, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipEventRecordWithFlags(event::hipEvent_t, + @gcsafe_ccall(libamdhip64.hipEventRecordWithFlags(event::hipEvent_t, stream::hipStream_t, flags::Cuint)::hipError_t) end @checked function hipEventRecord(event, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipEventRecord(event::hipEvent_t, + @gcsafe_ccall(libamdhip64.hipEventRecord(event::hipEvent_t, stream::hipStream_t)::hipError_t) end @checked function hipEventDestroy(event) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipEventDestroy(event::hipEvent_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipEventDestroy(event::hipEvent_t)::hipError_t) end @checked function hipEventSynchronize(event) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipEventSynchronize(event::hipEvent_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipEventSynchronize(event::hipEvent_t)::hipError_t) end @checked function hipEventElapsedTime(ms, start, stop) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipEventElapsedTime(ms::Ptr{Cfloat}, start::hipEvent_t, + @gcsafe_ccall(libamdhip64.hipEventElapsedTime(ms::Ptr{Cfloat}, start::hipEvent_t, stop::hipEvent_t)::hipError_t) end @checked function hipEventQuery(event) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipEventQuery(event::hipEvent_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipEventQuery(event::hipEvent_t)::hipError_t) end @checked function hipPointerSetAttribute(value, attribute, ptr) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipPointerSetAttribute(value::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipPointerSetAttribute(value::Ptr{Cvoid}, attribute::hipPointer_attribute, ptr::hipDeviceptr_t)::hipError_t) end @checked function hipPointerGetAttributes(attributes, ptr) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipPointerGetAttributes(attributes::Ptr{hipPointerAttribute_t}, + @gcsafe_ccall(libamdhip64.hipPointerGetAttributes(attributes::Ptr{hipPointerAttribute_t}, ptr::Ptr{Cvoid})::hipError_t) end @checked function hipPointerGetAttribute(data, attribute, ptr) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipPointerGetAttribute(data::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipPointerGetAttribute(data::Ptr{Cvoid}, attribute::hipPointer_attribute, ptr::hipDeviceptr_t)::hipError_t) end @checked function hipDrvPointerGetAttributes(numAttributes, attributes, data, ptr) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDrvPointerGetAttributes(numAttributes::Cuint, + @gcsafe_ccall(libamdhip64.hipDrvPointerGetAttributes(numAttributes::Cuint, attributes::Ptr{hipPointer_attribute}, data::Ptr{Ptr{Cvoid}}, ptr::hipDeviceptr_t)::hipError_t) @@ -4403,13 +4403,13 @@ end @checked function hipImportExternalSemaphore(extSem_out, semHandleDesc) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipImportExternalSemaphore(extSem_out::Ptr{hipExternalSemaphore_t}, + @gcsafe_ccall(libamdhip64.hipImportExternalSemaphore(extSem_out::Ptr{hipExternalSemaphore_t}, semHandleDesc::Ptr{hipExternalSemaphoreHandleDesc})::hipError_t) end @checked function hipSignalExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipSignalExternalSemaphoresAsync(extSemArray::Ptr{hipExternalSemaphore_t}, + @gcsafe_ccall(libamdhip64.hipSignalExternalSemaphoresAsync(extSemArray::Ptr{hipExternalSemaphore_t}, paramsArray::Ptr{hipExternalSemaphoreSignalParams}, numExtSems::Cuint, stream::hipStream_t)::hipError_t) @@ -4417,7 +4417,7 @@ end @checked function hipWaitExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipWaitExternalSemaphoresAsync(extSemArray::Ptr{hipExternalSemaphore_t}, + @gcsafe_ccall(libamdhip64.hipWaitExternalSemaphoresAsync(extSemArray::Ptr{hipExternalSemaphore_t}, paramsArray::Ptr{hipExternalSemaphoreWaitParams}, numExtSems::Cuint, stream::hipStream_t)::hipError_t) @@ -4425,80 +4425,80 @@ end @checked function hipDestroyExternalSemaphore(extSem) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDestroyExternalSemaphore(extSem::hipExternalSemaphore_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipDestroyExternalSemaphore(extSem::hipExternalSemaphore_t)::hipError_t) end @checked function hipImportExternalMemory(extMem_out, memHandleDesc) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipImportExternalMemory(extMem_out::Ptr{hipExternalMemory_t}, + @gcsafe_ccall(libamdhip64.hipImportExternalMemory(extMem_out::Ptr{hipExternalMemory_t}, memHandleDesc::Ptr{hipExternalMemoryHandleDesc})::hipError_t) end @checked function hipExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipExternalMemoryGetMappedBuffer(devPtr::Ptr{Ptr{Cvoid}}, + @gcsafe_ccall(libamdhip64.hipExternalMemoryGetMappedBuffer(devPtr::Ptr{Ptr{Cvoid}}, extMem::hipExternalMemory_t, bufferDesc::Ptr{hipExternalMemoryBufferDesc})::hipError_t) end @checked function hipDestroyExternalMemory(extMem) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDestroyExternalMemory(extMem::hipExternalMemory_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipDestroyExternalMemory(extMem::hipExternalMemory_t)::hipError_t) end @checked function hipExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipExternalMemoryGetMappedMipmappedArray(mipmap::Ptr{hipMipmappedArray_t}, + @gcsafe_ccall(libamdhip64.hipExternalMemoryGetMappedMipmappedArray(mipmap::Ptr{hipMipmappedArray_t}, extMem::hipExternalMemory_t, mipmapDesc::Ptr{hipExternalMemoryMipmappedArrayDesc})::hipError_t) end @checked function hipMalloc(ptr, size) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMalloc(ptr::Ptr{Ptr{Cvoid}}, size::Csize_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipMalloc(ptr::Ptr{Ptr{Cvoid}}, size::Csize_t)::hipError_t) end @checked function hipExtMallocWithFlags(ptr, sizeBytes, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipExtMallocWithFlags(ptr::Ptr{Ptr{Cvoid}}, + @gcsafe_ccall(libamdhip64.hipExtMallocWithFlags(ptr::Ptr{Ptr{Cvoid}}, sizeBytes::Csize_t, flags::Cuint)::hipError_t) end @checked function hipMallocHost(ptr, size) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMallocHost(ptr::Ptr{Ptr{Cvoid}}, + @gcsafe_ccall(libamdhip64.hipMallocHost(ptr::Ptr{Ptr{Cvoid}}, size::Csize_t)::hipError_t) end @checked function hipMemAllocHost(ptr, size) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemAllocHost(ptr::Ptr{Ptr{Cvoid}}, + @gcsafe_ccall(libamdhip64.hipMemAllocHost(ptr::Ptr{Ptr{Cvoid}}, size::Csize_t)::hipError_t) end @checked function hipHostMalloc(ptr, size, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipHostMalloc(ptr::Ptr{Ptr{Cvoid}}, size::Csize_t, + @gcsafe_ccall(libamdhip64.hipHostMalloc(ptr::Ptr{Ptr{Cvoid}}, size::Csize_t, flags::Cuint)::hipError_t) end @checked function hipMallocManaged(dev_ptr, size, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMallocManaged(dev_ptr::Ptr{Ptr{Cvoid}}, size::Csize_t, + @gcsafe_ccall(libamdhip64.hipMallocManaged(dev_ptr::Ptr{Ptr{Cvoid}}, size::Csize_t, flags::Cuint)::hipError_t) end @checked function hipMemPrefetchAsync(dev_ptr, count, device, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemPrefetchAsync(dev_ptr::Ptr{Cvoid}, count::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemPrefetchAsync(dev_ptr::Ptr{Cvoid}, count::Csize_t, device::Cint, stream::hipStream_t)::hipError_t) end @checked function hipMemPrefetchAsync_v2(dev_ptr, count, location, flags, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemPrefetchAsync_v2(dev_ptr::Ptr{Cvoid}, count::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemPrefetchAsync_v2(dev_ptr::Ptr{Cvoid}, count::Csize_t, location::hipMemLocation, flags::Cuint, stream::hipStream_t)::hipError_t) @@ -4507,7 +4507,7 @@ end @checked function hipMemPrefetchBatchAsync(dev_ptrs, sizes, count, prefetch_locs, prefetch_loc_idxs, num_prefetch_locs, flags, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemPrefetchBatchAsync(dev_ptrs::Ptr{Ptr{Cvoid}}, + @gcsafe_ccall(libamdhip64.hipMemPrefetchBatchAsync(dev_ptrs::Ptr{Ptr{Cvoid}}, sizes::Ptr{Csize_t}, count::Csize_t, prefetch_locs::Ptr{hipMemLocation}, @@ -4519,21 +4519,21 @@ end @checked function hipMemAdvise(dev_ptr, count, advice, device) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemAdvise(dev_ptr::Ptr{Cvoid}, count::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemAdvise(dev_ptr::Ptr{Cvoid}, count::Csize_t, advice::hipMemoryAdvise, device::Cint)::hipError_t) end @checked function hipMemAdvise_v2(dev_ptr, count, advice, location) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemAdvise_v2(dev_ptr::Ptr{Cvoid}, count::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemAdvise_v2(dev_ptr::Ptr{Cvoid}, count::Csize_t, advice::hipMemoryAdvise, location::hipMemLocation)::hipError_t) end @checked function hipMemRangeGetAttribute(data, data_size, attribute, dev_ptr, count) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemRangeGetAttribute(data::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemRangeGetAttribute(data::Ptr{Cvoid}, data_size::Csize_t, attribute::hipMemRangeAttribute, dev_ptr::Ptr{Cvoid}, @@ -4543,7 +4543,7 @@ end @checked function hipMemRangeGetAttributes(data, data_sizes, attributes, num_attributes, dev_ptr, count) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemRangeGetAttributes(data::Ptr{Ptr{Cvoid}}, + @gcsafe_ccall(libamdhip64.hipMemRangeGetAttributes(data::Ptr{Ptr{Cvoid}}, data_sizes::Ptr{Csize_t}, attributes::Ptr{hipMemRangeAttribute}, num_attributes::Csize_t, @@ -4553,7 +4553,7 @@ end @checked function hipStreamAttachMemAsync(stream, dev_ptr, length, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamAttachMemAsync(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamAttachMemAsync(stream::hipStream_t, dev_ptr::Ptr{Cvoid}, length::Csize_t, flags::Cuint)::hipError_t) @@ -4561,64 +4561,64 @@ end @checked function hipMallocAsync(dev_ptr, size, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMallocAsync(dev_ptr::Ptr{Ptr{Cvoid}}, size::Csize_t, + @gcsafe_ccall(libamdhip64.hipMallocAsync(dev_ptr::Ptr{Ptr{Cvoid}}, size::Csize_t, stream::hipStream_t)::hipError_t) end @checked function hipFreeAsync(dev_ptr, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipFreeAsync(dev_ptr::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipFreeAsync(dev_ptr::Ptr{Cvoid}, stream::hipStream_t)::hipError_t) end @checked function hipMemPoolTrimTo(mem_pool, min_bytes_to_hold) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemPoolTrimTo(mem_pool::hipMemPool_t, + @gcsafe_ccall(libamdhip64.hipMemPoolTrimTo(mem_pool::hipMemPool_t, min_bytes_to_hold::Csize_t)::hipError_t) end @checked function hipMemPoolSetAttribute(mem_pool, attr, value) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemPoolSetAttribute(mem_pool::hipMemPool_t, + @gcsafe_ccall(libamdhip64.hipMemPoolSetAttribute(mem_pool::hipMemPool_t, attr::hipMemPoolAttr, value::Ptr{Cvoid})::hipError_t) end @checked function hipMemPoolGetAttribute(mem_pool, attr, value) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemPoolGetAttribute(mem_pool::hipMemPool_t, + @gcsafe_ccall(libamdhip64.hipMemPoolGetAttribute(mem_pool::hipMemPool_t, attr::hipMemPoolAttr, value::Ptr{Cvoid})::hipError_t) end @checked function hipMemPoolSetAccess(mem_pool, desc_list, count) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemPoolSetAccess(mem_pool::hipMemPool_t, + @gcsafe_ccall(libamdhip64.hipMemPoolSetAccess(mem_pool::hipMemPool_t, desc_list::Ptr{hipMemAccessDesc}, count::Csize_t)::hipError_t) end @checked function hipMemPoolGetAccess(flags, mem_pool, location) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemPoolGetAccess(flags::Ptr{hipMemAccessFlags}, + @gcsafe_ccall(libamdhip64.hipMemPoolGetAccess(flags::Ptr{hipMemAccessFlags}, mem_pool::hipMemPool_t, location::Ptr{hipMemLocation})::hipError_t) end @checked function hipMemPoolCreate(mem_pool, pool_props) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemPoolCreate(mem_pool::Ptr{hipMemPool_t}, + @gcsafe_ccall(libamdhip64.hipMemPoolCreate(mem_pool::Ptr{hipMemPool_t}, pool_props::Ptr{hipMemPoolProps})::hipError_t) end @checked function hipMemPoolDestroy(mem_pool) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemPoolDestroy(mem_pool::hipMemPool_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipMemPoolDestroy(mem_pool::hipMemPool_t)::hipError_t) end @checked function hipMallocFromPoolAsync(dev_ptr, size, mem_pool, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMallocFromPoolAsync(dev_ptr::Ptr{Ptr{Cvoid}}, + @gcsafe_ccall(libamdhip64.hipMallocFromPoolAsync(dev_ptr::Ptr{Ptr{Cvoid}}, size::Csize_t, mem_pool::hipMemPool_t, stream::hipStream_t)::hipError_t) @@ -4626,7 +4626,7 @@ end @checked function hipMemPoolExportToShareableHandle(shared_handle, mem_pool, handle_type, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemPoolExportToShareableHandle(shared_handle::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemPoolExportToShareableHandle(shared_handle::Ptr{Cvoid}, mem_pool::hipMemPool_t, handle_type::hipMemAllocationHandleType, flags::Cuint)::hipError_t) @@ -4634,7 +4634,7 @@ end @checked function hipMemPoolImportFromShareableHandle(mem_pool, shared_handle, handle_type, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemPoolImportFromShareableHandle(mem_pool::Ptr{hipMemPool_t}, + @gcsafe_ccall(libamdhip64.hipMemPoolImportFromShareableHandle(mem_pool::Ptr{hipMemPool_t}, shared_handle::Ptr{Cvoid}, handle_type::hipMemAllocationHandleType, flags::Cuint)::hipError_t) @@ -4642,70 +4642,70 @@ end @checked function hipMemPoolExportPointer(export_data, dev_ptr) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemPoolExportPointer(export_data::Ptr{hipMemPoolPtrExportData}, + @gcsafe_ccall(libamdhip64.hipMemPoolExportPointer(export_data::Ptr{hipMemPoolPtrExportData}, dev_ptr::Ptr{Cvoid})::hipError_t) end @checked function hipMemPoolImportPointer(dev_ptr, mem_pool, export_data) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemPoolImportPointer(dev_ptr::Ptr{Ptr{Cvoid}}, + @gcsafe_ccall(libamdhip64.hipMemPoolImportPointer(dev_ptr::Ptr{Ptr{Cvoid}}, mem_pool::hipMemPool_t, export_data::Ptr{hipMemPoolPtrExportData})::hipError_t) end @checked function hipMemSetMemPool(location, type, pool) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemSetMemPool(location::Ptr{hipMemLocation}, + @gcsafe_ccall(libamdhip64.hipMemSetMemPool(location::Ptr{hipMemLocation}, type::hipMemAllocationType, pool::hipMemPool_t)::hipError_t) end @checked function hipMemGetMemPool(pool, location, type) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemGetMemPool(pool::Ptr{hipMemPool_t}, + @gcsafe_ccall(libamdhip64.hipMemGetMemPool(pool::Ptr{hipMemPool_t}, location::Ptr{hipMemLocation}, type::hipMemAllocationType)::hipError_t) end @checked function hipHostAlloc(ptr, size, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipHostAlloc(ptr::Ptr{Ptr{Cvoid}}, size::Csize_t, + @gcsafe_ccall(libamdhip64.hipHostAlloc(ptr::Ptr{Ptr{Cvoid}}, size::Csize_t, flags::Cuint)::hipError_t) end @checked function hipHostGetDevicePointer(devPtr, hstPtr, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipHostGetDevicePointer(devPtr::Ptr{Ptr{Cvoid}}, + @gcsafe_ccall(libamdhip64.hipHostGetDevicePointer(devPtr::Ptr{Ptr{Cvoid}}, hstPtr::Ptr{Cvoid}, flags::Cuint)::hipError_t) end @checked function hipHostGetFlags(flagsPtr, hostPtr) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipHostGetFlags(flagsPtr::Ptr{Cuint}, + @gcsafe_ccall(libamdhip64.hipHostGetFlags(flagsPtr::Ptr{Cuint}, hostPtr::Ptr{Cvoid})::hipError_t) end @checked function hipHostRegister(hostPtr, sizeBytes, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipHostRegister(hostPtr::Ptr{Cvoid}, sizeBytes::Csize_t, + @gcsafe_ccall(libamdhip64.hipHostRegister(hostPtr::Ptr{Cvoid}, sizeBytes::Csize_t, flags::Cuint)::hipError_t) end @checked function hipHostUnregister(hostPtr) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipHostUnregister(hostPtr::Ptr{Cvoid})::hipError_t) + @gcsafe_ccall(libamdhip64.hipHostUnregister(hostPtr::Ptr{Cvoid})::hipError_t) end @checked function hipMallocPitch(ptr, pitch, width, height) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMallocPitch(ptr::Ptr{Ptr{Cvoid}}, pitch::Ptr{Csize_t}, + @gcsafe_ccall(libamdhip64.hipMallocPitch(ptr::Ptr{Ptr{Cvoid}}, pitch::Ptr{Csize_t}, width::Csize_t, height::Csize_t)::hipError_t) end @checked function hipMemAllocPitch(dptr, pitch, widthInBytes, height, elementSizeBytes) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemAllocPitch(dptr::Ptr{hipDeviceptr_t}, + @gcsafe_ccall(libamdhip64.hipMemAllocPitch(dptr::Ptr{hipDeviceptr_t}, pitch::Ptr{Csize_t}, widthInBytes::Csize_t, height::Csize_t, elementSizeBytes::Cuint)::hipError_t) @@ -4713,96 +4713,96 @@ end @checked function hipFree(ptr) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipFree(ptr::Ptr{Cvoid})::hipError_t) + @gcsafe_ccall(libamdhip64.hipFree(ptr::Ptr{Cvoid})::hipError_t) end @checked function hipFreeHost(ptr) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipFreeHost(ptr::Ptr{Cvoid})::hipError_t) + @gcsafe_ccall(libamdhip64.hipFreeHost(ptr::Ptr{Cvoid})::hipError_t) end @checked function hipHostFree(ptr) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipHostFree(ptr::Ptr{Cvoid})::hipError_t) + @gcsafe_ccall(libamdhip64.hipHostFree(ptr::Ptr{Cvoid})::hipError_t) end @checked function hipMemcpy(dst, src, sizeBytes, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy(dst::Ptr{Cvoid}, src::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemcpy(dst::Ptr{Cvoid}, src::Ptr{Cvoid}, sizeBytes::Csize_t, kind::hipMemcpyKind)::hipError_t) end @checked function hipMemcpyWithStream(dst, src, sizeBytes, kind, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyWithStream(dst::Ptr{Cvoid}, src::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemcpyWithStream(dst::Ptr{Cvoid}, src::Ptr{Cvoid}, sizeBytes::Csize_t, kind::hipMemcpyKind, stream::hipStream_t)::hipError_t) end @checked function hipMemcpyHtoD(dst, src, sizeBytes) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyHtoD(dst::hipDeviceptr_t, src::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemcpyHtoD(dst::hipDeviceptr_t, src::Ptr{Cvoid}, sizeBytes::Csize_t)::hipError_t) end @checked function hipMemcpyDtoH(dst, src, sizeBytes) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyDtoH(dst::Ptr{Cvoid}, src::hipDeviceptr_t, + @gcsafe_ccall(libamdhip64.hipMemcpyDtoH(dst::Ptr{Cvoid}, src::hipDeviceptr_t, sizeBytes::Csize_t)::hipError_t) end @checked function hipMemcpyDtoD(dst, src, sizeBytes) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyDtoD(dst::hipDeviceptr_t, src::hipDeviceptr_t, + @gcsafe_ccall(libamdhip64.hipMemcpyDtoD(dst::hipDeviceptr_t, src::hipDeviceptr_t, sizeBytes::Csize_t)::hipError_t) end @checked function hipMemcpyAtoD(dstDevice, srcArray, srcOffset, ByteCount) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyAtoD(dstDevice::hipDeviceptr_t, + @gcsafe_ccall(libamdhip64.hipMemcpyAtoD(dstDevice::hipDeviceptr_t, srcArray::hipArray_t, srcOffset::Csize_t, ByteCount::Csize_t)::hipError_t) end @checked function hipMemcpyDtoA(dstArray, dstOffset, srcDevice, ByteCount) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyDtoA(dstArray::hipArray_t, dstOffset::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemcpyDtoA(dstArray::hipArray_t, dstOffset::Csize_t, srcDevice::hipDeviceptr_t, ByteCount::Csize_t)::hipError_t) end @checked function hipMemcpyAtoA(dstArray, dstOffset, srcArray, srcOffset, ByteCount) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyAtoA(dstArray::hipArray_t, dstOffset::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemcpyAtoA(dstArray::hipArray_t, dstOffset::Csize_t, srcArray::hipArray_t, srcOffset::Csize_t, ByteCount::Csize_t)::hipError_t) end @checked function hipMemcpyHtoDAsync(dst, src, sizeBytes, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyHtoDAsync(dst::hipDeviceptr_t, src::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemcpyHtoDAsync(dst::hipDeviceptr_t, src::Ptr{Cvoid}, sizeBytes::Csize_t, stream::hipStream_t)::hipError_t) end @checked function hipMemcpyDtoHAsync(dst, src, sizeBytes, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyDtoHAsync(dst::Ptr{Cvoid}, src::hipDeviceptr_t, + @gcsafe_ccall(libamdhip64.hipMemcpyDtoHAsync(dst::Ptr{Cvoid}, src::hipDeviceptr_t, sizeBytes::Csize_t, stream::hipStream_t)::hipError_t) end @checked function hipMemcpyDtoDAsync(dst, src, sizeBytes, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyDtoDAsync(dst::hipDeviceptr_t, src::hipDeviceptr_t, + @gcsafe_ccall(libamdhip64.hipMemcpyDtoDAsync(dst::hipDeviceptr_t, src::hipDeviceptr_t, sizeBytes::Csize_t, stream::hipStream_t)::hipError_t) end @checked function hipMemcpyAtoHAsync(dstHost, srcArray, srcOffset, ByteCount, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyAtoHAsync(dstHost::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemcpyAtoHAsync(dstHost::Ptr{Cvoid}, srcArray::hipArray_t, srcOffset::Csize_t, ByteCount::Csize_t, stream::hipStream_t)::hipError_t) @@ -4810,47 +4810,47 @@ end @checked function hipMemcpyHtoAAsync(dstArray, dstOffset, srcHost, ByteCount, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyHtoAAsync(dstArray::hipArray_t, dstOffset::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemcpyHtoAAsync(dstArray::hipArray_t, dstOffset::Csize_t, srcHost::Ptr{Cvoid}, ByteCount::Csize_t, stream::hipStream_t)::hipError_t) end @checked function hipModuleGetGlobal(dptr, bytes, hmod, name) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipModuleGetGlobal(dptr::Ptr{hipDeviceptr_t}, + @gcsafe_ccall(libamdhip64.hipModuleGetGlobal(dptr::Ptr{hipDeviceptr_t}, bytes::Ptr{Csize_t}, hmod::hipModule_t, name::Cstring)::hipError_t) end @checked function hipGetSymbolAddress(devPtr, symbol) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGetSymbolAddress(devPtr::Ptr{Ptr{Cvoid}}, + @gcsafe_ccall(libamdhip64.hipGetSymbolAddress(devPtr::Ptr{Ptr{Cvoid}}, symbol::Ptr{Cvoid})::hipError_t) end @checked function hipGetSymbolSize(size, symbol) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGetSymbolSize(size::Ptr{Csize_t}, + @gcsafe_ccall(libamdhip64.hipGetSymbolSize(size::Ptr{Csize_t}, symbol::Ptr{Cvoid})::hipError_t) end @checked function hipGetProcAddress(symbol, pfn, hipVersion, flags, symbolStatus) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGetProcAddress(symbol::Cstring, pfn::Ptr{Ptr{Cvoid}}, + @gcsafe_ccall(libamdhip64.hipGetProcAddress(symbol::Cstring, pfn::Ptr{Ptr{Cvoid}}, hipVersion::Cint, flags::UInt64, symbolStatus::Ptr{hipDriverProcAddressQueryResult})::hipError_t) end @checked function hipMemcpyToSymbol(symbol, src, sizeBytes, offset, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyToSymbol(symbol::Ptr{Cvoid}, src::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemcpyToSymbol(symbol::Ptr{Cvoid}, src::Ptr{Cvoid}, sizeBytes::Csize_t, offset::Csize_t, kind::hipMemcpyKind)::hipError_t) end @checked function hipMemcpyToSymbolAsync(symbol, src, sizeBytes, offset, kind, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyToSymbolAsync(symbol::Ptr{Cvoid}, src::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemcpyToSymbolAsync(symbol::Ptr{Cvoid}, src::Ptr{Cvoid}, sizeBytes::Csize_t, offset::Csize_t, kind::hipMemcpyKind, stream::hipStream_t)::hipError_t) @@ -4858,14 +4858,14 @@ end @checked function hipMemcpyFromSymbol(dst, symbol, sizeBytes, offset, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyFromSymbol(dst::Ptr{Cvoid}, symbol::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemcpyFromSymbol(dst::Ptr{Cvoid}, symbol::Ptr{Cvoid}, sizeBytes::Csize_t, offset::Csize_t, kind::hipMemcpyKind)::hipError_t) end @checked function hipMemcpyFromSymbolAsync(dst, symbol, sizeBytes, offset, kind, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyFromSymbolAsync(dst::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemcpyFromSymbolAsync(dst::Ptr{Cvoid}, symbol::Ptr{Cvoid}, sizeBytes::Csize_t, offset::Csize_t, @@ -4875,72 +4875,72 @@ end @checked function hipMemcpyAsync(dst, src, sizeBytes, kind, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyAsync(dst::Ptr{Cvoid}, src::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemcpyAsync(dst::Ptr{Cvoid}, src::Ptr{Cvoid}, sizeBytes::Csize_t, kind::hipMemcpyKind, stream::hipStream_t)::hipError_t) end @checked function hipMemset(dst, value, sizeBytes) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemset(dst::Ptr{Cvoid}, value::Cint, + @gcsafe_ccall(libamdhip64.hipMemset(dst::Ptr{Cvoid}, value::Cint, sizeBytes::Csize_t)::hipError_t) end @checked function hipMemsetD8(dest, value, count) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemsetD8(dest::hipDeviceptr_t, value::Cuchar, + @gcsafe_ccall(libamdhip64.hipMemsetD8(dest::hipDeviceptr_t, value::Cuchar, count::Csize_t)::hipError_t) end @checked function hipMemsetD8Async(dest, value, count, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemsetD8Async(dest::hipDeviceptr_t, value::Cuchar, + @gcsafe_ccall(libamdhip64.hipMemsetD8Async(dest::hipDeviceptr_t, value::Cuchar, count::Csize_t, stream::hipStream_t)::hipError_t) end @checked function hipMemsetD16(dest, value, count) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemsetD16(dest::hipDeviceptr_t, value::Cushort, + @gcsafe_ccall(libamdhip64.hipMemsetD16(dest::hipDeviceptr_t, value::Cushort, count::Csize_t)::hipError_t) end @checked function hipMemsetD16Async(dest, value, count, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemsetD16Async(dest::hipDeviceptr_t, value::Cushort, + @gcsafe_ccall(libamdhip64.hipMemsetD16Async(dest::hipDeviceptr_t, value::Cushort, count::Csize_t, stream::hipStream_t)::hipError_t) end @checked function hipMemsetD32(dest, value, count) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemsetD32(dest::hipDeviceptr_t, value::Cint, + @gcsafe_ccall(libamdhip64.hipMemsetD32(dest::hipDeviceptr_t, value::Cint, count::Csize_t)::hipError_t) end @checked function hipMemsetAsync(dst, value, sizeBytes, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemsetAsync(dst::Ptr{Cvoid}, value::Cint, + @gcsafe_ccall(libamdhip64.hipMemsetAsync(dst::Ptr{Cvoid}, value::Cint, sizeBytes::Csize_t, stream::hipStream_t)::hipError_t) end @checked function hipMemsetD32Async(dst, value, count, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemsetD32Async(dst::hipDeviceptr_t, value::Cint, + @gcsafe_ccall(libamdhip64.hipMemsetD32Async(dst::hipDeviceptr_t, value::Cint, count::Csize_t, stream::hipStream_t)::hipError_t) end @checked function hipMemset2D(dst, pitch, value, width, height) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemset2D(dst::Ptr{Cvoid}, pitch::Csize_t, value::Cint, + @gcsafe_ccall(libamdhip64.hipMemset2D(dst::Ptr{Cvoid}, pitch::Csize_t, value::Cint, width::Csize_t, height::Csize_t)::hipError_t) end @checked function hipMemset2DAsync(dst, pitch, value, width, height, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemset2DAsync(dst::Ptr{Cvoid}, pitch::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemset2DAsync(dst::Ptr{Cvoid}, pitch::Csize_t, value::Cint, width::Csize_t, height::Csize_t, stream::hipStream_t)::hipError_t) @@ -4948,27 +4948,27 @@ end @checked function hipMemset3D(pitchedDevPtr, value, extent) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemset3D(pitchedDevPtr::hipPitchedPtr, value::Cint, + @gcsafe_ccall(libamdhip64.hipMemset3D(pitchedDevPtr::hipPitchedPtr, value::Cint, extent::hipExtent)::hipError_t) end @checked function hipMemset3DAsync(pitchedDevPtr, value, extent, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemset3DAsync(pitchedDevPtr::hipPitchedPtr, value::Cint, + @gcsafe_ccall(libamdhip64.hipMemset3DAsync(pitchedDevPtr::hipPitchedPtr, value::Cint, extent::hipExtent, stream::hipStream_t)::hipError_t) end @checked function hipMemsetD2D8(dst, dstPitch, value, width, height) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemsetD2D8(dst::hipDeviceptr_t, dstPitch::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemsetD2D8(dst::hipDeviceptr_t, dstPitch::Csize_t, value::Cuchar, width::Csize_t, height::Csize_t)::hipError_t) end @checked function hipMemsetD2D8Async(dst, dstPitch, value, width, height, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemsetD2D8Async(dst::hipDeviceptr_t, dstPitch::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemsetD2D8Async(dst::hipDeviceptr_t, dstPitch::Csize_t, value::Cuchar, width::Csize_t, height::Csize_t, stream::hipStream_t)::hipError_t) @@ -4976,14 +4976,14 @@ end @checked function hipMemsetD2D16(dst, dstPitch, value, width, height) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemsetD2D16(dst::hipDeviceptr_t, dstPitch::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemsetD2D16(dst::hipDeviceptr_t, dstPitch::Csize_t, value::Cushort, width::Csize_t, height::Csize_t)::hipError_t) end @checked function hipMemsetD2D16Async(dst, dstPitch, value, width, height, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemsetD2D16Async(dst::hipDeviceptr_t, dstPitch::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemsetD2D16Async(dst::hipDeviceptr_t, dstPitch::Csize_t, value::Cushort, width::Csize_t, height::Csize_t, stream::hipStream_t)::hipError_t) @@ -4991,14 +4991,14 @@ end @checked function hipMemsetD2D32(dst, dstPitch, value, width, height) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemsetD2D32(dst::hipDeviceptr_t, dstPitch::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemsetD2D32(dst::hipDeviceptr_t, dstPitch::Csize_t, value::Cuint, width::Csize_t, height::Csize_t)::hipError_t) end @checked function hipMemsetD2D32Async(dst, dstPitch, value, width, height, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemsetD2D32Async(dst::hipDeviceptr_t, dstPitch::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemsetD2D32Async(dst::hipDeviceptr_t, dstPitch::Csize_t, value::Cuint, width::Csize_t, height::Csize_t, stream::hipStream_t)::hipError_t) @@ -5006,19 +5006,19 @@ end @checked function hipMemGetInfo(free, total) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemGetInfo(free::Ptr{Csize_t}, + @gcsafe_ccall(libamdhip64.hipMemGetInfo(free::Ptr{Csize_t}, total::Ptr{Csize_t})::hipError_t) end @checked function hipMemPtrGetInfo(ptr, size) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemPtrGetInfo(ptr::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemPtrGetInfo(ptr::Ptr{Cvoid}, size::Ptr{Csize_t})::hipError_t) end @checked function hipMallocArray(array, desc, width, height, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMallocArray(array::Ptr{hipArray_t}, + @gcsafe_ccall(libamdhip64.hipMallocArray(array::Ptr{hipArray_t}, desc::Ptr{hipChannelFormatDesc}, width::Csize_t, height::Csize_t, flags::Cuint)::hipError_t) @@ -5026,35 +5026,35 @@ end @checked function hipArrayCreate(pHandle, pAllocateArray) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipArrayCreate(pHandle::Ptr{hipArray_t}, + @gcsafe_ccall(libamdhip64.hipArrayCreate(pHandle::Ptr{hipArray_t}, pAllocateArray::Ptr{HIP_ARRAY_DESCRIPTOR})::hipError_t) end @checked function hipArrayDestroy(array) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipArrayDestroy(array::hipArray_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipArrayDestroy(array::hipArray_t)::hipError_t) end @checked function hipArray3DCreate(array, pAllocateArray) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipArray3DCreate(array::Ptr{hipArray_t}, + @gcsafe_ccall(libamdhip64.hipArray3DCreate(array::Ptr{hipArray_t}, pAllocateArray::Ptr{HIP_ARRAY3D_DESCRIPTOR})::hipError_t) end @checked function hipMalloc3D(pitchedDevPtr, extent) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMalloc3D(pitchedDevPtr::Ptr{hipPitchedPtr}, + @gcsafe_ccall(libamdhip64.hipMalloc3D(pitchedDevPtr::Ptr{hipPitchedPtr}, extent::hipExtent)::hipError_t) end @checked function hipFreeArray(array) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipFreeArray(array::hipArray_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipFreeArray(array::hipArray_t)::hipError_t) end @checked function hipMalloc3DArray(array, desc, extent, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMalloc3DArray(array::Ptr{hipArray_t}, + @gcsafe_ccall(libamdhip64.hipMalloc3DArray(array::Ptr{hipArray_t}, desc::Ptr{hipChannelFormatDesc}, extent::hipExtent, flags::Cuint)::hipError_t) @@ -5062,26 +5062,26 @@ end @checked function hipArrayGetInfo(desc, extent, flags, array) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipArrayGetInfo(desc::Ptr{hipChannelFormatDesc}, + @gcsafe_ccall(libamdhip64.hipArrayGetInfo(desc::Ptr{hipChannelFormatDesc}, extent::Ptr{hipExtent}, flags::Ptr{Cuint}, array::hipArray_t)::hipError_t) end @checked function hipArrayGetDescriptor(pArrayDescriptor, array) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipArrayGetDescriptor(pArrayDescriptor::Ptr{HIP_ARRAY_DESCRIPTOR}, + @gcsafe_ccall(libamdhip64.hipArrayGetDescriptor(pArrayDescriptor::Ptr{HIP_ARRAY_DESCRIPTOR}, array::hipArray_t)::hipError_t) end @checked function hipArray3DGetDescriptor(pArrayDescriptor, array) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipArray3DGetDescriptor(pArrayDescriptor::Ptr{HIP_ARRAY3D_DESCRIPTOR}, + @gcsafe_ccall(libamdhip64.hipArray3DGetDescriptor(pArrayDescriptor::Ptr{HIP_ARRAY3D_DESCRIPTOR}, array::hipArray_t)::hipError_t) end @checked function hipMemcpy2D(dst, dpitch, src, spitch, width, height, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy2D(dst::Ptr{Cvoid}, dpitch::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemcpy2D(dst::Ptr{Cvoid}, dpitch::Csize_t, src::Ptr{Cvoid}, spitch::Csize_t, width::Csize_t, height::Csize_t, kind::hipMemcpyKind)::hipError_t) @@ -5089,18 +5089,18 @@ end @checked function hipMemcpyParam2D(pCopy) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyParam2D(pCopy::Ptr{hip_Memcpy2D})::hipError_t) + @gcsafe_ccall(libamdhip64.hipMemcpyParam2D(pCopy::Ptr{hip_Memcpy2D})::hipError_t) end @checked function hipMemcpyParam2DAsync(pCopy, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyParam2DAsync(pCopy::Ptr{hip_Memcpy2D}, + @gcsafe_ccall(libamdhip64.hipMemcpyParam2DAsync(pCopy::Ptr{hip_Memcpy2D}, stream::hipStream_t)::hipError_t) end @checked function hipMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy2DAsync(dst::Ptr{Cvoid}, dpitch::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemcpy2DAsync(dst::Ptr{Cvoid}, dpitch::Csize_t, src::Ptr{Cvoid}, spitch::Csize_t, width::Csize_t, height::Csize_t, kind::hipMemcpyKind, @@ -5109,7 +5109,7 @@ end @checked function hipMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy2DToArray(dst::hipArray_t, wOffset::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemcpy2DToArray(dst::hipArray_t, wOffset::Csize_t, hOffset::Csize_t, src::Ptr{Cvoid}, spitch::Csize_t, width::Csize_t, height::Csize_t, @@ -5119,7 +5119,7 @@ end @checked function hipMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy2DToArrayAsync(dst::hipArray_t, wOffset::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemcpy2DToArrayAsync(dst::hipArray_t, wOffset::Csize_t, hOffset::Csize_t, src::Ptr{Cvoid}, spitch::Csize_t, width::Csize_t, height::Csize_t, @@ -5130,7 +5130,7 @@ end @checked function hipMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy2DArrayToArray(dst::hipArray_t, + @gcsafe_ccall(libamdhip64.hipMemcpy2DArrayToArray(dst::hipArray_t, wOffsetDst::Csize_t, hOffsetDst::Csize_t, src::hipArray_const_t, @@ -5142,7 +5142,7 @@ end @checked function hipMemcpyToArray(dst, wOffset, hOffset, src, count, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyToArray(dst::hipArray_t, wOffset::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemcpyToArray(dst::hipArray_t, wOffset::Csize_t, hOffset::Csize_t, src::Ptr{Cvoid}, count::Csize_t, kind::hipMemcpyKind)::hipError_t) @@ -5150,7 +5150,7 @@ end @checked function hipMemcpyFromArray(dst, srcArray, wOffset, hOffset, count, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyFromArray(dst::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemcpyFromArray(dst::Ptr{Cvoid}, srcArray::hipArray_const_t, wOffset::Csize_t, hOffset::Csize_t, count::Csize_t, @@ -5159,7 +5159,7 @@ end @checked function hipMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy2DFromArray(dst::Ptr{Cvoid}, dpitch::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemcpy2DFromArray(dst::Ptr{Cvoid}, dpitch::Csize_t, src::hipArray_const_t, wOffset::Csize_t, hOffset::Csize_t, width::Csize_t, height::Csize_t, @@ -5169,7 +5169,7 @@ end @checked function hipMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy2DFromArrayAsync(dst::Ptr{Cvoid}, dpitch::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemcpy2DFromArrayAsync(dst::Ptr{Cvoid}, dpitch::Csize_t, src::hipArray_const_t, wOffset::Csize_t, hOffset::Csize_t, width::Csize_t, @@ -5180,43 +5180,43 @@ end @checked function hipMemcpyAtoH(dst, srcArray, srcOffset, count) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyAtoH(dst::Ptr{Cvoid}, srcArray::hipArray_t, + @gcsafe_ccall(libamdhip64.hipMemcpyAtoH(dst::Ptr{Cvoid}, srcArray::hipArray_t, srcOffset::Csize_t, count::Csize_t)::hipError_t) end @checked function hipMemcpyHtoA(dstArray, dstOffset, srcHost, count) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyHtoA(dstArray::hipArray_t, dstOffset::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemcpyHtoA(dstArray::hipArray_t, dstOffset::Csize_t, srcHost::Ptr{Cvoid}, count::Csize_t)::hipError_t) end @checked function hipMemcpy3D(p) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy3D(p::Ptr{hipMemcpy3DParms})::hipError_t) + @gcsafe_ccall(libamdhip64.hipMemcpy3D(p::Ptr{hipMemcpy3DParms})::hipError_t) end @checked function hipMemcpy3DAsync(p, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy3DAsync(p::Ptr{hipMemcpy3DParms}, + @gcsafe_ccall(libamdhip64.hipMemcpy3DAsync(p::Ptr{hipMemcpy3DParms}, stream::hipStream_t)::hipError_t) end @checked function hipDrvMemcpy3D(pCopy) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDrvMemcpy3D(pCopy::Ptr{HIP_MEMCPY3D})::hipError_t) + @gcsafe_ccall(libamdhip64.hipDrvMemcpy3D(pCopy::Ptr{HIP_MEMCPY3D})::hipError_t) end @checked function hipDrvMemcpy3DAsync(pCopy, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDrvMemcpy3DAsync(pCopy::Ptr{HIP_MEMCPY3D}, + @gcsafe_ccall(libamdhip64.hipDrvMemcpy3DAsync(pCopy::Ptr{HIP_MEMCPY3D}, stream::hipStream_t)::hipError_t) end @checked function hipMemGetAddressRange(pbase, psize, dptr) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemGetAddressRange(pbase::Ptr{hipDeviceptr_t}, + @gcsafe_ccall(libamdhip64.hipMemGetAddressRange(pbase::Ptr{hipDeviceptr_t}, psize::Ptr{Csize_t}, dptr::hipDeviceptr_t)::hipError_t) end @@ -5224,7 +5224,7 @@ end @checked function hipMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyBatchAsync(dsts::Ptr{Ptr{Cvoid}}, + @gcsafe_ccall(libamdhip64.hipMemcpyBatchAsync(dsts::Ptr{Ptr{Cvoid}}, srcs::Ptr{Ptr{Cvoid}}, sizes::Ptr{Csize_t}, count::Csize_t, attrs::Ptr{hipMemcpyAttributes}, @@ -5236,7 +5236,7 @@ end @checked function hipMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy3DBatchAsync(numOps::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemcpy3DBatchAsync(numOps::Csize_t, opList::Ptr{hipMemcpy3DBatchOp}, failIdx::Ptr{Csize_t}, flags::Culonglong, @@ -5245,196 +5245,196 @@ end @checked function hipMemcpy3DPeer(p) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy3DPeer(p::Ptr{hipMemcpy3DPeerParms})::hipError_t) + @gcsafe_ccall(libamdhip64.hipMemcpy3DPeer(p::Ptr{hipMemcpy3DPeerParms})::hipError_t) end @checked function hipMemcpy3DPeerAsync(p, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy3DPeerAsync(p::Ptr{hipMemcpy3DPeerParms}, + @gcsafe_ccall(libamdhip64.hipMemcpy3DPeerAsync(p::Ptr{hipMemcpy3DPeerParms}, stream::hipStream_t)::hipError_t) end @checked function hipMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMipmappedArrayGetMemoryRequirements(memoryRequirements::Ptr{hipArrayMemoryRequirements}, + @gcsafe_ccall(libamdhip64.hipMipmappedArrayGetMemoryRequirements(memoryRequirements::Ptr{hipArrayMemoryRequirements}, mipmap::hipMipmappedArray_t, device::hipDevice_t)::hipError_t) end @checked function hipDeviceCanAccessPeer(canAccessPeer, deviceId, peerDeviceId) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceCanAccessPeer(canAccessPeer::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipDeviceCanAccessPeer(canAccessPeer::Ptr{Cint}, deviceId::Cint, peerDeviceId::Cint)::hipError_t) end @checked function hipDeviceEnablePeerAccess(peerDeviceId, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceEnablePeerAccess(peerDeviceId::Cint, + @gcsafe_ccall(libamdhip64.hipDeviceEnablePeerAccess(peerDeviceId::Cint, flags::Cuint)::hipError_t) end @checked function hipDeviceDisablePeerAccess(peerDeviceId) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceDisablePeerAccess(peerDeviceId::Cint)::hipError_t) + @gcsafe_ccall(libamdhip64.hipDeviceDisablePeerAccess(peerDeviceId::Cint)::hipError_t) end @checked function hipMemcpyPeer(dst, dstDeviceId, src, srcDeviceId, sizeBytes) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyPeer(dst::Ptr{Cvoid}, dstDeviceId::Cint, + @gcsafe_ccall(libamdhip64.hipMemcpyPeer(dst::Ptr{Cvoid}, dstDeviceId::Cint, src::Ptr{Cvoid}, srcDeviceId::Cint, sizeBytes::Csize_t)::hipError_t) end @checked function hipMemcpyPeerAsync(dst, dstDeviceId, src, srcDevice, sizeBytes, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyPeerAsync(dst::Ptr{Cvoid}, dstDeviceId::Cint, + @gcsafe_ccall(libamdhip64.hipMemcpyPeerAsync(dst::Ptr{Cvoid}, dstDeviceId::Cint, src::Ptr{Cvoid}, srcDevice::Cint, sizeBytes::Csize_t, stream::hipStream_t)::hipError_t) end @checked function hipCtxCreate(ctx, flags, device) - @gcsafe_ccall(libhip.hipCtxCreate(ctx::Ptr{hipCtx_t}, flags::Cuint, + @gcsafe_ccall(libamdhip64.hipCtxCreate(ctx::Ptr{hipCtx_t}, flags::Cuint, device::hipDevice_t)::hipError_t) end @checked function hipCtxDestroy(ctx) - @gcsafe_ccall(libhip.hipCtxDestroy(ctx::hipCtx_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipCtxDestroy(ctx::hipCtx_t)::hipError_t) end @checked function hipCtxPopCurrent(ctx) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipCtxPopCurrent(ctx::Ptr{hipCtx_t})::hipError_t) + @gcsafe_ccall(libamdhip64.hipCtxPopCurrent(ctx::Ptr{hipCtx_t})::hipError_t) end @checked function hipCtxPushCurrent(ctx) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipCtxPushCurrent(ctx::hipCtx_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipCtxPushCurrent(ctx::hipCtx_t)::hipError_t) end @checked function hipCtxSetCurrent(ctx) - @gcsafe_ccall(libhip.hipCtxSetCurrent(ctx::hipCtx_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipCtxSetCurrent(ctx::hipCtx_t)::hipError_t) end @checked function hipCtxGetCurrent(ctx) - @gcsafe_ccall(libhip.hipCtxGetCurrent(ctx::Ref{hipCtx_t})::hipError_t) + @gcsafe_ccall(libamdhip64.hipCtxGetCurrent(ctx::Ref{hipCtx_t})::hipError_t) end @checked function hipCtxGetDevice(device) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipCtxGetDevice(device::Ptr{hipDevice_t})::hipError_t) + @gcsafe_ccall(libamdhip64.hipCtxGetDevice(device::Ptr{hipDevice_t})::hipError_t) end @checked function hipCtxGetApiVersion(ctx, apiVersion) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipCtxGetApiVersion(ctx::hipCtx_t, + @gcsafe_ccall(libamdhip64.hipCtxGetApiVersion(ctx::hipCtx_t, apiVersion::Ptr{Cuint})::hipError_t) end @checked function hipCtxGetCacheConfig(cacheConfig) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipCtxGetCacheConfig(cacheConfig::Ptr{hipFuncCache_t})::hipError_t) + @gcsafe_ccall(libamdhip64.hipCtxGetCacheConfig(cacheConfig::Ptr{hipFuncCache_t})::hipError_t) end @checked function hipCtxSetCacheConfig(cacheConfig) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipCtxSetCacheConfig(cacheConfig::hipFuncCache_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipCtxSetCacheConfig(cacheConfig::hipFuncCache_t)::hipError_t) end @checked function hipCtxSetSharedMemConfig(config) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipCtxSetSharedMemConfig(config::hipSharedMemConfig)::hipError_t) + @gcsafe_ccall(libamdhip64.hipCtxSetSharedMemConfig(config::hipSharedMemConfig)::hipError_t) end @checked function hipCtxGetSharedMemConfig(pConfig) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipCtxGetSharedMemConfig(pConfig::Ptr{hipSharedMemConfig})::hipError_t) + @gcsafe_ccall(libamdhip64.hipCtxGetSharedMemConfig(pConfig::Ptr{hipSharedMemConfig})::hipError_t) end @checked function hipCtxSynchronize() AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipCtxSynchronize()::hipError_t) + @gcsafe_ccall(libamdhip64.hipCtxSynchronize()::hipError_t) end @checked function hipCtxGetFlags(flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipCtxGetFlags(flags::Ptr{Cuint})::hipError_t) + @gcsafe_ccall(libamdhip64.hipCtxGetFlags(flags::Ptr{Cuint})::hipError_t) end @checked function hipCtxEnablePeerAccess(peerCtx, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipCtxEnablePeerAccess(peerCtx::hipCtx_t, + @gcsafe_ccall(libamdhip64.hipCtxEnablePeerAccess(peerCtx::hipCtx_t, flags::Cuint)::hipError_t) end @checked function hipCtxDisablePeerAccess(peerCtx) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipCtxDisablePeerAccess(peerCtx::hipCtx_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipCtxDisablePeerAccess(peerCtx::hipCtx_t)::hipError_t) end @checked function hipDevicePrimaryCtxGetState(dev, flags, active) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDevicePrimaryCtxGetState(dev::hipDevice_t, + @gcsafe_ccall(libamdhip64.hipDevicePrimaryCtxGetState(dev::hipDevice_t, flags::Ptr{Cuint}, active::Ptr{Cint})::hipError_t) end @checked function hipDevicePrimaryCtxRelease(dev) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDevicePrimaryCtxRelease(dev::hipDevice_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipDevicePrimaryCtxRelease(dev::hipDevice_t)::hipError_t) end @checked function hipDevicePrimaryCtxRetain(pctx, dev) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDevicePrimaryCtxRetain(pctx::Ptr{hipCtx_t}, + @gcsafe_ccall(libamdhip64.hipDevicePrimaryCtxRetain(pctx::Ptr{hipCtx_t}, dev::hipDevice_t)::hipError_t) end @checked function hipDevicePrimaryCtxReset(dev) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDevicePrimaryCtxReset(dev::hipDevice_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipDevicePrimaryCtxReset(dev::hipDevice_t)::hipError_t) end @checked function hipDevicePrimaryCtxSetFlags(dev, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDevicePrimaryCtxSetFlags(dev::hipDevice_t, + @gcsafe_ccall(libamdhip64.hipDevicePrimaryCtxSetFlags(dev::hipDevice_t, flags::Cuint)::hipError_t) end @checked function hipModuleLoadFatBinary(_module, fatbin) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipModuleLoadFatBinary(_module::Ptr{hipModule_t}, + @gcsafe_ccall(libamdhip64.hipModuleLoadFatBinary(_module::Ptr{hipModule_t}, fatbin::Ptr{Cvoid})::hipError_t) end @checked function hipModuleLoad(_module, fname) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipModuleLoad(_module::Ptr{hipModule_t}, + @gcsafe_ccall(libamdhip64.hipModuleLoad(_module::Ptr{hipModule_t}, fname::Cstring)::hipError_t) end @checked function hipModuleUnload(_module) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipModuleUnload(_module::hipModule_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipModuleUnload(_module::hipModule_t)::hipError_t) end @checked function hipModuleGetFunction(_function, _module, kname) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipModuleGetFunction(_function::Ptr{hipFunction_t}, + @gcsafe_ccall(libamdhip64.hipModuleGetFunction(_function::Ptr{hipFunction_t}, _module::hipModule_t, kname::Cstring)::hipError_t) end @checked function hipModuleGetFunctionCount(count, mod) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipModuleGetFunctionCount(count::Ptr{Cuint}, + @gcsafe_ccall(libamdhip64.hipModuleGetFunctionCount(count::Ptr{Cuint}, mod::hipModule_t)::hipError_t) end @checked function hipKernelGetAttribute(pi, attrib, kernel, dev) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipKernelGetAttribute(pi::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipKernelGetAttribute(pi::Ptr{Cint}, attrib::hipFunction_attribute, kernel::hipKernel_t, dev::hipDevice_t)::hipError_t) @@ -5443,7 +5443,7 @@ end @checked function hipLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLibraryLoadData(library::Ptr{hipLibrary_t}, + @gcsafe_ccall(libamdhip64.hipLibraryLoadData(library::Ptr{hipLibrary_t}, code::Ptr{Cvoid}, jitOptions::Ptr{hipJitOption}, jitOptionsValues::Ptr{Ptr{Cvoid}}, @@ -5457,7 +5457,7 @@ end numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLibraryLoadFromFile(library::Ptr{hipLibrary_t}, + @gcsafe_ccall(libamdhip64.hipLibraryLoadFromFile(library::Ptr{hipLibrary_t}, fileName::Cstring, jitOptions::Ptr{hipJitOption}, jitOptionsValues::Ptr{Ptr{Cvoid}}, @@ -5469,44 +5469,44 @@ end @checked function hipLibraryUnload(library) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLibraryUnload(library::hipLibrary_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipLibraryUnload(library::hipLibrary_t)::hipError_t) end @checked function hipLibraryGetKernel(pKernel, library, name) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLibraryGetKernel(pKernel::Ptr{hipKernel_t}, + @gcsafe_ccall(libamdhip64.hipLibraryGetKernel(pKernel::Ptr{hipKernel_t}, library::hipLibrary_t, name::Cstring)::hipError_t) end @checked function hipLibraryGetKernelCount(count, library) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLibraryGetKernelCount(count::Ptr{Cuint}, + @gcsafe_ccall(libamdhip64.hipLibraryGetKernelCount(count::Ptr{Cuint}, library::hipLibrary_t)::hipError_t) end @checked function hipLibraryEnumerateKernels(kernels, numKernels, library) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLibraryEnumerateKernels(kernels::Ptr{hipKernel_t}, + @gcsafe_ccall(libamdhip64.hipLibraryEnumerateKernels(kernels::Ptr{hipKernel_t}, numKernels::Cuint, library::hipLibrary_t)::hipError_t) end @checked function hipKernelGetLibrary(library, kernel) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipKernelGetLibrary(library::Ptr{hipLibrary_t}, + @gcsafe_ccall(libamdhip64.hipKernelGetLibrary(library::Ptr{hipLibrary_t}, kernel::hipKernel_t)::hipError_t) end @checked function hipKernelGetName(name, kernel) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipKernelGetName(name::Ptr{Cstring}, + @gcsafe_ccall(libamdhip64.hipKernelGetName(name::Ptr{Cstring}, kernel::hipKernel_t)::hipError_t) end @checked function hipKernelGetParamInfo(kernel, paramIndex, paramOffset, paramSize) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipKernelGetParamInfo(kernel::hipKernel_t, + @gcsafe_ccall(libamdhip64.hipKernelGetParamInfo(kernel::hipKernel_t, paramIndex::Csize_t, paramOffset::Ptr{Csize_t}, paramSize::Ptr{Csize_t})::hipError_t) @@ -5514,26 +5514,26 @@ end @checked function hipFuncGetAttributes(attr, func) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipFuncGetAttributes(attr::Ptr{hipFuncAttributes}, + @gcsafe_ccall(libamdhip64.hipFuncGetAttributes(attr::Ptr{hipFuncAttributes}, func::Ptr{Cvoid})::hipError_t) end @checked function hipFuncGetAttribute(value, attrib, hfunc) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipFuncGetAttribute(value::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipFuncGetAttribute(value::Ptr{Cint}, attrib::hipFunction_attribute, hfunc::hipFunction_t)::hipError_t) end @checked function hipGetFuncBySymbol(functionPtr, symbolPtr) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGetFuncBySymbol(functionPtr::Ptr{hipFunction_t}, + @gcsafe_ccall(libamdhip64.hipGetFuncBySymbol(functionPtr::Ptr{hipFunction_t}, symbolPtr::Ptr{Cvoid})::hipError_t) end @checked function hipGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGetDriverEntryPoint(symbol::Cstring, + @gcsafe_ccall(libamdhip64.hipGetDriverEntryPoint(symbol::Cstring, funcPtr::Ptr{Ptr{Cvoid}}, flags::Culonglong, driverStatus::Ptr{hipDriverEntryPointQueryResult})::hipError_t) @@ -5541,20 +5541,20 @@ end @checked function hipModuleGetTexRef(texRef, hmod, name) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipModuleGetTexRef(texRef::Ptr{Ptr{textureReference}}, + @gcsafe_ccall(libamdhip64.hipModuleGetTexRef(texRef::Ptr{Ptr{textureReference}}, hmod::hipModule_t, name::Cstring)::hipError_t) end @checked function hipModuleLoadData(_module, image) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipModuleLoadData(_module::Ptr{hipModule_t}, + @gcsafe_ccall(libamdhip64.hipModuleLoadData(_module::Ptr{hipModule_t}, image::Ptr{Cvoid})::hipError_t) end @checked function hipModuleLoadDataEx(_module, image, numOptions, options, optionValues) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipModuleLoadDataEx(_module::Ptr{hipModule_t}, + @gcsafe_ccall(libamdhip64.hipModuleLoadDataEx(_module::Ptr{hipModule_t}, image::Ptr{Cvoid}, numOptions::Cuint, options::Ptr{hipJitOption}, optionValues::Ptr{Ptr{Cvoid}})::hipError_t) @@ -5562,7 +5562,7 @@ end @checked function hipLinkAddData(state, type, data, size, name, numOptions, options, optionValues) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLinkAddData(state::hipLinkState_t, type::hipJitInputType, + @gcsafe_ccall(libamdhip64.hipLinkAddData(state::hipLinkState_t, type::hipJitInputType, data::Ptr{Cvoid}, size::Csize_t, name::Cstring, numOptions::Cuint, options::Ptr{hipJitOption}, @@ -5571,7 +5571,7 @@ end @checked function hipLinkAddFile(state, type, path, numOptions, options, optionValues) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLinkAddFile(state::hipLinkState_t, type::hipJitInputType, + @gcsafe_ccall(libamdhip64.hipLinkAddFile(state::hipLinkState_t, type::hipJitInputType, path::Cstring, numOptions::Cuint, options::Ptr{hipJitOption}, optionValues::Ptr{Ptr{Cvoid}})::hipError_t) @@ -5579,27 +5579,27 @@ end @checked function hipLinkComplete(state, hipBinOut, sizeOut) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLinkComplete(state::hipLinkState_t, + @gcsafe_ccall(libamdhip64.hipLinkComplete(state::hipLinkState_t, hipBinOut::Ptr{Ptr{Cvoid}}, sizeOut::Ptr{Csize_t})::hipError_t) end @checked function hipLinkCreate(numOptions, options, optionValues, stateOut) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLinkCreate(numOptions::Cuint, options::Ptr{hipJitOption}, + @gcsafe_ccall(libamdhip64.hipLinkCreate(numOptions::Cuint, options::Ptr{hipJitOption}, optionValues::Ptr{Ptr{Cvoid}}, stateOut::Ptr{hipLinkState_t})::hipError_t) end @checked function hipLinkDestroy(state) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLinkDestroy(state::hipLinkState_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipLinkDestroy(state::hipLinkState_t)::hipError_t) end @checked function hipModuleLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, stream, kernelParams, extra) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipModuleLaunchKernel(f::hipFunction_t, gridDimX::Cuint, + @gcsafe_ccall(libamdhip64.hipModuleLaunchKernel(f::hipFunction_t, gridDimX::Cuint, gridDimY::Cuint, gridDimZ::Cuint, blockDimX::Cuint, blockDimY::Cuint, blockDimZ::Cuint, @@ -5613,7 +5613,7 @@ end blockDimY, blockDimZ, sharedMemBytes, stream, kernelParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipModuleLaunchCooperativeKernel(f::hipFunction_t, + @gcsafe_ccall(libamdhip64.hipModuleLaunchCooperativeKernel(f::hipFunction_t, gridDimX::Cuint, gridDimY::Cuint, gridDimZ::Cuint, @@ -5627,7 +5627,7 @@ end @checked function hipModuleLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipModuleLaunchCooperativeKernelMultiDevice(launchParamsList::Ptr{hipFunctionLaunchParams}, + @gcsafe_ccall(libamdhip64.hipModuleLaunchCooperativeKernelMultiDevice(launchParamsList::Ptr{hipFunctionLaunchParams}, numDevices::Cuint, flags::Cuint)::hipError_t) end @@ -5635,7 +5635,7 @@ end @checked function hipLaunchCooperativeKernel(f, gridDim, blockDimX, kernelParams, sharedMemBytes, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLaunchCooperativeKernel(f::Ptr{Cvoid}, gridDim::dim3, + @gcsafe_ccall(libamdhip64.hipLaunchCooperativeKernel(f::Ptr{Cvoid}, gridDim::dim3, blockDimX::dim3, kernelParams::Ptr{Ptr{Cvoid}}, sharedMemBytes::Cuint, @@ -5644,28 +5644,28 @@ end @checked function hipLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLaunchCooperativeKernelMultiDevice(launchParamsList::Ptr{hipLaunchParams}, + @gcsafe_ccall(libamdhip64.hipLaunchCooperativeKernelMultiDevice(launchParamsList::Ptr{hipLaunchParams}, numDevices::Cint, flags::Cuint)::hipError_t) end @checked function hipExtLaunchMultiKernelMultiDevice(launchParamsList, numDevices, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipExtLaunchMultiKernelMultiDevice(launchParamsList::Ptr{hipLaunchParams}, + @gcsafe_ccall(libamdhip64.hipExtLaunchMultiKernelMultiDevice(launchParamsList::Ptr{hipLaunchParams}, numDevices::Cint, flags::Cuint)::hipError_t) end @checked function hipLaunchKernelExC(config, fPtr, args) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLaunchKernelExC(config::Ptr{hipLaunchConfig_t}, + @gcsafe_ccall(libamdhip64.hipLaunchKernelExC(config::Ptr{hipLaunchConfig_t}, fPtr::Ptr{Cvoid}, args::Ptr{Ptr{Cvoid}})::hipError_t) end @checked function hipDrvLaunchKernelEx(config, f, params, extra) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDrvLaunchKernelEx(config::Ptr{HIP_LAUNCH_CONFIG}, + @gcsafe_ccall(libamdhip64.hipDrvLaunchKernelEx(config::Ptr{HIP_LAUNCH_CONFIG}, f::hipFunction_t, params::Ptr{Ptr{Cvoid}}, extra::Ptr{Ptr{Cvoid}})::hipError_t) @@ -5673,7 +5673,7 @@ end @checked function hipMemGetHandleForAddressRange(handle, dptr, size, handleType, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemGetHandleForAddressRange(handle::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemGetHandleForAddressRange(handle::Ptr{Cvoid}, dptr::hipDeviceptr_t, size::Csize_t, handleType::hipMemRangeHandleType, @@ -5683,7 +5683,7 @@ end @checked function hipModuleOccupancyMaxPotentialBlockSize(gridSize, blockSize, f, dynSharedMemPerBlk, blockSizeLimit) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipModuleOccupancyMaxPotentialBlockSize(gridSize::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipModuleOccupancyMaxPotentialBlockSize(gridSize::Ptr{Cint}, blockSize::Ptr{Cint}, f::hipFunction_t, dynSharedMemPerBlk::Csize_t, @@ -5694,7 +5694,7 @@ end dynSharedMemPerBlk, blockSizeLimit, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipModuleOccupancyMaxPotentialBlockSizeWithFlags(gridSize::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipModuleOccupancyMaxPotentialBlockSizeWithFlags(gridSize::Ptr{Cint}, blockSize::Ptr{Cint}, f::hipFunction_t, dynSharedMemPerBlk::Csize_t, @@ -5705,7 +5705,7 @@ end @checked function hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, f, blockSize, dynSharedMemPerBlk) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks::Ptr{Cint}, f::hipFunction_t, blockSize::Cint, dynSharedMemPerBlk::Csize_t)::hipError_t) @@ -5716,7 +5716,7 @@ end dynSharedMemPerBlk, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks::Ptr{Cint}, f::hipFunction_t, blockSize::Cint, dynSharedMemPerBlk::Csize_t, @@ -5726,7 +5726,7 @@ end @checked function hipOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, f, blockSize, dynSharedMemPerBlk) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks::Ptr{Cint}, f::Ptr{Cvoid}, blockSize::Cint, dynSharedMemPerBlk::Csize_t)::hipError_t) @@ -5735,7 +5735,7 @@ end @checked function hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, f, blockSize, dynSharedMemPerBlk, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks::Ptr{Cint}, f::Ptr{Cvoid}, blockSize::Cint, dynSharedMemPerBlk::Csize_t, @@ -5745,7 +5745,7 @@ end @checked function hipOccupancyMaxPotentialBlockSize(gridSize, blockSize, f, dynSharedMemPerBlk, blockSizeLimit) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipOccupancyMaxPotentialBlockSize(gridSize::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipOccupancyMaxPotentialBlockSize(gridSize::Ptr{Cint}, blockSize::Ptr{Cint}, f::Ptr{Cvoid}, dynSharedMemPerBlk::Csize_t, @@ -5754,7 +5754,7 @@ end @checked function hipOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, f, numBlocks, blockSize) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize::Ptr{Csize_t}, + @gcsafe_ccall(libamdhip64.hipOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize::Ptr{Csize_t}, f::Ptr{Cvoid}, numBlocks::Cint, blockSize::Cint)::hipError_t) @@ -5762,14 +5762,14 @@ end @checked function hipOccupancyMaxActiveClusters(numClusters, f, config) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipOccupancyMaxActiveClusters(numClusters::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipOccupancyMaxActiveClusters(numClusters::Ptr{Cint}, f::Ptr{Cvoid}, config::Ptr{hipLaunchConfig_t})::hipError_t) end @checked function hipOccupancyMaxPotentialClusterSize(clusterSize, f, config) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipOccupancyMaxPotentialClusterSize(clusterSize::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipOccupancyMaxPotentialClusterSize(clusterSize::Ptr{Cint}, f::Ptr{Cvoid}, config::Ptr{hipLaunchConfig_t})::hipError_t) end @@ -5777,43 +5777,43 @@ end # no prototype is found for this function at hip_runtime_api.h:7168:12, please use with caution @checked function hipProfilerStart() AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipProfilerStart()::hipError_t) + @gcsafe_ccall(libamdhip64.hipProfilerStart()::hipError_t) end # no prototype is found for this function at hip_runtime_api.h:7176:12, please use with caution @checked function hipProfilerStop() AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipProfilerStop()::hipError_t) + @gcsafe_ccall(libamdhip64.hipProfilerStop()::hipError_t) end @checked function hipConfigureCall(gridDim, blockDim, sharedMem, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipConfigureCall(gridDim::dim3, blockDim::dim3, + @gcsafe_ccall(libamdhip64.hipConfigureCall(gridDim::dim3, blockDim::dim3, sharedMem::Csize_t, stream::hipStream_t)::hipError_t) end @checked function hipSetupArgument(arg, size, offset) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipSetupArgument(arg::Ptr{Cvoid}, size::Csize_t, + @gcsafe_ccall(libamdhip64.hipSetupArgument(arg::Ptr{Cvoid}, size::Csize_t, offset::Csize_t)::hipError_t) end @checked function hipLaunchByPtr(func) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLaunchByPtr(func::Ptr{Cvoid})::hipError_t) + @gcsafe_ccall(libamdhip64.hipLaunchByPtr(func::Ptr{Cvoid})::hipError_t) end @checked function __hipPushCallConfiguration(gridDim, blockDim, sharedMem, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.__hipPushCallConfiguration(gridDim::dim3, blockDim::dim3, + @gcsafe_ccall(libamdhip64.__hipPushCallConfiguration(gridDim::dim3, blockDim::dim3, sharedMem::Csize_t, stream::hipStream_t)::hipError_t) end @checked function __hipPopCallConfiguration(gridDim, blockDim, sharedMem, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.__hipPopCallConfiguration(gridDim::Ptr{dim3}, + @gcsafe_ccall(libamdhip64.__hipPopCallConfiguration(gridDim::Ptr{dim3}, blockDim::Ptr{dim3}, sharedMem::Ptr{Csize_t}, stream::Ptr{hipStream_t})::hipError_t) @@ -5822,7 +5822,7 @@ end @checked function hipLaunchKernel(function_address, numBlocks, dimBlocks, args, sharedMemBytes, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLaunchKernel(function_address::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipLaunchKernel(function_address::Ptr{Cvoid}, numBlocks::dim3, dimBlocks::dim3, args::Ptr{Ptr{Cvoid}}, sharedMemBytes::Csize_t, @@ -5831,19 +5831,19 @@ end @checked function hipLaunchHostFunc(stream, fn, userData) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLaunchHostFunc(stream::hipStream_t, fn::hipHostFn_t, + @gcsafe_ccall(libamdhip64.hipLaunchHostFunc(stream::hipStream_t, fn::hipHostFn_t, userData::Ptr{Cvoid})::hipError_t) end @checked function hipDrvMemcpy2DUnaligned(pCopy) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDrvMemcpy2DUnaligned(pCopy::Ptr{hip_Memcpy2D})::hipError_t) + @gcsafe_ccall(libamdhip64.hipDrvMemcpy2DUnaligned(pCopy::Ptr{hip_Memcpy2D})::hipError_t) end @checked function hipExtLaunchKernel(function_address, numBlocks, dimBlocks, args, sharedMemBytes, stream, startEvent, stopEvent, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipExtLaunchKernel(function_address::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipExtLaunchKernel(function_address::Ptr{Cvoid}, numBlocks::dim3, dimBlocks::dim3, args::Ptr{Ptr{Cvoid}}, sharedMemBytes::Csize_t, @@ -5855,7 +5855,7 @@ end @checked function hipCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipCreateTextureObject(pTexObject::Ptr{hipTextureObject_t}, + @gcsafe_ccall(libamdhip64.hipCreateTextureObject(pTexObject::Ptr{hipTextureObject_t}, pResDesc::Ptr{hipResourceDesc}, pTexDesc::Ptr{hipTextureDesc}, pResViewDesc::Ptr{hipResourceViewDesc})::hipError_t) @@ -5863,36 +5863,36 @@ end @checked function hipDestroyTextureObject(textureObject) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDestroyTextureObject(textureObject::hipTextureObject_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipDestroyTextureObject(textureObject::hipTextureObject_t)::hipError_t) end @checked function hipGetChannelDesc(desc, array) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGetChannelDesc(desc::Ptr{hipChannelFormatDesc}, + @gcsafe_ccall(libamdhip64.hipGetChannelDesc(desc::Ptr{hipChannelFormatDesc}, array::hipArray_const_t)::hipError_t) end @checked function hipGetTextureObjectResourceDesc(pResDesc, textureObject) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGetTextureObjectResourceDesc(pResDesc::Ptr{hipResourceDesc}, + @gcsafe_ccall(libamdhip64.hipGetTextureObjectResourceDesc(pResDesc::Ptr{hipResourceDesc}, textureObject::hipTextureObject_t)::hipError_t) end @checked function hipGetTextureObjectResourceViewDesc(pResViewDesc, textureObject) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGetTextureObjectResourceViewDesc(pResViewDesc::Ptr{hipResourceViewDesc}, + @gcsafe_ccall(libamdhip64.hipGetTextureObjectResourceViewDesc(pResViewDesc::Ptr{hipResourceViewDesc}, textureObject::hipTextureObject_t)::hipError_t) end @checked function hipGetTextureObjectTextureDesc(pTexDesc, textureObject) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGetTextureObjectTextureDesc(pTexDesc::Ptr{hipTextureDesc}, + @gcsafe_ccall(libamdhip64.hipGetTextureObjectTextureDesc(pTexDesc::Ptr{hipTextureDesc}, textureObject::hipTextureObject_t)::hipError_t) end @checked function hipTexObjectCreate(pTexObject, pResDesc, pTexDesc, pResViewDesc) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexObjectCreate(pTexObject::Ptr{hipTextureObject_t}, + @gcsafe_ccall(libamdhip64.hipTexObjectCreate(pTexObject::Ptr{hipTextureObject_t}, pResDesc::Ptr{HIP_RESOURCE_DESC}, pTexDesc::Ptr{HIP_TEXTURE_DESC}, pResViewDesc::Ptr{HIP_RESOURCE_VIEW_DESC})::hipError_t) @@ -5900,30 +5900,30 @@ end @checked function hipTexObjectDestroy(texObject) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexObjectDestroy(texObject::hipTextureObject_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipTexObjectDestroy(texObject::hipTextureObject_t)::hipError_t) end @checked function hipTexObjectGetResourceDesc(pResDesc, texObject) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexObjectGetResourceDesc(pResDesc::Ptr{HIP_RESOURCE_DESC}, + @gcsafe_ccall(libamdhip64.hipTexObjectGetResourceDesc(pResDesc::Ptr{HIP_RESOURCE_DESC}, texObject::hipTextureObject_t)::hipError_t) end @checked function hipTexObjectGetResourceViewDesc(pResViewDesc, texObject) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexObjectGetResourceViewDesc(pResViewDesc::Ptr{HIP_RESOURCE_VIEW_DESC}, + @gcsafe_ccall(libamdhip64.hipTexObjectGetResourceViewDesc(pResViewDesc::Ptr{HIP_RESOURCE_VIEW_DESC}, texObject::hipTextureObject_t)::hipError_t) end @checked function hipTexObjectGetTextureDesc(pTexDesc, texObject) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexObjectGetTextureDesc(pTexDesc::Ptr{HIP_TEXTURE_DESC}, + @gcsafe_ccall(libamdhip64.hipTexObjectGetTextureDesc(pTexDesc::Ptr{HIP_TEXTURE_DESC}, texObject::hipTextureObject_t)::hipError_t) end @checked function hipMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMallocMipmappedArray(mipmappedArray::Ptr{hipMipmappedArray_t}, + @gcsafe_ccall(libamdhip64.hipMallocMipmappedArray(mipmappedArray::Ptr{hipMipmappedArray_t}, desc::Ptr{hipChannelFormatDesc}, extent::hipExtent, numLevels::Cuint, flags::Cuint)::hipError_t) @@ -5931,96 +5931,96 @@ end @checked function hipFreeMipmappedArray(mipmappedArray) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipFreeMipmappedArray(mipmappedArray::hipMipmappedArray_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipFreeMipmappedArray(mipmappedArray::hipMipmappedArray_t)::hipError_t) end @checked function hipGetMipmappedArrayLevel(levelArray, mipmappedArray, level) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGetMipmappedArrayLevel(levelArray::Ptr{hipArray_t}, + @gcsafe_ccall(libamdhip64.hipGetMipmappedArrayLevel(levelArray::Ptr{hipArray_t}, mipmappedArray::hipMipmappedArray_const_t, level::Cuint)::hipError_t) end @checked function hipMipmappedArrayCreate(pHandle, pMipmappedArrayDesc, numMipmapLevels) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMipmappedArrayCreate(pHandle::Ptr{hipMipmappedArray_t}, + @gcsafe_ccall(libamdhip64.hipMipmappedArrayCreate(pHandle::Ptr{hipMipmappedArray_t}, pMipmappedArrayDesc::Ptr{HIP_ARRAY3D_DESCRIPTOR}, numMipmapLevels::Cuint)::hipError_t) end @checked function hipMipmappedArrayDestroy(hMipmappedArray) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMipmappedArrayDestroy(hMipmappedArray::hipMipmappedArray_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipMipmappedArrayDestroy(hMipmappedArray::hipMipmappedArray_t)::hipError_t) end @checked function hipMipmappedArrayGetLevel(pLevelArray, hMipMappedArray, level) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMipmappedArrayGetLevel(pLevelArray::Ptr{hipArray_t}, + @gcsafe_ccall(libamdhip64.hipMipmappedArrayGetLevel(pLevelArray::Ptr{hipArray_t}, hMipMappedArray::hipMipmappedArray_t, level::Cuint)::hipError_t) end @checked function hipBindTextureToMipmappedArray(tex, mipmappedArray, desc) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipBindTextureToMipmappedArray(tex::Ptr{textureReference}, + @gcsafe_ccall(libamdhip64.hipBindTextureToMipmappedArray(tex::Ptr{textureReference}, mipmappedArray::hipMipmappedArray_const_t, desc::Ptr{hipChannelFormatDesc})::hipError_t) end @checked function hipGetTextureReference(texref, symbol) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGetTextureReference(texref::Ptr{Ptr{textureReference}}, + @gcsafe_ccall(libamdhip64.hipGetTextureReference(texref::Ptr{Ptr{textureReference}}, symbol::Ptr{Cvoid})::hipError_t) end @checked function hipTexRefGetBorderColor(pBorderColor, texRef) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefGetBorderColor(pBorderColor::Ptr{Cfloat}, + @gcsafe_ccall(libamdhip64.hipTexRefGetBorderColor(pBorderColor::Ptr{Cfloat}, texRef::Ptr{textureReference})::hipError_t) end @checked function hipTexRefGetArray(pArray, texRef) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefGetArray(pArray::Ptr{hipArray_t}, + @gcsafe_ccall(libamdhip64.hipTexRefGetArray(pArray::Ptr{hipArray_t}, texRef::Ptr{textureReference})::hipError_t) end @checked function hipTexRefSetAddressMode(texRef, dim, am) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefSetAddressMode(texRef::Ptr{textureReference}, + @gcsafe_ccall(libamdhip64.hipTexRefSetAddressMode(texRef::Ptr{textureReference}, dim::Cint, am::hipTextureAddressMode)::hipError_t) end @checked function hipTexRefSetArray(tex, array, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefSetArray(tex::Ptr{textureReference}, + @gcsafe_ccall(libamdhip64.hipTexRefSetArray(tex::Ptr{textureReference}, array::hipArray_const_t, flags::Cuint)::hipError_t) end @checked function hipTexRefSetFilterMode(texRef, fm) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefSetFilterMode(texRef::Ptr{textureReference}, + @gcsafe_ccall(libamdhip64.hipTexRefSetFilterMode(texRef::Ptr{textureReference}, fm::hipTextureFilterMode)::hipError_t) end @checked function hipTexRefSetFlags(texRef, Flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefSetFlags(texRef::Ptr{textureReference}, + @gcsafe_ccall(libamdhip64.hipTexRefSetFlags(texRef::Ptr{textureReference}, Flags::Cuint)::hipError_t) end @checked function hipTexRefSetFormat(texRef, fmt, NumPackedComponents) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefSetFormat(texRef::Ptr{textureReference}, + @gcsafe_ccall(libamdhip64.hipTexRefSetFormat(texRef::Ptr{textureReference}, fmt::hipArray_Format, NumPackedComponents::Cint)::hipError_t) end @checked function hipBindTexture(offset, tex, devPtr, desc, size) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipBindTexture(offset::Ptr{Csize_t}, + @gcsafe_ccall(libamdhip64.hipBindTexture(offset::Ptr{Csize_t}, tex::Ptr{textureReference}, devPtr::Ptr{Cvoid}, desc::Ptr{hipChannelFormatDesc}, @@ -6029,7 +6029,7 @@ end @checked function hipBindTexture2D(offset, tex, devPtr, desc, width, height, pitch) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipBindTexture2D(offset::Ptr{Csize_t}, + @gcsafe_ccall(libamdhip64.hipBindTexture2D(offset::Ptr{Csize_t}, tex::Ptr{textureReference}, devPtr::Ptr{Cvoid}, desc::Ptr{hipChannelFormatDesc}, @@ -6039,88 +6039,88 @@ end @checked function hipBindTextureToArray(tex, array, desc) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipBindTextureToArray(tex::Ptr{textureReference}, + @gcsafe_ccall(libamdhip64.hipBindTextureToArray(tex::Ptr{textureReference}, array::hipArray_const_t, desc::Ptr{hipChannelFormatDesc})::hipError_t) end @checked function hipGetTextureAlignmentOffset(offset, texref) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGetTextureAlignmentOffset(offset::Ptr{Csize_t}, + @gcsafe_ccall(libamdhip64.hipGetTextureAlignmentOffset(offset::Ptr{Csize_t}, texref::Ptr{textureReference})::hipError_t) end @checked function hipUnbindTexture(tex) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipUnbindTexture(tex::Ptr{textureReference})::hipError_t) + @gcsafe_ccall(libamdhip64.hipUnbindTexture(tex::Ptr{textureReference})::hipError_t) end @checked function hipTexRefGetAddress(dev_ptr, texRef) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefGetAddress(dev_ptr::Ptr{hipDeviceptr_t}, + @gcsafe_ccall(libamdhip64.hipTexRefGetAddress(dev_ptr::Ptr{hipDeviceptr_t}, texRef::Ptr{textureReference})::hipError_t) end @checked function hipTexRefGetAddressMode(pam, texRef, dim) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefGetAddressMode(pam::Ptr{hipTextureAddressMode}, + @gcsafe_ccall(libamdhip64.hipTexRefGetAddressMode(pam::Ptr{hipTextureAddressMode}, texRef::Ptr{textureReference}, dim::Cint)::hipError_t) end @checked function hipTexRefGetFilterMode(pfm, texRef) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefGetFilterMode(pfm::Ptr{hipTextureFilterMode}, + @gcsafe_ccall(libamdhip64.hipTexRefGetFilterMode(pfm::Ptr{hipTextureFilterMode}, texRef::Ptr{textureReference})::hipError_t) end @checked function hipTexRefGetFlags(pFlags, texRef) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefGetFlags(pFlags::Ptr{Cuint}, + @gcsafe_ccall(libamdhip64.hipTexRefGetFlags(pFlags::Ptr{Cuint}, texRef::Ptr{textureReference})::hipError_t) end @checked function hipTexRefGetFormat(pFormat, pNumChannels, texRef) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefGetFormat(pFormat::Ptr{hipArray_Format}, + @gcsafe_ccall(libamdhip64.hipTexRefGetFormat(pFormat::Ptr{hipArray_Format}, pNumChannels::Ptr{Cint}, texRef::Ptr{textureReference})::hipError_t) end @checked function hipTexRefGetMaxAnisotropy(pmaxAnsio, texRef) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefGetMaxAnisotropy(pmaxAnsio::Ptr{Cint}, + @gcsafe_ccall(libamdhip64.hipTexRefGetMaxAnisotropy(pmaxAnsio::Ptr{Cint}, texRef::Ptr{textureReference})::hipError_t) end @checked function hipTexRefGetMipmapFilterMode(pfm, texRef) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefGetMipmapFilterMode(pfm::Ptr{hipTextureFilterMode}, + @gcsafe_ccall(libamdhip64.hipTexRefGetMipmapFilterMode(pfm::Ptr{hipTextureFilterMode}, texRef::Ptr{textureReference})::hipError_t) end @checked function hipTexRefGetMipmapLevelBias(pbias, texRef) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefGetMipmapLevelBias(pbias::Ptr{Cfloat}, + @gcsafe_ccall(libamdhip64.hipTexRefGetMipmapLevelBias(pbias::Ptr{Cfloat}, texRef::Ptr{textureReference})::hipError_t) end @checked function hipTexRefGetMipmapLevelClamp(pminMipmapLevelClamp, pmaxMipmapLevelClamp, texRef) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefGetMipmapLevelClamp(pminMipmapLevelClamp::Ptr{Cfloat}, + @gcsafe_ccall(libamdhip64.hipTexRefGetMipmapLevelClamp(pminMipmapLevelClamp::Ptr{Cfloat}, pmaxMipmapLevelClamp::Ptr{Cfloat}, texRef::Ptr{textureReference})::hipError_t) end @checked function hipTexRefGetMipMappedArray(pArray, texRef) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefGetMipMappedArray(pArray::Ptr{hipMipmappedArray_t}, + @gcsafe_ccall(libamdhip64.hipTexRefGetMipMappedArray(pArray::Ptr{hipMipmappedArray_t}, texRef::Ptr{textureReference})::hipError_t) end @checked function hipTexRefSetAddress(ByteOffset, texRef, dptr, bytes) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefSetAddress(ByteOffset::Ptr{Csize_t}, + @gcsafe_ccall(libamdhip64.hipTexRefSetAddress(ByteOffset::Ptr{Csize_t}, texRef::Ptr{textureReference}, dptr::hipDeviceptr_t, bytes::Csize_t)::hipError_t) @@ -6128,7 +6128,7 @@ end @checked function hipTexRefSetAddress2D(texRef, desc, dptr, Pitch) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefSetAddress2D(texRef::Ptr{textureReference}, + @gcsafe_ccall(libamdhip64.hipTexRefSetAddress2D(texRef::Ptr{textureReference}, desc::Ptr{HIP_ARRAY_DESCRIPTOR}, dptr::hipDeviceptr_t, Pitch::Csize_t)::hipError_t) @@ -6136,73 +6136,73 @@ end @checked function hipTexRefSetMaxAnisotropy(texRef, maxAniso) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefSetMaxAnisotropy(texRef::Ptr{textureReference}, + @gcsafe_ccall(libamdhip64.hipTexRefSetMaxAnisotropy(texRef::Ptr{textureReference}, maxAniso::Cuint)::hipError_t) end @checked function hipTexRefSetBorderColor(texRef, pBorderColor) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefSetBorderColor(texRef::Ptr{textureReference}, + @gcsafe_ccall(libamdhip64.hipTexRefSetBorderColor(texRef::Ptr{textureReference}, pBorderColor::Ptr{Cfloat})::hipError_t) end @checked function hipTexRefSetMipmapFilterMode(texRef, fm) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefSetMipmapFilterMode(texRef::Ptr{textureReference}, + @gcsafe_ccall(libamdhip64.hipTexRefSetMipmapFilterMode(texRef::Ptr{textureReference}, fm::hipTextureFilterMode)::hipError_t) end @checked function hipTexRefSetMipmapLevelBias(texRef, bias) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefSetMipmapLevelBias(texRef::Ptr{textureReference}, + @gcsafe_ccall(libamdhip64.hipTexRefSetMipmapLevelBias(texRef::Ptr{textureReference}, bias::Cfloat)::hipError_t) end @checked function hipTexRefSetMipmapLevelClamp(texRef, minMipMapLevelClamp, maxMipMapLevelClamp) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefSetMipmapLevelClamp(texRef::Ptr{textureReference}, + @gcsafe_ccall(libamdhip64.hipTexRefSetMipmapLevelClamp(texRef::Ptr{textureReference}, minMipMapLevelClamp::Cfloat, maxMipMapLevelClamp::Cfloat)::hipError_t) end @checked function hipTexRefSetMipmappedArray(texRef, mipmappedArray, Flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipTexRefSetMipmappedArray(texRef::Ptr{textureReference}, + @gcsafe_ccall(libamdhip64.hipTexRefSetMipmappedArray(texRef::Ptr{textureReference}, mipmappedArray::Ptr{hipMipmappedArray}, Flags::Cuint)::hipError_t) end @checked function hipApiName(id) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipApiName(id::UInt32)::Cstring) + @gcsafe_ccall(libamdhip64.hipApiName(id::UInt32)::Cstring) end @checked function hipKernelNameRef(f) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipKernelNameRef(f::hipFunction_t)::Cstring) + @gcsafe_ccall(libamdhip64.hipKernelNameRef(f::hipFunction_t)::Cstring) end @checked function hipKernelNameRefByPtr(hostFunction, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipKernelNameRefByPtr(hostFunction::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipKernelNameRefByPtr(hostFunction::Ptr{Cvoid}, stream::hipStream_t)::Cstring) end @checked function hipGetStreamDeviceId(stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGetStreamDeviceId(stream::hipStream_t)::Cint) + @gcsafe_ccall(libamdhip64.hipGetStreamDeviceId(stream::hipStream_t)::Cint) end @checked function hipStreamBeginCapture(stream, mode) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamBeginCapture(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamBeginCapture(stream::hipStream_t, mode::hipStreamCaptureMode)::hipError_t) end @checked function hipStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamBeginCaptureToGraph(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamBeginCaptureToGraph(stream::hipStream_t, graph::hipGraph_t, dependencies::Ptr{hipGraphNode_t}, dependencyData::Ptr{hipGraphEdgeData}, @@ -6212,13 +6212,13 @@ end @checked function hipStreamEndCapture(stream, pGraph) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamEndCapture(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamEndCapture(stream::hipStream_t, pGraph::Ptr{hipGraph_t})::hipError_t) end @checked function hipStreamGetCaptureInfo(stream, pCaptureStatus, pId) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamGetCaptureInfo(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamGetCaptureInfo(stream::hipStream_t, pCaptureStatus::Ptr{hipStreamCaptureStatus}, pId::Ptr{Culonglong})::hipError_t) end @@ -6226,7 +6226,7 @@ end @checked function hipStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamGetCaptureInfo_v2(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamGetCaptureInfo_v2(stream::hipStream_t, captureStatus_out::Ptr{hipStreamCaptureStatus}, id_out::Ptr{Culonglong}, graph_out::Ptr{hipGraph_t}, @@ -6236,13 +6236,13 @@ end @checked function hipStreamIsCapturing(stream, pCaptureStatus) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamIsCapturing(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamIsCapturing(stream::hipStream_t, pCaptureStatus::Ptr{hipStreamCaptureStatus})::hipError_t) end @checked function hipStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamUpdateCaptureDependencies(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamUpdateCaptureDependencies(stream::hipStream_t, dependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, flags::Cuint)::hipError_t) @@ -6250,23 +6250,23 @@ end @checked function hipThreadExchangeStreamCaptureMode(mode) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipThreadExchangeStreamCaptureMode(mode::Ptr{hipStreamCaptureMode})::hipError_t) + @gcsafe_ccall(libamdhip64.hipThreadExchangeStreamCaptureMode(mode::Ptr{hipStreamCaptureMode})::hipError_t) end @checked function hipGraphCreate(pGraph, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphCreate(pGraph::Ptr{hipGraph_t}, + @gcsafe_ccall(libamdhip64.hipGraphCreate(pGraph::Ptr{hipGraph_t}, flags::Cuint)::hipError_t) end @checked function hipGraphDestroy(graph) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphDestroy(graph::hipGraph_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipGraphDestroy(graph::hipGraph_t)::hipError_t) end @checked function hipGraphAddDependencies(graph, from, to, numDependencies) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphAddDependencies(graph::hipGraph_t, + @gcsafe_ccall(libamdhip64.hipGraphAddDependencies(graph::hipGraph_t, from::Ptr{hipGraphNode_t}, to::Ptr{hipGraphNode_t}, numDependencies::Csize_t)::hipError_t) @@ -6274,7 +6274,7 @@ end @checked function hipGraphRemoveDependencies(graph, from, to, numDependencies) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphRemoveDependencies(graph::hipGraph_t, + @gcsafe_ccall(libamdhip64.hipGraphRemoveDependencies(graph::hipGraph_t, from::Ptr{hipGraphNode_t}, to::Ptr{hipGraphNode_t}, numDependencies::Csize_t)::hipError_t) @@ -6282,7 +6282,7 @@ end @checked function hipGraphGetEdges(graph, from, to, numEdges) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphGetEdges(graph::hipGraph_t, + @gcsafe_ccall(libamdhip64.hipGraphGetEdges(graph::hipGraph_t, from::Ptr{hipGraphNode_t}, to::Ptr{hipGraphNode_t}, numEdges::Ptr{Csize_t})::hipError_t) @@ -6290,59 +6290,59 @@ end @checked function hipGraphGetNodes(graph, nodes, numNodes) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphGetNodes(graph::hipGraph_t, + @gcsafe_ccall(libamdhip64.hipGraphGetNodes(graph::hipGraph_t, nodes::Ptr{hipGraphNode_t}, numNodes::Ptr{Csize_t})::hipError_t) end @checked function hipGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphGetRootNodes(graph::hipGraph_t, + @gcsafe_ccall(libamdhip64.hipGraphGetRootNodes(graph::hipGraph_t, pRootNodes::Ptr{hipGraphNode_t}, pNumRootNodes::Ptr{Csize_t})::hipError_t) end @checked function hipGraphNodeGetDependencies(node, pDependencies, pNumDependencies) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphNodeGetDependencies(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphNodeGetDependencies(node::hipGraphNode_t, pDependencies::Ptr{hipGraphNode_t}, pNumDependencies::Ptr{Csize_t})::hipError_t) end @checked function hipGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphNodeGetDependentNodes(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphNodeGetDependentNodes(node::hipGraphNode_t, pDependentNodes::Ptr{hipGraphNode_t}, pNumDependentNodes::Ptr{Csize_t})::hipError_t) end @checked function hipGraphNodeGetType(node, pType) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphNodeGetType(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphNodeGetType(node::hipGraphNode_t, pType::Ptr{hipGraphNodeType})::hipError_t) end @checked function hipGraphDestroyNode(node) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphDestroyNode(node::hipGraphNode_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipGraphDestroyNode(node::hipGraphNode_t)::hipError_t) end @checked function hipGraphClone(pGraphClone, originalGraph) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphClone(pGraphClone::Ptr{hipGraph_t}, + @gcsafe_ccall(libamdhip64.hipGraphClone(pGraphClone::Ptr{hipGraph_t}, originalGraph::hipGraph_t)::hipError_t) end @checked function hipGraphNodeFindInClone(pNode, originalNode, clonedGraph) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphNodeFindInClone(pNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipGraphNodeFindInClone(pNode::Ptr{hipGraphNode_t}, originalNode::hipGraphNode_t, clonedGraph::hipGraph_t)::hipError_t) end @checked function hipGraphInstantiate(pGraphExec, graph, pErrorNode, pLogBuffer, bufferSize) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphInstantiate(pGraphExec::Ptr{hipGraphExec_t}, + @gcsafe_ccall(libamdhip64.hipGraphInstantiate(pGraphExec::Ptr{hipGraphExec_t}, graph::hipGraph_t, pErrorNode::Ptr{hipGraphNode_t}, pLogBuffer::Cstring, @@ -6351,33 +6351,33 @@ end @checked function hipGraphInstantiateWithFlags(pGraphExec, graph, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphInstantiateWithFlags(pGraphExec::Ptr{hipGraphExec_t}, + @gcsafe_ccall(libamdhip64.hipGraphInstantiateWithFlags(pGraphExec::Ptr{hipGraphExec_t}, graph::hipGraph_t, flags::Culonglong)::hipError_t) end @checked function hipGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphInstantiateWithParams(pGraphExec::Ptr{hipGraphExec_t}, + @gcsafe_ccall(libamdhip64.hipGraphInstantiateWithParams(pGraphExec::Ptr{hipGraphExec_t}, graph::hipGraph_t, instantiateParams::Ptr{hipGraphInstantiateParams})::hipError_t) end @checked function hipGraphLaunch(graphExec, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphLaunch(graphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphLaunch(graphExec::hipGraphExec_t, stream::hipStream_t)::hipError_t) end @checked function hipGraphUpload(graphExec, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphUpload(graphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphUpload(graphExec::hipGraphExec_t, stream::hipStream_t)::hipError_t) end @checked function hipGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphAddNode(pGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipGraphAddNode(pGraphNode::Ptr{hipGraphNode_t}, graph::hipGraph_t, pDependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, @@ -6386,31 +6386,31 @@ end @checked function hipGraphExecGetFlags(graphExec, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExecGetFlags(graphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphExecGetFlags(graphExec::hipGraphExec_t, flags::Ptr{Culonglong})::hipError_t) end @checked function hipGraphNodeSetParams(node, nodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphNodeSetParams(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphNodeSetParams(node::hipGraphNode_t, nodeParams::Ptr{hipGraphNodeParams})::hipError_t) end @checked function hipGraphExecNodeSetParams(graphExec, node, nodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExecNodeSetParams(graphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphExecNodeSetParams(graphExec::hipGraphExec_t, node::hipGraphNode_t, nodeParams::Ptr{hipGraphNodeParams})::hipError_t) end @checked function hipGraphExecDestroy(graphExec) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExecDestroy(graphExec::hipGraphExec_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipGraphExecDestroy(graphExec::hipGraphExec_t)::hipError_t) end @checked function hipGraphExecUpdate(hGraphExec, hGraph, hErrorNode_out, updateResult_out) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExecUpdate(hGraphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphExecUpdate(hGraphExec::hipGraphExec_t, hGraph::hipGraph_t, hErrorNode_out::Ptr{hipGraphNode_t}, updateResult_out::Ptr{hipGraphExecUpdateResult})::hipError_t) @@ -6419,7 +6419,7 @@ end @checked function hipGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphAddKernelNode(pGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipGraphAddKernelNode(pGraphNode::Ptr{hipGraphNode_t}, graph::hipGraph_t, pDependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, @@ -6428,19 +6428,19 @@ end @checked function hipGraphKernelNodeGetParams(node, pNodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphKernelNodeGetParams(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphKernelNodeGetParams(node::hipGraphNode_t, pNodeParams::Ptr{hipKernelNodeParams})::hipError_t) end @checked function hipGraphKernelNodeSetParams(node, pNodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphKernelNodeSetParams(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphKernelNodeSetParams(node::hipGraphNode_t, pNodeParams::Ptr{hipKernelNodeParams})::hipError_t) end @checked function hipGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExecKernelNodeSetParams(hGraphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphExecKernelNodeSetParams(hGraphExec::hipGraphExec_t, node::hipGraphNode_t, pNodeParams::Ptr{hipKernelNodeParams})::hipError_t) end @@ -6448,7 +6448,7 @@ end @checked function hipDrvGraphAddMemcpyNode(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDrvGraphAddMemcpyNode(phGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipDrvGraphAddMemcpyNode(phGraphNode::Ptr{hipGraphNode_t}, hGraph::hipGraph_t, dependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, @@ -6459,7 +6459,7 @@ end @checked function hipGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphAddMemcpyNode(pGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipGraphAddMemcpyNode(pGraphNode::Ptr{hipGraphNode_t}, graph::hipGraph_t, pDependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, @@ -6468,33 +6468,33 @@ end @checked function hipGraphMemcpyNodeGetParams(node, pNodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphMemcpyNodeGetParams(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphMemcpyNodeGetParams(node::hipGraphNode_t, pNodeParams::Ptr{hipMemcpy3DParms})::hipError_t) end @checked function hipGraphMemcpyNodeSetParams(node, pNodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphMemcpyNodeSetParams(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphMemcpyNodeSetParams(node::hipGraphNode_t, pNodeParams::Ptr{hipMemcpy3DParms})::hipError_t) end @checked function hipGraphKernelNodeSetAttribute(hNode, attr, value) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphKernelNodeSetAttribute(hNode::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphKernelNodeSetAttribute(hNode::hipGraphNode_t, attr::hipLaunchAttributeID, value::Ptr{hipLaunchAttributeValue})::hipError_t) end @checked function hipGraphKernelNodeGetAttribute(hNode, attr, value) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphKernelNodeGetAttribute(hNode::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphKernelNodeGetAttribute(hNode::hipGraphNode_t, attr::hipLaunchAttributeID, value::Ptr{hipLaunchAttributeValue})::hipError_t) end @checked function hipGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExecMemcpyNodeSetParams(hGraphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphExecMemcpyNodeSetParams(hGraphExec::hipGraphExec_t, node::hipGraphNode_t, pNodeParams::Ptr{hipMemcpy3DParms})::hipError_t) end @@ -6502,7 +6502,7 @@ end @checked function hipGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphAddMemcpyNode1D(pGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipGraphAddMemcpyNode1D(pGraphNode::Ptr{hipGraphNode_t}, graph::hipGraph_t, pDependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, @@ -6513,7 +6513,7 @@ end @checked function hipGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphMemcpyNodeSetParams1D(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphMemcpyNodeSetParams1D(node::hipGraphNode_t, dst::Ptr{Cvoid}, src::Ptr{Cvoid}, count::Csize_t, @@ -6522,7 +6522,7 @@ end @checked function hipGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExecMemcpyNodeSetParams1D(hGraphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphExecMemcpyNodeSetParams1D(hGraphExec::hipGraphExec_t, node::hipGraphNode_t, dst::Ptr{Cvoid}, src::Ptr{Cvoid}, @@ -6533,7 +6533,7 @@ end @checked function hipGraphAddMemcpyNodeFromSymbol(pGraphNode, graph, pDependencies, numDependencies, dst, symbol, count, offset, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphAddMemcpyNodeFromSymbol(pGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipGraphAddMemcpyNodeFromSymbol(pGraphNode::Ptr{hipGraphNode_t}, graph::hipGraph_t, pDependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, @@ -6546,7 +6546,7 @@ end @checked function hipGraphMemcpyNodeSetParamsFromSymbol(node, dst, symbol, count, offset, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphMemcpyNodeSetParamsFromSymbol(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphMemcpyNodeSetParamsFromSymbol(node::hipGraphNode_t, dst::Ptr{Cvoid}, symbol::Ptr{Cvoid}, count::Csize_t, @@ -6557,7 +6557,7 @@ end @checked function hipGraphExecMemcpyNodeSetParamsFromSymbol(hGraphExec, node, dst, symbol, count, offset, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExecMemcpyNodeSetParamsFromSymbol(hGraphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphExecMemcpyNodeSetParamsFromSymbol(hGraphExec::hipGraphExec_t, node::hipGraphNode_t, dst::Ptr{Cvoid}, symbol::Ptr{Cvoid}, @@ -6569,7 +6569,7 @@ end @checked function hipGraphAddMemcpyNodeToSymbol(pGraphNode, graph, pDependencies, numDependencies, symbol, src, count, offset, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphAddMemcpyNodeToSymbol(pGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipGraphAddMemcpyNodeToSymbol(pGraphNode::Ptr{hipGraphNode_t}, graph::hipGraph_t, pDependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, @@ -6582,7 +6582,7 @@ end @checked function hipGraphMemcpyNodeSetParamsToSymbol(node, symbol, src, count, offset, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphMemcpyNodeSetParamsToSymbol(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphMemcpyNodeSetParamsToSymbol(node::hipGraphNode_t, symbol::Ptr{Cvoid}, src::Ptr{Cvoid}, count::Csize_t, @@ -6593,7 +6593,7 @@ end @checked function hipGraphExecMemcpyNodeSetParamsToSymbol(hGraphExec, node, symbol, src, count, offset, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExecMemcpyNodeSetParamsToSymbol(hGraphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphExecMemcpyNodeSetParamsToSymbol(hGraphExec::hipGraphExec_t, node::hipGraphNode_t, symbol::Ptr{Cvoid}, src::Ptr{Cvoid}, @@ -6605,7 +6605,7 @@ end @checked function hipGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphAddMemsetNode(pGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipGraphAddMemsetNode(pGraphNode::Ptr{hipGraphNode_t}, graph::hipGraph_t, pDependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, @@ -6614,26 +6614,26 @@ end @checked function hipGraphMemsetNodeGetParams(node, pNodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphMemsetNodeGetParams(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphMemsetNodeGetParams(node::hipGraphNode_t, pNodeParams::Ptr{hipMemsetParams})::hipError_t) end @checked function hipGraphMemsetNodeSetParams(node, pNodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphMemsetNodeSetParams(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphMemsetNodeSetParams(node::hipGraphNode_t, pNodeParams::Ptr{hipMemsetParams})::hipError_t) end @checked function hipGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExecMemsetNodeSetParams(hGraphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphExecMemsetNodeSetParams(hGraphExec::hipGraphExec_t, node::hipGraphNode_t, pNodeParams::Ptr{hipMemsetParams})::hipError_t) end @checked function hipGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphAddHostNode(pGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipGraphAddHostNode(pGraphNode::Ptr{hipGraphNode_t}, graph::hipGraph_t, pDependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, @@ -6642,19 +6642,19 @@ end @checked function hipGraphHostNodeGetParams(node, pNodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphHostNodeGetParams(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphHostNodeGetParams(node::hipGraphNode_t, pNodeParams::Ptr{hipHostNodeParams})::hipError_t) end @checked function hipGraphHostNodeSetParams(node, pNodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphHostNodeSetParams(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphHostNodeSetParams(node::hipGraphNode_t, pNodeParams::Ptr{hipHostNodeParams})::hipError_t) end @checked function hipGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExecHostNodeSetParams(hGraphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphExecHostNodeSetParams(hGraphExec::hipGraphExec_t, node::hipGraphNode_t, pNodeParams::Ptr{hipHostNodeParams})::hipError_t) end @@ -6662,7 +6662,7 @@ end @checked function hipGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphAddChildGraphNode(pGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipGraphAddChildGraphNode(pGraphNode::Ptr{hipGraphNode_t}, graph::hipGraph_t, pDependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, @@ -6671,20 +6671,20 @@ end @checked function hipGraphChildGraphNodeGetGraph(node, pGraph) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphChildGraphNodeGetGraph(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphChildGraphNodeGetGraph(node::hipGraphNode_t, pGraph::Ptr{hipGraph_t})::hipError_t) end @checked function hipGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExecChildGraphNodeSetParams(hGraphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphExecChildGraphNodeSetParams(hGraphExec::hipGraphExec_t, node::hipGraphNode_t, childGraph::hipGraph_t)::hipError_t) end @checked function hipGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphAddEmptyNode(pGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipGraphAddEmptyNode(pGraphNode::Ptr{hipGraphNode_t}, graph::hipGraph_t, pDependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t)::hipError_t) @@ -6693,7 +6693,7 @@ end @checked function hipGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphAddEventRecordNode(pGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipGraphAddEventRecordNode(pGraphNode::Ptr{hipGraphNode_t}, graph::hipGraph_t, pDependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, @@ -6702,26 +6702,26 @@ end @checked function hipGraphEventRecordNodeGetEvent(node, event_out) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphEventRecordNodeGetEvent(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphEventRecordNodeGetEvent(node::hipGraphNode_t, event_out::Ptr{hipEvent_t})::hipError_t) end @checked function hipGraphEventRecordNodeSetEvent(node, event) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphEventRecordNodeSetEvent(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphEventRecordNodeSetEvent(node::hipGraphNode_t, event::hipEvent_t)::hipError_t) end @checked function hipGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExecEventRecordNodeSetEvent(hGraphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphExecEventRecordNodeSetEvent(hGraphExec::hipGraphExec_t, hNode::hipGraphNode_t, event::hipEvent_t)::hipError_t) end @checked function hipGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphAddEventWaitNode(pGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipGraphAddEventWaitNode(pGraphNode::Ptr{hipGraphNode_t}, graph::hipGraph_t, pDependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, @@ -6730,19 +6730,19 @@ end @checked function hipGraphEventWaitNodeGetEvent(node, event_out) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphEventWaitNodeGetEvent(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphEventWaitNodeGetEvent(node::hipGraphNode_t, event_out::Ptr{hipEvent_t})::hipError_t) end @checked function hipGraphEventWaitNodeSetEvent(node, event) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphEventWaitNodeSetEvent(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphEventWaitNodeSetEvent(node::hipGraphNode_t, event::hipEvent_t)::hipError_t) end @checked function hipGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExecEventWaitNodeSetEvent(hGraphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphExecEventWaitNodeSetEvent(hGraphExec::hipGraphExec_t, hNode::hipGraphNode_t, event::hipEvent_t)::hipError_t) end @@ -6750,7 +6750,7 @@ end @checked function hipGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphAddMemAllocNode(pGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipGraphAddMemAllocNode(pGraphNode::Ptr{hipGraphNode_t}, graph::hipGraph_t, pDependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, @@ -6759,13 +6759,13 @@ end @checked function hipGraphMemAllocNodeGetParams(node, pNodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphMemAllocNodeGetParams(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphMemAllocNodeGetParams(node::hipGraphNode_t, pNodeParams::Ptr{hipMemAllocNodeParams})::hipError_t) end @checked function hipGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dev_ptr) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphAddMemFreeNode(pGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipGraphAddMemFreeNode(pGraphNode::Ptr{hipGraphNode_t}, graph::hipGraph_t, pDependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, @@ -6774,32 +6774,32 @@ end @checked function hipGraphMemFreeNodeGetParams(node, dev_ptr) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphMemFreeNodeGetParams(node::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphMemFreeNodeGetParams(node::hipGraphNode_t, dev_ptr::Ptr{Cvoid})::hipError_t) end @checked function hipDeviceGetGraphMemAttribute(device, attr, value) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceGetGraphMemAttribute(device::Cint, + @gcsafe_ccall(libamdhip64.hipDeviceGetGraphMemAttribute(device::Cint, attr::hipGraphMemAttributeType, value::Ptr{Cvoid})::hipError_t) end @checked function hipDeviceSetGraphMemAttribute(device, attr, value) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceSetGraphMemAttribute(device::Cint, + @gcsafe_ccall(libamdhip64.hipDeviceSetGraphMemAttribute(device::Cint, attr::hipGraphMemAttributeType, value::Ptr{Cvoid})::hipError_t) end @checked function hipDeviceGraphMemTrim(device) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDeviceGraphMemTrim(device::Cint)::hipError_t) + @gcsafe_ccall(libamdhip64.hipDeviceGraphMemTrim(device::Cint)::hipError_t) end @checked function hipUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipUserObjectCreate(object_out::Ptr{hipUserObject_t}, + @gcsafe_ccall(libamdhip64.hipUserObjectCreate(object_out::Ptr{hipUserObject_t}, ptr::Ptr{Cvoid}, destroy::hipHostFn_t, initialRefcount::Cuint, flags::Cuint)::hipError_t) @@ -6807,19 +6807,19 @@ end @checked function hipUserObjectRelease(object, count) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipUserObjectRelease(object::hipUserObject_t, + @gcsafe_ccall(libamdhip64.hipUserObjectRelease(object::hipUserObject_t, count::Cuint)::hipError_t) end @checked function hipUserObjectRetain(object, count) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipUserObjectRetain(object::hipUserObject_t, + @gcsafe_ccall(libamdhip64.hipUserObjectRetain(object::hipUserObject_t, count::Cuint)::hipError_t) end @checked function hipGraphRetainUserObject(graph, object, count, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphRetainUserObject(graph::hipGraph_t, + @gcsafe_ccall(libamdhip64.hipGraphRetainUserObject(graph::hipGraph_t, object::hipUserObject_t, count::Cuint, flags::Cuint)::hipError_t) @@ -6827,33 +6827,33 @@ end @checked function hipGraphReleaseUserObject(graph, object, count) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphReleaseUserObject(graph::hipGraph_t, + @gcsafe_ccall(libamdhip64.hipGraphReleaseUserObject(graph::hipGraph_t, object::hipUserObject_t, count::Cuint)::hipError_t) end @checked function hipGraphDebugDotPrint(graph, path, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphDebugDotPrint(graph::hipGraph_t, path::Cstring, + @gcsafe_ccall(libamdhip64.hipGraphDebugDotPrint(graph::hipGraph_t, path::Cstring, flags::Cuint)::hipError_t) end @checked function hipGraphKernelNodeCopyAttributes(hSrc, hDst) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphKernelNodeCopyAttributes(hSrc::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphKernelNodeCopyAttributes(hSrc::hipGraphNode_t, hDst::hipGraphNode_t)::hipError_t) end @checked function hipGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphNodeSetEnabled(hGraphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphNodeSetEnabled(hGraphExec::hipGraphExec_t, hNode::hipGraphNode_t, isEnabled::Cuint)::hipError_t) end @checked function hipGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphNodeGetEnabled(hGraphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphNodeGetEnabled(hGraphExec::hipGraphExec_t, hNode::hipGraphNode_t, isEnabled::Ptr{Cuint})::hipError_t) end @@ -6861,7 +6861,7 @@ end @checked function hipGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphAddExternalSemaphoresWaitNode(pGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipGraphAddExternalSemaphoresWaitNode(pGraphNode::Ptr{hipGraphNode_t}, graph::hipGraph_t, pDependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, @@ -6871,7 +6871,7 @@ end @checked function hipGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphAddExternalSemaphoresSignalNode(pGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipGraphAddExternalSemaphoresSignalNode(pGraphNode::Ptr{hipGraphNode_t}, graph::hipGraph_t, pDependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, @@ -6880,58 +6880,58 @@ end @checked function hipGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExternalSemaphoresSignalNodeSetParams(hNode::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphExternalSemaphoresSignalNodeSetParams(hNode::hipGraphNode_t, nodeParams::Ptr{hipExternalSemaphoreSignalNodeParams})::hipError_t) end @checked function hipGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExternalSemaphoresWaitNodeSetParams(hNode::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphExternalSemaphoresWaitNodeSetParams(hNode::hipGraphNode_t, nodeParams::Ptr{hipExternalSemaphoreWaitNodeParams})::hipError_t) end @checked function hipGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExternalSemaphoresSignalNodeGetParams(hNode::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphExternalSemaphoresSignalNodeGetParams(hNode::hipGraphNode_t, params_out::Ptr{hipExternalSemaphoreSignalNodeParams})::hipError_t) end @checked function hipGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExternalSemaphoresWaitNodeGetParams(hNode::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipGraphExternalSemaphoresWaitNodeGetParams(hNode::hipGraphNode_t, params_out::Ptr{hipExternalSemaphoreWaitNodeParams})::hipError_t) end @checked function hipGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec::hipGraphExec_t, hNode::hipGraphNode_t, nodeParams::Ptr{hipExternalSemaphoreSignalNodeParams})::hipError_t) end @checked function hipGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec::hipGraphExec_t, hNode::hipGraphNode_t, nodeParams::Ptr{hipExternalSemaphoreWaitNodeParams})::hipError_t) end @checked function hipDrvGraphMemcpyNodeGetParams(hNode, nodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDrvGraphMemcpyNodeGetParams(hNode::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipDrvGraphMemcpyNodeGetParams(hNode::hipGraphNode_t, nodeParams::Ptr{HIP_MEMCPY3D})::hipError_t) end @checked function hipDrvGraphMemcpyNodeSetParams(hNode, nodeParams) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDrvGraphMemcpyNodeSetParams(hNode::hipGraphNode_t, + @gcsafe_ccall(libamdhip64.hipDrvGraphMemcpyNodeSetParams(hNode::hipGraphNode_t, nodeParams::Ptr{HIP_MEMCPY3D})::hipError_t) end @checked function hipDrvGraphAddMemsetNode(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDrvGraphAddMemsetNode(phGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipDrvGraphAddMemsetNode(phGraphNode::Ptr{hipGraphNode_t}, hGraph::hipGraph_t, dependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, @@ -6941,7 +6941,7 @@ end @checked function hipDrvGraphAddMemFreeNode(phGraphNode, hGraph, dependencies, numDependencies, dptr) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDrvGraphAddMemFreeNode(phGraphNode::Ptr{hipGraphNode_t}, + @gcsafe_ccall(libamdhip64.hipDrvGraphAddMemFreeNode(phGraphNode::Ptr{hipGraphNode_t}, hGraph::hipGraph_t, dependencies::Ptr{hipGraphNode_t}, numDependencies::Csize_t, @@ -6950,7 +6950,7 @@ end @checked function hipDrvGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams, ctx) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDrvGraphExecMemcpyNodeSetParams(hGraphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipDrvGraphExecMemcpyNodeSetParams(hGraphExec::hipGraphExec_t, hNode::hipGraphNode_t, copyParams::Ptr{HIP_MEMCPY3D}, ctx::hipCtx_t)::hipError_t) @@ -6958,7 +6958,7 @@ end @checked function hipDrvGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams, ctx) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDrvGraphExecMemsetNodeSetParams(hGraphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipDrvGraphExecMemsetNodeSetParams(hGraphExec::hipGraphExec_t, hNode::hipGraphNode_t, memsetParams::Ptr{hipMemsetParams}, ctx::hipCtx_t)::hipError_t) @@ -6966,27 +6966,27 @@ end @checked function hipMemAddressFree(devPtr, size) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemAddressFree(devPtr::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemAddressFree(devPtr::Ptr{Cvoid}, size::Csize_t)::hipError_t) end @checked function hipMemAddressReserve(ptr, size, alignment, addr, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemAddressReserve(ptr::Ptr{Ptr{Cvoid}}, size::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemAddressReserve(ptr::Ptr{Ptr{Cvoid}}, size::Csize_t, alignment::Csize_t, addr::Ptr{Cvoid}, flags::Culonglong)::hipError_t) end @checked function hipMemCreate(handle, size, prop, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemCreate(handle::Ptr{hipMemGenericAllocationHandle_t}, + @gcsafe_ccall(libamdhip64.hipMemCreate(handle::Ptr{hipMemGenericAllocationHandle_t}, size::Csize_t, prop::Ptr{hipMemAllocationProp}, flags::Culonglong)::hipError_t) end @checked function hipMemExportToShareableHandle(shareableHandle, handle, handleType, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemExportToShareableHandle(shareableHandle::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemExportToShareableHandle(shareableHandle::Ptr{Cvoid}, handle::hipMemGenericAllocationHandle_t, handleType::hipMemAllocationHandleType, flags::Culonglong)::hipError_t) @@ -6994,78 +6994,78 @@ end @checked function hipMemGetAccess(flags, location, ptr) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemGetAccess(flags::Ptr{Culonglong}, + @gcsafe_ccall(libamdhip64.hipMemGetAccess(flags::Ptr{Culonglong}, location::Ptr{hipMemLocation}, ptr::Ptr{Cvoid})::hipError_t) end @checked function hipMemGetAllocationGranularity(granularity, prop, option) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemGetAllocationGranularity(granularity::Ptr{Csize_t}, + @gcsafe_ccall(libamdhip64.hipMemGetAllocationGranularity(granularity::Ptr{Csize_t}, prop::Ptr{hipMemAllocationProp}, option::hipMemAllocationGranularity_flags)::hipError_t) end @checked function hipMemGetAllocationPropertiesFromHandle(prop, handle) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemGetAllocationPropertiesFromHandle(prop::Ptr{hipMemAllocationProp}, + @gcsafe_ccall(libamdhip64.hipMemGetAllocationPropertiesFromHandle(prop::Ptr{hipMemAllocationProp}, handle::hipMemGenericAllocationHandle_t)::hipError_t) end @checked function hipMemImportFromShareableHandle(handle, osHandle, shHandleType) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemImportFromShareableHandle(handle::Ptr{hipMemGenericAllocationHandle_t}, + @gcsafe_ccall(libamdhip64.hipMemImportFromShareableHandle(handle::Ptr{hipMemGenericAllocationHandle_t}, osHandle::Ptr{Cvoid}, shHandleType::hipMemAllocationHandleType)::hipError_t) end @checked function hipMemMap(ptr, size, offset, handle, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemMap(ptr::Ptr{Cvoid}, size::Csize_t, offset::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemMap(ptr::Ptr{Cvoid}, size::Csize_t, offset::Csize_t, handle::hipMemGenericAllocationHandle_t, flags::Culonglong)::hipError_t) end @checked function hipMemMapArrayAsync(mapInfoList, count, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemMapArrayAsync(mapInfoList::Ptr{hipArrayMapInfo}, + @gcsafe_ccall(libamdhip64.hipMemMapArrayAsync(mapInfoList::Ptr{hipArrayMapInfo}, count::Cuint, stream::hipStream_t)::hipError_t) end @checked function hipMemRelease(handle) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemRelease(handle::hipMemGenericAllocationHandle_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipMemRelease(handle::hipMemGenericAllocationHandle_t)::hipError_t) end @checked function hipMemRetainAllocationHandle(handle, addr) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemRetainAllocationHandle(handle::Ptr{hipMemGenericAllocationHandle_t}, + @gcsafe_ccall(libamdhip64.hipMemRetainAllocationHandle(handle::Ptr{hipMemGenericAllocationHandle_t}, addr::Ptr{Cvoid})::hipError_t) end @checked function hipMemSetAccess(ptr, size, desc, count) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemSetAccess(ptr::Ptr{Cvoid}, size::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemSetAccess(ptr::Ptr{Cvoid}, size::Csize_t, desc::Ptr{hipMemAccessDesc}, count::Csize_t)::hipError_t) end @checked function hipMemUnmap(ptr, size) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemUnmap(ptr::Ptr{Cvoid}, size::Csize_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipMemUnmap(ptr::Ptr{Cvoid}, size::Csize_t)::hipError_t) end @checked function hipGraphicsMapResources(count, resources, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphicsMapResources(count::Cint, + @gcsafe_ccall(libamdhip64.hipGraphicsMapResources(count::Cint, resources::Ptr{hipGraphicsResource_t}, stream::hipStream_t)::hipError_t) end @checked function hipGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphicsSubResourceGetMappedArray(array::Ptr{hipArray_t}, + @gcsafe_ccall(libamdhip64.hipGraphicsSubResourceGetMappedArray(array::Ptr{hipArray_t}, resource::hipGraphicsResource_t, arrayIndex::Cuint, mipLevel::Cuint)::hipError_t) @@ -7073,77 +7073,77 @@ end @checked function hipGraphicsResourceGetMappedPointer(devPtr, size, resource) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphicsResourceGetMappedPointer(devPtr::Ptr{Ptr{Cvoid}}, + @gcsafe_ccall(libamdhip64.hipGraphicsResourceGetMappedPointer(devPtr::Ptr{Ptr{Cvoid}}, size::Ptr{Csize_t}, resource::hipGraphicsResource_t)::hipError_t) end @checked function hipGraphicsUnmapResources(count, resources, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphicsUnmapResources(count::Cint, + @gcsafe_ccall(libamdhip64.hipGraphicsUnmapResources(count::Cint, resources::Ptr{hipGraphicsResource_t}, stream::hipStream_t)::hipError_t) end @checked function hipGraphicsUnregisterResource(resource) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphicsUnregisterResource(resource::hipGraphicsResource_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipGraphicsUnregisterResource(resource::hipGraphicsResource_t)::hipError_t) end @checked function hipCreateSurfaceObject(pSurfObject, pResDesc) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipCreateSurfaceObject(pSurfObject::Ptr{hipSurfaceObject_t}, + @gcsafe_ccall(libamdhip64.hipCreateSurfaceObject(pSurfObject::Ptr{hipSurfaceObject_t}, pResDesc::Ptr{hipResourceDesc})::hipError_t) end @checked function hipDestroySurfaceObject(surfaceObject) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipDestroySurfaceObject(surfaceObject::hipSurfaceObject_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipDestroySurfaceObject(surfaceObject::hipSurfaceObject_t)::hipError_t) end # no prototype is found for this function at hip_runtime_api.h:9827:12, please use with caution @checked function hipExtEnableLogging() AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipExtEnableLogging()::hipError_t) + @gcsafe_ccall(libamdhip64.hipExtEnableLogging()::hipError_t) end # no prototype is found for this function at hip_runtime_api.h:9838:12, please use with caution @checked function hipExtDisableLogging() AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipExtDisableLogging()::hipError_t) + @gcsafe_ccall(libamdhip64.hipExtDisableLogging()::hipError_t) end @checked function hipExtSetLoggingParams(log_level, log_size, log_mask) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipExtSetLoggingParams(log_level::Csize_t, + @gcsafe_ccall(libamdhip64.hipExtSetLoggingParams(log_level::Csize_t, log_size::Csize_t, log_mask::Csize_t)::hipError_t) end @checked function hipMemcpy_spt(dst, src, sizeBytes, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy_spt(dst::Ptr{Cvoid}, src::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemcpy_spt(dst::Ptr{Cvoid}, src::Ptr{Cvoid}, sizeBytes::Csize_t, kind::hipMemcpyKind)::hipError_t) end @checked function hipMemcpyToSymbol_spt(symbol, src, sizeBytes, offset, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyToSymbol_spt(symbol::Ptr{Cvoid}, src::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemcpyToSymbol_spt(symbol::Ptr{Cvoid}, src::Ptr{Cvoid}, sizeBytes::Csize_t, offset::Csize_t, kind::hipMemcpyKind)::hipError_t) end @checked function hipMemcpyFromSymbol_spt(dst, symbol, sizeBytes, offset, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyFromSymbol_spt(dst::Ptr{Cvoid}, symbol::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemcpyFromSymbol_spt(dst::Ptr{Cvoid}, symbol::Ptr{Cvoid}, sizeBytes::Csize_t, offset::Csize_t, kind::hipMemcpyKind)::hipError_t) end @checked function hipMemcpy2D_spt(dst, dpitch, src, spitch, width, height, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy2D_spt(dst::Ptr{Cvoid}, dpitch::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemcpy2D_spt(dst::Ptr{Cvoid}, dpitch::Csize_t, src::Ptr{Cvoid}, spitch::Csize_t, width::Csize_t, height::Csize_t, kind::hipMemcpyKind)::hipError_t) @@ -7151,7 +7151,7 @@ end @checked function hipMemcpy2DFromArray_spt(dst, dpitch, src, wOffset, hOffset, width, height, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy2DFromArray_spt(dst::Ptr{Cvoid}, dpitch::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemcpy2DFromArray_spt(dst::Ptr{Cvoid}, dpitch::Csize_t, src::hipArray_const_t, wOffset::Csize_t, hOffset::Csize_t, width::Csize_t, height::Csize_t, @@ -7160,32 +7160,32 @@ end @checked function hipMemcpy3D_spt(p) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy3D_spt(p::Ptr{hipMemcpy3DParms})::hipError_t) + @gcsafe_ccall(libamdhip64.hipMemcpy3D_spt(p::Ptr{hipMemcpy3DParms})::hipError_t) end @checked function hipMemset_spt(dst, value, sizeBytes) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemset_spt(dst::Ptr{Cvoid}, value::Cint, + @gcsafe_ccall(libamdhip64.hipMemset_spt(dst::Ptr{Cvoid}, value::Cint, sizeBytes::Csize_t)::hipError_t) end @checked function hipMemsetAsync_spt(dst, value, sizeBytes, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemsetAsync_spt(dst::Ptr{Cvoid}, value::Cint, + @gcsafe_ccall(libamdhip64.hipMemsetAsync_spt(dst::Ptr{Cvoid}, value::Cint, sizeBytes::Csize_t, stream::hipStream_t)::hipError_t) end @checked function hipMemset2D_spt(dst, pitch, value, width, height) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemset2D_spt(dst::Ptr{Cvoid}, pitch::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemset2D_spt(dst::Ptr{Cvoid}, pitch::Csize_t, value::Cint, width::Csize_t, height::Csize_t)::hipError_t) end @checked function hipMemset2DAsync_spt(dst, pitch, value, width, height, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemset2DAsync_spt(dst::Ptr{Cvoid}, pitch::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemset2DAsync_spt(dst::Ptr{Cvoid}, pitch::Csize_t, value::Cint, width::Csize_t, height::Csize_t, stream::hipStream_t)::hipError_t) @@ -7193,33 +7193,33 @@ end @checked function hipMemset3DAsync_spt(pitchedDevPtr, value, extent, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemset3DAsync_spt(pitchedDevPtr::hipPitchedPtr, + @gcsafe_ccall(libamdhip64.hipMemset3DAsync_spt(pitchedDevPtr::hipPitchedPtr, value::Cint, extent::hipExtent, stream::hipStream_t)::hipError_t) end @checked function hipMemset3D_spt(pitchedDevPtr, value, extent) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemset3D_spt(pitchedDevPtr::hipPitchedPtr, value::Cint, + @gcsafe_ccall(libamdhip64.hipMemset3D_spt(pitchedDevPtr::hipPitchedPtr, value::Cint, extent::hipExtent)::hipError_t) end @checked function hipMemcpyAsync_spt(dst, src, sizeBytes, kind, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyAsync_spt(dst::Ptr{Cvoid}, src::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemcpyAsync_spt(dst::Ptr{Cvoid}, src::Ptr{Cvoid}, sizeBytes::Csize_t, kind::hipMemcpyKind, stream::hipStream_t)::hipError_t) end @checked function hipMemcpy3DAsync_spt(p, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy3DAsync_spt(p::Ptr{hipMemcpy3DParms}, + @gcsafe_ccall(libamdhip64.hipMemcpy3DAsync_spt(p::Ptr{hipMemcpy3DParms}, stream::hipStream_t)::hipError_t) end @checked function hipMemcpy2DAsync_spt(dst, dpitch, src, spitch, width, height, kind, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy2DAsync_spt(dst::Ptr{Cvoid}, dpitch::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemcpy2DAsync_spt(dst::Ptr{Cvoid}, dpitch::Csize_t, src::Ptr{Cvoid}, spitch::Csize_t, width::Csize_t, height::Csize_t, kind::hipMemcpyKind, @@ -7228,7 +7228,7 @@ end @checked function hipMemcpyFromSymbolAsync_spt(dst, symbol, sizeBytes, offset, kind, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyFromSymbolAsync_spt(dst::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemcpyFromSymbolAsync_spt(dst::Ptr{Cvoid}, symbol::Ptr{Cvoid}, sizeBytes::Csize_t, offset::Csize_t, @@ -7238,7 +7238,7 @@ end @checked function hipMemcpyToSymbolAsync_spt(symbol, src, sizeBytes, offset, kind, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyToSymbolAsync_spt(symbol::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemcpyToSymbolAsync_spt(symbol::Ptr{Cvoid}, src::Ptr{Cvoid}, sizeBytes::Csize_t, offset::Csize_t, @@ -7248,7 +7248,7 @@ end @checked function hipMemcpyFromArray_spt(dst, src, wOffsetSrc, hOffset, count, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpyFromArray_spt(dst::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemcpyFromArray_spt(dst::Ptr{Cvoid}, src::hipArray_const_t, wOffsetSrc::Csize_t, hOffset::Csize_t, count::Csize_t, @@ -7257,7 +7257,7 @@ end @checked function hipMemcpy2DToArray_spt(dst, wOffset, hOffset, src, spitch, width, height, kind) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy2DToArray_spt(dst::hipArray_t, wOffset::Csize_t, + @gcsafe_ccall(libamdhip64.hipMemcpy2DToArray_spt(dst::hipArray_t, wOffset::Csize_t, hOffset::Csize_t, src::Ptr{Cvoid}, spitch::Csize_t, width::Csize_t, height::Csize_t, @@ -7267,7 +7267,7 @@ end @checked function hipMemcpy2DFromArrayAsync_spt(dst, dpitch, src, wOffsetSrc, hOffsetSrc, width, height, kind, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy2DFromArrayAsync_spt(dst::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipMemcpy2DFromArrayAsync_spt(dst::Ptr{Cvoid}, dpitch::Csize_t, src::hipArray_const_t, wOffsetSrc::Csize_t, @@ -7281,7 +7281,7 @@ end @checked function hipMemcpy2DToArrayAsync_spt(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipMemcpy2DToArrayAsync_spt(dst::hipArray_t, + @gcsafe_ccall(libamdhip64.hipMemcpy2DToArrayAsync_spt(dst::hipArray_t, wOffset::Csize_t, hOffset::Csize_t, src::Ptr{Cvoid}, @@ -7293,36 +7293,36 @@ end @checked function hipStreamQuery_spt(stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamQuery_spt(stream::hipStream_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipStreamQuery_spt(stream::hipStream_t)::hipError_t) end @checked function hipStreamSynchronize_spt(stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamSynchronize_spt(stream::hipStream_t)::hipError_t) + @gcsafe_ccall(libamdhip64.hipStreamSynchronize_spt(stream::hipStream_t)::hipError_t) end @checked function hipStreamGetPriority_spt(stream, priority) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamGetPriority_spt(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamGetPriority_spt(stream::hipStream_t, priority::Ptr{Cint})::hipError_t) end @checked function hipStreamWaitEvent_spt(stream, event, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamWaitEvent_spt(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamWaitEvent_spt(stream::hipStream_t, event::hipEvent_t, flags::Cuint)::hipError_t) end @checked function hipStreamGetFlags_spt(stream, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamGetFlags_spt(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamGetFlags_spt(stream::hipStream_t, flags::Ptr{Cuint})::hipError_t) end @checked function hipStreamAddCallback_spt(stream, callback, userData, flags) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamAddCallback_spt(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamAddCallback_spt(stream::hipStream_t, callback::hipStreamCallback_t, userData::Ptr{Cvoid}, flags::Cuint)::hipError_t) @@ -7330,14 +7330,14 @@ end @checked function hipEventRecord_spt(event, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipEventRecord_spt(event::hipEvent_t, + @gcsafe_ccall(libamdhip64.hipEventRecord_spt(event::hipEvent_t, stream::hipStream_t)::hipError_t) end @checked function hipLaunchCooperativeKernel_spt(f, gridDim, blockDim, kernelParams, sharedMemBytes, hStream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLaunchCooperativeKernel_spt(f::Ptr{Cvoid}, gridDim::dim3, + @gcsafe_ccall(libamdhip64.hipLaunchCooperativeKernel_spt(f::Ptr{Cvoid}, gridDim::dim3, blockDim::dim3, kernelParams::Ptr{Ptr{Cvoid}}, sharedMemBytes::UInt32, @@ -7347,7 +7347,7 @@ end @checked function hipLaunchKernel_spt(function_address, numBlocks, dimBlocks, args, sharedMemBytes, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLaunchKernel_spt(function_address::Ptr{Cvoid}, + @gcsafe_ccall(libamdhip64.hipLaunchKernel_spt(function_address::Ptr{Cvoid}, numBlocks::dim3, dimBlocks::dim3, args::Ptr{Ptr{Cvoid}}, sharedMemBytes::Csize_t, @@ -7356,31 +7356,31 @@ end @checked function hipGraphLaunch_spt(graphExec, stream) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGraphLaunch_spt(graphExec::hipGraphExec_t, + @gcsafe_ccall(libamdhip64.hipGraphLaunch_spt(graphExec::hipGraphExec_t, stream::hipStream_t)::hipError_t) end @checked function hipStreamBeginCapture_spt(stream, mode) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamBeginCapture_spt(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamBeginCapture_spt(stream::hipStream_t, mode::hipStreamCaptureMode)::hipError_t) end @checked function hipStreamEndCapture_spt(stream, pGraph) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamEndCapture_spt(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamEndCapture_spt(stream::hipStream_t, pGraph::Ptr{hipGraph_t})::hipError_t) end @checked function hipStreamIsCapturing_spt(stream, pCaptureStatus) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamIsCapturing_spt(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamIsCapturing_spt(stream::hipStream_t, pCaptureStatus::Ptr{hipStreamCaptureStatus})::hipError_t) end @checked function hipStreamGetCaptureInfo_spt(stream, pCaptureStatus, pId) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamGetCaptureInfo_spt(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamGetCaptureInfo_spt(stream::hipStream_t, pCaptureStatus::Ptr{hipStreamCaptureStatus}, pId::Ptr{Culonglong})::hipError_t) end @@ -7388,7 +7388,7 @@ end @checked function hipStreamGetCaptureInfo_v2_spt(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipStreamGetCaptureInfo_v2_spt(stream::hipStream_t, + @gcsafe_ccall(libamdhip64.hipStreamGetCaptureInfo_v2_spt(stream::hipStream_t, captureStatus_out::Ptr{hipStreamCaptureStatus}, id_out::Ptr{Culonglong}, graph_out::Ptr{hipGraph_t}, @@ -7398,13 +7398,13 @@ end @checked function hipLaunchHostFunc_spt(stream, fn, userData) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipLaunchHostFunc_spt(stream::hipStream_t, fn::hipHostFn_t, + @gcsafe_ccall(libamdhip64.hipLaunchHostFunc_spt(stream::hipStream_t, fn::hipHostFn_t, userData::Ptr{Cvoid})::hipError_t) end @checked function hipGetDriverEntryPoint_spt(symbol, funcPtr, flags, status) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGetDriverEntryPoint_spt(symbol::Cstring, + @gcsafe_ccall(libamdhip64.hipGetDriverEntryPoint_spt(symbol::Cstring, funcPtr::Ptr{Ptr{Cvoid}}, flags::Culonglong, status::Ptr{hipDriverEntryPointQueryResult})::hipError_t) @@ -7412,7 +7412,7 @@ end @checked function hipGetProcAddress_spt(symbol, pfn, hipVersion, flags, symbolStatus) AMDGPU.prepare_state() - @gcsafe_ccall(libhip.hipGetProcAddress_spt(symbol::Cstring, pfn::Ptr{Ptr{Cvoid}}, + @gcsafe_ccall(libamdhip64.hipGetProcAddress_spt(symbol::Cstring, pfn::Ptr{Ptr{Cvoid}}, hipVersion::Cint, flags::UInt64, symbolStatus::Ptr{hipDriverProcAddressQueryResult})::hipError_t) end diff --git a/src/hsa/libHSA.jl b/src/hsa/libHSA.jl index 69814d9a6..67f36140a 100644 --- a/src/hsa/libHSA.jl +++ b/src/hsa/libHSA.jl @@ -2,7 +2,7 @@ module LibHSARuntime using CEnum -import ...AMDGPU: libhsaruntime +import ...AMDGPU: libhsa_runtime64 const HSA_EXPORT_DECORATOR = identity const HSA_CALL = nothing @@ -47,7 +47,7 @@ const HSA_CALL = nothing end function hsa_status_string(status, status_string) - ccall((:hsa_status_string, libhsaruntime), hsa_status_t, (hsa_status_t, Ptr{Ptr{Cchar}}), status, status_string) + ccall((:hsa_status_string, libhsa_runtime64), hsa_status_t, (hsa_status_t, Ptr{Ptr{Cchar}}), status, status_string) end struct hsa_dim3_s @@ -68,12 +68,12 @@ const hsa_file_t = Cint # no prototype is found for this function at hsa.h:359:22, please use with caution function hsa_init() - ccall((:hsa_init, libhsaruntime), hsa_status_t, ()) + ccall((:hsa_init, libhsa_runtime64), hsa_status_t, ()) end # no prototype is found for this function at hsa.h:381:22, please use with caution function hsa_shut_down() - ccall((:hsa_shut_down, libhsaruntime), hsa_status_t, ()) + ccall((:hsa_shut_down, libhsa_runtime64), hsa_status_t, ()) end @cenum hsa_endianness_t::UInt32 begin @@ -104,7 +104,7 @@ end end function hsa_system_get_info(attribute, value) - ccall((:hsa_system_get_info, libhsaruntime), hsa_status_t, (hsa_system_info_t, Ptr{Cvoid}), attribute, value) + ccall((:hsa_system_get_info, libhsa_runtime64), hsa_status_t, (hsa_system_info_t, Ptr{Cvoid}), attribute, value) end @cenum hsa_extension_t::UInt32 begin @@ -121,23 +121,23 @@ end end function hsa_extension_get_name(extension, name) - ccall((:hsa_extension_get_name, libhsaruntime), hsa_status_t, (UInt16, Ptr{Ptr{Cchar}}), extension, name) + ccall((:hsa_extension_get_name, libhsa_runtime64), hsa_status_t, (UInt16, Ptr{Ptr{Cchar}}), extension, name) end function hsa_system_extension_supported(extension, version_major, version_minor, result) - ccall((:hsa_system_extension_supported, libhsaruntime), hsa_status_t, (UInt16, UInt16, UInt16, Ptr{Bool}), extension, version_major, version_minor, result) + ccall((:hsa_system_extension_supported, libhsa_runtime64), hsa_status_t, (UInt16, UInt16, UInt16, Ptr{Bool}), extension, version_major, version_minor, result) end function hsa_system_major_extension_supported(extension, version_major, version_minor, result) - ccall((:hsa_system_major_extension_supported, libhsaruntime), hsa_status_t, (UInt16, UInt16, Ptr{UInt16}, Ptr{Bool}), extension, version_major, version_minor, result) + ccall((:hsa_system_major_extension_supported, libhsa_runtime64), hsa_status_t, (UInt16, UInt16, Ptr{UInt16}, Ptr{Bool}), extension, version_major, version_minor, result) end function hsa_system_get_extension_table(extension, version_major, version_minor, table) - ccall((:hsa_system_get_extension_table, libhsaruntime), hsa_status_t, (UInt16, UInt16, UInt16, Ptr{Cvoid}), extension, version_major, version_minor, table) + ccall((:hsa_system_get_extension_table, libhsa_runtime64), hsa_status_t, (UInt16, UInt16, UInt16, Ptr{Cvoid}), extension, version_major, version_minor, table) end function hsa_system_get_major_extension_table(extension, version_major, table_length, table) - ccall((:hsa_system_get_major_extension_table, libhsaruntime), hsa_status_t, (UInt16, UInt16, Csize_t, Ptr{Cvoid}), extension, version_major, table_length, table) + ccall((:hsa_system_get_major_extension_table, libhsa_runtime64), hsa_status_t, (UInt16, UInt16, Csize_t, Ptr{Cvoid}), extension, version_major, table_length, table) end struct hsa_agent_s @@ -192,11 +192,11 @@ end end function hsa_agent_get_info(agent, attribute, value) - ccall((:hsa_agent_get_info, libhsaruntime), hsa_status_t, (hsa_agent_t, hsa_agent_info_t, Ptr{Cvoid}), agent, attribute, value) + ccall((:hsa_agent_get_info, libhsa_runtime64), hsa_status_t, (hsa_agent_t, hsa_agent_info_t, Ptr{Cvoid}), agent, attribute, value) end function hsa_iterate_agents(callback, data) - ccall((:hsa_iterate_agents, libhsaruntime), hsa_status_t, (Ptr{Cvoid}, Ptr{Cvoid}), callback, data) + ccall((:hsa_iterate_agents, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid}, Ptr{Cvoid}), callback, data) end @cenum hsa_exception_policy_t::UInt32 begin @@ -205,7 +205,7 @@ end end function hsa_agent_get_exception_policies(agent, profile, mask) - ccall((:hsa_agent_get_exception_policies, libhsaruntime), hsa_status_t, (hsa_agent_t, hsa_profile_t, Ptr{UInt16}), agent, profile, mask) + ccall((:hsa_agent_get_exception_policies, libhsa_runtime64), hsa_status_t, (hsa_agent_t, hsa_profile_t, Ptr{UInt16}), agent, profile, mask) end struct hsa_cache_s @@ -222,19 +222,19 @@ const hsa_cache_t = hsa_cache_s end function hsa_cache_get_info(cache, attribute, value) - ccall((:hsa_cache_get_info, libhsaruntime), hsa_status_t, (hsa_cache_t, hsa_cache_info_t, Ptr{Cvoid}), cache, attribute, value) + ccall((:hsa_cache_get_info, libhsa_runtime64), hsa_status_t, (hsa_cache_t, hsa_cache_info_t, Ptr{Cvoid}), cache, attribute, value) end function hsa_agent_iterate_caches(agent, callback, data) - ccall((:hsa_agent_iterate_caches, libhsaruntime), hsa_status_t, (hsa_agent_t, Ptr{Cvoid}, Ptr{Cvoid}), agent, callback, data) + ccall((:hsa_agent_iterate_caches, libhsa_runtime64), hsa_status_t, (hsa_agent_t, Ptr{Cvoid}, Ptr{Cvoid}), agent, callback, data) end function hsa_agent_extension_supported(extension, agent, version_major, version_minor, result) - ccall((:hsa_agent_extension_supported, libhsaruntime), hsa_status_t, (UInt16, hsa_agent_t, UInt16, UInt16, Ptr{Bool}), extension, agent, version_major, version_minor, result) + ccall((:hsa_agent_extension_supported, libhsa_runtime64), hsa_status_t, (UInt16, hsa_agent_t, UInt16, UInt16, Ptr{Bool}), extension, agent, version_major, version_minor, result) end function hsa_agent_major_extension_supported(extension, agent, version_major, version_minor, result) - ccall((:hsa_agent_major_extension_supported, libhsaruntime), hsa_status_t, (UInt16, hsa_agent_t, UInt16, Ptr{UInt16}, Ptr{Bool}), extension, agent, version_major, version_minor, result) + ccall((:hsa_agent_major_extension_supported, libhsa_runtime64), hsa_status_t, (UInt16, hsa_agent_t, UInt16, Ptr{UInt16}, Ptr{Bool}), extension, agent, version_major, version_minor, result) end struct hsa_signal_s @@ -246,239 +246,239 @@ const hsa_signal_t = hsa_signal_s const hsa_signal_value_t = Int64 function hsa_signal_create(initial_value, num_consumers, consumers, signal) - ccall((:hsa_signal_create, libhsaruntime), hsa_status_t, (hsa_signal_value_t, UInt32, Ptr{hsa_agent_t}, Ptr{hsa_signal_t}), initial_value, num_consumers, consumers, signal) + ccall((:hsa_signal_create, libhsa_runtime64), hsa_status_t, (hsa_signal_value_t, UInt32, Ptr{hsa_agent_t}, Ptr{hsa_signal_t}), initial_value, num_consumers, consumers, signal) end function hsa_signal_destroy(signal) - ccall((:hsa_signal_destroy, libhsaruntime), hsa_status_t, (hsa_signal_t,), signal) + ccall((:hsa_signal_destroy, libhsa_runtime64), hsa_status_t, (hsa_signal_t,), signal) end function hsa_signal_load_scacquire(signal) - ccall((:hsa_signal_load_scacquire, libhsaruntime), hsa_signal_value_t, (hsa_signal_t,), signal) + ccall((:hsa_signal_load_scacquire, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t,), signal) end function hsa_signal_load_relaxed(signal) - ccall((:hsa_signal_load_relaxed, libhsaruntime), hsa_signal_value_t, (hsa_signal_t,), signal) + ccall((:hsa_signal_load_relaxed, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t,), signal) end function hsa_signal_load_acquire(signal) - ccall((:hsa_signal_load_acquire, libhsaruntime), hsa_signal_value_t, (hsa_signal_t,), signal) + ccall((:hsa_signal_load_acquire, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t,), signal) end function hsa_signal_store_relaxed(signal, value) - ccall((:hsa_signal_store_relaxed, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_store_relaxed, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_store_screlease(signal, value) - ccall((:hsa_signal_store_screlease, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_store_screlease, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_store_release(signal, value) - ccall((:hsa_signal_store_release, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_store_release, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_silent_store_relaxed(signal, value) - ccall((:hsa_signal_silent_store_relaxed, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_silent_store_relaxed, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_silent_store_screlease(signal, value) - ccall((:hsa_signal_silent_store_screlease, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_silent_store_screlease, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_exchange_scacq_screl(signal, value) - ccall((:hsa_signal_exchange_scacq_screl, libhsaruntime), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_exchange_scacq_screl, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_exchange_acq_rel(signal, value) - ccall((:hsa_signal_exchange_acq_rel, libhsaruntime), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_exchange_acq_rel, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_exchange_scacquire(signal, value) - ccall((:hsa_signal_exchange_scacquire, libhsaruntime), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_exchange_scacquire, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_exchange_acquire(signal, value) - ccall((:hsa_signal_exchange_acquire, libhsaruntime), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_exchange_acquire, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_exchange_relaxed(signal, value) - ccall((:hsa_signal_exchange_relaxed, libhsaruntime), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_exchange_relaxed, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_exchange_screlease(signal, value) - ccall((:hsa_signal_exchange_screlease, libhsaruntime), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_exchange_screlease, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_exchange_release(signal, value) - ccall((:hsa_signal_exchange_release, libhsaruntime), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_exchange_release, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_cas_scacq_screl(signal, expected, value) - ccall((:hsa_signal_cas_scacq_screl, libhsaruntime), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t, hsa_signal_value_t), signal, expected, value) + ccall((:hsa_signal_cas_scacq_screl, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t, hsa_signal_value_t), signal, expected, value) end function hsa_signal_cas_acq_rel(signal, expected, value) - ccall((:hsa_signal_cas_acq_rel, libhsaruntime), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t, hsa_signal_value_t), signal, expected, value) + ccall((:hsa_signal_cas_acq_rel, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t, hsa_signal_value_t), signal, expected, value) end function hsa_signal_cas_scacquire(signal, expected, value) - ccall((:hsa_signal_cas_scacquire, libhsaruntime), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t, hsa_signal_value_t), signal, expected, value) + ccall((:hsa_signal_cas_scacquire, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t, hsa_signal_value_t), signal, expected, value) end function hsa_signal_cas_acquire(signal, expected, value) - ccall((:hsa_signal_cas_acquire, libhsaruntime), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t, hsa_signal_value_t), signal, expected, value) + ccall((:hsa_signal_cas_acquire, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t, hsa_signal_value_t), signal, expected, value) end function hsa_signal_cas_relaxed(signal, expected, value) - ccall((:hsa_signal_cas_relaxed, libhsaruntime), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t, hsa_signal_value_t), signal, expected, value) + ccall((:hsa_signal_cas_relaxed, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t, hsa_signal_value_t), signal, expected, value) end function hsa_signal_cas_screlease(signal, expected, value) - ccall((:hsa_signal_cas_screlease, libhsaruntime), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t, hsa_signal_value_t), signal, expected, value) + ccall((:hsa_signal_cas_screlease, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t, hsa_signal_value_t), signal, expected, value) end function hsa_signal_cas_release(signal, expected, value) - ccall((:hsa_signal_cas_release, libhsaruntime), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t, hsa_signal_value_t), signal, expected, value) + ccall((:hsa_signal_cas_release, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t, hsa_signal_value_t, hsa_signal_value_t), signal, expected, value) end function hsa_signal_add_scacq_screl(signal, value) - ccall((:hsa_signal_add_scacq_screl, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_add_scacq_screl, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_add_acq_rel(signal, value) - ccall((:hsa_signal_add_acq_rel, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_add_acq_rel, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_add_scacquire(signal, value) - ccall((:hsa_signal_add_scacquire, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_add_scacquire, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_add_acquire(signal, value) - ccall((:hsa_signal_add_acquire, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_add_acquire, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_add_relaxed(signal, value) - ccall((:hsa_signal_add_relaxed, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_add_relaxed, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_add_screlease(signal, value) - ccall((:hsa_signal_add_screlease, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_add_screlease, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_add_release(signal, value) - ccall((:hsa_signal_add_release, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_add_release, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_subtract_scacq_screl(signal, value) - ccall((:hsa_signal_subtract_scacq_screl, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_subtract_scacq_screl, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_subtract_acq_rel(signal, value) - ccall((:hsa_signal_subtract_acq_rel, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_subtract_acq_rel, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_subtract_scacquire(signal, value) - ccall((:hsa_signal_subtract_scacquire, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_subtract_scacquire, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_subtract_acquire(signal, value) - ccall((:hsa_signal_subtract_acquire, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_subtract_acquire, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_subtract_relaxed(signal, value) - ccall((:hsa_signal_subtract_relaxed, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_subtract_relaxed, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_subtract_screlease(signal, value) - ccall((:hsa_signal_subtract_screlease, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_subtract_screlease, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_subtract_release(signal, value) - ccall((:hsa_signal_subtract_release, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_subtract_release, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_and_scacq_screl(signal, value) - ccall((:hsa_signal_and_scacq_screl, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_and_scacq_screl, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_and_acq_rel(signal, value) - ccall((:hsa_signal_and_acq_rel, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_and_acq_rel, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_and_scacquire(signal, value) - ccall((:hsa_signal_and_scacquire, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_and_scacquire, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_and_acquire(signal, value) - ccall((:hsa_signal_and_acquire, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_and_acquire, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_and_relaxed(signal, value) - ccall((:hsa_signal_and_relaxed, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_and_relaxed, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_and_screlease(signal, value) - ccall((:hsa_signal_and_screlease, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_and_screlease, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_and_release(signal, value) - ccall((:hsa_signal_and_release, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_and_release, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_or_scacq_screl(signal, value) - ccall((:hsa_signal_or_scacq_screl, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_or_scacq_screl, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_or_acq_rel(signal, value) - ccall((:hsa_signal_or_acq_rel, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_or_acq_rel, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_or_scacquire(signal, value) - ccall((:hsa_signal_or_scacquire, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_or_scacquire, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_or_acquire(signal, value) - ccall((:hsa_signal_or_acquire, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_or_acquire, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_or_relaxed(signal, value) - ccall((:hsa_signal_or_relaxed, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_or_relaxed, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_or_screlease(signal, value) - ccall((:hsa_signal_or_screlease, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_or_screlease, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_or_release(signal, value) - ccall((:hsa_signal_or_release, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_or_release, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_xor_scacq_screl(signal, value) - ccall((:hsa_signal_xor_scacq_screl, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_xor_scacq_screl, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_xor_acq_rel(signal, value) - ccall((:hsa_signal_xor_acq_rel, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_xor_acq_rel, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_xor_scacquire(signal, value) - ccall((:hsa_signal_xor_scacquire, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_xor_scacquire, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_xor_acquire(signal, value) - ccall((:hsa_signal_xor_acquire, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_xor_acquire, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_xor_relaxed(signal, value) - ccall((:hsa_signal_xor_relaxed, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_xor_relaxed, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_xor_screlease(signal, value) - ccall((:hsa_signal_xor_screlease, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_xor_screlease, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end function hsa_signal_xor_release(signal, value) - ccall((:hsa_signal_xor_release, libhsaruntime), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) + ccall((:hsa_signal_xor_release, libhsa_runtime64), Cvoid, (hsa_signal_t, hsa_signal_value_t), signal, value) end @cenum hsa_signal_condition_t::UInt32 begin @@ -494,15 +494,15 @@ end end function hsa_signal_wait_scacquire(signal, condition, compare_value, timeout_hint, wait_state_hint) - ccall((:hsa_signal_wait_scacquire, libhsaruntime), hsa_signal_value_t, (hsa_signal_t, hsa_signal_condition_t, hsa_signal_value_t, UInt64, hsa_wait_state_t), signal, condition, compare_value, timeout_hint, wait_state_hint) + ccall((:hsa_signal_wait_scacquire, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t, hsa_signal_condition_t, hsa_signal_value_t, UInt64, hsa_wait_state_t), signal, condition, compare_value, timeout_hint, wait_state_hint) end function hsa_signal_wait_relaxed(signal, condition, compare_value, timeout_hint, wait_state_hint) - ccall((:hsa_signal_wait_relaxed, libhsaruntime), hsa_signal_value_t, (hsa_signal_t, hsa_signal_condition_t, hsa_signal_value_t, UInt64, hsa_wait_state_t), signal, condition, compare_value, timeout_hint, wait_state_hint) + ccall((:hsa_signal_wait_relaxed, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t, hsa_signal_condition_t, hsa_signal_value_t, UInt64, hsa_wait_state_t), signal, condition, compare_value, timeout_hint, wait_state_hint) end function hsa_signal_wait_acquire(signal, condition, compare_value, timeout_hint, wait_state_hint) - ccall((:hsa_signal_wait_acquire, libhsaruntime), hsa_signal_value_t, (hsa_signal_t, hsa_signal_condition_t, hsa_signal_value_t, UInt64, hsa_wait_state_t), signal, condition, compare_value, timeout_hint, wait_state_hint) + ccall((:hsa_signal_wait_acquire, libhsa_runtime64), hsa_signal_value_t, (hsa_signal_t, hsa_signal_condition_t, hsa_signal_value_t, UInt64, hsa_wait_state_t), signal, condition, compare_value, timeout_hint, wait_state_hint) end struct hsa_signal_group_s @@ -512,19 +512,19 @@ end const hsa_signal_group_t = hsa_signal_group_s function hsa_signal_group_create(num_signals, signals, num_consumers, consumers, signal_group) - ccall((:hsa_signal_group_create, libhsaruntime), hsa_status_t, (UInt32, Ptr{hsa_signal_t}, UInt32, Ptr{hsa_agent_t}, Ptr{hsa_signal_group_t}), num_signals, signals, num_consumers, consumers, signal_group) + ccall((:hsa_signal_group_create, libhsa_runtime64), hsa_status_t, (UInt32, Ptr{hsa_signal_t}, UInt32, Ptr{hsa_agent_t}, Ptr{hsa_signal_group_t}), num_signals, signals, num_consumers, consumers, signal_group) end function hsa_signal_group_destroy(signal_group) - ccall((:hsa_signal_group_destroy, libhsaruntime), hsa_status_t, (hsa_signal_group_t,), signal_group) + ccall((:hsa_signal_group_destroy, libhsa_runtime64), hsa_status_t, (hsa_signal_group_t,), signal_group) end function hsa_signal_group_wait_any_scacquire(signal_group, conditions, compare_values, wait_state_hint, signal, value) - ccall((:hsa_signal_group_wait_any_scacquire, libhsaruntime), hsa_status_t, (hsa_signal_group_t, Ptr{hsa_signal_condition_t}, Ptr{hsa_signal_value_t}, hsa_wait_state_t, Ptr{hsa_signal_t}, Ptr{hsa_signal_value_t}), signal_group, conditions, compare_values, wait_state_hint, signal, value) + ccall((:hsa_signal_group_wait_any_scacquire, libhsa_runtime64), hsa_status_t, (hsa_signal_group_t, Ptr{hsa_signal_condition_t}, Ptr{hsa_signal_value_t}, hsa_wait_state_t, Ptr{hsa_signal_t}, Ptr{hsa_signal_value_t}), signal_group, conditions, compare_values, wait_state_hint, signal, value) end function hsa_signal_group_wait_any_relaxed(signal_group, conditions, compare_values, wait_state_hint, signal, value) - ccall((:hsa_signal_group_wait_any_relaxed, libhsaruntime), hsa_status_t, (hsa_signal_group_t, Ptr{hsa_signal_condition_t}, Ptr{hsa_signal_value_t}, hsa_wait_state_t, Ptr{hsa_signal_t}, Ptr{hsa_signal_value_t}), signal_group, conditions, compare_values, wait_state_hint, signal, value) + ccall((:hsa_signal_group_wait_any_relaxed, libhsa_runtime64), hsa_status_t, (hsa_signal_group_t, Ptr{hsa_signal_condition_t}, Ptr{hsa_signal_value_t}, hsa_wait_state_t, Ptr{hsa_signal_t}, Ptr{hsa_signal_value_t}), signal_group, conditions, compare_values, wait_state_hint, signal, value) end struct hsa_region_s @@ -559,123 +559,123 @@ end const hsa_queue_t = hsa_queue_s function hsa_queue_create(agent, size, type, callback, data, private_segment_size, group_segment_size, queue) - ccall((:hsa_queue_create, libhsaruntime), hsa_status_t, (hsa_agent_t, UInt32, hsa_queue_type32_t, Ptr{Cvoid}, Ptr{Cvoid}, UInt32, UInt32, Ptr{Ptr{hsa_queue_t}}), agent, size, type, callback, data, private_segment_size, group_segment_size, queue) + ccall((:hsa_queue_create, libhsa_runtime64), hsa_status_t, (hsa_agent_t, UInt32, hsa_queue_type32_t, Ptr{Cvoid}, Ptr{Cvoid}, UInt32, UInt32, Ptr{Ptr{hsa_queue_t}}), agent, size, type, callback, data, private_segment_size, group_segment_size, queue) end function hsa_soft_queue_create(region, size, type, features, doorbell_signal, queue) - ccall((:hsa_soft_queue_create, libhsaruntime), hsa_status_t, (hsa_region_t, UInt32, hsa_queue_type32_t, UInt32, hsa_signal_t, Ptr{Ptr{hsa_queue_t}}), region, size, type, features, doorbell_signal, queue) + ccall((:hsa_soft_queue_create, libhsa_runtime64), hsa_status_t, (hsa_region_t, UInt32, hsa_queue_type32_t, UInt32, hsa_signal_t, Ptr{Ptr{hsa_queue_t}}), region, size, type, features, doorbell_signal, queue) end function hsa_queue_destroy(queue) - ccall((:hsa_queue_destroy, libhsaruntime), hsa_status_t, (Ptr{hsa_queue_t},), queue) + ccall((:hsa_queue_destroy, libhsa_runtime64), hsa_status_t, (Ptr{hsa_queue_t},), queue) end function hsa_queue_inactivate(queue) - ccall((:hsa_queue_inactivate, libhsaruntime), hsa_status_t, (Ptr{hsa_queue_t},), queue) + ccall((:hsa_queue_inactivate, libhsa_runtime64), hsa_status_t, (Ptr{hsa_queue_t},), queue) end function hsa_queue_load_read_index_acquire(queue) - ccall((:hsa_queue_load_read_index_acquire, libhsaruntime), UInt64, (Ptr{hsa_queue_t},), queue) + ccall((:hsa_queue_load_read_index_acquire, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t},), queue) end function hsa_queue_load_read_index_scacquire(queue) - ccall((:hsa_queue_load_read_index_scacquire, libhsaruntime), UInt64, (Ptr{hsa_queue_t},), queue) + ccall((:hsa_queue_load_read_index_scacquire, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t},), queue) end function hsa_queue_load_read_index_relaxed(queue) - ccall((:hsa_queue_load_read_index_relaxed, libhsaruntime), UInt64, (Ptr{hsa_queue_t},), queue) + ccall((:hsa_queue_load_read_index_relaxed, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t},), queue) end function hsa_queue_load_write_index_acquire(queue) - ccall((:hsa_queue_load_write_index_acquire, libhsaruntime), UInt64, (Ptr{hsa_queue_t},), queue) + ccall((:hsa_queue_load_write_index_acquire, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t},), queue) end function hsa_queue_load_write_index_scacquire(queue) - ccall((:hsa_queue_load_write_index_scacquire, libhsaruntime), UInt64, (Ptr{hsa_queue_t},), queue) + ccall((:hsa_queue_load_write_index_scacquire, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t},), queue) end function hsa_queue_load_write_index_relaxed(queue) - ccall((:hsa_queue_load_write_index_relaxed, libhsaruntime), UInt64, (Ptr{hsa_queue_t},), queue) + ccall((:hsa_queue_load_write_index_relaxed, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t},), queue) end function hsa_queue_store_write_index_relaxed(queue, value) - ccall((:hsa_queue_store_write_index_relaxed, libhsaruntime), Cvoid, (Ptr{hsa_queue_t}, UInt64), queue, value) + ccall((:hsa_queue_store_write_index_relaxed, libhsa_runtime64), Cvoid, (Ptr{hsa_queue_t}, UInt64), queue, value) end function hsa_queue_store_write_index_release(queue, value) - ccall((:hsa_queue_store_write_index_release, libhsaruntime), Cvoid, (Ptr{hsa_queue_t}, UInt64), queue, value) + ccall((:hsa_queue_store_write_index_release, libhsa_runtime64), Cvoid, (Ptr{hsa_queue_t}, UInt64), queue, value) end function hsa_queue_store_write_index_screlease(queue, value) - ccall((:hsa_queue_store_write_index_screlease, libhsaruntime), Cvoid, (Ptr{hsa_queue_t}, UInt64), queue, value) + ccall((:hsa_queue_store_write_index_screlease, libhsa_runtime64), Cvoid, (Ptr{hsa_queue_t}, UInt64), queue, value) end function hsa_queue_cas_write_index_acq_rel(queue, expected, value) - ccall((:hsa_queue_cas_write_index_acq_rel, libhsaruntime), UInt64, (Ptr{hsa_queue_t}, UInt64, UInt64), queue, expected, value) + ccall((:hsa_queue_cas_write_index_acq_rel, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t}, UInt64, UInt64), queue, expected, value) end function hsa_queue_cas_write_index_scacq_screl(queue, expected, value) - ccall((:hsa_queue_cas_write_index_scacq_screl, libhsaruntime), UInt64, (Ptr{hsa_queue_t}, UInt64, UInt64), queue, expected, value) + ccall((:hsa_queue_cas_write_index_scacq_screl, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t}, UInt64, UInt64), queue, expected, value) end function hsa_queue_cas_write_index_acquire(queue, expected, value) - ccall((:hsa_queue_cas_write_index_acquire, libhsaruntime), UInt64, (Ptr{hsa_queue_t}, UInt64, UInt64), queue, expected, value) + ccall((:hsa_queue_cas_write_index_acquire, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t}, UInt64, UInt64), queue, expected, value) end function hsa_queue_cas_write_index_scacquire(queue, expected, value) - ccall((:hsa_queue_cas_write_index_scacquire, libhsaruntime), UInt64, (Ptr{hsa_queue_t}, UInt64, UInt64), queue, expected, value) + ccall((:hsa_queue_cas_write_index_scacquire, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t}, UInt64, UInt64), queue, expected, value) end function hsa_queue_cas_write_index_relaxed(queue, expected, value) - ccall((:hsa_queue_cas_write_index_relaxed, libhsaruntime), UInt64, (Ptr{hsa_queue_t}, UInt64, UInt64), queue, expected, value) + ccall((:hsa_queue_cas_write_index_relaxed, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t}, UInt64, UInt64), queue, expected, value) end function hsa_queue_cas_write_index_release(queue, expected, value) - ccall((:hsa_queue_cas_write_index_release, libhsaruntime), UInt64, (Ptr{hsa_queue_t}, UInt64, UInt64), queue, expected, value) + ccall((:hsa_queue_cas_write_index_release, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t}, UInt64, UInt64), queue, expected, value) end function hsa_queue_cas_write_index_screlease(queue, expected, value) - ccall((:hsa_queue_cas_write_index_screlease, libhsaruntime), UInt64, (Ptr{hsa_queue_t}, UInt64, UInt64), queue, expected, value) + ccall((:hsa_queue_cas_write_index_screlease, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t}, UInt64, UInt64), queue, expected, value) end function hsa_queue_add_write_index_acq_rel(queue, value) - ccall((:hsa_queue_add_write_index_acq_rel, libhsaruntime), UInt64, (Ptr{hsa_queue_t}, UInt64), queue, value) + ccall((:hsa_queue_add_write_index_acq_rel, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t}, UInt64), queue, value) end function hsa_queue_add_write_index_scacq_screl(queue, value) - ccall((:hsa_queue_add_write_index_scacq_screl, libhsaruntime), UInt64, (Ptr{hsa_queue_t}, UInt64), queue, value) + ccall((:hsa_queue_add_write_index_scacq_screl, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t}, UInt64), queue, value) end function hsa_queue_add_write_index_acquire(queue, value) - ccall((:hsa_queue_add_write_index_acquire, libhsaruntime), UInt64, (Ptr{hsa_queue_t}, UInt64), queue, value) + ccall((:hsa_queue_add_write_index_acquire, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t}, UInt64), queue, value) end function hsa_queue_add_write_index_scacquire(queue, value) - ccall((:hsa_queue_add_write_index_scacquire, libhsaruntime), UInt64, (Ptr{hsa_queue_t}, UInt64), queue, value) + ccall((:hsa_queue_add_write_index_scacquire, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t}, UInt64), queue, value) end function hsa_queue_add_write_index_relaxed(queue, value) - ccall((:hsa_queue_add_write_index_relaxed, libhsaruntime), UInt64, (Ptr{hsa_queue_t}, UInt64), queue, value) + ccall((:hsa_queue_add_write_index_relaxed, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t}, UInt64), queue, value) end function hsa_queue_add_write_index_release(queue, value) - ccall((:hsa_queue_add_write_index_release, libhsaruntime), UInt64, (Ptr{hsa_queue_t}, UInt64), queue, value) + ccall((:hsa_queue_add_write_index_release, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t}, UInt64), queue, value) end function hsa_queue_add_write_index_screlease(queue, value) - ccall((:hsa_queue_add_write_index_screlease, libhsaruntime), UInt64, (Ptr{hsa_queue_t}, UInt64), queue, value) + ccall((:hsa_queue_add_write_index_screlease, libhsa_runtime64), UInt64, (Ptr{hsa_queue_t}, UInt64), queue, value) end function hsa_queue_store_read_index_relaxed(queue, value) - ccall((:hsa_queue_store_read_index_relaxed, libhsaruntime), Cvoid, (Ptr{hsa_queue_t}, UInt64), queue, value) + ccall((:hsa_queue_store_read_index_relaxed, libhsa_runtime64), Cvoid, (Ptr{hsa_queue_t}, UInt64), queue, value) end function hsa_queue_store_read_index_release(queue, value) - ccall((:hsa_queue_store_read_index_release, libhsaruntime), Cvoid, (Ptr{hsa_queue_t}, UInt64), queue, value) + ccall((:hsa_queue_store_read_index_release, libhsa_runtime64), Cvoid, (Ptr{hsa_queue_t}, UInt64), queue, value) end function hsa_queue_store_read_index_screlease(queue, value) - ccall((:hsa_queue_store_read_index_screlease, libhsaruntime), Cvoid, (Ptr{hsa_queue_t}, UInt64), queue, value) + ccall((:hsa_queue_store_read_index_screlease, libhsa_runtime64), Cvoid, (Ptr{hsa_queue_t}, UInt64), queue, value) end @cenum hsa_packet_type_t::UInt32 begin @@ -799,35 +799,35 @@ end end function hsa_region_get_info(region, attribute, value) - ccall((:hsa_region_get_info, libhsaruntime), hsa_status_t, (hsa_region_t, hsa_region_info_t, Ptr{Cvoid}), region, attribute, value) + ccall((:hsa_region_get_info, libhsa_runtime64), hsa_status_t, (hsa_region_t, hsa_region_info_t, Ptr{Cvoid}), region, attribute, value) end function hsa_agent_iterate_regions(agent, callback, data) - ccall((:hsa_agent_iterate_regions, libhsaruntime), hsa_status_t, (hsa_agent_t, Ptr{Cvoid}, Ptr{Cvoid}), agent, callback, data) + ccall((:hsa_agent_iterate_regions, libhsa_runtime64), hsa_status_t, (hsa_agent_t, Ptr{Cvoid}, Ptr{Cvoid}), agent, callback, data) end function hsa_memory_allocate(region, size, ptr) - ccall((:hsa_memory_allocate, libhsaruntime), hsa_status_t, (hsa_region_t, Csize_t, Ptr{Ptr{Cvoid}}), region, size, ptr) + ccall((:hsa_memory_allocate, libhsa_runtime64), hsa_status_t, (hsa_region_t, Csize_t, Ptr{Ptr{Cvoid}}), region, size, ptr) end function hsa_memory_free(ptr) - ccall((:hsa_memory_free, libhsaruntime), hsa_status_t, (Ptr{Cvoid},), ptr) + ccall((:hsa_memory_free, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid},), ptr) end function hsa_memory_copy(dst, src, size) - ccall((:hsa_memory_copy, libhsaruntime), hsa_status_t, (Ptr{Cvoid}, Ptr{Cvoid}, Csize_t), dst, src, size) + ccall((:hsa_memory_copy, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid}, Ptr{Cvoid}, Csize_t), dst, src, size) end function hsa_memory_assign_agent(ptr, agent, access) - ccall((:hsa_memory_assign_agent, libhsaruntime), hsa_status_t, (Ptr{Cvoid}, hsa_agent_t, hsa_access_permission_t), ptr, agent, access) + ccall((:hsa_memory_assign_agent, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid}, hsa_agent_t, hsa_access_permission_t), ptr, agent, access) end function hsa_memory_register(ptr, size) - ccall((:hsa_memory_register, libhsaruntime), hsa_status_t, (Ptr{Cvoid}, Csize_t), ptr, size) + ccall((:hsa_memory_register, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid}, Csize_t), ptr, size) end function hsa_memory_deregister(ptr, size) - ccall((:hsa_memory_deregister, libhsaruntime), hsa_status_t, (Ptr{Cvoid}, Csize_t), ptr, size) + ccall((:hsa_memory_deregister, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid}, Csize_t), ptr, size) end struct hsa_isa_s @@ -837,11 +837,11 @@ end const hsa_isa_t = hsa_isa_s function hsa_isa_from_name(name, isa) - ccall((:hsa_isa_from_name, libhsaruntime), hsa_status_t, (Ptr{Cchar}, Ptr{hsa_isa_t}), name, isa) + ccall((:hsa_isa_from_name, libhsa_runtime64), hsa_status_t, (Ptr{Cchar}, Ptr{hsa_isa_t}), name, isa) end function hsa_agent_iterate_isas(agent, callback, data) - ccall((:hsa_agent_iterate_isas, libhsaruntime), hsa_status_t, (hsa_agent_t, Ptr{Cvoid}, Ptr{Cvoid}), agent, callback, data) + ccall((:hsa_agent_iterate_isas, libhsa_runtime64), hsa_status_t, (hsa_agent_t, Ptr{Cvoid}, Ptr{Cvoid}), agent, callback, data) end @cenum hsa_isa_info_t::UInt32 begin @@ -863,15 +863,15 @@ end end function hsa_isa_get_info(isa, attribute, index, value) - ccall((:hsa_isa_get_info, libhsaruntime), hsa_status_t, (hsa_isa_t, hsa_isa_info_t, UInt32, Ptr{Cvoid}), isa, attribute, index, value) + ccall((:hsa_isa_get_info, libhsa_runtime64), hsa_status_t, (hsa_isa_t, hsa_isa_info_t, UInt32, Ptr{Cvoid}), isa, attribute, index, value) end function hsa_isa_get_info_alt(isa, attribute, value) - ccall((:hsa_isa_get_info_alt, libhsaruntime), hsa_status_t, (hsa_isa_t, hsa_isa_info_t, Ptr{Cvoid}), isa, attribute, value) + ccall((:hsa_isa_get_info_alt, libhsa_runtime64), hsa_status_t, (hsa_isa_t, hsa_isa_info_t, Ptr{Cvoid}), isa, attribute, value) end function hsa_isa_get_exception_policies(isa, profile, mask) - ccall((:hsa_isa_get_exception_policies, libhsaruntime), hsa_status_t, (hsa_isa_t, hsa_profile_t, Ptr{UInt16}), isa, profile, mask) + ccall((:hsa_isa_get_exception_policies, libhsa_runtime64), hsa_status_t, (hsa_isa_t, hsa_profile_t, Ptr{UInt16}), isa, profile, mask) end @cenum hsa_fp_type_t::UInt32 begin @@ -891,7 +891,7 @@ end end function hsa_isa_get_round_method(isa, fp_type, flush_mode, round_method) - ccall((:hsa_isa_get_round_method, libhsaruntime), hsa_status_t, (hsa_isa_t, hsa_fp_type_t, hsa_flush_mode_t, Ptr{hsa_round_method_t}), isa, fp_type, flush_mode, round_method) + ccall((:hsa_isa_get_round_method, libhsa_runtime64), hsa_status_t, (hsa_isa_t, hsa_fp_type_t, hsa_flush_mode_t, Ptr{hsa_round_method_t}), isa, fp_type, flush_mode, round_method) end struct hsa_wavefront_s @@ -905,15 +905,15 @@ const hsa_wavefront_t = hsa_wavefront_s end function hsa_wavefront_get_info(wavefront, attribute, value) - ccall((:hsa_wavefront_get_info, libhsaruntime), hsa_status_t, (hsa_wavefront_t, hsa_wavefront_info_t, Ptr{Cvoid}), wavefront, attribute, value) + ccall((:hsa_wavefront_get_info, libhsa_runtime64), hsa_status_t, (hsa_wavefront_t, hsa_wavefront_info_t, Ptr{Cvoid}), wavefront, attribute, value) end function hsa_isa_iterate_wavefronts(isa, callback, data) - ccall((:hsa_isa_iterate_wavefronts, libhsaruntime), hsa_status_t, (hsa_isa_t, Ptr{Cvoid}, Ptr{Cvoid}), isa, callback, data) + ccall((:hsa_isa_iterate_wavefronts, libhsa_runtime64), hsa_status_t, (hsa_isa_t, Ptr{Cvoid}, Ptr{Cvoid}), isa, callback, data) end function hsa_isa_compatible(code_object_isa, agent_isa, result) - ccall((:hsa_isa_compatible, libhsaruntime), hsa_status_t, (hsa_isa_t, hsa_isa_t, Ptr{Bool}), code_object_isa, agent_isa, result) + ccall((:hsa_isa_compatible, libhsa_runtime64), hsa_status_t, (hsa_isa_t, hsa_isa_t, Ptr{Bool}), code_object_isa, agent_isa, result) end struct hsa_code_object_reader_s @@ -923,15 +923,15 @@ end const hsa_code_object_reader_t = hsa_code_object_reader_s function hsa_code_object_reader_create_from_file(file, code_object_reader) - ccall((:hsa_code_object_reader_create_from_file, libhsaruntime), hsa_status_t, (hsa_file_t, Ptr{hsa_code_object_reader_t}), file, code_object_reader) + ccall((:hsa_code_object_reader_create_from_file, libhsa_runtime64), hsa_status_t, (hsa_file_t, Ptr{hsa_code_object_reader_t}), file, code_object_reader) end function hsa_code_object_reader_create_from_memory(code_object, size, code_object_reader) - ccall((:hsa_code_object_reader_create_from_memory, libhsaruntime), hsa_status_t, (Ptr{Cvoid}, Csize_t, Ptr{hsa_code_object_reader_t}), code_object, size, code_object_reader) + ccall((:hsa_code_object_reader_create_from_memory, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid}, Csize_t, Ptr{hsa_code_object_reader_t}), code_object, size, code_object_reader) end function hsa_code_object_reader_destroy(code_object_reader) - ccall((:hsa_code_object_reader_destroy, libhsaruntime), hsa_status_t, (hsa_code_object_reader_t,), code_object_reader) + ccall((:hsa_code_object_reader_destroy, libhsa_runtime64), hsa_status_t, (hsa_code_object_reader_t,), code_object_reader) end struct hsa_executable_s @@ -946,15 +946,15 @@ const hsa_executable_t = hsa_executable_s end function hsa_executable_create(profile, executable_state, options, executable) - ccall((:hsa_executable_create, libhsaruntime), hsa_status_t, (hsa_profile_t, hsa_executable_state_t, Ptr{Cchar}, Ptr{hsa_executable_t}), profile, executable_state, options, executable) + ccall((:hsa_executable_create, libhsa_runtime64), hsa_status_t, (hsa_profile_t, hsa_executable_state_t, Ptr{Cchar}, Ptr{hsa_executable_t}), profile, executable_state, options, executable) end function hsa_executable_create_alt(profile, default_float_rounding_mode, options, executable) - ccall((:hsa_executable_create_alt, libhsaruntime), hsa_status_t, (hsa_profile_t, hsa_default_float_rounding_mode_t, Ptr{Cchar}, Ptr{hsa_executable_t}), profile, default_float_rounding_mode, options, executable) + ccall((:hsa_executable_create_alt, libhsa_runtime64), hsa_status_t, (hsa_profile_t, hsa_default_float_rounding_mode_t, Ptr{Cchar}, Ptr{hsa_executable_t}), profile, default_float_rounding_mode, options, executable) end function hsa_executable_destroy(executable) - ccall((:hsa_executable_destroy, libhsaruntime), hsa_status_t, (hsa_executable_t,), executable) + ccall((:hsa_executable_destroy, libhsa_runtime64), hsa_status_t, (hsa_executable_t,), executable) end struct hsa_loaded_code_object_s @@ -964,15 +964,15 @@ end const hsa_loaded_code_object_t = hsa_loaded_code_object_s function hsa_executable_load_program_code_object(executable, code_object_reader, options, loaded_code_object) - ccall((:hsa_executable_load_program_code_object, libhsaruntime), hsa_status_t, (hsa_executable_t, hsa_code_object_reader_t, Ptr{Cchar}, Ptr{hsa_loaded_code_object_t}), executable, code_object_reader, options, loaded_code_object) + ccall((:hsa_executable_load_program_code_object, libhsa_runtime64), hsa_status_t, (hsa_executable_t, hsa_code_object_reader_t, Ptr{Cchar}, Ptr{hsa_loaded_code_object_t}), executable, code_object_reader, options, loaded_code_object) end function hsa_executable_load_agent_code_object(executable, agent, code_object_reader, options, loaded_code_object) - ccall((:hsa_executable_load_agent_code_object, libhsaruntime), hsa_status_t, (hsa_executable_t, hsa_agent_t, hsa_code_object_reader_t, Ptr{Cchar}, Ptr{hsa_loaded_code_object_t}), executable, agent, code_object_reader, options, loaded_code_object) + ccall((:hsa_executable_load_agent_code_object, libhsa_runtime64), hsa_status_t, (hsa_executable_t, hsa_agent_t, hsa_code_object_reader_t, Ptr{Cchar}, Ptr{hsa_loaded_code_object_t}), executable, agent, code_object_reader, options, loaded_code_object) end function hsa_executable_freeze(executable, options) - ccall((:hsa_executable_freeze, libhsaruntime), hsa_status_t, (hsa_executable_t, Ptr{Cchar}), executable, options) + ccall((:hsa_executable_freeze, libhsa_runtime64), hsa_status_t, (hsa_executable_t, Ptr{Cchar}), executable, options) end @cenum hsa_executable_info_t::UInt32 begin @@ -982,27 +982,27 @@ end end function hsa_executable_get_info(executable, attribute, value) - ccall((:hsa_executable_get_info, libhsaruntime), hsa_status_t, (hsa_executable_t, hsa_executable_info_t, Ptr{Cvoid}), executable, attribute, value) + ccall((:hsa_executable_get_info, libhsa_runtime64), hsa_status_t, (hsa_executable_t, hsa_executable_info_t, Ptr{Cvoid}), executable, attribute, value) end function hsa_executable_global_variable_define(executable, variable_name, address) - ccall((:hsa_executable_global_variable_define, libhsaruntime), hsa_status_t, (hsa_executable_t, Ptr{Cchar}, Ptr{Cvoid}), executable, variable_name, address) + ccall((:hsa_executable_global_variable_define, libhsa_runtime64), hsa_status_t, (hsa_executable_t, Ptr{Cchar}, Ptr{Cvoid}), executable, variable_name, address) end function hsa_executable_agent_global_variable_define(executable, agent, variable_name, address) - ccall((:hsa_executable_agent_global_variable_define, libhsaruntime), hsa_status_t, (hsa_executable_t, hsa_agent_t, Ptr{Cchar}, Ptr{Cvoid}), executable, agent, variable_name, address) + ccall((:hsa_executable_agent_global_variable_define, libhsa_runtime64), hsa_status_t, (hsa_executable_t, hsa_agent_t, Ptr{Cchar}, Ptr{Cvoid}), executable, agent, variable_name, address) end function hsa_executable_readonly_variable_define(executable, agent, variable_name, address) - ccall((:hsa_executable_readonly_variable_define, libhsaruntime), hsa_status_t, (hsa_executable_t, hsa_agent_t, Ptr{Cchar}, Ptr{Cvoid}), executable, agent, variable_name, address) + ccall((:hsa_executable_readonly_variable_define, libhsa_runtime64), hsa_status_t, (hsa_executable_t, hsa_agent_t, Ptr{Cchar}, Ptr{Cvoid}), executable, agent, variable_name, address) end function hsa_executable_validate(executable, result) - ccall((:hsa_executable_validate, libhsaruntime), hsa_status_t, (hsa_executable_t, Ptr{UInt32}), executable, result) + ccall((:hsa_executable_validate, libhsa_runtime64), hsa_status_t, (hsa_executable_t, Ptr{UInt32}), executable, result) end function hsa_executable_validate_alt(executable, options, result) - ccall((:hsa_executable_validate_alt, libhsaruntime), hsa_status_t, (hsa_executable_t, Ptr{Cchar}, Ptr{UInt32}), executable, options, result) + ccall((:hsa_executable_validate_alt, libhsa_runtime64), hsa_status_t, (hsa_executable_t, Ptr{Cchar}, Ptr{UInt32}), executable, options, result) end struct hsa_executable_symbol_s @@ -1012,11 +1012,11 @@ end const hsa_executable_symbol_t = hsa_executable_symbol_s function hsa_executable_get_symbol(executable, module_name, symbol_name, agent, call_convention, symbol) - ccall((:hsa_executable_get_symbol, libhsaruntime), hsa_status_t, (hsa_executable_t, Ptr{Cchar}, Ptr{Cchar}, hsa_agent_t, Int32, Ptr{hsa_executable_symbol_t}), executable, module_name, symbol_name, agent, call_convention, symbol) + ccall((:hsa_executable_get_symbol, libhsa_runtime64), hsa_status_t, (hsa_executable_t, Ptr{Cchar}, Ptr{Cchar}, hsa_agent_t, Int32, Ptr{hsa_executable_symbol_t}), executable, module_name, symbol_name, agent, call_convention, symbol) end function hsa_executable_get_symbol_by_name(executable, symbol_name, agent, symbol) - ccall((:hsa_executable_get_symbol_by_name, libhsaruntime), hsa_status_t, (hsa_executable_t, Ptr{Cchar}, Ptr{hsa_agent_t}, Ptr{hsa_executable_symbol_t}), executable, symbol_name, agent, symbol) + ccall((:hsa_executable_get_symbol_by_name, libhsa_runtime64), hsa_status_t, (hsa_executable_t, Ptr{Cchar}, Ptr{hsa_agent_t}, Ptr{hsa_executable_symbol_t}), executable, symbol_name, agent, symbol) end @cenum hsa_symbol_kind_t::UInt32 begin @@ -1067,19 +1067,19 @@ end end function hsa_executable_symbol_get_info(executable_symbol, attribute, value) - ccall((:hsa_executable_symbol_get_info, libhsaruntime), hsa_status_t, (hsa_executable_symbol_t, hsa_executable_symbol_info_t, Ptr{Cvoid}), executable_symbol, attribute, value) + ccall((:hsa_executable_symbol_get_info, libhsa_runtime64), hsa_status_t, (hsa_executable_symbol_t, hsa_executable_symbol_info_t, Ptr{Cvoid}), executable_symbol, attribute, value) end function hsa_executable_iterate_symbols(executable, callback, data) - ccall((:hsa_executable_iterate_symbols, libhsaruntime), hsa_status_t, (hsa_executable_t, Ptr{Cvoid}, Ptr{Cvoid}), executable, callback, data) + ccall((:hsa_executable_iterate_symbols, libhsa_runtime64), hsa_status_t, (hsa_executable_t, Ptr{Cvoid}, Ptr{Cvoid}), executable, callback, data) end function hsa_executable_iterate_agent_symbols(executable, agent, callback, data) - ccall((:hsa_executable_iterate_agent_symbols, libhsaruntime), hsa_status_t, (hsa_executable_t, hsa_agent_t, Ptr{Cvoid}, Ptr{Cvoid}), executable, agent, callback, data) + ccall((:hsa_executable_iterate_agent_symbols, libhsa_runtime64), hsa_status_t, (hsa_executable_t, hsa_agent_t, Ptr{Cvoid}, Ptr{Cvoid}), executable, agent, callback, data) end function hsa_executable_iterate_program_symbols(executable, callback, data) - ccall((:hsa_executable_iterate_program_symbols, libhsaruntime), hsa_status_t, (hsa_executable_t, Ptr{Cvoid}, Ptr{Cvoid}), executable, callback, data) + ccall((:hsa_executable_iterate_program_symbols, libhsa_runtime64), hsa_status_t, (hsa_executable_t, Ptr{Cvoid}, Ptr{Cvoid}), executable, callback, data) end struct hsa_code_object_s @@ -1095,15 +1095,15 @@ end const hsa_callback_data_t = hsa_callback_data_s function hsa_code_object_serialize(code_object, alloc_callback, callback_data, options, serialized_code_object, serialized_code_object_size) - ccall((:hsa_code_object_serialize, libhsaruntime), hsa_status_t, (hsa_code_object_t, Ptr{Cvoid}, hsa_callback_data_t, Ptr{Cchar}, Ptr{Ptr{Cvoid}}, Ptr{Csize_t}), code_object, alloc_callback, callback_data, options, serialized_code_object, serialized_code_object_size) + ccall((:hsa_code_object_serialize, libhsa_runtime64), hsa_status_t, (hsa_code_object_t, Ptr{Cvoid}, hsa_callback_data_t, Ptr{Cchar}, Ptr{Ptr{Cvoid}}, Ptr{Csize_t}), code_object, alloc_callback, callback_data, options, serialized_code_object, serialized_code_object_size) end function hsa_code_object_deserialize(serialized_code_object, serialized_code_object_size, options, code_object) - ccall((:hsa_code_object_deserialize, libhsaruntime), hsa_status_t, (Ptr{Cvoid}, Csize_t, Ptr{Cchar}, Ptr{hsa_code_object_t}), serialized_code_object, serialized_code_object_size, options, code_object) + ccall((:hsa_code_object_deserialize, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid}, Csize_t, Ptr{Cchar}, Ptr{hsa_code_object_t}), serialized_code_object, serialized_code_object_size, options, code_object) end function hsa_code_object_destroy(code_object) - ccall((:hsa_code_object_destroy, libhsaruntime), hsa_status_t, (hsa_code_object_t,), code_object) + ccall((:hsa_code_object_destroy, libhsa_runtime64), hsa_status_t, (hsa_code_object_t,), code_object) end @cenum hsa_code_object_type_t::UInt32 begin @@ -1120,11 +1120,11 @@ end end function hsa_code_object_get_info(code_object, attribute, value) - ccall((:hsa_code_object_get_info, libhsaruntime), hsa_status_t, (hsa_code_object_t, hsa_code_object_info_t, Ptr{Cvoid}), code_object, attribute, value) + ccall((:hsa_code_object_get_info, libhsa_runtime64), hsa_status_t, (hsa_code_object_t, hsa_code_object_info_t, Ptr{Cvoid}), code_object, attribute, value) end function hsa_executable_load_code_object(executable, agent, code_object, options) - ccall((:hsa_executable_load_code_object, libhsaruntime), hsa_status_t, (hsa_executable_t, hsa_agent_t, hsa_code_object_t, Ptr{Cchar}), executable, agent, code_object, options) + ccall((:hsa_executable_load_code_object, libhsa_runtime64), hsa_status_t, (hsa_executable_t, hsa_agent_t, hsa_code_object_t, Ptr{Cchar}), executable, agent, code_object, options) end struct hsa_code_symbol_s @@ -1134,11 +1134,11 @@ end const hsa_code_symbol_t = hsa_code_symbol_s function hsa_code_object_get_symbol(code_object, symbol_name, symbol) - ccall((:hsa_code_object_get_symbol, libhsaruntime), hsa_status_t, (hsa_code_object_t, Ptr{Cchar}, Ptr{hsa_code_symbol_t}), code_object, symbol_name, symbol) + ccall((:hsa_code_object_get_symbol, libhsa_runtime64), hsa_status_t, (hsa_code_object_t, Ptr{Cchar}, Ptr{hsa_code_symbol_t}), code_object, symbol_name, symbol) end function hsa_code_object_get_symbol_from_name(code_object, module_name, symbol_name, symbol) - ccall((:hsa_code_object_get_symbol_from_name, libhsaruntime), hsa_status_t, (hsa_code_object_t, Ptr{Cchar}, Ptr{Cchar}, Ptr{hsa_code_symbol_t}), code_object, module_name, symbol_name, symbol) + ccall((:hsa_code_object_get_symbol_from_name, libhsa_runtime64), hsa_status_t, (hsa_code_object_t, Ptr{Cchar}, Ptr{Cchar}, Ptr{hsa_code_symbol_t}), code_object, module_name, symbol_name, symbol) end @cenum hsa_code_symbol_info_t::UInt32 begin @@ -1164,11 +1164,11 @@ end end function hsa_code_symbol_get_info(code_symbol, attribute, value) - ccall((:hsa_code_symbol_get_info, libhsaruntime), hsa_status_t, (hsa_code_symbol_t, hsa_code_symbol_info_t, Ptr{Cvoid}), code_symbol, attribute, value) + ccall((:hsa_code_symbol_get_info, libhsa_runtime64), hsa_status_t, (hsa_code_symbol_t, hsa_code_symbol_info_t, Ptr{Cvoid}), code_symbol, attribute, value) end function hsa_code_object_iterate_symbols(code_object, callback, data) - ccall((:hsa_code_object_iterate_symbols, libhsaruntime), hsa_status_t, (hsa_code_object_t, Ptr{Cvoid}, Ptr{Cvoid}), code_object, callback, data) + ccall((:hsa_code_object_iterate_symbols, libhsa_runtime64), hsa_status_t, (hsa_code_object_t, Ptr{Cvoid}, Ptr{Cvoid}), code_object, callback, data) end @cenum var"##Ctag#317"::UInt32 begin @@ -1290,11 +1290,11 @@ end end function hsa_ext_image_get_capability(agent, geometry, image_format, capability_mask) - ccall((:hsa_ext_image_get_capability, libhsaruntime), hsa_status_t, (hsa_agent_t, hsa_ext_image_geometry_t, Ptr{hsa_ext_image_format_t}, Ptr{UInt32}), agent, geometry, image_format, capability_mask) + ccall((:hsa_ext_image_get_capability, libhsa_runtime64), hsa_status_t, (hsa_agent_t, hsa_ext_image_geometry_t, Ptr{hsa_ext_image_format_t}, Ptr{UInt32}), agent, geometry, image_format, capability_mask) end function hsa_ext_image_get_capability_with_layout(agent, geometry, image_format, image_data_layout, capability_mask) - ccall((:hsa_ext_image_get_capability_with_layout, libhsaruntime), hsa_status_t, (hsa_agent_t, hsa_ext_image_geometry_t, Ptr{hsa_ext_image_format_t}, hsa_ext_image_data_layout_t, Ptr{UInt32}), agent, geometry, image_format, image_data_layout, capability_mask) + ccall((:hsa_ext_image_get_capability_with_layout, libhsa_runtime64), hsa_status_t, (hsa_agent_t, hsa_ext_image_geometry_t, Ptr{hsa_ext_image_format_t}, hsa_ext_image_data_layout_t, Ptr{UInt32}), agent, geometry, image_format, image_data_layout, capability_mask) end struct hsa_ext_image_data_info_s @@ -1305,27 +1305,27 @@ end const hsa_ext_image_data_info_t = hsa_ext_image_data_info_s function hsa_ext_image_data_get_info(agent, image_descriptor, access_permission, image_data_info) - ccall((:hsa_ext_image_data_get_info, libhsaruntime), hsa_status_t, (hsa_agent_t, Ptr{hsa_ext_image_descriptor_t}, hsa_access_permission_t, Ptr{hsa_ext_image_data_info_t}), agent, image_descriptor, access_permission, image_data_info) + ccall((:hsa_ext_image_data_get_info, libhsa_runtime64), hsa_status_t, (hsa_agent_t, Ptr{hsa_ext_image_descriptor_t}, hsa_access_permission_t, Ptr{hsa_ext_image_data_info_t}), agent, image_descriptor, access_permission, image_data_info) end function hsa_ext_image_data_get_info_with_layout(agent, image_descriptor, access_permission, image_data_layout, image_data_row_pitch, image_data_slice_pitch, image_data_info) - ccall((:hsa_ext_image_data_get_info_with_layout, libhsaruntime), hsa_status_t, (hsa_agent_t, Ptr{hsa_ext_image_descriptor_t}, hsa_access_permission_t, hsa_ext_image_data_layout_t, Csize_t, Csize_t, Ptr{hsa_ext_image_data_info_t}), agent, image_descriptor, access_permission, image_data_layout, image_data_row_pitch, image_data_slice_pitch, image_data_info) + ccall((:hsa_ext_image_data_get_info_with_layout, libhsa_runtime64), hsa_status_t, (hsa_agent_t, Ptr{hsa_ext_image_descriptor_t}, hsa_access_permission_t, hsa_ext_image_data_layout_t, Csize_t, Csize_t, Ptr{hsa_ext_image_data_info_t}), agent, image_descriptor, access_permission, image_data_layout, image_data_row_pitch, image_data_slice_pitch, image_data_info) end function hsa_ext_image_create(agent, image_descriptor, image_data, access_permission, image) - ccall((:hsa_ext_image_create, libhsaruntime), hsa_status_t, (hsa_agent_t, Ptr{hsa_ext_image_descriptor_t}, Ptr{Cvoid}, hsa_access_permission_t, Ptr{hsa_ext_image_t}), agent, image_descriptor, image_data, access_permission, image) + ccall((:hsa_ext_image_create, libhsa_runtime64), hsa_status_t, (hsa_agent_t, Ptr{hsa_ext_image_descriptor_t}, Ptr{Cvoid}, hsa_access_permission_t, Ptr{hsa_ext_image_t}), agent, image_descriptor, image_data, access_permission, image) end function hsa_ext_image_create_with_layout(agent, image_descriptor, image_data, access_permission, image_data_layout, image_data_row_pitch, image_data_slice_pitch, image) - ccall((:hsa_ext_image_create_with_layout, libhsaruntime), hsa_status_t, (hsa_agent_t, Ptr{hsa_ext_image_descriptor_t}, Ptr{Cvoid}, hsa_access_permission_t, hsa_ext_image_data_layout_t, Csize_t, Csize_t, Ptr{hsa_ext_image_t}), agent, image_descriptor, image_data, access_permission, image_data_layout, image_data_row_pitch, image_data_slice_pitch, image) + ccall((:hsa_ext_image_create_with_layout, libhsa_runtime64), hsa_status_t, (hsa_agent_t, Ptr{hsa_ext_image_descriptor_t}, Ptr{Cvoid}, hsa_access_permission_t, hsa_ext_image_data_layout_t, Csize_t, Csize_t, Ptr{hsa_ext_image_t}), agent, image_descriptor, image_data, access_permission, image_data_layout, image_data_row_pitch, image_data_slice_pitch, image) end function hsa_ext_image_destroy(agent, image) - ccall((:hsa_ext_image_destroy, libhsaruntime), hsa_status_t, (hsa_agent_t, hsa_ext_image_t), agent, image) + ccall((:hsa_ext_image_destroy, libhsa_runtime64), hsa_status_t, (hsa_agent_t, hsa_ext_image_t), agent, image) end function hsa_ext_image_copy(agent, src_image, src_offset, dst_image, dst_offset, range) - ccall((:hsa_ext_image_copy, libhsaruntime), hsa_status_t, (hsa_agent_t, hsa_ext_image_t, Ptr{hsa_dim3_t}, hsa_ext_image_t, Ptr{hsa_dim3_t}, Ptr{hsa_dim3_t}), agent, src_image, src_offset, dst_image, dst_offset, range) + ccall((:hsa_ext_image_copy, libhsa_runtime64), hsa_status_t, (hsa_agent_t, hsa_ext_image_t, Ptr{hsa_dim3_t}, hsa_ext_image_t, Ptr{hsa_dim3_t}, Ptr{hsa_dim3_t}), agent, src_image, src_offset, dst_image, dst_offset, range) end struct hsa_ext_image_region_s @@ -1336,15 +1336,15 @@ end const hsa_ext_image_region_t = hsa_ext_image_region_s function hsa_ext_image_import(agent, src_memory, src_row_pitch, src_slice_pitch, dst_image, image_region) - ccall((:hsa_ext_image_import, libhsaruntime), hsa_status_t, (hsa_agent_t, Ptr{Cvoid}, Csize_t, Csize_t, hsa_ext_image_t, Ptr{hsa_ext_image_region_t}), agent, src_memory, src_row_pitch, src_slice_pitch, dst_image, image_region) + ccall((:hsa_ext_image_import, libhsa_runtime64), hsa_status_t, (hsa_agent_t, Ptr{Cvoid}, Csize_t, Csize_t, hsa_ext_image_t, Ptr{hsa_ext_image_region_t}), agent, src_memory, src_row_pitch, src_slice_pitch, dst_image, image_region) end function hsa_ext_image_export(agent, src_image, dst_memory, dst_row_pitch, dst_slice_pitch, image_region) - ccall((:hsa_ext_image_export, libhsaruntime), hsa_status_t, (hsa_agent_t, hsa_ext_image_t, Ptr{Cvoid}, Csize_t, Csize_t, Ptr{hsa_ext_image_region_t}), agent, src_image, dst_memory, dst_row_pitch, dst_slice_pitch, image_region) + ccall((:hsa_ext_image_export, libhsa_runtime64), hsa_status_t, (hsa_agent_t, hsa_ext_image_t, Ptr{Cvoid}, Csize_t, Csize_t, Ptr{hsa_ext_image_region_t}), agent, src_image, dst_memory, dst_row_pitch, dst_slice_pitch, image_region) end function hsa_ext_image_clear(agent, image, data, image_region) - ccall((:hsa_ext_image_clear, libhsaruntime), hsa_status_t, (hsa_agent_t, hsa_ext_image_t, Ptr{Cvoid}, Ptr{hsa_ext_image_region_t}), agent, image, data, image_region) + ccall((:hsa_ext_image_clear, libhsa_runtime64), hsa_status_t, (hsa_agent_t, hsa_ext_image_t, Ptr{Cvoid}, Ptr{hsa_ext_image_region_t}), agent, image, data, image_region) end struct hsa_ext_sampler_s @@ -1386,11 +1386,11 @@ end const hsa_ext_sampler_descriptor_t = hsa_ext_sampler_descriptor_s function hsa_ext_sampler_create(agent, sampler_descriptor, sampler) - ccall((:hsa_ext_sampler_create, libhsaruntime), hsa_status_t, (hsa_agent_t, Ptr{hsa_ext_sampler_descriptor_t}, Ptr{hsa_ext_sampler_t}), agent, sampler_descriptor, sampler) + ccall((:hsa_ext_sampler_create, libhsa_runtime64), hsa_status_t, (hsa_agent_t, Ptr{hsa_ext_sampler_descriptor_t}, Ptr{hsa_ext_sampler_t}), agent, sampler_descriptor, sampler) end function hsa_ext_sampler_destroy(agent, sampler) - ccall((:hsa_ext_sampler_destroy, libhsaruntime), hsa_status_t, (hsa_agent_t, hsa_ext_sampler_t), agent, sampler) + ccall((:hsa_ext_sampler_destroy, libhsa_runtime64), hsa_status_t, (hsa_agent_t, hsa_ext_sampler_t), agent, sampler) end struct hsa_ext_images_1_00_pfn_s @@ -1511,11 +1511,11 @@ end const hsa_amd_coherency_type_t = hsa_amd_coherency_type_s function hsa_amd_coherency_get_type(agent, type) - ccall((:hsa_amd_coherency_get_type, libhsaruntime), hsa_status_t, (hsa_agent_t, Ptr{hsa_amd_coherency_type_t}), agent, type) + ccall((:hsa_amd_coherency_get_type, libhsa_runtime64), hsa_status_t, (hsa_agent_t, Ptr{hsa_amd_coherency_type_t}), agent, type) end function hsa_amd_coherency_set_type(agent, type) - ccall((:hsa_amd_coherency_set_type, libhsaruntime), hsa_status_t, (hsa_agent_t, hsa_amd_coherency_type_t), agent, type) + ccall((:hsa_amd_coherency_set_type, libhsa_runtime64), hsa_status_t, (hsa_agent_t, hsa_amd_coherency_type_t), agent, type) end struct hsa_amd_profiling_dispatch_time_s @@ -1533,23 +1533,23 @@ end const hsa_amd_profiling_async_copy_time_t = hsa_amd_profiling_async_copy_time_s function hsa_amd_profiling_set_profiler_enabled(queue, enable) - ccall((:hsa_amd_profiling_set_profiler_enabled, libhsaruntime), hsa_status_t, (Ptr{hsa_queue_t}, Cint), queue, enable) + ccall((:hsa_amd_profiling_set_profiler_enabled, libhsa_runtime64), hsa_status_t, (Ptr{hsa_queue_t}, Cint), queue, enable) end function hsa_amd_profiling_async_copy_enable(enable) - ccall((:hsa_amd_profiling_async_copy_enable, libhsaruntime), hsa_status_t, (Bool,), enable) + ccall((:hsa_amd_profiling_async_copy_enable, libhsa_runtime64), hsa_status_t, (Bool,), enable) end function hsa_amd_profiling_get_dispatch_time(agent, signal, time) - ccall((:hsa_amd_profiling_get_dispatch_time, libhsaruntime), hsa_status_t, (hsa_agent_t, hsa_signal_t, Ptr{hsa_amd_profiling_dispatch_time_t}), agent, signal, time) + ccall((:hsa_amd_profiling_get_dispatch_time, libhsa_runtime64), hsa_status_t, (hsa_agent_t, hsa_signal_t, Ptr{hsa_amd_profiling_dispatch_time_t}), agent, signal, time) end function hsa_amd_profiling_get_async_copy_time(signal, time) - ccall((:hsa_amd_profiling_get_async_copy_time, libhsaruntime), hsa_status_t, (hsa_signal_t, Ptr{hsa_amd_profiling_async_copy_time_t}), signal, time) + ccall((:hsa_amd_profiling_get_async_copy_time, libhsa_runtime64), hsa_status_t, (hsa_signal_t, Ptr{hsa_amd_profiling_async_copy_time_t}), signal, time) end function hsa_amd_profiling_convert_tick_to_system_domain(agent, agent_tick, system_tick) - ccall((:hsa_amd_profiling_convert_tick_to_system_domain, libhsaruntime), hsa_status_t, (hsa_agent_t, UInt64, Ptr{UInt64}), agent, agent_tick, system_tick) + ccall((:hsa_amd_profiling_convert_tick_to_system_domain, libhsa_runtime64), hsa_status_t, (hsa_agent_t, UInt64, Ptr{UInt64}), agent, agent_tick, system_tick) end @cenum hsa_amd_signal_attribute_t::UInt32 begin @@ -1558,34 +1558,34 @@ end end function hsa_amd_signal_create(initial_value, num_consumers, consumers, attributes, signal) - ccall((:hsa_amd_signal_create, libhsaruntime), hsa_status_t, (hsa_signal_value_t, UInt32, Ptr{hsa_agent_t}, UInt64, Ptr{hsa_signal_t}), initial_value, num_consumers, consumers, attributes, signal) + ccall((:hsa_amd_signal_create, libhsa_runtime64), hsa_status_t, (hsa_signal_value_t, UInt32, Ptr{hsa_agent_t}, UInt64, Ptr{hsa_signal_t}), initial_value, num_consumers, consumers, attributes, signal) end function hsa_amd_signal_value_pointer(signal, value_ptr) - ccall((:hsa_amd_signal_value_pointer, libhsaruntime), hsa_status_t, (hsa_signal_t, Ptr{Ptr{hsa_signal_value_t}}), signal, value_ptr) + ccall((:hsa_amd_signal_value_pointer, libhsa_runtime64), hsa_status_t, (hsa_signal_t, Ptr{Ptr{hsa_signal_value_t}}), signal, value_ptr) end # typedef bool ( * hsa_amd_signal_handler ) ( hsa_signal_value_t value , void * arg ) const hsa_amd_signal_handler = Ptr{Cvoid} function hsa_amd_signal_async_handler(signal, cond, value, handler, arg) - ccall((:hsa_amd_signal_async_handler, libhsaruntime), hsa_status_t, (hsa_signal_t, hsa_signal_condition_t, hsa_signal_value_t, hsa_amd_signal_handler, Ptr{Cvoid}), signal, cond, value, handler, arg) + ccall((:hsa_amd_signal_async_handler, libhsa_runtime64), hsa_status_t, (hsa_signal_t, hsa_signal_condition_t, hsa_signal_value_t, hsa_amd_signal_handler, Ptr{Cvoid}), signal, cond, value, handler, arg) end function hsa_amd_async_function(callback, arg) - ccall((:hsa_amd_async_function, libhsaruntime), hsa_status_t, (Ptr{Cvoid}, Ptr{Cvoid}), callback, arg) + ccall((:hsa_amd_async_function, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid}, Ptr{Cvoid}), callback, arg) end function hsa_amd_signal_wait_any(signal_count, signals, conds, values, timeout_hint, wait_hint, satisfying_value) - ccall((:hsa_amd_signal_wait_any, libhsaruntime), UInt32, (UInt32, Ptr{hsa_signal_t}, Ptr{hsa_signal_condition_t}, Ptr{hsa_signal_value_t}, UInt64, hsa_wait_state_t, Ptr{hsa_signal_value_t}), signal_count, signals, conds, values, timeout_hint, wait_hint, satisfying_value) + ccall((:hsa_amd_signal_wait_any, libhsa_runtime64), UInt32, (UInt32, Ptr{hsa_signal_t}, Ptr{hsa_signal_condition_t}, Ptr{hsa_signal_value_t}, UInt64, hsa_wait_state_t, Ptr{hsa_signal_value_t}), signal_count, signals, conds, values, timeout_hint, wait_hint, satisfying_value) end function hsa_amd_image_get_info_max_dim(agent, attribute, value) - ccall((:hsa_amd_image_get_info_max_dim, libhsaruntime), hsa_status_t, (hsa_agent_t, hsa_agent_info_t, Ptr{Cvoid}), agent, attribute, value) + ccall((:hsa_amd_image_get_info_max_dim, libhsa_runtime64), hsa_status_t, (hsa_agent_t, hsa_agent_info_t, Ptr{Cvoid}), agent, attribute, value) end function hsa_amd_queue_cu_set_mask(queue, num_cu_mask_count, cu_mask) - ccall((:hsa_amd_queue_cu_set_mask, libhsaruntime), hsa_status_t, (Ptr{hsa_queue_t}, UInt32, Ptr{UInt32}), queue, num_cu_mask_count, cu_mask) + ccall((:hsa_amd_queue_cu_set_mask, libhsa_runtime64), hsa_status_t, (Ptr{hsa_queue_t}, UInt32, Ptr{UInt32}), queue, num_cu_mask_count, cu_mask) end @cenum hsa_amd_segment_t::UInt32 begin @@ -1621,23 +1621,23 @@ const hsa_amd_memory_pool_global_flag_t = hsa_amd_memory_pool_global_flag_s end function hsa_amd_memory_pool_get_info(memory_pool, attribute, value) - ccall((:hsa_amd_memory_pool_get_info, libhsaruntime), hsa_status_t, (hsa_amd_memory_pool_t, hsa_amd_memory_pool_info_t, Ptr{Cvoid}), memory_pool, attribute, value) + ccall((:hsa_amd_memory_pool_get_info, libhsa_runtime64), hsa_status_t, (hsa_amd_memory_pool_t, hsa_amd_memory_pool_info_t, Ptr{Cvoid}), memory_pool, attribute, value) end function hsa_amd_agent_iterate_memory_pools(agent, callback, data) - ccall((:hsa_amd_agent_iterate_memory_pools, libhsaruntime), hsa_status_t, (hsa_agent_t, Ptr{Cvoid}, Ptr{Cvoid}), agent, callback, data) + ccall((:hsa_amd_agent_iterate_memory_pools, libhsa_runtime64), hsa_status_t, (hsa_agent_t, Ptr{Cvoid}, Ptr{Cvoid}), agent, callback, data) end function hsa_amd_memory_pool_allocate(memory_pool, size, flags, ptr) - ccall((:hsa_amd_memory_pool_allocate, libhsaruntime), hsa_status_t, (hsa_amd_memory_pool_t, Csize_t, UInt32, Ptr{Ptr{Cvoid}}), memory_pool, size, flags, ptr) + ccall((:hsa_amd_memory_pool_allocate, libhsa_runtime64), hsa_status_t, (hsa_amd_memory_pool_t, Csize_t, UInt32, Ptr{Ptr{Cvoid}}), memory_pool, size, flags, ptr) end function hsa_amd_memory_pool_free(ptr) - ccall((:hsa_amd_memory_pool_free, libhsaruntime), hsa_status_t, (Ptr{Cvoid},), ptr) + ccall((:hsa_amd_memory_pool_free, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid},), ptr) end function hsa_amd_memory_async_copy(dst, dst_agent, src, src_agent, size, num_dep_signals, dep_signals, completion_signal) - ccall((:hsa_amd_memory_async_copy, libhsaruntime), hsa_status_t, (Ptr{Cvoid}, hsa_agent_t, Ptr{Cvoid}, hsa_agent_t, Csize_t, UInt32, Ptr{hsa_signal_t}, hsa_signal_t), dst, dst_agent, src, src_agent, size, num_dep_signals, dep_signals, completion_signal) + ccall((:hsa_amd_memory_async_copy, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid}, hsa_agent_t, Ptr{Cvoid}, hsa_agent_t, Csize_t, UInt32, Ptr{hsa_signal_t}, hsa_signal_t), dst, dst_agent, src, src_agent, size, num_dep_signals, dep_signals, completion_signal) end struct hsa_pitched_ptr_s @@ -1656,7 +1656,7 @@ const hsa_pitched_ptr_t = hsa_pitched_ptr_s end function hsa_amd_memory_async_copy_rect(dst, dst_offset, src, src_offset, range, copy_agent, dir, num_dep_signals, dep_signals, completion_signal) - ccall((:hsa_amd_memory_async_copy_rect, libhsaruntime), hsa_status_t, (Ptr{hsa_pitched_ptr_t}, Ptr{hsa_dim3_t}, Ptr{hsa_pitched_ptr_t}, Ptr{hsa_dim3_t}, Ptr{hsa_dim3_t}, hsa_agent_t, hsa_amd_copy_direction_t, UInt32, Ptr{hsa_signal_t}, hsa_signal_t), dst, dst_offset, src, src_offset, range, copy_agent, dir, num_dep_signals, dep_signals, completion_signal) + ccall((:hsa_amd_memory_async_copy_rect, libhsa_runtime64), hsa_status_t, (Ptr{hsa_pitched_ptr_t}, Ptr{hsa_dim3_t}, Ptr{hsa_pitched_ptr_t}, Ptr{hsa_dim3_t}, Ptr{hsa_dim3_t}, hsa_agent_t, hsa_amd_copy_direction_t, UInt32, Ptr{hsa_signal_t}, hsa_signal_t), dst, dst_offset, src, src_offset, range, copy_agent, dir, num_dep_signals, dep_signals, completion_signal) end @cenum hsa_amd_memory_pool_access_t::UInt32 begin @@ -1694,43 +1694,43 @@ const hsa_amd_memory_pool_link_info_t = hsa_amd_memory_pool_link_info_s end function hsa_amd_agent_memory_pool_get_info(agent, memory_pool, attribute, value) - ccall((:hsa_amd_agent_memory_pool_get_info, libhsaruntime), hsa_status_t, (hsa_agent_t, hsa_amd_memory_pool_t, hsa_amd_agent_memory_pool_info_t, Ptr{Cvoid}), agent, memory_pool, attribute, value) + ccall((:hsa_amd_agent_memory_pool_get_info, libhsa_runtime64), hsa_status_t, (hsa_agent_t, hsa_amd_memory_pool_t, hsa_amd_agent_memory_pool_info_t, Ptr{Cvoid}), agent, memory_pool, attribute, value) end function hsa_amd_agents_allow_access(num_agents, agents, flags, ptr) - ccall((:hsa_amd_agents_allow_access, libhsaruntime), hsa_status_t, (UInt32, Ptr{hsa_agent_t}, Ptr{UInt32}, Ptr{Cvoid}), num_agents, agents, flags, ptr) + ccall((:hsa_amd_agents_allow_access, libhsa_runtime64), hsa_status_t, (UInt32, Ptr{hsa_agent_t}, Ptr{UInt32}, Ptr{Cvoid}), num_agents, agents, flags, ptr) end function hsa_amd_memory_pool_can_migrate(src_memory_pool, dst_memory_pool, result) - ccall((:hsa_amd_memory_pool_can_migrate, libhsaruntime), hsa_status_t, (hsa_amd_memory_pool_t, hsa_amd_memory_pool_t, Ptr{Bool}), src_memory_pool, dst_memory_pool, result) + ccall((:hsa_amd_memory_pool_can_migrate, libhsa_runtime64), hsa_status_t, (hsa_amd_memory_pool_t, hsa_amd_memory_pool_t, Ptr{Bool}), src_memory_pool, dst_memory_pool, result) end function hsa_amd_memory_migrate(ptr, memory_pool, flags) - ccall((:hsa_amd_memory_migrate, libhsaruntime), hsa_status_t, (Ptr{Cvoid}, hsa_amd_memory_pool_t, UInt32), ptr, memory_pool, flags) + ccall((:hsa_amd_memory_migrate, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid}, hsa_amd_memory_pool_t, UInt32), ptr, memory_pool, flags) end function hsa_amd_memory_lock(host_ptr, size, agents, num_agent, agent_ptr) - ccall((:hsa_amd_memory_lock, libhsaruntime), hsa_status_t, (Ptr{Cvoid}, Csize_t, Ptr{hsa_agent_t}, Cint, Ptr{Ptr{Cvoid}}), host_ptr, size, agents, num_agent, agent_ptr) + ccall((:hsa_amd_memory_lock, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid}, Csize_t, Ptr{hsa_agent_t}, Cint, Ptr{Ptr{Cvoid}}), host_ptr, size, agents, num_agent, agent_ptr) end function hsa_amd_memory_lock_to_pool(host_ptr, size, agents, num_agent, pool, flags, agent_ptr) - ccall((:hsa_amd_memory_lock_to_pool, libhsaruntime), hsa_status_t, (Ptr{Cvoid}, Csize_t, Ptr{hsa_agent_t}, Cint, hsa_amd_memory_pool_t, UInt32, Ptr{Ptr{Cvoid}}), host_ptr, size, agents, num_agent, pool, flags, agent_ptr) + ccall((:hsa_amd_memory_lock_to_pool, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid}, Csize_t, Ptr{hsa_agent_t}, Cint, hsa_amd_memory_pool_t, UInt32, Ptr{Ptr{Cvoid}}), host_ptr, size, agents, num_agent, pool, flags, agent_ptr) end function hsa_amd_memory_unlock(host_ptr) - ccall((:hsa_amd_memory_unlock, libhsaruntime), hsa_status_t, (Ptr{Cvoid},), host_ptr) + ccall((:hsa_amd_memory_unlock, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid},), host_ptr) end function hsa_amd_memory_fill(ptr, value, count) - ccall((:hsa_amd_memory_fill, libhsaruntime), hsa_status_t, (Ptr{Cvoid}, UInt32, Csize_t), ptr, value, count) + ccall((:hsa_amd_memory_fill, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid}, UInt32, Csize_t), ptr, value, count) end function hsa_amd_interop_map_buffer(num_agents, agents, interop_handle, flags, size, ptr, metadata_size, metadata) - ccall((:hsa_amd_interop_map_buffer, libhsaruntime), hsa_status_t, (UInt32, Ptr{hsa_agent_t}, Cint, UInt32, Ptr{Csize_t}, Ptr{Ptr{Cvoid}}, Ptr{Csize_t}, Ptr{Ptr{Cvoid}}), num_agents, agents, interop_handle, flags, size, ptr, metadata_size, metadata) + ccall((:hsa_amd_interop_map_buffer, libhsa_runtime64), hsa_status_t, (UInt32, Ptr{hsa_agent_t}, Cint, UInt32, Ptr{Csize_t}, Ptr{Ptr{Cvoid}}, Ptr{Csize_t}, Ptr{Ptr{Cvoid}}), num_agents, agents, interop_handle, flags, size, ptr, metadata_size, metadata) end function hsa_amd_interop_unmap_buffer(ptr) - ccall((:hsa_amd_interop_unmap_buffer, libhsaruntime), hsa_status_t, (Ptr{Cvoid},), ptr) + ccall((:hsa_amd_interop_unmap_buffer, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid},), ptr) end struct hsa_amd_image_descriptor_s @@ -1742,7 +1742,7 @@ end const hsa_amd_image_descriptor_t = hsa_amd_image_descriptor_s function hsa_amd_image_create(agent, image_descriptor, image_layout, image_data, access_permission, image) - ccall((:hsa_amd_image_create, libhsaruntime), hsa_status_t, (hsa_agent_t, Ptr{hsa_ext_image_descriptor_t}, Ptr{hsa_amd_image_descriptor_t}, Ptr{Cvoid}, hsa_access_permission_t, Ptr{hsa_ext_image_t}), agent, image_descriptor, image_layout, image_data, access_permission, image) + ccall((:hsa_amd_image_create, libhsa_runtime64), hsa_status_t, (hsa_agent_t, Ptr{hsa_ext_image_descriptor_t}, Ptr{hsa_amd_image_descriptor_t}, Ptr{Cvoid}, hsa_access_permission_t, Ptr{hsa_ext_image_t}), agent, image_descriptor, image_layout, image_data, access_permission, image) end @cenum hsa_amd_pointer_type_t::UInt32 begin @@ -1766,11 +1766,11 @@ end const hsa_amd_pointer_info_t = hsa_amd_pointer_info_s function hsa_amd_pointer_info(ptr, info, alloc, num_agents_accessible, accessible) - ccall((:hsa_amd_pointer_info, libhsaruntime), hsa_status_t, (Ptr{Cvoid}, Ptr{hsa_amd_pointer_info_t}, Ptr{Cvoid}, Ptr{UInt32}, Ptr{Ptr{hsa_agent_t}}), ptr, info, alloc, num_agents_accessible, accessible) + ccall((:hsa_amd_pointer_info, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid}, Ptr{hsa_amd_pointer_info_t}, Ptr{Cvoid}, Ptr{UInt32}, Ptr{Ptr{hsa_agent_t}}), ptr, info, alloc, num_agents_accessible, accessible) end function hsa_amd_pointer_info_set_userdata(ptr, userdata) - ccall((:hsa_amd_pointer_info_set_userdata, libhsaruntime), hsa_status_t, (Ptr{Cvoid}, Ptr{Cvoid}), ptr, userdata) + ccall((:hsa_amd_pointer_info_set_userdata, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid}, Ptr{Cvoid}), ptr, userdata) end struct hsa_amd_ipc_memory_s @@ -1780,25 +1780,25 @@ end const hsa_amd_ipc_memory_t = hsa_amd_ipc_memory_s function hsa_amd_ipc_memory_create(ptr, len, handle) - ccall((:hsa_amd_ipc_memory_create, libhsaruntime), hsa_status_t, (Ptr{Cvoid}, Csize_t, Ptr{hsa_amd_ipc_memory_t}), ptr, len, handle) + ccall((:hsa_amd_ipc_memory_create, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid}, Csize_t, Ptr{hsa_amd_ipc_memory_t}), ptr, len, handle) end function hsa_amd_ipc_memory_attach(handle, len, num_agents, mapping_agents, mapped_ptr) - ccall((:hsa_amd_ipc_memory_attach, libhsaruntime), hsa_status_t, (Ptr{hsa_amd_ipc_memory_t}, Csize_t, UInt32, Ptr{hsa_agent_t}, Ptr{Ptr{Cvoid}}), handle, len, num_agents, mapping_agents, mapped_ptr) + ccall((:hsa_amd_ipc_memory_attach, libhsa_runtime64), hsa_status_t, (Ptr{hsa_amd_ipc_memory_t}, Csize_t, UInt32, Ptr{hsa_agent_t}, Ptr{Ptr{Cvoid}}), handle, len, num_agents, mapping_agents, mapped_ptr) end function hsa_amd_ipc_memory_detach(mapped_ptr) - ccall((:hsa_amd_ipc_memory_detach, libhsaruntime), hsa_status_t, (Ptr{Cvoid},), mapped_ptr) + ccall((:hsa_amd_ipc_memory_detach, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid},), mapped_ptr) end const hsa_amd_ipc_signal_t = hsa_amd_ipc_memory_t function hsa_amd_ipc_signal_create(signal, handle) - ccall((:hsa_amd_ipc_signal_create, libhsaruntime), hsa_status_t, (hsa_signal_t, Ptr{hsa_amd_ipc_signal_t}), signal, handle) + ccall((:hsa_amd_ipc_signal_create, libhsa_runtime64), hsa_status_t, (hsa_signal_t, Ptr{hsa_amd_ipc_signal_t}), signal, handle) end function hsa_amd_ipc_signal_attach(handle, signal) - ccall((:hsa_amd_ipc_signal_attach, libhsaruntime), hsa_status_t, (Ptr{hsa_amd_ipc_signal_t}, Ptr{hsa_signal_t}), handle, signal) + ccall((:hsa_amd_ipc_signal_attach, libhsa_runtime64), hsa_status_t, (Ptr{hsa_amd_ipc_signal_t}, Ptr{hsa_signal_t}), handle, signal) end @cenum hsa_amd_event_type_s::UInt32 begin @@ -1853,7 +1853,7 @@ const hsa_amd_event_t = hsa_amd_event_s const hsa_amd_system_event_callback_t = Ptr{Cvoid} function hsa_amd_register_system_event_handler(callback, data) - ccall((:hsa_amd_register_system_event_handler, libhsaruntime), hsa_status_t, (hsa_amd_system_event_callback_t, Ptr{Cvoid}), callback, data) + ccall((:hsa_amd_register_system_event_handler, libhsa_runtime64), hsa_status_t, (hsa_amd_system_event_callback_t, Ptr{Cvoid}), callback, data) end @cenum hsa_amd_queue_priority_s::UInt32 begin @@ -1865,18 +1865,18 @@ end const hsa_amd_queue_priority_t = hsa_amd_queue_priority_s function hsa_amd_queue_set_priority(queue, priority) - ccall((:hsa_amd_queue_set_priority, libhsaruntime), hsa_status_t, (Ptr{hsa_queue_t}, hsa_amd_queue_priority_t), queue, priority) + ccall((:hsa_amd_queue_set_priority, libhsa_runtime64), hsa_status_t, (Ptr{hsa_queue_t}, hsa_amd_queue_priority_t), queue, priority) end # typedef void ( * hsa_amd_deallocation_callback_t ) ( void * ptr , void * user_data ) const hsa_amd_deallocation_callback_t = Ptr{Cvoid} function hsa_amd_register_deallocation_callback(ptr, callback, user_data) - ccall((:hsa_amd_register_deallocation_callback, libhsaruntime), hsa_status_t, (Ptr{Cvoid}, hsa_amd_deallocation_callback_t, Ptr{Cvoid}), ptr, callback, user_data) + ccall((:hsa_amd_register_deallocation_callback, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid}, hsa_amd_deallocation_callback_t, Ptr{Cvoid}), ptr, callback, user_data) end function hsa_amd_deregister_deallocation_callback(ptr, callback) - ccall((:hsa_amd_deregister_deallocation_callback, libhsaruntime), hsa_status_t, (Ptr{Cvoid}, hsa_amd_deallocation_callback_t), ptr, callback) + ccall((:hsa_amd_deregister_deallocation_callback, libhsa_runtime64), hsa_status_t, (Ptr{Cvoid}, hsa_amd_deallocation_callback_t), ptr, callback) end # Skipping MacroDefinition: HSA_EXPORT_DECORATOR __attribute__ ( ( visibility ( "default" ) ) ) diff --git a/src/libs.jl b/src/libs.jl index 31293be74..639ab7afe 100644 --- a/src/libs.jl +++ b/src/libs.jl @@ -5,62 +5,24 @@ # distribution as lazy artifacts. Setting its "local" preference (see # `AMDGPU.set_rocm_version!`) switches them to a local ROCm installation, # discovered through ROCm_Runtime_Discovery; that package is not loaded at all -# otherwise. +# otherwise. Both packages provide the same set of exported library paths +# (empty strings when a component is missing). # # `ld.lld` and the device libraries always come from their JLLs: `ld.lld` has # to match the LLVM version device code is generated with, and local device # libraries target a newer LLVM than Julia's and would need to be downgraded. -import AMDGPU_LLVM_Backend_jll -import ROCmDeviceLibs_jll import ROCm_Runtime const local_rocm = ROCm_Runtime.local_preference === true if local_rocm - import ROCm_Runtime_Discovery + using ROCm_Runtime_Discovery +else + using ROCm_Runtime end -global libhsaruntime::String = "" -global libhip::String = "" -global lld_path::String = "" -global libdevice_libs::String = "" -global librocblas::String = "" -global librocsparse::String = "" -global librocsolver::String = "" -global librocrand::String = "" -global librocfft::String = "" -global libMIOpen::String = "" - -function __init_libs__() - if local_rocm - global libhip = ROCm_Runtime_Discovery.libamdhip64 - global libhsaruntime = ROCm_Runtime_Discovery.libhsa_runtime64 - global librocblas = ROCm_Runtime_Discovery.librocblas - global librocsparse = ROCm_Runtime_Discovery.librocsparse - global librocsolver = ROCm_Runtime_Discovery.librocsolver - global librocrand = ROCm_Runtime_Discovery.librocrand - global librocfft = ROCm_Runtime_Discovery.librocfft - global libMIOpen = ROCm_Runtime_Discovery.libMIOpen - elseif ROCm_Runtime.is_available() - global libhip = ROCm_Runtime.libamdhip64 - global libhsaruntime = Sys.islinux() ? - ROCm_Runtime.libhsa_runtime64 : "" - global librocblas = ROCm_Runtime.librocblas - global librocsparse = ROCm_Runtime.librocsparse - global librocsolver = ROCm_Runtime.librocsolver - global librocrand = ROCm_Runtime.librocrand - global librocfft = ROCm_Runtime.librocfft - global libMIOpen = ROCm_Runtime.libMIOpen - end - - if AMDGPU_LLVM_Backend_jll.is_available() - global lld_path = AMDGPU_LLVM_Backend_jll.lld_path - end - - if ROCmDeviceLibs_jll.is_available() - global libdevice_libs = ROCmDeviceLibs_jll.bitcode_path - end -end +import AMDGPU_LLVM_Backend_jll: lld_path +import ROCmDeviceLibs_jll: bitcode_path as libdevice_libs """ AMDGPU.set_rocm_version!([version::VersionNumber]; [local_rocm::Bool]) diff --git a/src/precompile.jl b/src/precompile.jl index 748976959..298738f8c 100644 --- a/src/precompile.jl +++ b/src/precompile.jl @@ -56,13 +56,12 @@ if :AMDGPU in LLVM.backends() # attach its artifact to the package-image CI. Compiler.compile_or_lookup(job) - # The compile above runs during precompilation, when - # `__init_libs__` has NOT run, so `libdevice_libs` is - # empty. That poisons the `DEVICE_LIBS` cache with empty entries - # (e.g. an `ocml` `DevLib` with no path), which would be baked - # into the precompile image and prevent device-library linking - # at runtime (`unsupported call to __ocml_*`). Reset it so it is - # repopulated correctly once `__init_libs__` has run. + # The compile above populates the `DEVICE_LIBS` cache + # (`libdevice_libs` points into the ROCmDeviceLibs_jll + # artifact, whose `__init__` has run by now). Baking those + # entries into the precompile image would hardcode absolute + # artifact paths and duplicate the bitcode blobs there, so + # reset the cache and let it repopulate at runtime. empty!(Compiler.DEVICE_LIBS) end end diff --git a/src/utils.jl b/src/utils.jl index b5b3ae3e7..25b416e79 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -61,7 +61,7 @@ function versioninfo(io::IO=stdout) data = String[ _status(functional(:lld)) "LLD" "-" _libpath(lld_path); _status(functional(:device_libs)) "Device Libraries" "-" _libpath(libdevice_libs); - _status(functional(:hip)) "HIP" _ver(:hip, HIP.runtime_version) _libpath(libhip); + _status(functional(:hip)) "HIP" _ver(:hip, HIP.runtime_version) _libpath(libamdhip64); _status(functional(:rocblas)) "rocBLAS" _ver(:rocblas, rocBLAS.version) _libpath(librocblas); _status(functional(:rocsolver)) "rocSOLVER" _ver(:rocsolver, rocSOLVER.version) _libpath(librocsolver); _status(functional(:rocsparse)) "rocSPARSE" rocsparse_ver _libpath(librocsparse); @@ -137,7 +137,7 @@ This query should never throw for valid `component` values. """ function functional(component::Symbol) if component == :hip - return !isempty(libhip) + return !isempty(libamdhip64) elseif component == :lld return !isempty(lld_path) elseif component == :device_libs From 8b69e1e5959a575591d042d23daa8d19446cacef Mon Sep 17 00:00:00 2001 From: Simeon David Schaub Date: Sat, 15 Aug 2026 21:36:14 +0000 Subject: [PATCH 03/28] CI: develop the ROCm_Runtime{,_Discovery} subpackages in every step The subpackages are wired up through [sources], which only the active project's Project.toml provides and which Pkg supports only on Julia 1.11+. Steps running on Julia 1.10 (like the GPU-less environment check) or resolving from another project (docs, perf) therefore failed with "expected package ROCm_Runtime to be registered". Explicitly Pkg.develop'ing the subpackages records path entries in the manifest, which works everywhere. Verified by simulating the CI resolve in a fresh clone on Julia 1.10 and nightly, including a GPU-less load (arch = "none") on 1.10. Assisted-by: Claude Code (claude-fable-5) --- .buildkite/pipeline.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 91dcf0d31..5dfa46fd0 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -14,11 +14,12 @@ steps: julia --project -e ' println("--- :julia: Instantiating project") using Pkg + Pkg.develop([PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")]) Pkg.instantiate() Pkg.build() Pkg.activate("docs") - Pkg.develop(PackageSpec(path=".")) + Pkg.develop([PackageSpec(path="."), PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")]) Pkg.instantiate() push!(LOAD_PATH, @__DIR__) @@ -61,7 +62,7 @@ steps: queue: "rocm" rocmgpu: "*" if: build.message !~ /\[skip tests\]/ - command: "julia --project -e 'using Pkg; Pkg.update()'" + command: "julia --project -e 'using Pkg; Pkg.develop([PackageSpec(path=\"ROCm_Runtime\"), PackageSpec(path=\"ROCm_Runtime_Discovery\")]); Pkg.update()'" timeout_in_minutes: 90 env: JULIA_NUM_THREADS: 4 @@ -84,7 +85,7 @@ steps: queue: "rocm" rocmgpu: "*" if: build.message !~ /\[skip tests\]/ - command: "julia --project -e 'using Pkg; Pkg.update()'" + command: "julia --project -e 'using Pkg; Pkg.develop([PackageSpec(path=\"ROCm_Runtime\"), PackageSpec(path=\"ROCm_Runtime_Discovery\")]); Pkg.update()'" timeout_in_minutes: 45 soft_fail: true env: @@ -100,6 +101,9 @@ steps: - JuliaCI/julia-test#v1: run_tests: false command: | + julia --project -e ' + using Pkg + Pkg.develop([PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")])' julia --project -e ' using AMDGPU @assert !AMDGPU.functional()' @@ -116,7 +120,7 @@ steps: julia --project=perf -e ' println("--- :julia: Instantiating benchmark project") using Pkg - Pkg.develop(PackageSpec(path=".")) + Pkg.develop([PackageSpec(path="."), PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")]) Pkg.instantiate() println("+++ :julia: Running benchmarks") From e6e927a003858975fdf3073e776fbcb9dbdaf564 Mon Sep 17 00:00:00 2001 From: Simeon David Schaub Date: Sun, 16 Aug 2026 05:35:12 +0000 Subject: [PATCH 04/28] CI: run Julia 1.10 steps without the julia-test plugin The previous fix dev'ed the subpackages in the step command, but the julia-test plugin instantiates the project in its pre-command hook, which runs before the step's command -- so Julia 1.10 (no [sources] support) still failed with "expected package ROCm_Runtime to be registered". Follow CUDA.jl's approach instead: on 1.10 (tests, Enzyme, GPU-less check) drop the julia-test plugin and run Pkg.develop + Pkg.test manually; on 1.11+ the plugin works as-is since Pkg honors [sources] there, so those steps go back to their plain Pkg.update() command. Verified on a fresh clone with Julia 1.10: develop + update resolves, and Pkg.test constructs its sandbox with the dev'ed subpackages from the parent manifest. Assisted-by: Claude Code (claude-fable-5) --- .buildkite/pipeline.yml | 70 +++++++++++++++++++++++++++++++++-------- 1 file changed, 57 insertions(+), 13 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 5dfa46fd0..435115d2c 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -32,11 +32,37 @@ steps: if: build.message !~ /\[skip docs\]/ timeout_in_minutes: 20 + # Julia 1.10 doesn't support [sources] in Project.toml, so the workspace + # packages have to be dev'ed manually before instantiating -- which rules out + # the julia-test plugin, whose pre-command hook instantiates the project + # before the step's command gets a chance to run. + - label: "Julia 1.10" + plugins: + - JuliaCI/julia#v1: + version: "1.10" + - JuliaCI/julia-coverage#v1: + codecov: true + agents: + queue: "rocm" + rocmgpu: "*" + if: build.message !~ /\[skip tests\]/ + command: | + julia --project -e ' + using Pkg + Pkg.develop([PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")]) + Pkg.update() + Pkg.test(; coverage=true, test_args=["--verbose"])' + timeout_in_minutes: 90 + env: + JULIA_NUM_THREADS: 4 + JULIA_AMDGPU_CORE_MUST_LOAD: "1" + JULIA_AMDGPU_HIP_MUST_LOAD: "1" + JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" + - label: "Julia {{matrix.version}}" matrix: setup: version: - - "1.10" - "1.11" - "1.12" - "1.13" @@ -62,7 +88,7 @@ steps: queue: "rocm" rocmgpu: "*" if: build.message !~ /\[skip tests\]/ - command: "julia --project -e 'using Pkg; Pkg.develop([PackageSpec(path=\"ROCm_Runtime\"), PackageSpec(path=\"ROCm_Runtime_Discovery\")]); Pkg.update()'" + command: "julia --project -e 'using Pkg; Pkg.update()'" timeout_in_minutes: 90 env: JULIA_NUM_THREADS: 4 @@ -70,22 +96,40 @@ steps: JULIA_AMDGPU_HIP_MUST_LOAD: "1" JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" - - label: "Julia {{matrix.version}} Enzyme" - matrix: - setup: - version: - - "1.10" - - "1.11" + # see the "Julia 1.10" step for why this doesn't use the julia-test plugin + - label: "Julia 1.10 Enzyme" plugins: - JuliaCI/julia#v1: - version: "{{matrix.version}}" + version: "1.10" + agents: + queue: "rocm" + rocmgpu: "*" + if: build.message !~ /\[skip tests\]/ + command: | + julia --project -e ' + using Pkg + Pkg.develop([PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")]) + Pkg.update() + Pkg.test(; test_args=["enzyme"])' + timeout_in_minutes: 45 + soft_fail: true + env: + JULIA_NUM_THREADS: 4 + JULIA_AMDGPU_CORE_MUST_LOAD: "1" + JULIA_AMDGPU_HIP_MUST_LOAD: "1" + JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" + + - label: "Julia 1.11 Enzyme" + plugins: + - JuliaCI/julia#v1: + version: "1.11" - JuliaCI/julia-test#v1: test_args: "enzyme" agents: queue: "rocm" rocmgpu: "*" if: build.message !~ /\[skip tests\]/ - command: "julia --project -e 'using Pkg; Pkg.develop([PackageSpec(path=\"ROCm_Runtime\"), PackageSpec(path=\"ROCm_Runtime_Discovery\")]); Pkg.update()'" + command: "julia --project -e 'using Pkg; Pkg.update()'" timeout_in_minutes: 45 soft_fail: true env: @@ -94,16 +138,16 @@ steps: JULIA_AMDGPU_HIP_MUST_LOAD: "1" JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" + # see the "Julia 1.10" step for why this doesn't use the julia-test plugin - label: "GPU-less environment" plugins: - JuliaCI/julia#v1: version: "1.10" - - JuliaCI/julia-test#v1: - run_tests: false command: | julia --project -e ' using Pkg - Pkg.develop([PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")])' + Pkg.develop([PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")]) + Pkg.instantiate()' julia --project -e ' using AMDGPU @assert !AMDGPU.functional()' From 96aeb1d3f082288f54f56202896331a8db03a238 Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Mon, 17 Aug 2026 16:22:03 +0200 Subject: [PATCH 05/28] CSCS MI300 CI: select the ROCm provider explicitly The MI300 job set JULIA_AMDGPU_DISABLE_ARTIFACTS=1 to pick up the uenv's ROCm. That variable no longer exists after the discovery refactor, so the job silently resolved to the TheRock artifacts instead, and every test died with hipErrorOutOfMemory out of hipStreamCreateWithPriority (3167 occurrences; no hipMalloc ever failed). The .rocm-miopen merge and MIOPEN_PREFIX symlinking the script does were inert as a result. Select the provider through ROCm_Runtime's "local" preference instead, set before Pkg.instantiate() since it is a compile-time preference that also gates artifact resolution, and dev the two workspace packages the way .buildkite/pipeline.yml now does. The resolved provider is asserted against the requested one afterwards, so a future change of default fails loudly instead of quietly swapping the ROCm underneath the job. The script is parameterised by ROCM_LOCAL so both providers can be run. Only the uenv variant is enabled: this is the project's only gfx942 CI, so covering the default artifact path here is worthwhile, but TheRock ships a ROCm 7.14 userspace that cannot create a HIP stream at all against the 6.12.12 amdgpu driver on this machine, so that job is left commented out until the mismatch is resolved. Verified on beverin (2x MI300A, gfx942, Julia 1.12.6) at c644fc5: uenv ROCm, full suite, --jobs=32: 16162 pass, 0 OOM (was 3167 OOM) A/B in one allocation, only the preference differing: local=true HIP 7.2.53211 hipStreamCreateWithPriority OK local=false HIP 7.14.60850 hipErrorOutOfMemory Co-Authored-By: Claude Opus 5 --- ci/cscs-mi300.yml | 102 +++++++++++++++++++++++++++++++--------------- 1 file changed, 69 insertions(+), 33 deletions(-) diff --git a/ci/cscs-mi300.yml b/ci/cscs-mi300.yml index dc00e2750..2243f9049 100644 --- a/ci/cscs-mi300.yml +++ b/ci/cscs-mi300.yml @@ -1,53 +1,89 @@ include: - remote: 'https://gitlab.com/cscs-ci/recipes/-/raw/master/templates/v2/.ci-ext.yml' +# Slurm/Julia settings shared by both ROCm provider variants. +.common_variables: &common_variables + JULIA: /users/lraess/julia_amd/juliaup/julia-1.12.6+0.x64.linux.gnu/bin/julia + UENV: ab517d8a08f537d2 + MIOPEN_PREFIX: /user-environment/linux-zen3/miopen-hip-7.2.3-22x3pq72goxi4xwkknlspqhxbx72owes + # Workaround for MIOpen CK Group-Xdlops solvers segfaulting on gfx942 (MI300). + # Remove once fixed upstream: https://github.com/ROCm/rocm-libraries/issues/9088 + MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_FWD_GTC_XDLOPS_NHWC: "0" + MIOPEN_DEBUG_GROUP_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS: "0" + MIOPEN_DEBUG_GROUP_CONV_IMPLICIT_GEMM_HIP_WRW_XDLOPS: "0" + MIOPEN_DEBUG_3D_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS: "0" + MIOPEN_DEBUG_3D_CONV_IMPLICIT_GEMM_HIP_WRW_XDLOPS: "0" + SLURM_JOB_NUM_NODES: 1 + SLURM_NTASKS_PER_NODE: 1 + SLURM_GPUS_PER_TASK: 2 + SLURM_TIMELIMIT: "00:45:00" + JULIA_NUM_THREADS: 4 + JULIA_DEPOT_PATH: "${CI_PROJECT_DIR}/.julia" + JULIA_AMDGPU_CORE_MUST_LOAD: "1" + JULIA_AMDGPU_HIP_MUST_LOAD: "1" + +# AMDGPU.jl takes ROCm either from the uenv ($ROCM_LOCAL == "true": the merged +# ROCM_PATH below, resolved through ROCm_Runtime_Discovery) or from the TheRock +# artifacts shipped by ROCm_Runtime ($ROCM_LOCAL == "false"). Which one is used +# is decided by ROCm_Runtime's "local" preference; it is a compile-time +# preference that also gates artifact resolution, so it has to be set before +# Pkg.instantiate(). It is set explicitly in both variants rather than relying +# on the default, and the resolved provider is asserted afterwards, so that a +# change of default cannot silently swap the ROCm underneath a job. .unit_test_script: &unit_test_script - srun -n 1 --uenv $UENV --view=default bash -c ' set -euo pipefail; shopt -s nullglob; - MERGED_ROCM="$CI_PROJECT_DIR/.rocm-miopen"; - rm -rf "$MERGED_ROCM"; - mkdir -p "$MERGED_ROCM/lib"; - for entry in "$ROCM_PATH"/*; do - name=$(basename "$entry"); - [ "$name" = "lib" ] && continue; - ln -s "$entry" "$MERGED_ROCM/$name"; - done; - ln -s "$ROCM_PATH"/lib/* "$MERGED_ROCM/lib/"; - for libdir in "$MIOPEN_PREFIX/lib" "$MIOPEN_PREFIX/lib64"; do - ln -s "$libdir"/libMIOpen* "$MERGED_ROCM/lib/" 2>/dev/null || true; - done; - export ROCM_PATH="$MERGED_ROCM"; + if [ "$ROCM_LOCAL" = "true" ]; then + MERGED_ROCM="$CI_PROJECT_DIR/.rocm-miopen"; + rm -rf "$MERGED_ROCM"; + mkdir -p "$MERGED_ROCM/lib"; + for entry in "$ROCM_PATH"/*; do + name=$(basename "$entry"); + [ "$name" = "lib" ] && continue; + ln -s "$entry" "$MERGED_ROCM/$name"; + done; + ln -s "$ROCM_PATH"/lib/* "$MERGED_ROCM/lib/"; + for libdir in "$MIOPEN_PREFIX/lib" "$MIOPEN_PREFIX/lib64"; do + ln -s "$libdir"/libMIOpen* "$MERGED_ROCM/lib/" 2>/dev/null || true; + done; + export ROCM_PATH="$MERGED_ROCM"; + fi; exec "$0" "$@" ' $JULIA --project -e ' println("Instantiating project"); using Pkg; Pkg.activate(pwd()); + Pkg.develop([PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")]); + using Preferences; + want_local = ENV["ROCM_LOCAL"] == "true"; + set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => string(want_local); force=true); Pkg.instantiate(); using AMDGPU; + AMDGPU.versioninfo(); + AMDGPU.local_rocm == want_local || error("requested local_rocm=$want_local, but AMDGPU resolved to local_rocm=$(AMDGPU.local_rocm)"); println("Running tests"); Pkg.test("AMDGPU"; test_args=`--jobs=32`);' -UnitTest julia 1.12: +UnitTest julia 1.12 (system ROCm): extends: .baremetal-runner-beverin-mi300 variables: - JULIA: /users/lraess/julia_amd/juliaup/julia-1.12.6+0.x64.linux.gnu/bin/julia - UENV: ab517d8a08f537d2 - MIOPEN_PREFIX: /user-environment/linux-zen3/miopen-hip-7.2.3-22x3pq72goxi4xwkknlspqhxbx72owes - # Workaround for MIOpen CK Group-Xdlops solvers segfaulting on gfx942 (MI300). - # Remove once fixed upstream: https://github.com/ROCm/rocm-libraries/issues/9088 - MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_FWD_GTC_XDLOPS_NHWC: "0" - MIOPEN_DEBUG_GROUP_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS: "0" - MIOPEN_DEBUG_GROUP_CONV_IMPLICIT_GEMM_HIP_WRW_XDLOPS: "0" - MIOPEN_DEBUG_3D_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS: "0" - MIOPEN_DEBUG_3D_CONV_IMPLICIT_GEMM_HIP_WRW_XDLOPS: "0" - SLURM_JOB_NUM_NODES: 1 - SLURM_NTASKS_PER_NODE: 1 - SLURM_GPUS_PER_TASK: 2 - SLURM_TIMELIMIT: "00:45:00" - JULIA_NUM_THREADS: 4 - JULIA_DEPOT_PATH: "${CI_PROJECT_DIR}/.julia" - JULIA_AMDGPU_CORE_MUST_LOAD: "1" - JULIA_AMDGPU_HIP_MUST_LOAD: "1" - JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" + <<: *common_variables + ROCM_LOCAL: "true" script: *unit_test_script + +# Coverage of the artifact path -- what AMDGPU.jl uses by default -- is worth +# having here, since this is the only gfx942 CI in the project. It is disabled +# for now because it cannot get off the ground on this machine: TheRock ships a +# ROCm 7.14 userspace, and against the 6.12.12 amdgpu driver here every +# hipStreamCreateWithPriority fails with hipErrorOutOfMemory before any test +# body runs. Re-enable (with allow_failure until it is green) once that is +# resolved; the ROCM_LOCAL switch above already handles both variants. +# +# UnitTest julia 1.12 (ROCm artifacts): +# extends: .baremetal-runner-beverin-mi300 +# allow_failure: true +# variables: +# <<: *common_variables +# ROCM_LOCAL: "false" +# script: *unit_test_script From dfa978b2b36c9c998af3b787b7f054a8cfadd353 Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Mon, 17 Aug 2026 17:25:26 +0200 Subject: [PATCH 06/28] CSCS MI300 CI: correct the reason the artifact job is disabled The comment blamed a ROCm 7.14 userspace / 6.12.12 amdgpu driver mismatch. That was wrong: the driver side is fine (rocminfo enumerates all agents, hipMalloc succeeds). What actually fails is ROCclr's blit-kernel build on first stream creation, which cannot resolve __amd_streamOpsIncrement and __amd_streamOpsDecrement, and is then reported as hipErrorOutOfMemory -- which is what made this look like memory exhaustion for so long. Reported upstream as https://github.com/ROCm/TheRock/issues/7426, so the comment now just points there rather than restating the analysis. Co-Authored-By: Claude Opus 5 --- ci/cscs-mi300.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/cscs-mi300.yml b/ci/cscs-mi300.yml index 2243f9049..9c52d66b6 100644 --- a/ci/cscs-mi300.yml +++ b/ci/cscs-mi300.yml @@ -73,12 +73,12 @@ UnitTest julia 1.12 (system ROCm): script: *unit_test_script # Coverage of the artifact path -- what AMDGPU.jl uses by default -- is worth -# having here, since this is the only gfx942 CI in the project. It is disabled -# for now because it cannot get off the ground on this machine: TheRock ships a -# ROCm 7.14 userspace, and against the 6.12.12 amdgpu driver here every -# hipStreamCreateWithPriority fails with hipErrorOutOfMemory before any test -# body runs. Re-enable (with allow_failure until it is green) once that is -# resolved; the ROCM_LOCAL switch above already handles both variants. +# having here, since this is the only gfx942 CI in the project. Disabled for +# now: with the ROCm 7.14 TheRock bundle, every HIP application fails at its +# first stream creation on gfx942, reported as hipErrorOutOfMemory even though +# nothing runs out of memory. See https://github.com/ROCm/TheRock/issues/7426. +# Re-enable, with allow_failure until it is green, once that is fixed; the +# ROCM_LOCAL switch above already handles both variants. # # UnitTest julia 1.12 (ROCm artifacts): # extends: .baremetal-runner-beverin-mi300 From bbee1501befe9f5cd4524348f66760aa5019d13f Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Mon, 17 Aug 2026 21:18:41 +0200 Subject: [PATCH 07/28] Fixup --- ci/cscs-mi300.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ci/cscs-mi300.yml b/ci/cscs-mi300.yml index 9c52d66b6..9ce0b2957 100644 --- a/ci/cscs-mi300.yml +++ b/ci/cscs-mi300.yml @@ -72,8 +72,7 @@ UnitTest julia 1.12 (system ROCm): ROCM_LOCAL: "true" script: *unit_test_script -# Coverage of the artifact path -- what AMDGPU.jl uses by default -- is worth -# having here, since this is the only gfx942 CI in the project. Disabled for +# Coverage of the artifact path, what AMDGPU.jl uses by default. Disabled for # now: with the ROCm 7.14 TheRock bundle, every HIP application fails at its # first stream creation on gfx942, reported as hipErrorOutOfMemory even though # nothing runs out of memory. See https://github.com/ROCm/TheRock/issues/7426. From e63dd453cf5ff48a1fdb5733eae9cfc95e453872 Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Tue, 18 Aug 2026 17:09:31 +0200 Subject: [PATCH 08/28] rm unused env vars --- .buildkite/pipeline.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 435115d2c..682d7cf27 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -57,7 +57,6 @@ steps: JULIA_NUM_THREADS: 4 JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" - label: "Julia {{matrix.version}}" matrix: @@ -94,7 +93,6 @@ steps: JULIA_NUM_THREADS: 4 JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" # see the "Julia 1.10" step for why this doesn't use the julia-test plugin - label: "Julia 1.10 Enzyme" @@ -117,7 +115,6 @@ steps: JULIA_NUM_THREADS: 4 JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" - label: "Julia 1.11 Enzyme" plugins: @@ -136,7 +133,6 @@ steps: JULIA_NUM_THREADS: 4 JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" # see the "Julia 1.10" step for why this doesn't use the julia-test plugin - label: "GPU-less environment" @@ -179,7 +175,6 @@ steps: env: JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" env: JULIA_AMDGPU_LOGGING_ENABLED: true From e4690f86afed7caf60afe1a4214bc084ce2803e0 Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Tue, 18 Aug 2026 17:09:42 +0200 Subject: [PATCH 09/28] Document more --- docs/src/api/system.md | 3 +++ docs/src/install_tips.md | 40 ++++++++++++++++++++++++++++++++++------ 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/docs/src/api/system.md b/docs/src/api/system.md index a99051815..d85471e41 100644 --- a/docs/src/api/system.md +++ b/docs/src/api/system.md @@ -27,11 +27,14 @@ Several behaviours are configured through [Preferences.jl](https://github.com/Ju | Preference | Set via | Effect | |:--|:--|:--| | `version` / `local` | `AMDGPU.set_rocm_version!` | Select the ROCm version, and whether to use downloaded artifacts or a local ROCm installation. | +| `arch` | preference | Override the GPU architectures used to select the ROCm artifact, as a comma-separated list of `gfx` targets. Useful when no GPU is visible at install time. See [Installation Info](@ref). | | `nonblocking_synchronize` | preference | Use non-blocking stream synchronization (default `true`); disable for slightly lower latency. See [Streams](@ref). | | `eager_gc` | `AMDGPU.eager_gc!(::Bool)` | Trigger GC before allocations under memory pressure. See [Memory Allocation and Intrinsics](@ref). | | `hard_memory_limit` | `AMDGPU.hard_memory_limit!("8 GiB")` | Hard cap on GPU memory, checked before every allocation. | | `soft_memory_limit` | `AMDGPU.soft_memory_limit!("6 GiB")` | Advisory limit for the memory pool. | +The `version`, `local` and `arch` preferences belong to the `ROCm_Runtime` subpackage rather than to AMDGPU itself, so when editing `LocalPreferences.toml` by hand they go under a `[ROCm_Runtime]` section. They are compile-time preferences: changing one invalidates precompilation and takes effect after restarting Julia. + ## Debugging kernel launches Set the environment variable `HIP_LAUNCH_BLOCKING=1` (or toggle `AMDGPU.LAUNCH_BLOCKING[] = true` at runtime) to make kernel launches synchronous. This makes errors surface at the offending launch rather than at a later synchronization point, which is invaluable when tracking down a crashing or misbehaving kernel. diff --git a/docs/src/install_tips.md b/docs/src/install_tips.md index d03c955ba..aa3f99631 100644 --- a/docs/src/install_tips.md +++ b/docs/src/install_tips.md @@ -20,8 +20,36 @@ The library locations are then discovered through the `ROCm_Runtime_Discovery` package, as described below. Use `AMDGPU.reset_rocm_version!()` to go back to the default artifact-based setup. +### Selecting the provider without loading AMDGPU.jl + +`local` is a compile-time preference, and it also gates whether the artifact is *resolved* at all, so in CI or in a fresh depot it has to be set before `Pkg.instantiate()` rather than through `AMDGPU.set_rocm_version!` (which needs AMDGPU.jl loaded first). Write it directly against `ROCm_Runtime`'s UUID: + +```julia +using Preferences +set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "true"; force=true) +``` + +`AMDGPU.local_rocm` reports which provider was actually selected. Asserting on it is worthwhile in CI, so that a change of default cannot silently swap the ROCm underneath a job. + +### When no artifact matches + +The artifact is chosen from the GPU architectures detected on the host, which on Linux are read from the `/sys/class/kfd/kfd/topology` nodes. If nothing is detected — a container without KFD passthrough, a login node, or a host where the `amdgpu` driver is not loaded — or if the detected architecture is not one of the shipped bundles, then no artifact is downloaded and AMDGPU.jl reports its ROCm components as unavailable. + +This is not a fallback: an existing system-wide ROCm is only picked up after explicitly opting in with the `local` preference above. The bundles currently shipped cover `gfx908`, `gfx90a`, `gfx94x` and `gfx950` for Instinct, and `gfx101x`, `gfx103x`, `gfx110x`, `gfx1150` through `gfx1153` and `gfx120x` for Radeon. + +To pin the architecture when detection is not possible, for example when preparing a depot on a CPU-only build machine, set the `arch` preference of `ROCm_Runtime` to a comma-separated list of `gfx` targets: + +```julia +using Preferences +set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "arch" => "gfx942"; force=true) +``` + +The `version` preference selects which ROCm distribution the bundle is taken from. Only 7.14 is currently available, so it mainly becomes useful for pinning once more versions ship. + ## Local ROCm discovery +Everything in this section applies only when the `local` preference is set. In the default artifact mode the library paths come from the downloaded bundle, and the `ROCM_PATH`, `DEVICE_LIB_PATH` and `HIP_DEVICE_LIB_PATH` environment variables are ignored. + On Linux, AMDGPU.jl queries the location of ROCm libraries through `rocminfo` by default. If not successful or on Windows, the following standard directories are searched: @@ -35,13 +63,13 @@ function prints the paths of any libraries found. Starting with ROCm 7.14, libraries are installed under a versioned `core-` subdirectory (for example `/opt/rocm/core-7.14/lib`) instead of directly in `/opt/rocm/lib`. AMDGPU.jl handles this automatically by selecting the newest `core-*` directory found under the ROCm root, so keep `ROCM_PATH` pointed at the install root (e.g. `/opt/rocm`) rather than at the versioned subdirectory. A full ("metapackage") install additionally provides a `/opt/rocm/lib` compatibility symlink and needs no special handling; the versioned lookup mainly benefits minimal, GPU-architecture-specific installs that omit that symlink. -Depending on your GPU model and the functionality you want to use, you may have -to force the GPU architecture by setting the `HSA_OVERRIDE_GFX_VERSION` -variable to a compatible version. +## GPU selection and architecture overrides + +These apply in both provider modes, because they are read by the HSA and HIP runtimes themselves rather than by AMDGPU.jl. + +Depending on your GPU model and the functionality you want to use, you may have to force the GPU architecture by setting the `HSA_OVERRIDE_GFX_VERSION` variable to a compatible version. -You may also have more than one type of GPU, for example a dedicated AMD GPU and an integrated one. -In that case use `rocminfo` to find which device they are and setting `HIP_VISIBLE_DEVICES` to the specific device you want to use. -Otherwise the runtime may crash if it sees two different architectures. +You may also have more than one type of GPU, for example a dedicated AMD GPU and an integrated one. In that case use `rocminfo` to find which device they are and setting `HIP_VISIBLE_DEVICES` to the specific device you want to use. Otherwise the runtime may crash if it sees two different architectures. ## Extra Setup Details From 84d8269590b0cbd2c14e7bad697d1527371df4ee Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Tue, 18 Aug 2026 17:30:03 +0200 Subject: [PATCH 10/28] Add arch kwarg on set_rocm_version! --- docs/src/api/system.md | 2 +- docs/src/install_tips.md | 7 ++++--- src/libs.jl | 35 ++++++++++++++++++++++++++++++----- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/docs/src/api/system.md b/docs/src/api/system.md index d85471e41..b557dd2bf 100644 --- a/docs/src/api/system.md +++ b/docs/src/api/system.md @@ -27,7 +27,7 @@ Several behaviours are configured through [Preferences.jl](https://github.com/Ju | Preference | Set via | Effect | |:--|:--|:--| | `version` / `local` | `AMDGPU.set_rocm_version!` | Select the ROCm version, and whether to use downloaded artifacts or a local ROCm installation. | -| `arch` | preference | Override the GPU architectures used to select the ROCm artifact, as a comma-separated list of `gfx` targets. Useful when no GPU is visible at install time. See [Installation Info](@ref). | +| `arch` | `AMDGPU.set_rocm_version!` | Override the GPU architectures used to select the ROCm artifact, as a comma-separated list of `gfx` targets. Useful when no GPU is visible at install time. See [Installation Info](@ref). | | `nonblocking_synchronize` | preference | Use non-blocking stream synchronization (default `true`); disable for slightly lower latency. See [Streams](@ref). | | `eager_gc` | `AMDGPU.eager_gc!(::Bool)` | Trigger GC before allocations under memory pressure. See [Memory Allocation and Intrinsics](@ref). | | `hard_memory_limit` | `AMDGPU.hard_memory_limit!("8 GiB")` | Hard cap on GPU memory, checked before every allocation. | diff --git a/docs/src/install_tips.md b/docs/src/install_tips.md index aa3f99631..0d9862e48 100644 --- a/docs/src/install_tips.md +++ b/docs/src/install_tips.md @@ -37,13 +37,14 @@ The artifact is chosen from the GPU architectures detected on the host, which on This is not a fallback: an existing system-wide ROCm is only picked up after explicitly opting in with the `local` preference above. The bundles currently shipped cover `gfx908`, `gfx90a`, `gfx94x` and `gfx950` for Instinct, and `gfx101x`, `gfx103x`, `gfx110x`, `gfx1150` through `gfx1153` and `gfx120x` for Radeon. -To pin the architecture when detection is not possible, for example when preparing a depot on a CPU-only build machine, set the `arch` preference of `ROCm_Runtime` to a comma-separated list of `gfx` targets: +To pin the architecture when detection is not possible, for example when preparing a depot on a CPU-only build machine, pass `arch` a `gfx` target or a collection of them: ```julia -using Preferences -set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "arch" => "gfx942"; force=true) +AMDGPU.set_rocm_version!(arch="gfx942") ``` +As with `local`, this writes the `arch` preference of `ROCm_Runtime`, so it can equally be set with `set_preferences!` before AMDGPU.jl is loaded. + The `version` preference selects which ROCm distribution the bundle is taken from. Only 7.14 is currently available, so it mainly becomes useful for pinning once more versions ship. ## Local ROCm discovery diff --git a/src/libs.jl b/src/libs.jl index 639ab7afe..52a8daca5 100644 --- a/src/libs.jl +++ b/src/libs.jl @@ -25,7 +25,7 @@ import AMDGPU_LLVM_Backend_jll: lld_path import ROCmDeviceLibs_jll: bitcode_path as libdevice_libs """ - AMDGPU.set_rocm_version!([version::VersionNumber]; [local_rocm::Bool]) + AMDGPU.set_rocm_version!([version::VersionNumber]; [local_rocm::Bool], [arch]) Configure the active project to use a specific ROCm version from a specific source. @@ -36,20 +36,41 @@ case of a local ROCm, `version` informs AMDGPU.jl which version that is (this may be useful if auto-detection fails). In the case of artifact sources, `version` controls which version will be downloaded and used. -When not specifying either the `version` or the `local_rocm` argument, the +`arch` overrides the GPU architectures the artifact is selected for, given +either as a single `gfx` target (`"gfx942"`) or as a collection of them. It is +only needed when the GPUs of the host cannot be detected, for example when +preparing a depot on a machine without an AMD GPU, and has no effect when a +local ROCm is used. + +When not specifying any of the `version`, `local_rocm` or `arch` arguments, the default behavior will be used, which is to use the most recent compatible artifacts. Note that this will override any preferences that may be configured in a higher-up depot; to clear preferences nondestructively, use [`AMDGPU.reset_rocm_version!`](@ref) instead. """ function set_rocm_version!(version::Union{Nothing,VersionNumber}=nothing; - local_rocm::Union{Nothing,Bool}=nothing) + local_rocm::Union{Nothing,Bool}=nothing, + arch::Union{Nothing,AbstractString,AbstractVector{<:AbstractString}}=nothing) + # Validate before writing anything, so a bad `arch` cannot leave the + # preferences half-applied. The artifact selection splits this value on ',' + # without dropping empty entries, and expects each one to be a gfx target, + # so anything else would only fail later during artifact resolution. + arch_pref = if isnothing(arch) + nothing + else + archs = arch isa AbstractString ? [String(arch)] : String.(arch) + (!isempty(archs) && all(a -> startswith(a, "gfx"), archs)) || throw(ArgumentError( + "`arch` must be a gfx target (e.g. \"gfx942\") or a collection of them, got $(repr(arch))")) + join(archs, ',') + end + Preferences.set_preferences!(ROCm_Runtime, "version" => isnothing(version) ? nothing : "$(version.major).$(version.minor)"; force=true) Preferences.set_preferences!(ROCm_Runtime, "local" => isnothing(local_rocm) ? nothing : string(local_rocm); force=true) + Preferences.set_preferences!(ROCm_Runtime, "arch" => arch_pref; force=true) io = IOBuffer() print(io, "Configured the active project to use ") @@ -61,6 +82,9 @@ function set_rocm_version!(version::Union{Nothing,VersionNumber}=nothing; if local_rocm !== nothing print(io, local_rocm ? " from the local system" : " from artifact sources") end + if arch_pref !== nothing + print(io, " for ", arch_pref) + end print(io, "; please re-start Julia for this to take effect.") @info String(take!(io)) end @@ -68,7 +92,7 @@ end """ AMDGPU.reset_rocm_version!() -Reset the ROCm version preferences in the active project to the default, which +Reset the ROCm preferences in the active project to the default, which is to use the most recent compatible artifacts, unless a higher-up depot has configured a different preference. To force use of the default behavior for the local project, use [`AMDGPU.set_rocm_version!`](@ref) with no arguments. @@ -76,5 +100,6 @@ local project, use [`AMDGPU.set_rocm_version!`](@ref) with no arguments. function reset_rocm_version!() Preferences.delete_preferences!(ROCm_Runtime, "version"; force=true) Preferences.delete_preferences!(ROCm_Runtime, "local"; force=true) - @info "Reset ROCm version preference, please re-start Julia for this to take effect." + Preferences.delete_preferences!(ROCm_Runtime, "arch"; force=true) + @info "Reset ROCm preferences, please re-start Julia for this to take effect." end From ecb6e95cb83825b84e1c680a2e2fa64198c126f9 Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Tue, 18 Aug 2026 18:13:32 +0200 Subject: [PATCH 11/28] Add diagnostic when no artifact resolves --- src/AMDGPU.jl | 7 +++++++ src/libs.jl | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/src/AMDGPU.jl b/src/AMDGPU.jl index cc409217e..dc08645fc 100644 --- a/src/AMDGPU.jl +++ b/src/AMDGPU.jl @@ -175,6 +175,13 @@ function __init__() end end + # Only worth reporting where a GPU is actually present: without GPU, not + # resolving an artifact is the expected outcome rather than a problem. + if !local_rocm && !ROCm_Runtime.is_available() && + (!Sys.islinux() || ispath("/dev/kfd")) + warn_unresolved_rocm_artifact() + end + if Sys.islinux() if !ispath("/dev/kfd") @debug "/dev/kfd not available (no AMD GPU), skipping initialization" diff --git a/src/libs.jl b/src/libs.jl index 52a8daca5..6b5f31984 100644 --- a/src/libs.jl +++ b/src/libs.jl @@ -24,6 +24,42 @@ end import AMDGPU_LLVM_Backend_jll: lld_path import ROCmDeviceLibs_jll: bitcode_path as libdevice_libs +# When the artifact provider cannot resolve a bundle for this host it simply +# ends up with no libraries at all, which otherwise surfaces only as the generic +# "... is unavailable" warnings during initialization. Those do not say that +# nothing was downloaded, nor that a system-wide ROCm is not picked up unless it +# is opted into, so spell both out along with the architecture we detected. +function warn_unresolved_rocm_artifact() + detected = try + ROCm_Runtime.rocm_arch() + catch err + @debug "Could not query the GPU architecture" exception=(err, catch_backtrace()) + String[] + end + + what = isempty(detected) ? + "no GPU architecture could be detected on this host" : + "no bundle could be resolved for the detected architecture " * + join(detected, ", ") * " (it may be unsupported, or the download may have failed)" + + @warn """ + No ROCm artifact could be resolved: $what. + + AMDGPU.jl downloads ROCm by default and does not fall back to a ROCm + installed on this system; using that one requires opting in: + + AMDGPU.set_rocm_version!(local_rocm=true) + + Alternatively, if the architecture above is wrong or could not be detected, + select the bundle explicitly: + + AMDGPU.set_rocm_version!(arch="gfx1100") + + Either way, restart Julia afterwards. Set `JULIA_DEBUG=ROCm_Runtime` to see + the underlying artifact resolution error. + """ +end + """ AMDGPU.set_rocm_version!([version::VersionNumber]; [local_rocm::Bool], [arch]) From e26a03e00358943c1928c9cca8db95d4831098c4 Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Wed, 19 Aug 2026 01:00:54 +0200 Subject: [PATCH 12/28] Be explicit about local or artifact in CI --- .buildkite/pipeline.yml | 71 +++++++++++++++++++++++++++++++++-------- perf/Project.toml | 1 + 2 files changed, 58 insertions(+), 14 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 682d7cf27..0871af2ea 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,3 +1,9 @@ +# AMDGPU.jl chooses between the ROCm_Runtime artifacts and a local ROCm through +# ROCm_Runtime's "local" preference. Every GPU step pins that preference and +# then asserts the provider it actually resolved to, so that a change of default +# cannot silently swap the ROCm underneath a job. The artifacts are lazy, so the +# pinning only has to happen before AMDGPU is first loaded, not before +# instantiating the project. steps: - label: "Documentation" plugins: @@ -32,11 +38,12 @@ steps: if: build.message !~ /\[skip docs\]/ timeout_in_minutes: 20 + # Julia 1.10 doesn't support [sources] in Project.toml, so the workspace # packages have to be dev'ed manually before instantiating -- which rules out # the julia-test plugin, whose pre-command hook instantiates the project # before the step's command gets a chance to run. - - label: "Julia 1.10" + - label: "Julia 1.10 (ROCm artifacts)" plugins: - JuliaCI/julia#v1: version: "1.10" @@ -50,15 +57,17 @@ steps: julia --project -e ' using Pkg Pkg.develop([PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")]) - Pkg.update() - Pkg.test(; coverage=true, test_args=["--verbose"])' + Pkg.update()' + julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' + julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + julia --project -e 'using Pkg; Pkg.test(; coverage=true, test_args=["--verbose"])' timeout_in_minutes: 90 env: JULIA_NUM_THREADS: 4 JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - - label: "Julia {{matrix.version}}" + - label: "Julia {{matrix.version}} (ROCm artifacts)" matrix: setup: version: @@ -87,15 +96,42 @@ steps: queue: "rocm" rocmgpu: "*" if: build.message !~ /\[skip tests\]/ - command: "julia --project -e 'using Pkg; Pkg.update()'" + command: | + julia --project -e 'using Pkg; Pkg.update()' + julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' + julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' timeout_in_minutes: 90 env: JULIA_NUM_THREADS: 4 JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - # see the "Julia 1.10" step for why this doesn't use the julia-test plugin - - label: "Julia 1.10 Enzyme" + # Coverage for the local-ROCm provider, also exercised by the CSCS + # MI300 pipeline. Does not use the julia-test plugin, so the provider is + # pinned before AMDGPU is first loaded and no artifact is fetched. + - label: "Julia 1.12 (local ROCm)" + plugins: + - JuliaCI/julia#v1: + version: "1.12" + - JuliaCI/julia-coverage#v1: + codecov: true + agents: + queue: "rocm" + rocmgpu: "*" + if: build.message !~ /\[skip tests\]/ + command: | + julia --project -e 'using Pkg; Pkg.update()' + julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "true"; force=true)' + julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm || error("this step selected a local ROCm, but AMDGPU resolved to the ROCm artifacts")' + julia --project -e 'using Pkg; Pkg.test(; coverage=true, test_args=["--verbose"])' + timeout_in_minutes: 90 + env: + JULIA_NUM_THREADS: 4 + JULIA_AMDGPU_CORE_MUST_LOAD: "1" + JULIA_AMDGPU_HIP_MUST_LOAD: "1" + + # see the "Julia 1.10 (ROCm artifacts)" step for why this doesn't use the plugin + - label: "Julia 1.10 Enzyme (ROCm artifacts)" plugins: - JuliaCI/julia#v1: version: "1.10" @@ -107,8 +143,10 @@ steps: julia --project -e ' using Pkg Pkg.develop([PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")]) - Pkg.update() - Pkg.test(; test_args=["enzyme"])' + Pkg.update()' + julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' + julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + julia --project -e 'using Pkg; Pkg.test(; test_args=["enzyme"])' timeout_in_minutes: 45 soft_fail: true env: @@ -116,7 +154,7 @@ steps: JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - - label: "Julia 1.11 Enzyme" + - label: "Julia 1.11 Enzyme (ROCm artifacts)" plugins: - JuliaCI/julia#v1: version: "1.11" @@ -126,7 +164,10 @@ steps: queue: "rocm" rocmgpu: "*" if: build.message !~ /\[skip tests\]/ - command: "julia --project -e 'using Pkg; Pkg.update()'" + command: | + julia --project -e 'using Pkg; Pkg.update()' + julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' + julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' timeout_in_minutes: 45 soft_fail: true env: @@ -134,7 +175,7 @@ steps: JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - # see the "Julia 1.10" step for why this doesn't use the julia-test plugin + # see the "Julia 1.10 (ROCm artifacts)" step for why this doesn't use the plugin - label: "GPU-less environment" plugins: - JuliaCI/julia#v1: @@ -161,8 +202,10 @@ steps: println("--- :julia: Instantiating benchmark project") using Pkg Pkg.develop([PackageSpec(path="."), PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")]) - Pkg.instantiate() - + Pkg.instantiate()' + julia --project=perf -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' + julia --project=perf -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + julia --project=perf -e ' println("+++ :julia: Running benchmarks") include("perf/runbenchmarks.jl")' artifact_paths: diff --git a/perf/Project.toml b/perf/Project.toml index fd8e4665b..fed23f7d2 100644 --- a/perf/Project.toml +++ b/perf/Project.toml @@ -1,6 +1,7 @@ [deps] AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" +Preferences = "21216c6a-2e73-6563-6e65-726566657250" StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" From 13b59e07d17f5fb82fd8ded7aaf143fd159731c3 Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Wed, 19 Aug 2026 08:35:49 +0200 Subject: [PATCH 13/28] Improve docs --- docs/src/install_tips.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/src/install_tips.md b/docs/src/install_tips.md index 0d9862e48..bf63a8407 100644 --- a/docs/src/install_tips.md +++ b/docs/src/install_tips.md @@ -35,7 +35,21 @@ set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => " The artifact is chosen from the GPU architectures detected on the host, which on Linux are read from the `/sys/class/kfd/kfd/topology` nodes. If nothing is detected — a container without KFD passthrough, a login node, or a host where the `amdgpu` driver is not loaded — or if the detected architecture is not one of the shipped bundles, then no artifact is downloaded and AMDGPU.jl reports its ROCm components as unavailable. -This is not a fallback: an existing system-wide ROCm is only picked up after explicitly opting in with the `local` preference above. The bundles currently shipped cover `gfx908`, `gfx90a`, `gfx94x` and `gfx950` for Instinct, and `gfx101x`, `gfx103x`, `gfx110x`, `gfx1150` through `gfx1153` and `gfx120x` for Radeon. +There is no fallback path: the provider is decided when AMDGPU.jl is loaded, so an existing system-wide ROCm is only picked up after explicitly opting in with the `local` preference above. + +The bundles currently shipped are: + +```@eval +using AMDGPU, TOML, Markdown +toml = TOML.parsefile(joinpath(pkgdir(AMDGPU.ROCm_Runtime), "Artifacts.toml")) +bundles = Dict{String,Set{String}}() +for entry in toml["ROCm_Runtime"] + push!(get!(bundles, entry["rocm_arch"], Set{String}()), entry["os"]) +end +rows = ["| `$arch` | $(join(sort(collect(bundles[arch])), ", ")) |" + for arch in sort(collect(keys(bundles)))] +Markdown.parse(join(vcat("| Bundle | Platforms |", "|:--|:--|", rows), "\n")) +``` To pin the architecture when detection is not possible, for example when preparing a depot on a CPU-only build machine, pass `arch` a `gfx` target or a collection of them: From 35abdbb870459409832d3212f54c9a8337d83302 Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Wed, 19 Aug 2026 09:01:41 +0200 Subject: [PATCH 14/28] Up --- .buildkite/pipeline.yml | 34 +++++++++++++++++----------------- perf/Project.toml | 1 - 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 0871af2ea..f1a879146 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,9 +1,10 @@ # AMDGPU.jl chooses between the ROCm_Runtime artifacts and a local ROCm through -# ROCm_Runtime's "local" preference. Every GPU step pins that preference and +# ROCm_Runtime's "local" preference. Every GPU step writes that preference and # then asserts the provider it actually resolved to, so that a change of default -# cannot silently swap the ROCm underneath a job. The artifacts are lazy, so the -# pinning only has to happen before AMDGPU is first loaded, not before -# instantiating the project. +# cannot silently swap the ROCm underneath a job. The artifacts are lazy, so +# Pkg.instantiate/update download nothing; the pin only has to be in place +# before AMDGPU is first loaded, which also covers the steps where the +# julia-test plugin instantiates before the command below runs. steps: - label: "Documentation" plugins: @@ -38,7 +39,6 @@ steps: if: build.message !~ /\[skip docs\]/ timeout_in_minutes: 20 - # Julia 1.10 doesn't support [sources] in Project.toml, so the workspace # packages have to be dev'ed manually before instantiating -- which rules out # the julia-test plugin, whose pre-command hook instantiates the project @@ -54,12 +54,12 @@ steps: rocmgpu: "*" if: build.message !~ /\[skip tests\]/ command: | + printf '[ROCm_Runtime]\nlocal = false\n' > LocalPreferences.toml julia --project -e ' using Pkg Pkg.develop([PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")]) Pkg.update()' - julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' - julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + julia --project -e 'using AMDGPU; AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' julia --project -e 'using Pkg; Pkg.test(; coverage=true, test_args=["--verbose"])' timeout_in_minutes: 90 env: @@ -97,9 +97,9 @@ steps: rocmgpu: "*" if: build.message !~ /\[skip tests\]/ command: | + printf '[ROCm_Runtime]\nlocal = false\n' > LocalPreferences.toml julia --project -e 'using Pkg; Pkg.update()' - julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' - julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + julia --project -e 'using AMDGPU; AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' timeout_in_minutes: 90 env: JULIA_NUM_THREADS: 4 @@ -120,9 +120,9 @@ steps: rocmgpu: "*" if: build.message !~ /\[skip tests\]/ command: | + printf '[ROCm_Runtime]\nlocal = true\n' > LocalPreferences.toml julia --project -e 'using Pkg; Pkg.update()' - julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "true"; force=true)' - julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm || error("this step selected a local ROCm, but AMDGPU resolved to the ROCm artifacts")' + julia --project -e 'using AMDGPU; AMDGPU.local_rocm || error("this step selected a local ROCm, but AMDGPU resolved to the ROCm artifacts")' julia --project -e 'using Pkg; Pkg.test(; coverage=true, test_args=["--verbose"])' timeout_in_minutes: 90 env: @@ -140,12 +140,12 @@ steps: rocmgpu: "*" if: build.message !~ /\[skip tests\]/ command: | + printf '[ROCm_Runtime]\nlocal = false\n' > LocalPreferences.toml julia --project -e ' using Pkg Pkg.develop([PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")]) Pkg.update()' - julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' - julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + julia --project -e 'using AMDGPU; AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' julia --project -e 'using Pkg; Pkg.test(; test_args=["enzyme"])' timeout_in_minutes: 45 soft_fail: true @@ -165,9 +165,9 @@ steps: rocmgpu: "*" if: build.message !~ /\[skip tests\]/ command: | + printf '[ROCm_Runtime]\nlocal = false\n' > LocalPreferences.toml julia --project -e 'using Pkg; Pkg.update()' - julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' - julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + julia --project -e 'using AMDGPU; AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' timeout_in_minutes: 45 soft_fail: true env: @@ -198,13 +198,13 @@ steps: - JuliaCI/julia#v1: version: "1.12" command: | + printf '[ROCm_Runtime]\nlocal = false\n' > perf/LocalPreferences.toml julia --project=perf -e ' println("--- :julia: Instantiating benchmark project") using Pkg Pkg.develop([PackageSpec(path="."), PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")]) Pkg.instantiate()' - julia --project=perf -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' - julia --project=perf -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + julia --project=perf -e 'using AMDGPU; AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' julia --project=perf -e ' println("+++ :julia: Running benchmarks") include("perf/runbenchmarks.jl")' diff --git a/perf/Project.toml b/perf/Project.toml index fed23f7d2..fd8e4665b 100644 --- a/perf/Project.toml +++ b/perf/Project.toml @@ -1,7 +1,6 @@ [deps] AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" -Preferences = "21216c6a-2e73-6563-6e65-726566657250" StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" From ed721eb9058f0054b8647c36589be39a53a8c577 Mon Sep 17 00:00:00 2001 From: Simeon David Schaub Date: Wed, 26 Aug 2026 14:38:43 +0200 Subject: [PATCH 15/28] regenerate Artifacts.toml for TheRock 10.0 --- .github/workflows/rocm-artifact-hashes.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rocm-artifact-hashes.yml b/.github/workflows/rocm-artifact-hashes.yml index b65d58349..6852510e6 100644 --- a/.github/workflows/rocm-artifact-hashes.yml +++ b/.github/workflows/rocm-artifact-hashes.yml @@ -16,8 +16,8 @@ jobs: import Pkg Pkg.add("ArtifactUtils") using ArtifactUtils, Base.BinaryPlatforms - const rocm_version = "7.14.0" - const rocm_tag = "7.14" + const rocm_version = "10.0.0" + const rocm_tag = "10.0" for rocm_arch in [ "gfx908", @@ -37,14 +37,14 @@ jobs: platform = Platform("x86_64", "linux", Dict( "libc" => "glibc", "rocm" => rocm_tag, "rocm_arch" => replace(rocm_arch, "-" => "_"))) - add_artifact!("Artifacts.toml", "ROCm_Runtime", "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-$rocm_arch-$rocm_version.tar.gz"; lazy = true, platform) + add_artifact!("Artifacts.toml", "ROCm_Runtime", "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-linux-$rocm_arch-$rocm_version.tar.gz"; lazy = true, platform) startswith(rocm_arch, "gfx9") && continue @info "Windows, $rocm_arch" platform = Platform("x86_64", "windows", Dict( "rocm" => rocm_tag, "rocm_arch" => replace(rocm_arch, "-" => "_"))) - add_artifact!("Artifacts.toml", "ROCm_Runtime", "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-windows-$rocm_arch-$rocm_version.tar.gz"; lazy = true, platform) + add_artifact!("Artifacts.toml", "ROCm_Runtime", "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-windows-$rocm_arch-$rocm_version.tar.gz"; lazy = true, platform) end - name: Upload hash report uses: actions/upload-artifact@v4 From cd4260e73086d15ec5374972867f205c06606368 Mon Sep 17 00:00:00 2001 From: Simeon David Schaub Date: Wed, 26 Aug 2026 16:16:01 +0000 Subject: [PATCH 16/28] Adapt to TheRock 10.0 and re-enable the CSCS artifact job Ship the ROCm 10.0 TheRock bundles from stable.repo.amd.com: regenerate Artifacts.toml, bump ROCm_Runtime to 10.0.0 and the selectable toolkit version along with AMDGPU's compat bound, and update the docs. The CSCS MI300 artifact job is re-enabled with allow_failure, since the hipErrorOutOfMemory failure on gfx942 was seen with the 7.14 bundle. Assisted-by: Claude Code (claude-fable-5) --- Project.toml | 2 +- ROCm_Runtime/.pkg/platform_augmentation.jl | 2 +- ROCm_Runtime/Artifacts.toml | 160 ++++++++++----------- ROCm_Runtime/Project.toml | 2 +- ci/cscs-mi300.yml | 26 ++-- docs/src/install_tips.md | 2 +- 6 files changed, 96 insertions(+), 98 deletions(-) diff --git a/Project.toml b/Project.toml index b18add29c..b10425f96 100644 --- a/Project.toml +++ b/Project.toml @@ -74,7 +74,7 @@ PrecompileTools = "1" Preferences = "1" PrettyTables = "3" ROCmDeviceLibs_jll = "=5.6.1, =6.2.1, =7.0.2" -ROCm_Runtime = "7.14" +ROCm_Runtime = "10.0" ROCm_Runtime_Discovery = "0.1" Random123 = "1.6" RandomNumbers = "1.5" diff --git a/ROCm_Runtime/.pkg/platform_augmentation.jl b/ROCm_Runtime/.pkg/platform_augmentation.jl index b2a6f765e..88d629604 100644 --- a/ROCm_Runtime/.pkg/platform_augmentation.jl +++ b/ROCm_Runtime/.pkg/platform_augmentation.jl @@ -1,5 +1,5 @@ const ROCm_Runtime_uuid = Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355") -const rocm_toolkits = VersionNumber[v"7.14.0"] +const rocm_toolkits = VersionNumber[v"10.0.0"] # Platform augmentation for ROCm_Runtime. # # Artifacts are selected based on two platform tags: diff --git a/ROCm_Runtime/Artifacts.toml b/ROCm_Runtime/Artifacts.toml index f5a4f0787..986eba0f9 100644 --- a/ROCm_Runtime/Artifacts.toml +++ b/ROCm_Runtime/Artifacts.toml @@ -1,232 +1,232 @@ [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "2ad0783e0d8f96e15cc91c08a5fd1afc81012044" +git-tree-sha1 = "637e218683756f061497d3607773626ff841d3bf" lazy = true libc = "glibc" os = "linux" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx908" [[ROCm_Runtime.download]] - sha256 = "1686270efa2e523889168ec6a4343f2e53f173d6026fdb9c6b308d99f99d99fa" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx908-7.14.0.tar.gz" + sha256 = "d66ea48f449cdf9fa3e5d89a608998e465aeef01531be94be5f2cbd80c4712d3" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-linux-gfx908-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "6cd48e7425c8a2d0786a76910ec5cd995ce339df" +git-tree-sha1 = "8876f83a5e596890e4b20dbec46f204b25e3e900" lazy = true libc = "glibc" os = "linux" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx90a" [[ROCm_Runtime.download]] - sha256 = "b1caebb79f542951114ef6478ea587a691d005cc13c2efadfec577bd82b6fc78" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx90a-7.14.0.tar.gz" + sha256 = "19cc76973a79622fd9d9be67101abf2c2a0a997658083e359c5b9accf10fef79" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-linux-gfx90a-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "cffed7643bd98c8c2be8aca8f2af2740919baa4c" +git-tree-sha1 = "fa17307c250e615312df7f304bebedd3f1493dc1" lazy = true libc = "glibc" os = "linux" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx94x_dcgpu" [[ROCm_Runtime.download]] - sha256 = "32e16dca7f8440a08a8d636a6a7db0034c61518f32ea915347b98d9f55199b0c" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx94X-dcgpu-7.14.0.tar.gz" + sha256 = "a7e105c74c26ef88d12f66712a0af1a107ded0405890a8e2389254ed046e7b06" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-linux-gfx94X-dcgpu-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "4c83a0714d0377bc3410162422c615e3db0312cd" +git-tree-sha1 = "dea80fd28573502056af452a5938eb292e93c117" lazy = true libc = "glibc" os = "linux" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx950_dcgpu" [[ROCm_Runtime.download]] - sha256 = "12afeccd06e6caf0699d86d688f16083aafa35474d0ec1d8063477fb5c119d49" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx950-dcgpu-7.14.0.tar.gz" + sha256 = "3bf27df141e78dbb14e4e1af3b5f8a4238ff8bf97565ccedd965ae4dddc5e9c8" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-linux-gfx950-dcgpu-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "80f47907c7eee68d84c4e0ab59e7ff2c49a2e414" +git-tree-sha1 = "26746d22267fefdb540aaac6d73b890b1ba49fda" lazy = true libc = "glibc" os = "linux" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx101x_dgpu" [[ROCm_Runtime.download]] - sha256 = "fdb302ee45e9e3a6dcb6bab295fdf2e6a4c0f8b2c7a4937698b18178715822d9" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx101X-dgpu-7.14.0.tar.gz" + sha256 = "8f69ac5cd3785615a972aa9f90377c7401d5d6a98ede057da68eb2c438b7527b" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-linux-gfx101X-dgpu-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "819e3da69d2a73dad9b468a95bd0da508d34d9b8" +git-tree-sha1 = "d8cb14c7ae58333e5b4f1bd6e38dc08ba50c9d38" lazy = true os = "windows" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx101x_dgpu" [[ROCm_Runtime.download]] - sha256 = "58b33f43d67dae68087cff37494c13267a7613eda6202e1ee904097643e5958d" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-windows-gfx101X-dgpu-7.14.0.tar.gz" + sha256 = "3f25efd1ddefae7cd384888f53e99c4557f4f6d0a3f5cb7b81a3fe4e15b90e2e" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-windows-gfx101X-dgpu-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "41050555b43ef6fdfd8c0984835c37aa659595b2" +git-tree-sha1 = "e4f5e28fa8fbd368ab781a6153e88b165f95692e" lazy = true libc = "glibc" os = "linux" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx103x_all" [[ROCm_Runtime.download]] - sha256 = "ce9a5be2b43ee1bdd85de3fa9ea3c3d5dcb6875445acf7281c3763a4ee783f19" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx103X-all-7.14.0.tar.gz" + sha256 = "1913cf553193a5642bc0894807e68dd206724b377b779101add8e62844c2e20c" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-linux-gfx103X-all-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "2174846a8ed3e2bd9818b1123a3c538710397211" +git-tree-sha1 = "28bf643374e4e5021209e2d8231fe4522907a624" lazy = true os = "windows" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx103x_all" [[ROCm_Runtime.download]] - sha256 = "93f5244854cd1bec2ea29bb977e448a2b79c7ee77609d253ab075ea24404462c" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-windows-gfx103X-all-7.14.0.tar.gz" + sha256 = "8e29a6c77b472307bc01ccbdb7e1684efda68ae5d03618a5a2ca17abf10f70b2" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-windows-gfx103X-all-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "630f182a18238591accf77eac78b012c54edc991" +git-tree-sha1 = "2180675b4c8b9e1743d1f7a0ddf7c4bec3540533" lazy = true libc = "glibc" os = "linux" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx110x_all" [[ROCm_Runtime.download]] - sha256 = "e78a4445c52d879fbd0765f24e7fa9df1e262a8baf681b118a13e75340120127" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx110X-all-7.14.0.tar.gz" + sha256 = "1fdac4cfda1ff7f2d31a89737d4a21f9ce87cb857d26fa460e35f1e4537a330a" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-linux-gfx110X-all-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "85b35df9b9350fc7b3e4250cacc092956e1b353a" +git-tree-sha1 = "0975d5b2e2d29a1f7a0d47dfa7e13b0ce51717c6" lazy = true os = "windows" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx110x_all" [[ROCm_Runtime.download]] - sha256 = "3ce5d7fcd56f7b169ba9f95916553b7cd6bb0370d98b1c0ce572eb34874630d6" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-windows-gfx110X-all-7.14.0.tar.gz" + sha256 = "19626525dac45b72dea984af6489dafa9fe2e2d336bb7b30fc4a20e08cf13949" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-windows-gfx110X-all-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "a937f9dec93d4725a6a8e63d25a451462f3a6dd2" +git-tree-sha1 = "0589543f3ba6567f68aa4c8ef84aa23e68b6d70d" lazy = true libc = "glibc" os = "linux" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx1150" [[ROCm_Runtime.download]] - sha256 = "d73f8e29a21d031051466dad88d5dba273582819521f5930d9f100a7e7dd0905" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx1150-7.14.0.tar.gz" + sha256 = "e2fc089e2874dcff88384f387d5bb0553ac1392d5cd1c96d6ade0233a94a8c4b" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-linux-gfx1150-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "3c9251ddc93dd54a384da0c4ffceb741492ddd28" +git-tree-sha1 = "49ba401abe24da0cb100f46dd8d050707ce09c66" lazy = true os = "windows" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx1150" [[ROCm_Runtime.download]] - sha256 = "5f990ab9a3ca55b39fe771c92877fc950ba7a1702004d27395b2b7bf8a7ec56d" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-windows-gfx1150-7.14.0.tar.gz" + sha256 = "6bd34e8c7214a8b63f24f66560a0885a35c46b6cf14ef127a7cdc5c62a629a59" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-windows-gfx1150-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "3b92bdbcfb9b33ab013fc7f6b4380f9e5ea426e0" +git-tree-sha1 = "9b8d6ca4e5ca156efcfac8a90224339c5e56d35b" lazy = true libc = "glibc" os = "linux" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx1151" [[ROCm_Runtime.download]] - sha256 = "2567d5e34e470db104a62a02c36aa770cb0430175e48c1c46df0eefc05e1d77c" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx1151-7.14.0.tar.gz" + sha256 = "4feabd9f2da72352df37f6d714a54847d3fe913c0341fbe2a6542c1164024baf" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-linux-gfx1151-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "f018d64189fe218dc83838acfc6e8d3cabc28064" +git-tree-sha1 = "4ace42239649ca458d32508eddf976ce03ed2a7e" lazy = true os = "windows" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx1151" [[ROCm_Runtime.download]] - sha256 = "6d962c8868388e3d81a504c3b58caada49d40fd7a67b52da73319159f1479fe7" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-windows-gfx1151-7.14.0.tar.gz" + sha256 = "1293927b06b3b8d4bd7e0265823fb998bc9e0d83c68f33dcfa5d32663b30ce38" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-windows-gfx1151-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "b14bbbec7bad73b6219f00e586939eebc85ea1a6" +git-tree-sha1 = "67f477db16318da9f624c9ad6e73cc1e05e1c959" lazy = true libc = "glibc" os = "linux" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx1152" [[ROCm_Runtime.download]] - sha256 = "390c87f4bcacf026578fbfb36267a23912524f023f77f7f9322ecaaf61d88b60" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx1152-7.14.0.tar.gz" + sha256 = "bbe902444055d2bd4fed1db4eb15873d17041d488ae64f320ca1d283e42474f2" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-linux-gfx1152-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "9508c468d0a36f831a7abba11a839eced5dbd2fd" +git-tree-sha1 = "01d1c5ab31f6bb11b4e7cefa270891788e03d015" lazy = true os = "windows" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx1152" [[ROCm_Runtime.download]] - sha256 = "2966c84fcb14865e5700603d68267cf037b18cf65b862e642553f3a882ab4bee" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-windows-gfx1152-7.14.0.tar.gz" + sha256 = "2751fea94f389de39ae26ddc1fa0586edd642b6ef2ccfd1e7e9c53abdae9dd52" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-windows-gfx1152-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "f1a466b893b71f2f3498d6f1455cd802912edb4f" +git-tree-sha1 = "a8b7651e2be0217f038f8d053030fb7aacec88e9" lazy = true libc = "glibc" os = "linux" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx1153" [[ROCm_Runtime.download]] - sha256 = "56dc233ace740364dca06ca12c22749a85e5f5f54ae3812ca24426d3c5eb787d" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx1153-7.14.0.tar.gz" + sha256 = "7a34d3d63511bdbe2b5f782a429a88b9e200ae628ffae5c17cde980cd4597269" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-linux-gfx1153-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "9a18bc0d8e4d1b78d5deeab1e0ad131d7185ec72" +git-tree-sha1 = "f3f6e62e74b028bf536f37e3c93c231b5f31d810" lazy = true os = "windows" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx1153" [[ROCm_Runtime.download]] - sha256 = "465070a1004cbd6c6762f5e43ba96a5ce8c1a83a7c0fa6c4aad2d8563d82fc28" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-windows-gfx1153-7.14.0.tar.gz" + sha256 = "c9b4659fcaf356d8c5e9e6eedbe60cd99e28037c4419079b779d29d765a30eb2" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-windows-gfx1153-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "d9c9fb1280e4e369cdde165ce7cad1784644cfef" +git-tree-sha1 = "140dfa71ff8632f7b87bf8b5cfb23a95617fcc4e" lazy = true libc = "glibc" os = "linux" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx120x_all" [[ROCm_Runtime.download]] - sha256 = "2a304d07b925c7e46e51fa8f719b195a9bfe2df2cc920d706f10a29d2d2471af" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-linux-gfx120X-all-7.14.0.tar.gz" + sha256 = "eb99db434a1738fd83b0c3b933146cdb76418f35fcf4647743fbdfef76e8c71f" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-linux-gfx120X-all-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" -git-tree-sha1 = "9f1512af1b1bcbbd41cc144ed59ef01c318a5f6d" +git-tree-sha1 = "a60f9208b01538710af5625028395d4de20612f7" lazy = true os = "windows" -rocm = "7.14" +rocm = "10.0" rocm_arch = "gfx120x_all" [[ROCm_Runtime.download]] - sha256 = "87091e92ff9fcc0a590193b9d42bd48cf8e9ce9df258efeb52de7d3c3e44d395" - url = "https://repo.amd.com/rocm/tarball-multi-arch/therock-dist-windows-gfx120X-all-7.14.0.tar.gz" + sha256 = "75da73c483cbc0456d9008f2079b333f4f9d3b7744705378ff8007e502ca38c5" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-windows-gfx120X-all-10.0.0.tar.gz" diff --git a/ROCm_Runtime/Project.toml b/ROCm_Runtime/Project.toml index f19763516..57834132b 100644 --- a/ROCm_Runtime/Project.toml +++ b/ROCm_Runtime/Project.toml @@ -1,7 +1,7 @@ name = "ROCm_Runtime" uuid = "3129f4d2-de71-4ff3-9833-76037e3ea355" authors = ["Julian P Samaroo ", "Valentin Churavy ", "Anton Smirnov "] -version = "7.14.0" +version = "10.0.0" [deps] Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" diff --git a/ci/cscs-mi300.yml b/ci/cscs-mi300.yml index 9ce0b2957..81436dae3 100644 --- a/ci/cscs-mi300.yml +++ b/ci/cscs-mi300.yml @@ -72,17 +72,15 @@ UnitTest julia 1.12 (system ROCm): ROCM_LOCAL: "true" script: *unit_test_script -# Coverage of the artifact path, what AMDGPU.jl uses by default. Disabled for -# now: with the ROCm 7.14 TheRock bundle, every HIP application fails at its -# first stream creation on gfx942, reported as hipErrorOutOfMemory even though -# nothing runs out of memory. See https://github.com/ROCm/TheRock/issues/7426. -# Re-enable, with allow_failure until it is green, once that is fixed; the -# ROCM_LOCAL switch above already handles both variants. -# -# UnitTest julia 1.12 (ROCm artifacts): -# extends: .baremetal-runner-beverin-mi300 -# allow_failure: true -# variables: -# <<: *common_variables -# ROCM_LOCAL: "false" -# script: *unit_test_script +# Coverage of the artifact path, what AMDGPU.jl uses by default. Allowed to +# fail for now: with the ROCm 7.14 TheRock bundle, every HIP application failed +# at its first stream creation on gfx942, reported as hipErrorOutOfMemory even +# though nothing ran out of memory (https://github.com/ROCm/TheRock/issues/7426). +# Drop allow_failure once the job is green with the ROCm 10.0 bundle. +UnitTest julia 1.12 (ROCm artifacts): + extends: .baremetal-runner-beverin-mi300 + allow_failure: true + variables: + <<: *common_variables + ROCM_LOCAL: "false" + script: *unit_test_script diff --git a/docs/src/install_tips.md b/docs/src/install_tips.md index bf63a8407..8106484bc 100644 --- a/docs/src/install_tips.md +++ b/docs/src/install_tips.md @@ -59,7 +59,7 @@ AMDGPU.set_rocm_version!(arch="gfx942") As with `local`, this writes the `arch` preference of `ROCm_Runtime`, so it can equally be set with `set_preferences!` before AMDGPU.jl is loaded. -The `version` preference selects which ROCm distribution the bundle is taken from. Only 7.14 is currently available, so it mainly becomes useful for pinning once more versions ship. +The `version` preference selects which ROCm distribution the bundle is taken from. Only 10.0 is currently available, so it mainly becomes useful for pinning once more versions ship. ## Local ROCm discovery From ff8c5c7266ffad6400ec8610afb673f96a72a462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20R=C3=A4ss?= <61313342+luraess@users.noreply.github.com> Date: Thu, 3 Sep 2026 09:15:12 +0200 Subject: [PATCH 17/28] Makes artifact ROCm survive a machine that already has a ROCm in its environment (#1062) --- ROCm_Runtime/src/ROCm_Runtime.jl | 25 +++++++++++++++++++++++++ ci/cscs-mi300.yml | 21 +++++++++------------ 2 files changed, 34 insertions(+), 12 deletions(-) diff --git a/ROCm_Runtime/src/ROCm_Runtime.jl b/ROCm_Runtime/src/ROCm_Runtime.jl index d58b7d3fa..1c861866b 100644 --- a/ROCm_Runtime/src/ROCm_Runtime.jl +++ b/ROCm_Runtime/src/ROCm_Runtime.jl @@ -65,6 +65,27 @@ function get_library(name::String)::String return "" end +# HIP pulls `libamd_comgr` in transitively, so a system ROCm on LD_LIBRARY_PATH +# displaces the bundle's. Claim the soname first. +function preload_comgr() + isempty(libamd_comgr) && return + try + Libdl.dlopen(libamd_comgr) + catch err + @debug "Could not preload $libamd_comgr" exception=(err, catch_backtrace()) + end + return +end + +# comgr roots its clang driver at LLVM_PATH, which then picks up the device +# libraries named by ROCM_PATH / HIP_DEVICE_LIB_PATH / DEVICE_LIB_PATH. +function clear_llvm_path() + haskey(ENV, "LLVM_PATH") || return + @debug "Unsetting LLVM_PATH ($(ENV["LLVM_PATH"])): it redirects comgr away from the ROCm artifact" + delete!(ENV, "LLVM_PATH") + return +end + function __init__() global artifact_dir = find_artifact_dir() is_available() || return @@ -84,6 +105,10 @@ function __init__() global libhipblaslt = get_library(lib_prefix * "hipblaslt") global libhiptensor = get_library(lib_prefix * "hiptensor") global libMIOpen = get_library(lib_prefix * "MIOpen") + + # Both must precede `AMDGPU.__init__`, which loads HSA and HIP. + preload_comgr() + clear_llvm_path() end end diff --git a/ci/cscs-mi300.yml b/ci/cscs-mi300.yml index 98012780f..229b3b32f 100644 --- a/ci/cscs-mi300.yml +++ b/ci/cscs-mi300.yml @@ -30,13 +30,10 @@ include: paths: - rocfft-trace.log -# AMDGPU.jl takes ROCm either from the uenv ($ROCM_LOCAL == "true": the merged -# ROCM_PATH below, resolved through ROCm_Runtime_Discovery) or from the TheRock -# artifacts shipped by ROCm_Runtime ($ROCM_LOCAL == "false"). Which one is used -# is decided by ROCm_Runtime's "local" preference; it is a compile-time -# preference that also gates artifact resolution, so it has to be set before -# Pkg.instantiate(). It is set explicitly in both variants rather than relying -# on the default, and the resolved provider is asserted afterwards, so that a +# ROCm comes from the uenv ($ROCM_LOCAL == "true", via the merged ROCM_PATH below +# and ROCm_Runtime_Discovery) or from the TheRock artifacts. ROCm_Runtime's "local" +# preference decides, and gates artifact resolution too, so it must be set before +# Pkg.instantiate(). Both variants set it explicitly and assert the result, so a # change of default cannot silently swap the ROCm underneath a job. .unit_test_script: &unit_test_script - srun -n 1 --uenv $UENV --view=default bash -c ' @@ -92,11 +89,11 @@ UnitTest julia 1.13 (system ROCm): script: *unit_test_script artifacts: *trace_artifacts -# Coverage of the artifact path, what AMDGPU.jl uses by default. Allowed to -# fail for now: with the ROCm 7.14 TheRock bundle, every HIP application failed -# at its first stream creation on gfx942, reported as hipErrorOutOfMemory even -# though nothing ran out of memory (https://github.com/ROCm/TheRock/issues/7426). -# Drop allow_failure once the job is green with the ROCm 10.0 bundle. +# Coverage of the artifact path, what AMDGPU.jl uses by default. Allowed to fail +# until green on the 10.0 bundle: a ROCm in the environment can displace the +# bundle's libamd_comgr, failing the blit-kernel link at the first stream and +# reporting it as hipErrorOutOfMemory. ROCm_Runtime works around it; see +# https://github.com/ROCm/TheRock/issues/7426. UnitTest julia 1.12 (ROCm artifacts): extends: .baremetal-runner-beverin-mi300 allow_failure: true From dc4b9976976b626e7b91f58de1564e9d5d4f7974 Mon Sep 17 00:00:00 2001 From: Simeon David Schaub Date: Thu, 3 Sep 2026 07:37:20 +0000 Subject: [PATCH 18/28] Cover every TheRock 10.0 family and make the CSCS artifact job required The ROCm artifact job on CSCS is no longer allowed to fail now that ROCm_Runtime works around the libamd_comgr displacement. The Artifacts.toml generation script missed families TheRock publishes for 10.0: gfx125X-dcgpu on Linux, and the gfx908/gfx90a Windows bundles, which the old "skip Windows for gfx9" rule dropped. Only the data-center (-dcgpu) families are Linux-only, so skip Windows on that suffix instead. Artifacts.toml itself still needs regenerating on CI. Platform augmentation already matches gfx125X against a detected gfx1250, but Windows detection goes by marketing name, so add the Instinct MI100 and MI210/MI250 names for the newly shipped Windows gfx9 bundles. Assisted-by: Claude Code (claude-fable-5-1) --- .github/workflows/rocm-artifact-hashes.yml | 7 ++++++- ROCm_Runtime/.pkg/platform_augmentation.jl | 4 ++++ ci/cscs-mi300.yml | 10 ++++------ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rocm-artifact-hashes.yml b/.github/workflows/rocm-artifact-hashes.yml index 6852510e6..4f1ec44a4 100644 --- a/.github/workflows/rocm-artifact-hashes.yml +++ b/.github/workflows/rocm-artifact-hashes.yml @@ -19,11 +19,16 @@ jobs: const rocm_version = "10.0.0" const rocm_tag = "10.0" + # Every family TheRock publishes for this release; see the listing at + # https://stable.repo.amd.com/rocm/core/tarball/ and + # https://github.com/ROCm/TheRock/blob/main/build_tools/github_actions/amdgpu_family_matrix.py. + # The data-center families (`-dcgpu`) are only built for Linux. for rocm_arch in [ "gfx908", "gfx90a", "gfx94X-dcgpu", "gfx950-dcgpu", + "gfx125X-dcgpu", "gfx101X-dgpu", "gfx103X-all", "gfx110X-all", @@ -39,7 +44,7 @@ jobs: "rocm_arch" => replace(rocm_arch, "-" => "_"))) add_artifact!("Artifacts.toml", "ROCm_Runtime", "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-linux-$rocm_arch-$rocm_version.tar.gz"; lazy = true, platform) - startswith(rocm_arch, "gfx9") && continue + endswith(rocm_arch, "-dcgpu") && continue @info "Windows, $rocm_arch" platform = Platform("x86_64", "windows", Dict( "rocm" => rocm_tag, diff --git a/ROCm_Runtime/.pkg/platform_augmentation.jl b/ROCm_Runtime/.pkg/platform_augmentation.jl index 88d629604..c6e3eaca4 100644 --- a/ROCm_Runtime/.pkg/platform_augmentation.jl +++ b/ROCm_Runtime/.pkg/platform_augmentation.jl @@ -41,6 +41,10 @@ end # marketing-name substrings => gfx architecture family, for hosts where we cannot # query the driver for the real architecture (i.e. Windows) const device_name_archs = [ + # CDNA2: Instinct MI210 / MI250 / MI250X + ["mi210", "mi250"] => "gfx90a", + # CDNA: Instinct MI100 + ["mi100"] => "gfx908", # STX Halo iGPUs: Radeon 8050S / 8060S Graphics ["8050s", "8060s", "device 1586"] => "gfx1151", # STX Point iGPUs: Radeon 880M / 890M Graphics diff --git a/ci/cscs-mi300.yml b/ci/cscs-mi300.yml index 229b3b32f..1280dd7a3 100644 --- a/ci/cscs-mi300.yml +++ b/ci/cscs-mi300.yml @@ -89,14 +89,12 @@ UnitTest julia 1.13 (system ROCm): script: *unit_test_script artifacts: *trace_artifacts -# Coverage of the artifact path, what AMDGPU.jl uses by default. Allowed to fail -# until green on the 10.0 bundle: a ROCm in the environment can displace the -# bundle's libamd_comgr, failing the blit-kernel link at the first stream and -# reporting it as hipErrorOutOfMemory. ROCm_Runtime works around it; see -# https://github.com/ROCm/TheRock/issues/7426. +# Coverage of the artifact path, what AMDGPU.jl uses by default. A ROCm in the +# environment can displace the bundle's libamd_comgr, failing the blit-kernel +# link at the first stream and reporting it as hipErrorOutOfMemory; +# ROCm_Runtime works around it, see https://github.com/ROCm/TheRock/issues/7426. UnitTest julia 1.12 (ROCm artifacts): extends: .baremetal-runner-beverin-mi300 - allow_failure: true variables: <<: *common_variables JULIA: /users/lraess/julia_amd/julia_amd-1.12 From ecc65ba31109074598dad61c4d1fac0ee8597175 Mon Sep 17 00:00:00 2001 From: Simeon David Schaub Date: Thu, 3 Sep 2026 07:43:34 +0000 Subject: [PATCH 19/28] Preload comgr in the isolated rocSPARSE version probe Upstream (#1051) moved the rocSPARSE version probe into a bare child process that dlopens librocsparse directly. That child no longer runs ROCm_Runtime.__init__, so it misses the comgr preload that keeps a system ROCm on the library path from displacing the bundle's libamd_comgr, and the probe would report "err" on exactly the hosts the workaround targets. Preload the provider's comgr in the child as well. The bundle's libraries carry an $ORIGIN RUNPATH, so nothing else is needed for them to resolve. Assisted-by: Claude Code (claude-fable-5-1) --- src/utils.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utils.jl b/src/utils.jl index 73ae2c7ff..2e1dabcf9 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -34,7 +34,13 @@ function _rocsparse_version_isolated(; timeout::Real = 20) isempty(_ROCSPARSE_VERSION) || return _ROCSPARSE_VERSION lib = repr(librocsparse) # `repr` so Windows separators survive the parser + # HIP loads comgr by soname, so a system ROCm in the environment can displace + # the provider's copy. The parent claims the soname first (see + # `ROCm_Runtime.preload_comgr`); the child has to do the same. + preload = isempty(libamd_comgr) ? "" : + "Base.Libc.Libdl.dlopen($(repr(libamd_comgr)); throw_error = false)" out = _version_subprocess(""" + $preload handle = Ref{Ptr{Cvoid}}(C_NULL) ccall((:rocsparse_create_handle, $lib), Cint, (Ptr{Ptr{Cvoid}},), handle) == 0 || exit(2) From 4ad3bb2d8aa1ff0284904979b31cd37b2a52b5b8 Mon Sep 17 00:00:00 2001 From: Simeon David Schaub Date: Thu, 3 Sep 2026 11:24:42 +0200 Subject: [PATCH 20/28] add missing archs to Artifacts.toml --- ROCm_Runtime/Artifacts.toml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/ROCm_Runtime/Artifacts.toml b/ROCm_Runtime/Artifacts.toml index 986eba0f9..76a640a07 100644 --- a/ROCm_Runtime/Artifacts.toml +++ b/ROCm_Runtime/Artifacts.toml @@ -12,6 +12,17 @@ rocm_arch = "gfx908" url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-linux-gfx908-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" +git-tree-sha1 = "ecd6fa45b838b9657a822d59b1fea517909606f3" +lazy = true +os = "windows" +rocm = "10.0" +rocm_arch = "gfx908" + + [[ROCm_Runtime.download]] + sha256 = "540fe72255f2a6e689e84ae397f84d9b5b0a364a8fbbdc71aef760d24f90c52b" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-windows-gfx908-10.0.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" git-tree-sha1 = "8876f83a5e596890e4b20dbec46f204b25e3e900" lazy = true libc = "glibc" @@ -24,6 +35,17 @@ rocm_arch = "gfx90a" url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-linux-gfx90a-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" +git-tree-sha1 = "1a9204b2728852b8918a50220102b177a2f651c8" +lazy = true +os = "windows" +rocm = "10.0" +rocm_arch = "gfx90a" + + [[ROCm_Runtime.download]] + sha256 = "e50d093592e5e74325e78f1936872a9fd4e9fb8c47784416fb8260819a02a781" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-windows-gfx90a-10.0.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" git-tree-sha1 = "fa17307c250e615312df7f304bebedd3f1493dc1" lazy = true libc = "glibc" @@ -48,6 +70,18 @@ rocm_arch = "gfx950_dcgpu" url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-linux-gfx950-dcgpu-10.0.0.tar.gz" [[ROCm_Runtime]] arch = "x86_64" +git-tree-sha1 = "44352ef67849d04e76f27958918a607de8c9659b" +lazy = true +libc = "glibc" +os = "linux" +rocm = "10.0" +rocm_arch = "gfx125x_dcgpu" + + [[ROCm_Runtime.download]] + sha256 = "cb4c2b37fa496cca0ae7f6372cd759a590539d628144270dbec1d6f9af18be41" + url = "https://stable.repo.amd.com/rocm/core/tarball/therock-dist-linux-gfx125X-dcgpu-10.0.0.tar.gz" +[[ROCm_Runtime]] +arch = "x86_64" git-tree-sha1 = "26746d22267fefdb540aaac6d73b890b1ba49fda" lazy = true libc = "glibc" From 36f3f20340cb41b0fc8e1aec1cdb07817bd6a9e7 Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Thu, 3 Sep 2026 13:32:35 +0200 Subject: [PATCH 21/28] Artifact fix in uenv --- ROCm_Runtime/src/ROCm_Runtime.jl | 93 +++++++++++++++++++++++++------- ci/cscs-mi300.yml | 5 ++ src/AMDGPU.jl | 18 +++++++ src/utils.jl | 36 ++++++++++++- 4 files changed, 133 insertions(+), 19 deletions(-) diff --git a/ROCm_Runtime/src/ROCm_Runtime.jl b/ROCm_Runtime/src/ROCm_Runtime.jl index 1c861866b..92391fc84 100644 --- a/ROCm_Runtime/src/ROCm_Runtime.jl +++ b/ROCm_Runtime/src/ROCm_Runtime.jl @@ -65,27 +65,85 @@ function get_library(name::String)::String return "" end -# HIP pulls `libamd_comgr` in transitively, so a system ROCm on LD_LIBRARY_PATH -# displaces the bundle's. Claim the soname first. -function preload_comgr() - isempty(libamd_comgr) && return - try - Libdl.dlopen(libamd_comgr) - catch err - @debug "Could not preload $libamd_comgr" exception=(err, catch_backtrace()) +# Claimed from the bundle before LD_LIBRARY_PATH can resolve them elsewhere. +# Leaves first, as (subdirectory of the library directory, prefix, open all). +const PRELOAD_LIBRARIES = [ + ("rocm_sysdeps/lib", "librocm_sysdeps_", true), + ("llvm/lib", "libLLVM", false), + ("llvm/lib", "libclang-cpp", false), + ("", "librocprofiler-register", false), + ("", "libhsa-runtime64", false), + ("", "libamd_comgr", false), + ("", "libhiprtc", false), + ("", "librocm_kpack", false), +] + +# path => :loaded / :failed, prefix => :absent. Shown by `AMDGPU.versioninfo()`. +global preload_log::Vector{Pair{String,Symbol}} = Pair{String,Symbol}[] + +function find_libraries(subdir::String, prefix::String, every::Bool)::Vector{String} + dir = joinpath(artifact_dir, Sys.iswindows() ? "bin" : "lib", subdir) + isdir(dir) || return String[] + paths = String[] + # `every` marks a family prefix; otherwise the prefix is a whole library + # name, and must not also match a longer one (`libhiprtc-builtins`). + for file in readdir(dir) # sorted, so `libfoo.so` precedes `libfoo.so.N` + startswith(file, every ? prefix : prefix * ".") && + occursin("." * Libdl.dlext, file) || continue + push!(paths, joinpath(dir, file)) + every || break end - return + return paths end -# comgr roots its clang driver at LLVM_PATH, which then picks up the device -# libraries named by ROCM_PATH / HIP_DEVICE_LIB_PATH / DEVICE_LIB_PATH. -function clear_llvm_path() - haskey(ENV, "LLVM_PATH") || return - @debug "Unsetting LLVM_PATH ($(ENV["LLVM_PATH"])): it redirects comgr away from the ROCm artifact" - delete!(ENV, "LLVM_PATH") +function preload_bundle() + Sys.islinux() || return + empty!(preload_log) + seen = Set{String}() + for (subdir, prefix, every) in PRELOAD_LIBRARIES + paths = find_libraries(subdir, prefix, every) + if isempty(paths) + push!(preload_log, joinpath(subdir, prefix * "*") => :absent) + continue + end + for path in paths + resolved = try realpath(path) catch; path end + resolved in seen && continue + push!(seen, resolved) + try + # RTLD_LOCAL (Julia's default) already claims the soname. + Libdl.dlopen(path) + push!(preload_log, path => :loaded) + catch err + push!(preload_log, path => :failed) + @debug "Could not preload $path" exception=(err, catch_backtrace()) + end + end + end return end +# Variables that point comgr at another ROCm's device libraries. Reported, not +# removed: which one a bundle honours has moved between ROCm releases. +const REDIRECT_ENV = ["LLVM_PATH", "HIP_DEVICE_LIB_PATH", "DEVICE_LIB_PATH"] + +redirect_env() = [name => ENV[name] for name in REDIRECT_ENV if haskey(ENV, name)] + +# ROCm libraries mapped from outside the bundle: two ROCm versions live at once. +const FOREIGN_LIBRARY_NAMES = [ + "libamd_comgr", "libhsa-runtime64", "libamdhip64", "libhiprtc", + "librocprofiler-register", "librocm_kpack", "libLLVM", "libclang-cpp", +] + +function foreign_libraries()::Vector{String} + isempty(artifact_dir) && return String[] + julia_dir = dirname(Sys.BINDIR) # Julia ships its own libLLVM + return filter(Libdl.dllist()) do path + any(n -> startswith(basename(path), n), FOREIGN_LIBRARY_NAMES) && + !startswith(path, artifact_dir) && !startswith(path, julia_dir) + end +end + function __init__() global artifact_dir = find_artifact_dir() is_available() || return @@ -106,9 +164,8 @@ function __init__() global libhiptensor = get_library(lib_prefix * "hiptensor") global libMIOpen = get_library(lib_prefix * "MIOpen") - # Both must precede `AMDGPU.__init__`, which loads HSA and HIP. - preload_comgr() - clear_llvm_path() + # Must precede `AMDGPU.__init__`, which loads HSA and HIP. + preload_bundle() end end diff --git a/ci/cscs-mi300.yml b/ci/cscs-mi300.yml index 1280dd7a3..8c716f2fe 100644 --- a/ci/cscs-mi300.yml +++ b/ci/cscs-mi300.yml @@ -20,6 +20,9 @@ include: JULIA_DEPOT_PATH: "${CI_PROJECT_DIR}/.julia" # overrides default ~/.julia JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" + # Job-scoped: comgr's cache key omits the device-library paths. + # The default ~/.cache/comgr persists across runs and ROCm versions on a shared runner. + AMD_COMGR_CACHE_DIR: "${CI_PROJECT_DIR}/.comgr-cache" # Trace layer: prints the exception behind an opaque rocfft_status_failure. ROCFFT_LAYER: "1" ROCFFT_LOG_TRACE_PATH: "${CI_PROJECT_DIR}/rocfft-trace.log" @@ -54,6 +57,8 @@ include: ln -s "$libdir"/libMIOpen* "$MERGED_ROCM/lib/" 2>/dev/null || true; done; export ROCM_PATH="$MERGED_ROCM"; + else + unset LLVM_PATH HIP_DEVICE_LIB_PATH DEVICE_LIB_PATH; fi; exec "$0" "$@" ' $JULIA --project -e ' diff --git a/src/AMDGPU.jl b/src/AMDGPU.jl index c4b533669..4c44eb43d 100644 --- a/src/AMDGPU.jl +++ b/src/AMDGPU.jl @@ -234,6 +234,24 @@ function __init__() end end + # Another ROCm in the environment breaks compilation in ways that surface far + # from the cause, so name it up front. + if !local_rocm && functional(:hip) + redirects = ROCm_Runtime.redirect_env() + isempty(redirects) || @warn """These variables point at another ROCm's device \ + libraries, which will be used in preference to the ones this artifact ships. \ + Compilation may fail or produce wrong results, and is often reported as an \ + unrelated error. Unset them, or select the local ROCm with \ + `AMDGPU.set_rocm_version!(; local_rocm=true)`.""" redirects + + foreign = ROCm_Runtime.foreign_libraries() + isempty(foreign) || @warn """ROCm libraries from outside this artifact are loaded \ + into the process, so two ROCm versions are live at once. Compilation may fail \ + or produce wrong results, and is often reported as an unrelated error. This \ + usually means LD_LIBRARY_PATH points at another ROCm (a module, a uenv, a \ + container); it has to be unset before Julia starts.""" foreign + end + hiplibs = ( ("rocBLAS", :rocblas), ("rocSPARSE", :rocsparse), ("rocSOLVER", :rocsolver), ("rocRAND", :rocrand), ("rocFFT", :rocfft), ("MIOpen", :MIOpen)) diff --git a/src/utils.jl b/src/utils.jl index 2e1dabcf9..d26aae3d0 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -36,7 +36,8 @@ function _rocsparse_version_isolated(; timeout::Real = 20) lib = repr(librocsparse) # `repr` so Windows separators survive the parser # HIP loads comgr by soname, so a system ROCm in the environment can displace # the provider's copy. The parent claims the soname first (see - # `ROCm_Runtime.preload_comgr`); the child has to do the same. + # `ROCm_Runtime.preload_bundle`); the child has to do the same. Only comgr: + # replaying the parent's whole closure here costs more than the probe's budget. preload = isempty(libamd_comgr) ? "" : "Base.Libc.Libdl.dlopen($(repr(libamd_comgr)); throw_error = false)" out = _version_subprocess(""" @@ -96,6 +97,39 @@ function versioninfo(io::IO=stdout) https://github.com/JuliaGPU/AMDGPU.jl/issues/920.""" end + # Artifact-mode hygiene: what we claimed from the bundle, and what a ROCm + # elsewhere in the environment is still doing to this process. + if !local_rocm + loaded = count(p -> last(p) === :loaded, ROCm_Runtime.preload_log) + other = [p for p in ROCm_Runtime.preload_log if last(p) !== :loaded] + println(io) + print(io, "Preloaded $loaded artifact libraries") + println(io, isempty(other) ? "" : ", $(length(other)) not loaded:") + for (name, status) in other + println(io, " $status: $name") + end + + redirects = ROCm_Runtime.redirect_env() + if isempty(redirects) + println(io, "Device-library redirects: none") + else + println(io, "Device-library redirects (override the artifact's own):") + for (name, value) in redirects + println(io, " $name = $value") + end + end + + foreign = ROCm_Runtime.foreign_libraries() + if isempty(foreign) + println(io, "Foreign ROCm libraries loaded: none") + else + println(io, "Foreign ROCm libraries loaded (two ROCm versions at once):") + for path in foreign + println(io, " $path") + end + end + end + if functional(:hip) println(io) println(io, "AMDGPU devices") From f0d54f99b37ab51f86836c2ac88835eb48001183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20R=C3=A4ss?= <61313342+luraess@users.noreply.github.com> Date: Thu, 3 Sep 2026 21:36:26 +0200 Subject: [PATCH 22/28] Claim the bundle's vendor libraries, and drop the rocSPARSE version probe (#1063) --- ROCm_Runtime/src/ROCm_Runtime.jl | 10 +++++ src/AMDGPU.jl | 3 -- src/utils.jl | 75 ++++---------------------------- test/core/core_tests.jl | 32 +++----------- 4 files changed, 25 insertions(+), 95 deletions(-) diff --git a/ROCm_Runtime/src/ROCm_Runtime.jl b/ROCm_Runtime/src/ROCm_Runtime.jl index 92391fc84..873fc91e3 100644 --- a/ROCm_Runtime/src/ROCm_Runtime.jl +++ b/ROCm_Runtime/src/ROCm_Runtime.jl @@ -67,6 +67,8 @@ end # Claimed from the bundle before LD_LIBRARY_PATH can resolve them elsewhere. # Leaves first, as (subdirectory of the library directory, prefix, open all). +# HSA must precede HIP, or HIP's `libhsa-runtime64.so.1` binds outside the +# bundle; the vendor libraries here are ones other vendor libraries pull in. const PRELOAD_LIBRARIES = [ ("rocm_sysdeps/lib", "librocm_sysdeps_", true), ("llvm/lib", "libLLVM", false), @@ -76,6 +78,10 @@ const PRELOAD_LIBRARIES = [ ("", "libamd_comgr", false), ("", "libhiprtc", false), ("", "librocm_kpack", false), + ("", "libamdhip64", false), + ("", "libroctx64", false), + ("", "libhipblaslt", false), + ("", "librocblas", false), ] # path => :loaded / :failed, prefix => :absent. Shown by `AMDGPU.versioninfo()`. @@ -133,6 +139,10 @@ redirect_env() = [name => ENV[name] for name in REDIRECT_ENV if haskey(ENV, name const FOREIGN_LIBRARY_NAMES = [ "libamd_comgr", "libhsa-runtime64", "libamdhip64", "libhiprtc", "librocprofiler-register", "librocm_kpack", "libLLVM", "libclang-cpp", + # Vendor libraries: one can pull another in, and the soname collides across + # ROCm versions, so these mix silently unless the bundle claims them first. + "librocblas", "librocsparse", "librocsolver", "librocrand", "librocfft", + "libhipblaslt", "libhiptensor", "libMIOpen", "libroctx64", ] function foreign_libraries()::Vector{String} diff --git a/src/AMDGPU.jl b/src/AMDGPU.jl index 4c44eb43d..b3d814862 100644 --- a/src/AMDGPU.jl +++ b/src/AMDGPU.jl @@ -150,9 +150,6 @@ export ROCBackend include("precompile.jl") function __init__() - # Discovery runs at load time; a precompiled value would be stale. - global _ROCSPARSE_VERSION = "" - # Used to shutdown hostcalls if any is running. atexit(() -> begin Runtime.RT_EXITING[] = true end) diff --git a/src/utils.jl b/src/utils.jl index d26aae3d0..225dd54e8 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -1,60 +1,3 @@ -# Run `code` in a subprocess and return its stdout, or `nothing` on crash, -# timeout, or nonzero exit. The empty `JULIA_LOAD_PATH` keeps the child out of -# the active project, so `code` must only use `Base`. -function _version_subprocess(code::String; timeout::Real = 20)::Union{String, Nothing} - cmd = `$(Base.julia_cmd()) --startup-file=no -O0 --compile=min -e $code` - cmd = addenv(cmd, "JULIA_LOAD_PATH" => "") - out = IOBuffer() - try - proc = run(pipeline(ignorestatus(cmd); stdout = out, stderr = devnull); wait = false) - timedout = Ref(false) - timer = Timer(timeout) do _ - if process_running(proc) - timedout[] = true - kill(proc) - end - end - wait(proc) - close(timer) - (timedout[] || !success(proc)) && return nothing - v = strip(String(take!(out))) - return isempty(v) ? nothing : v - catch - return nothing - end -end - -# Empty until probed, then the version string or `"err"`. -global _ROCSPARSE_VERSION::String = "" - -# rocSPARSE's version query needs a handle, and creating one can segfault on -# broken ROCm installs (issue #920), so run it out-of-process. -function _rocsparse_version_isolated(; timeout::Real = 20) - global _ROCSPARSE_VERSION - isempty(_ROCSPARSE_VERSION) || return _ROCSPARSE_VERSION - - lib = repr(librocsparse) # `repr` so Windows separators survive the parser - # HIP loads comgr by soname, so a system ROCm in the environment can displace - # the provider's copy. The parent claims the soname first (see - # `ROCm_Runtime.preload_bundle`); the child has to do the same. Only comgr: - # replaying the parent's whole closure here costs more than the probe's budget. - preload = isempty(libamd_comgr) ? "" : - "Base.Libc.Libdl.dlopen($(repr(libamd_comgr)); throw_error = false)" - out = _version_subprocess(""" - $preload - handle = Ref{Ptr{Cvoid}}(C_NULL) - ccall((:rocsparse_create_handle, $lib), Cint, - (Ptr{Ptr{Cvoid}},), handle) == 0 || exit(2) - version = Ref{Cint}(0) - ccall((:rocsparse_get_version, $lib), Cint, - (Ptr{Cvoid}, Ptr{Cint}), handle[], version) == 0 || exit(2) - print(version[]) - """; timeout) - packed = out === nothing ? nothing : tryparse(Int, out) - return _ROCSPARSE_VERSION = - packed === nothing ? "err" : string(rocSPARSE.decode_version(packed)) -end - """ versioninfo(io::IO=stdout) @@ -68,10 +11,10 @@ function versioninfo(io::IO=stdout) "local ROCm installation" : "downloaded artifacts") _status(st::Bool) = st ? "+" : "-" _libpath(p::String) = isempty(p) ? "-" : p - _ver(lib::Symbol, ver_fn) = functional(lib) ? "$(ver_fn())" : "-" - - # `"err"` = present but the out-of-process version probe crashed/timed out. - rocsparse_ver = functional(:rocsparse) ? _rocsparse_version_isolated() : "-" + # rocSPARSE needs a handle for its version, so its query can fail where the + # others cannot; `"err"` keeps one library from sinking the whole report. + _ver(lib::Symbol, ver_fn) = + functional(lib) ? (try "$(ver_fn())" catch; "err" end) : "-" data = String[ _status(functional(:lld)) "LLD" "-" _libpath(lld_path); @@ -79,7 +22,7 @@ function versioninfo(io::IO=stdout) _status(functional(:hip)) "HIP" _ver(:hip, HIP.runtime_version) _libpath(libamdhip64); _status(functional(:rocblas)) "rocBLAS" _ver(:rocblas, rocBLAS.version) _libpath(librocblas); _status(functional(:rocsolver)) "rocSOLVER" _ver(:rocsolver, rocSOLVER.version) _libpath(librocsolver); - _status(functional(:rocsparse)) "rocSPARSE" rocsparse_ver _libpath(librocsparse); + _status(functional(:rocsparse)) "rocSPARSE" _ver(:rocsparse, rocSPARSE.version) _libpath(librocsparse); _status(functional(:rocrand)) "rocRAND" _ver(:rocrand, rocRAND.version) _libpath(librocrand); _status(functional(:rocfft)) "rocFFT" _ver(:rocfft, rocFFT.version) _libpath(librocfft); _status(functional(:hiptensor)) "hipTENSOR" _ver(:hiptensor, hipTENSOR.version) _libpath(libhiptensor); @@ -90,10 +33,10 @@ function versioninfo(io::IO=stdout) "Available", "Name", "Version", "Path"], alignment=[:c, :l, :l, :l]) - if rocsparse_ver == "err" - @warn """rocSPARSE is installed but its version query failed (it ran in an \ - isolated subprocess and crashed or timed out). This usually indicates a \ - broken or mismatched ROCm install. See \ + if any(==("err"), @view data[:, 3]) + @warn """A library is installed but its version query failed. Check the \ + foreign-library report below: a ROCm from the environment mixed into \ + this process is the usual cause. See \ https://github.com/JuliaGPU/AMDGPU.jl/issues/920.""" end diff --git a/test/core/core_tests.jl b/test/core/core_tests.jl index 3913b4807..4f6f466a9 100644 --- a/test/core/core_tests.jl +++ b/test/core/core_tests.jl @@ -9,34 +9,14 @@ using AMDGPU: HIP, Runtime, Device, Mem @test AMDGPU.functional() isa Bool end -@testset "versioninfo probe isolation" begin - probe(code; timeout = 60) = AMDGPU._version_subprocess(code; timeout) - - # A clean child returns its stdout. Library paths reach it through `repr`, - # so Windows separators must survive the round trip. - @test probe("print(\"4.2.0\")") == "4.2.0" - @test probe("print($(repr(raw"C:\rocm\lib")))") == raw"C:\rocm\lib" - - # No package environment, so probing can't trigger a precompile (#1040). - @test probe("print(Base.load_path())") == "String[]" - @test probe("using Adapt; print(\"loaded\")") === nothing - - # A failing child degrades to `nothing` without taking down this process — - # the point of the isolation: a SIGSEGV in a vendor library (issue #920) - # must not crash the caller. - @test probe("ccall(:abort, Cvoid, ())") === nothing # SIGABRT - @test probe("unsafe_store!(Ptr{Int}(0), 0)") === nothing # SIGSEGV - @test probe("exit(2)") === nothing # nonzero exit - @test probe("1 + 1") === nothing # no output - @test probe("while true; end"; timeout = 2) === nothing # hang -> timeout - - # On a working setup the probe returns a version; repeats hit the cache. +@testset "versioninfo" begin + # rocSPARSE is the only library whose version query needs a handle (#920). if AMDGPU.functional(:rocsparse) - AMDGPU._ROCSPARSE_VERSION = "" - v = AMDGPU._rocsparse_version_isolated() - @test tryparse(VersionNumber, v) !== nothing - @test AMDGPU._rocsparse_version_isolated() === v + @test AMDGPU.rocSPARSE.version() isa VersionNumber end + # Having touched rocSPARSE, nothing from a ROCm outside the artifact may be + # loaded: that mixture is silent until something downstream misbehaves. + @test isempty(AMDGPU.ROCm_Runtime.foreign_libraries()) end @testset "HIPDevice" begin From bedfa0794402b3880f4a442133bd1eea70b7e1f3 Mon Sep 17 00:00:00 2001 From: Simeon David Schaub Date: Thu, 3 Sep 2026 21:40:13 +0200 Subject: [PATCH 23/28] Squashed commit of the following: commit 2eaa7f16513b0c3c36609cb4a1c1f99469bc8f3b Author: Ludovic Raess Date: Thu Sep 3 21:09:02 2026 +0200 Update comments commit 0febfd4fe955e984c77a1e163e46ed59b98db850 Author: Ludovic Raess Date: Thu Sep 3 15:47:50 2026 +0200 Fix hipTensor --- docs/src/libraries/tensor.md | 4 ++ src/tensor/hipTENSOR.jl | 7 +-- src/tensor/operations.jl | 59 ++++++++++++++++++ test/hiptensor/contractions.jl | 105 ++++++++++++++++++++++----------- 4 files changed, 135 insertions(+), 40 deletions(-) diff --git a/docs/src/libraries/tensor.md b/docs/src/libraries/tensor.md index a01116407..ef8b7521b 100644 --- a/docs/src/libraries/tensor.md +++ b/docs/src/libraries/tensor.md @@ -8,3 +8,7 @@ which can be used to perform operations on high-dimensional arrays. However, the operator passed as `opABC` to `A` and `B`, and the one passed as `opAB` to that intermediate result and `C`. This is currently handled by our wrapper. - Unlike NVIDIA's `cuTENSOR`, `hipTENSOR` wants a *complex* compute descriptor for complex operands: pairing e.g. `ComplexF32` tensors with `HIPTENSOR_COMPUTE_DESC_32F` makes `hiptensorCreatePlan` fail with `HIPTENSOR_STATUS_EXECUTION_FAILED` +- from `hipTENSOR` 2.4 on, a contraction is only computed correctly when every operand is packed column-major and indexed with the free modes before the contracted ones: + `A = [M…, K…]`, `B = [N…, K…]`, `C = D = [M…, N…]`. Other layouts come back wrong with no error reported, so `plan_contraction` rejects them with an `ArgumentError` — + permute the operands with `permutedims` first +- on `hipTENSOR` 2.4, `HIPTENSOR_OP_CONJ` on a contraction's input makes `hiptensorCreatePlan` fail with `HIPTENSOR_STATUS_EXECUTION_FAILED` diff --git a/src/tensor/hipTENSOR.jl b/src/tensor/hipTENSOR.jl index abea300a1..30f5838c1 100644 --- a/src/tensor/hipTENSOR.jl +++ b/src/tensor/hipTENSOR.jl @@ -48,12 +48,11 @@ lib_state() = library_state( handle() = lib_state().handle stream() = lib_state().stream +# `hiptensorGetVersion` encodes `major * 1_000_000 + minor * 1_000 + patch` (2.4.0 reports +# 2004000), not cuTENSOR's `major * 10_000 + minor * 100 + patch`. function version() ver = hiptensorGetVersion() - major = ver ÷ 10000 - minor = (ver ÷ 100) % 100 - patch = ver % 100 - return VersionNumber(join((major,minor,patch), ".")) + return VersionNumber(ver ÷ 1_000_000, (ver ÷ 1_000) % 1_000, ver % 1_000) end end diff --git a/src/tensor/operations.jl b/src/tensor/operations.jl index 44af77a87..a082b05c7 100644 --- a/src/tensor/operations.jl +++ b/src/tensor/operations.jl @@ -330,6 +330,63 @@ function contract!(plan::hipTensorPlan, return C end +# hipTENSOR 2.4 returns wrong results, with no error reported, unless a contraction's +# operands are packed column-major and indexed as checked below. +const CANONICAL_CONTRACTION_LAYOUT = v"2.4" + +# A's free modes, B's free modes, the contracted modes, and any mode shared by all three, +# each in the order its owner declares them +function contraction_mode_groups(Ainds::ModeType, Binds::ModeType, Cinds::ModeType) + M = [mode for mode in Cinds if mode in Ainds && !(mode in Binds)] + N = [mode for mode in Cinds if mode in Binds && !(mode in Ainds)] + K = [mode for mode in Ainds if mode in Binds && !(mode in Cinds)] + batched = [mode for mode in Cinds if mode in Ainds && mode in Binds] + return M, N, K, batched +end + +# does `X` have the generalised packed column-major layout hipTENSOR assumes? +function is_packed(@nospecialize(X::AbstractArray)) + expected = 1 + for (i, len) in enumerate(size(X)) + stride(X, i) == expected || return false + expected *= len + end + return true +end + +function check_contraction_layout( + @nospecialize(A::AbstractArray), Ainds::ModeType, + @nospecialize(B::AbstractArray), Binds::ModeType, + @nospecialize(C::AbstractArray), Cinds::ModeType) + version() < CANONICAL_CONTRACTION_LAYOUT && return nothing + + M, N, K, batched = contraction_mode_groups(Ainds, Binds, Cinds) + isempty(batched) || throw(ArgumentError( + "this wrapper does not support a contraction with a mode shared by all three " * + "operands, and $(batched) " * (length(batched) == 1 ? "is" : "are") * + " shared by A, B and C here.")) + + problems = String[] + collect(Ainds) == [M; K] || + push!(problems, "A is indexed by $(collect(Ainds)) instead of $([M; K])") + collect(Binds) == [N; K] || + push!(problems, "B is indexed by $(collect(Binds)) instead of $([N; K])") + collect(Cinds) == [M; N] || + push!(problems, "C is indexed by $(collect(Cinds)) instead of $([M; N])") + is_packed(A) || push!(problems, "A is not packed column-major") + is_packed(B) || push!(problems, "B is not packed column-major") + is_packed(C) || push!(problems, "C is not packed column-major") + isempty(problems) && return nothing + + throw(ArgumentError( + "hipTENSOR $(version()) only contracts correctly when its operands are packed " * + "column-major and indexed in the order it expects: A by its free modes followed " * + "by the contracted ones ($([M; K]) here), B likewise ($([N; K])), and C by A's " * + "free modes followed by B's ($([M; N])). Other layouts are miscomputed without " * + "an error being reported, so this combination is rejected: " * + join(problems, ", ") * ". Permute the operands with `permutedims` first.")) +end + function plan_contraction( @nospecialize(A::AbstractArray), Ainds::ModeType, opA::hiptensorOperator_t, @nospecialize(B::AbstractArray), Binds::ModeType, opB::hiptensorOperator_t, @@ -354,6 +411,8 @@ function plan_contraction( modeC = collect(Cint, Cinds) length(modeC) == ndims(C) || throw(ArgumentError("Cinds must match number of dimensions in C!")) + check_contraction_layout(A, Ainds, B, Binds, C, Cinds) + compute_desc = compute_descriptor(compute_type === nothing ? default_compute_type(contraction_compute_types, "contraction", (eltype(A), eltype(B), eltype(C))) : compute_type) diff --git a/test/hiptensor/contractions.jl b/test/hiptensor/contractions.jl index 2e6aa8839..338bbb91c 100644 --- a/test/hiptensor/contractions.jl +++ b/test/hiptensor/contractions.jl @@ -31,11 +31,14 @@ eltypes = [(Float32, Float32, Float32, Float32), indsoA = allinds[1:NoA] indsoB = allinds[NoA .+ (1:NoB)] indsc = allinds[NoA .+ NoB .+ (1:Nc)] - pA = randperm(NoA + Nc) + # `check_contraction_layout` rejects other layouts on hipTENSOR 2.4 and above, so + # use the canonical one there; random orders still exercise earlier versions. + canonical_layout = hipTENSOR.version() >= v"2.4" + pA = canonical_layout ? collect(1:(NoA + Nc)) : randperm(NoA + Nc) + pB = canonical_layout ? [(Nc + 1):(Nc + NoB); 1:Nc] : randperm(Nc + NoB) + pC = canonical_layout ? collect(1:(NoA + NoB)) : randperm(NoA + NoB) ipA = invperm(pA) - pB = randperm(Nc + NoB) ipB = invperm(pB) - pC = randperm(NoA + NoB) ipC = invperm(pC) compute_rtol = (eltyCompute == Float16 || eltyC == Float16) ? 1e-2 : (eltyCompute == Float32 ? 1e-4 : 1e-6) dimsA = [dimsoA; dimsc][pA] @@ -141,38 +144,56 @@ eltypes = [(Float32, Float32, Float32, Float32), # silently ignores it: the results below are the unconjugated products. These # are `@test_broken` so that they start failing again once that is fixed. @testset "with conjugation flag for complex arguments" begin - if eltyA <: Complex - opA = AMDGPU.hipTENSOR.OP_CONJ - opB = AMDGPU.hipTENSOR.OP_IDENTITY - opOut = AMDGPU.hipTENSOR.OP_IDENTITY - dC = contract!(complex(1.0, 0.0), dA, indsA, opA, dB, indsB, opB, - 0, dC, indsC, opC, opOut; compute_type=eltyCompute) - C = collect(dC) - mC = reshape(permutedims(C, ipC), (loA, loB)) - @test_broken isapprox(mC, conj(mA) * mB; rtol=compute_rtol) - @test mC ≈ mA * mB rtol=compute_rtol # opA was ignored - end - if eltyB <: Complex - opA = AMDGPU.hipTENSOR.OP_IDENTITY - opB = AMDGPU.hipTENSOR.OP_CONJ - opOut = AMDGPU.hipTENSOR.OP_IDENTITY - dC = contract!(complex(1.0, 0.0), dA, indsA, opA, dB, indsB, opB, - complex(0.0, 0.0), dC, indsC, opC, opOut; compute_type=eltyCompute) - C = collect(dC) - mC = reshape(permutedims(C, ipC), (loA, loB)) - @test_broken isapprox(mC, mA * conj(mB); rtol=compute_rtol) - @test mC ≈ mA * mB rtol=compute_rtol # opB was ignored - end - if eltyA <: Complex && eltyB <: Complex - opA = AMDGPU.hipTENSOR.OP_CONJ - opB = AMDGPU.hipTENSOR.OP_CONJ - opOut = AMDGPU.hipTENSOR.OP_IDENTITY - dC = contract!(one(eltyCompute), dA, indsA, opA, dB, indsB, opB, - zero(eltyCompute), dC, indsC, opC, opOut; compute_type=eltyCompute) - C = collect(dC) - mC = reshape(permutedims(C, ipC), (loA, loB)) - @test_broken isapprox(mC, conj(mA) * conj(mB); rtol=compute_rtol) - @test mC ≈ mA * mB rtol=compute_rtol # opA and opB were ignored + if canonical_layout + # 2.4 rejects OP_CONJ outright, failing `hiptensorCreatePlan` + if eltyA <: Complex + @test_throws hipTENSOR.hipTENSORError contract!( + complex(1.0, 0.0), dA, indsA, AMDGPU.hipTENSOR.OP_CONJ, + dB, indsB, AMDGPU.hipTENSOR.OP_IDENTITY, + 0, dC, indsC, opC, AMDGPU.hipTENSOR.OP_IDENTITY; + compute_type=eltyCompute) + end + if eltyB <: Complex + @test_throws hipTENSOR.hipTENSORError contract!( + complex(1.0, 0.0), dA, indsA, AMDGPU.hipTENSOR.OP_IDENTITY, + dB, indsB, AMDGPU.hipTENSOR.OP_CONJ, + complex(0.0, 0.0), dC, indsC, opC, AMDGPU.hipTENSOR.OP_IDENTITY; + compute_type=eltyCompute) + end + else + if eltyA <: Complex + opA = AMDGPU.hipTENSOR.OP_CONJ + opB = AMDGPU.hipTENSOR.OP_IDENTITY + opOut = AMDGPU.hipTENSOR.OP_IDENTITY + dC = contract!(complex(1.0, 0.0), dA, indsA, opA, dB, indsB, opB, + 0, dC, indsC, opC, opOut; compute_type=eltyCompute) + C = collect(dC) + mC = reshape(permutedims(C, ipC), (loA, loB)) + @test_broken isapprox(mC, conj(mA) * mB; rtol=compute_rtol) + @test mC ≈ mA * mB rtol=compute_rtol # opA was ignored + end + if eltyB <: Complex + opA = AMDGPU.hipTENSOR.OP_IDENTITY + opB = AMDGPU.hipTENSOR.OP_CONJ + opOut = AMDGPU.hipTENSOR.OP_IDENTITY + dC = contract!(complex(1.0, 0.0), dA, indsA, opA, dB, indsB, opB, + complex(0.0, 0.0), dC, indsC, opC, opOut; compute_type=eltyCompute) + C = collect(dC) + mC = reshape(permutedims(C, ipC), (loA, loB)) + @test_broken isapprox(mC, mA * conj(mB); rtol=compute_rtol) + @test mC ≈ mA * mB rtol=compute_rtol # opB was ignored + end + if eltyA <: Complex && eltyB <: Complex + opA = AMDGPU.hipTENSOR.OP_CONJ + opB = AMDGPU.hipTENSOR.OP_CONJ + opOut = AMDGPU.hipTENSOR.OP_IDENTITY + dC = contract!(one(eltyCompute), dA, indsA, opA, dB, indsB, opB, + zero(eltyCompute), dC, indsC, opC, opOut; compute_type=eltyCompute) + C = collect(dC) + mC = reshape(permutedims(C, ipC), (loA, loB)) + @test_broken isapprox(mC, conj(mA) * conj(mB); rtol=compute_rtol) + @test mC ≈ mA * mB rtol=compute_rtol # opA and opB were ignored + end end end AMDGPU.synchronize() @@ -180,6 +201,17 @@ eltypes = [(Float32, Float32, Float32, Float32), end end +@testset "layouts hipTENSOR miscomputes are rejected" begin + if hipTENSOR.version() >= v"2.4" + dA = ROCArray(rand(Float32, 2, 4)) + dB = ROCArray(rand(Float32, 4, 3)) # indexed [K, N]; hipTENSOR 2.4 needs [N, K] + dC = ROCArray(zeros(Float32, 2, 3)) + op = AMDGPU.hipTENSOR.OP_IDENTITY + @test_throws ArgumentError contract!(1f0, dA, ['a', 'k'], op, dB, ['k', 'b'], op, + 0f0, dC, ['a', 'b'], op, op) + end +end + @testset "contractions of views" begin @testset for (eltyA, eltyB, eltyC, eltyCompute) in eltypes dimsA = (16,) @@ -198,7 +230,8 @@ end vD = @view dD[3:6] tA = hipTensor(reshape(vA, (4, 1)), [1, 2]) tB = hipTensor(reshape(vB, (1, 1)), [3, 2]) - tC = hipTensor(reshape(vC, (1, 4)), [3, 1]) + # C must be indexed by A's free modes then B's; see `check_contraction_layout` + tC = hipTensor(reshape(vC, (4, 1)), [1, 3]) mul!(tC, tA, tB) end end From 8f3dbfba8d6566233f24107459d1398d1eab407d Mon Sep 17 00:00:00 2001 From: Simeon David Schaub Date: Thu, 3 Sep 2026 19:57:00 +0000 Subject: [PATCH 24/28] Drop the library preloading; keep the environment clean in CI instead The bundle's libraries name their ROCm dependencies by soname and carry a DT_RUNPATH, which the loader consults only after LD_LIBRARY_PATH, so a ROCm on LD_LIBRARY_PATH displaces whatever HIP pulls in transitively. The ordered preload list claimed those sonames from the bundle first, but it has to mirror the bundle's dependency graph by hand, vendor libraries included, and silently rots when a release adds a dependency. The CSCS artifact job only unset the three comgr redirect variables and still ran with the uenv's ROCm on LD_LIBRARY_PATH, which is why the preloading was needed there at all. That job takes nothing from the uenv but the Julia binary (the bundle needs no more than GLIBCXX_3.4.22 and GLIBC_2.27 from the host), so unset LD_LIBRARY_PATH as well and remove the preloading. The foreign-library and redirect detection stays: it is pure inspection, `versioninfo` reports it, and the core tests assert that no foreign ROCm library is loaded, which turns a leaking environment into a clear failure instead of hipErrorOutOfMemory at the first stream. Assisted-by: Claude Code (claude-fable-5-1) --- ROCm_Runtime/src/ROCm_Runtime.jl | 74 ++++---------------------------- ci/cscs-mi300.yml | 12 +++--- src/utils.jl | 12 +----- 3 files changed, 17 insertions(+), 81 deletions(-) diff --git a/ROCm_Runtime/src/ROCm_Runtime.jl b/ROCm_Runtime/src/ROCm_Runtime.jl index 873fc91e3..8fef25e39 100644 --- a/ROCm_Runtime/src/ROCm_Runtime.jl +++ b/ROCm_Runtime/src/ROCm_Runtime.jl @@ -65,69 +65,14 @@ function get_library(name::String)::String return "" end -# Claimed from the bundle before LD_LIBRARY_PATH can resolve them elsewhere. -# Leaves first, as (subdirectory of the library directory, prefix, open all). -# HSA must precede HIP, or HIP's `libhsa-runtime64.so.1` binds outside the -# bundle; the vendor libraries here are ones other vendor libraries pull in. -const PRELOAD_LIBRARIES = [ - ("rocm_sysdeps/lib", "librocm_sysdeps_", true), - ("llvm/lib", "libLLVM", false), - ("llvm/lib", "libclang-cpp", false), - ("", "librocprofiler-register", false), - ("", "libhsa-runtime64", false), - ("", "libamd_comgr", false), - ("", "libhiprtc", false), - ("", "librocm_kpack", false), - ("", "libamdhip64", false), - ("", "libroctx64", false), - ("", "libhipblaslt", false), - ("", "librocblas", false), -] - -# path => :loaded / :failed, prefix => :absent. Shown by `AMDGPU.versioninfo()`. -global preload_log::Vector{Pair{String,Symbol}} = Pair{String,Symbol}[] - -function find_libraries(subdir::String, prefix::String, every::Bool)::Vector{String} - dir = joinpath(artifact_dir, Sys.iswindows() ? "bin" : "lib", subdir) - isdir(dir) || return String[] - paths = String[] - # `every` marks a family prefix; otherwise the prefix is a whole library - # name, and must not also match a longer one (`libhiprtc-builtins`). - for file in readdir(dir) # sorted, so `libfoo.so` precedes `libfoo.so.N` - startswith(file, every ? prefix : prefix * ".") && - occursin("." * Libdl.dlext, file) || continue - push!(paths, joinpath(dir, file)) - every || break - end - return paths -end - -function preload_bundle() - Sys.islinux() || return - empty!(preload_log) - seen = Set{String}() - for (subdir, prefix, every) in PRELOAD_LIBRARIES - paths = find_libraries(subdir, prefix, every) - if isempty(paths) - push!(preload_log, joinpath(subdir, prefix * "*") => :absent) - continue - end - for path in paths - resolved = try realpath(path) catch; path end - resolved in seen && continue - push!(seen, resolved) - try - # RTLD_LOCAL (Julia's default) already claims the soname. - Libdl.dlopen(path) - push!(preload_log, path => :loaded) - catch err - push!(preload_log, path => :failed) - @debug "Could not preload $path" exception=(err, catch_backtrace()) - end - end - end - return -end +# The bundle's libraries name their ROCm dependencies by soname and carry a +# DT_RUNPATH, which the loader searches only after LD_LIBRARY_PATH. A ROCm on +# LD_LIBRARY_PATH (a module, a uenv, AMD's containers) therefore displaces the +# bundle's copies of whatever HIP pulls in transitively, mixing two ROCm +# releases in one process (https://github.com/ROCm/TheRock/issues/7426). The +# loader reads LD_LIBRARY_PATH once at start-up, so this cannot be undone from +# inside the process; it is detected and reported instead (see below), and has +# to be fixed in the environment. # Variables that point comgr at another ROCm's device libraries. Reported, not # removed: which one a bundle honours has moved between ROCm releases. @@ -173,9 +118,6 @@ function __init__() global libhipblaslt = get_library(lib_prefix * "hipblaslt") global libhiptensor = get_library(lib_prefix * "hiptensor") global libMIOpen = get_library(lib_prefix * "MIOpen") - - # Must precede `AMDGPU.__init__`, which loads HSA and HIP. - preload_bundle() end end diff --git a/ci/cscs-mi300.yml b/ci/cscs-mi300.yml index 8c716f2fe..fb5b70a93 100644 --- a/ci/cscs-mi300.yml +++ b/ci/cscs-mi300.yml @@ -58,7 +58,7 @@ include: done; export ROCM_PATH="$MERGED_ROCM"; else - unset LLVM_PATH HIP_DEVICE_LIB_PATH DEVICE_LIB_PATH; + unset LD_LIBRARY_PATH LLVM_PATH HIP_DEVICE_LIB_PATH DEVICE_LIB_PATH; fi; exec "$0" "$@" ' $JULIA --project -e ' @@ -94,10 +94,12 @@ UnitTest julia 1.13 (system ROCm): script: *unit_test_script artifacts: *trace_artifacts -# Coverage of the artifact path, what AMDGPU.jl uses by default. A ROCm in the -# environment can displace the bundle's libamd_comgr, failing the blit-kernel -# link at the first stream and reporting it as hipErrorOutOfMemory; -# ROCm_Runtime works around it, see https://github.com/ROCm/TheRock/issues/7426. +# Coverage of the artifact path, what AMDGPU.jl uses by default. The uenv puts +# its own ROCm on LD_LIBRARY_PATH and points comgr at it through LLVM_PATH; +# either mixes that ROCm into the artifact's, failing at the first stream with +# hipErrorOutOfMemory (https://github.com/ROCm/TheRock/issues/7426). The script +# above unsets them for this variant; the core tests assert that no foreign +# ROCm library is loaded. UnitTest julia 1.12 (ROCm artifacts): extends: .baremetal-runner-beverin-mi300 variables: diff --git a/src/utils.jl b/src/utils.jl index 225dd54e8..5379388c4 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -40,18 +40,10 @@ function versioninfo(io::IO=stdout) https://github.com/JuliaGPU/AMDGPU.jl/issues/920.""" end - # Artifact-mode hygiene: what we claimed from the bundle, and what a ROCm - # elsewhere in the environment is still doing to this process. + # Artifact-mode hygiene: what a ROCm elsewhere in the environment is doing + # to this process. if !local_rocm - loaded = count(p -> last(p) === :loaded, ROCm_Runtime.preload_log) - other = [p for p in ROCm_Runtime.preload_log if last(p) !== :loaded] println(io) - print(io, "Preloaded $loaded artifact libraries") - println(io, isempty(other) ? "" : ", $(length(other)) not loaded:") - for (name, status) in other - println(io, " $status: $name") - end - redirects = ROCm_Runtime.redirect_env() if isempty(redirects) println(io, "Device-library redirects: none") From 1734a4903a9ea2ad3c7eadc6f2293825d7b31f27 Mon Sep 17 00:00:00 2001 From: Simeon David Schaub Date: Thu, 3 Sep 2026 20:27:38 +0000 Subject: [PATCH 25/28] CSCS CI: run the artifact job without the uenv Unsetting LD_LIBRARY_PATH and the comgr redirect variables was not enough: the artifact job still ended up with libamd_comgr.so.3 loaded from the uenv's spack tree, through some library carrying an RPATH into it. Rather than chase every route by which the uenv's ROCm can reach the process, don't mount the uenv for that job at all. It needs nothing from it: the bundle only requires the host's libstdc++ (GLIBCXX_3.4.22) and the driver, and the Julia install is self-contained. The uenv is now mounted only where UENV is set, i.e. on the system-ROCm jobs, which also own MIOPEN_PREFIX. Assisted-by: Claude Code (claude-fable-5-1) --- ci/cscs-mi300.yml | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/ci/cscs-mi300.yml b/ci/cscs-mi300.yml index fb5b70a93..539124746 100644 --- a/ci/cscs-mi300.yml +++ b/ci/cscs-mi300.yml @@ -3,8 +3,6 @@ include: # Slurm/Julia settings shared by all jobs; JULIA is set per Julia version. .common_variables: &common_variables - UENV: 56ebb909a6164680 - MIOPEN_PREFIX: /user-environment/linux-zen3/miopen-hip-7.2.3-kxzfucnamke4rlezapmrmrdrkmri325u # Workaround for MIOpen CK Group-Xdlops solvers segfaulting on gfx942 (MI300). # Remove once fixed upstream: https://github.com/ROCm/rocm-libraries/issues/9088 MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_FWD_GTC_XDLOPS_NHWC: "0" @@ -38,8 +36,17 @@ include: # preference decides, and gates artifact resolution too, so it must be set before # Pkg.instantiate(). Both variants set it explicitly and assert the result, so a # change of default cannot silently swap the ROCm underneath a job. +# +# The uenv provides the system ROCm (and MIOpen) and is mounted only where UENV +# is set. The artifact variant runs on the bare node, without it: anything of the +# uenv's ROCm that reaches the process (LD_LIBRARY_PATH, LLVM_PATH, a tool +# library with an RPATH into it) mixes it into the artifact's, which fails at +# the first stream with hipErrorOutOfMemory (ROCm/TheRock#7426). The bundle +# needs nothing but the host's libstdc++ and the driver, and $JULIA is a +# self-contained install. The core tests assert that no foreign ROCm library is +# loaded. .unit_test_script: &unit_test_script - - srun -n 1 --uenv $UENV --view=default bash -c ' + - srun -n 1 ${UENV:+--uenv $UENV --view=default} bash -c ' set -euo pipefail; ulimit -c 0; shopt -s nullglob; @@ -57,8 +64,6 @@ include: ln -s "$libdir"/libMIOpen* "$MERGED_ROCM/lib/" 2>/dev/null || true; done; export ROCM_PATH="$MERGED_ROCM"; - else - unset LD_LIBRARY_PATH LLVM_PATH HIP_DEVICE_LIB_PATH DEVICE_LIB_PATH; fi; exec "$0" "$@" ' $JULIA --project -e ' @@ -82,6 +87,8 @@ UnitTest julia 1.12 (system ROCm): <<: *common_variables JULIA: /users/lraess/julia_amd/julia_amd-1.12 ROCM_LOCAL: "true" + UENV: 56ebb909a6164680 + MIOPEN_PREFIX: /user-environment/linux-zen3/miopen-hip-7.2.3-kxzfucnamke4rlezapmrmrdrkmri325u script: *unit_test_script artifacts: *trace_artifacts @@ -91,15 +98,13 @@ UnitTest julia 1.13 (system ROCm): <<: *common_variables JULIA: /users/lraess/julia_amd/julia_amd-1.13 ROCM_LOCAL: "true" + UENV: 56ebb909a6164680 + MIOPEN_PREFIX: /user-environment/linux-zen3/miopen-hip-7.2.3-kxzfucnamke4rlezapmrmrdrkmri325u script: *unit_test_script artifacts: *trace_artifacts -# Coverage of the artifact path, what AMDGPU.jl uses by default. The uenv puts -# its own ROCm on LD_LIBRARY_PATH and points comgr at it through LLVM_PATH; -# either mixes that ROCm into the artifact's, failing at the first stream with -# hipErrorOutOfMemory (https://github.com/ROCm/TheRock/issues/7426). The script -# above unsets them for this variant; the core tests assert that no foreign -# ROCm library is loaded. +# Coverage of the artifact path, what AMDGPU.jl uses by default; runs without +# the uenv, see above. UnitTest julia 1.12 (ROCm artifacts): extends: .baremetal-runner-beverin-mi300 variables: From c463aa0423732be666a9fd9b34cfbbcc8243910a Mon Sep 17 00:00:00 2001 From: Simeon David Schaub Date: Mon, 7 Sep 2026 11:39:10 +0000 Subject: [PATCH 26/28] Don't count LLVM.jl's libLLVMExtra as a foreign ROCm library The foreign-library check matched every loaded library starting with "libLLVM", which includes LLVMExtra_jll's libLLVMExtra-N.so once LLVM.jl has compiled anything. It lives in the depot, not under Julia's own directory, so the exclusion for Julia's libLLVM did not cover it, and the core test asserting no foreign library failed on every Buildkite platform as soon as a kernel had been compiled in the same process. Match comgr's LLVM by its actual names, libLLVM.so.N and libLLVM-N.so. Assisted-by: Claude Code (claude-fable-5-1) --- ROCm_Runtime/src/ROCm_Runtime.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ROCm_Runtime/src/ROCm_Runtime.jl b/ROCm_Runtime/src/ROCm_Runtime.jl index 8fef25e39..ef65f3492 100644 --- a/ROCm_Runtime/src/ROCm_Runtime.jl +++ b/ROCm_Runtime/src/ROCm_Runtime.jl @@ -83,7 +83,10 @@ redirect_env() = [name => ENV[name] for name in REDIRECT_ENV if haskey(ENV, name # ROCm libraries mapped from outside the bundle: two ROCm versions live at once. const FOREIGN_LIBRARY_NAMES = [ "libamd_comgr", "libhsa-runtime64", "libamdhip64", "libhiprtc", - "librocprofiler-register", "librocm_kpack", "libLLVM", "libclang-cpp", + "librocprofiler-register", "librocm_kpack", + # comgr's LLVM: `libLLVM.so.N` / `libLLVM-N.so`, not e.g. LLVM.jl's + # `libLLVMExtra-N.so`, which shares the prefix and lives in the depot. + "libLLVM.", "libLLVM-", "libclang-cpp", # Vendor libraries: one can pull another in, and the soname collides across # ROCm versions, so these mix silently unless the bundle claims them first. "librocblas", "librocsparse", "librocsolver", "librocrand", "librocfft", From cb7ad0d3f223fd73782db6702ea8f22eafb65efc Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Thu, 10 Sep 2026 22:06:57 +0200 Subject: [PATCH 27/28] test 1.13 on artifacts --- ci/cscs-mi300.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ci/cscs-mi300.yml b/ci/cscs-mi300.yml index 539124746..dffcb027c 100644 --- a/ci/cscs-mi300.yml +++ b/ci/cscs-mi300.yml @@ -113,3 +113,12 @@ UnitTest julia 1.12 (ROCm artifacts): ROCM_LOCAL: "false" script: *unit_test_script artifacts: *trace_artifacts + +UnitTest julia 1.13 (ROCm artifacts): + extends: .baremetal-runner-beverin-mi300 + variables: + <<: *common_variables + JULIA: /users/lraess/julia_amd/julia_amd-1.13 + ROCM_LOCAL: "false" + script: *unit_test_script + artifacts: *trace_artifacts From fac07f9a25b3cdb9a833a31624d87a91c174cd9b Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Fri, 11 Sep 2026 00:30:52 +0200 Subject: [PATCH 28/28] Fix import ordering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 1.13 compilation resolves the global permute! before the nested using line ever runs — and permute! already resolves implicitly to Base.permute!, so the call site is bound to Base permanently. Julia 1.12 resolved that reference at run time, after the import had executed. --- test/hiptensor/permutations.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/hiptensor/permutations.jl b/test/hiptensor/permutations.jl index 17c4b676a..deaeb3583 100644 --- a/test/hiptensor/permutations.jl +++ b/test/hiptensor/permutations.jl @@ -1,12 +1,11 @@ using Test, AMDGPU using LinearAlgebra, Random +using AMDGPU.hipTENSOR: permute! if AMDGPU.hipTENSOR.has_hiptensor() @testset "permutations" begin - using AMDGPU.hipTENSOR: permute! - # hipTENSOR 2.2 only implements permutations between tensors of the same real element # type, see `AMDGPU.hipTENSOR.permutation_compute_types` eltypes = [(Float16, Float16),