Skip to content

Commit

Permalink
Account for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
pxl-th committed Nov 19, 2023
1 parent e4fdc13 commit 26bb0db
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/discovery/discovery.jl
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,17 @@ function __init__()
artifact_field=:libhsa_runtime64, ext="so.1")

# HIP.
global libhip = get_library("libamdhip64";
rocm_paths, artifact_library=:HIP_jll)
# Detect HIP version, which will influence what device libraries to use.
hip_version = Base.thisminor(_hip_runtime_version())
global libhip = get_library("libamdhip64"; rocm_paths, artifact_library=:HIP_jll)

from_artifact = if isempty(libhip)
use_artifacts()

Check warning on line 137 in src/discovery/discovery.jl

View check run for this annotation

Codecov / codecov/patch

src/discovery/discovery.jl#L137

Added line #L137 was not covered by tests
else
# Detect HIP version, which will influence what device libraries to use.
hip_version = Base.thisminor(_hip_runtime_version())
hip_version > v"5.4" ? true : use_artifacts()
end
# If ROCm 5.5+ - use artifact device libraries.
global libdevice_libs = get_device_libs(
hip_version > v"5.4" ? true : use_artifacts())
global libdevice_libs = get_device_libs(from_artifact)

# HIP-based libraries.
global librocblas = get_library("librocblas";
Expand Down

0 comments on commit 26bb0db

Please sign in to comment.