Skip to content

Commit 308941e

Browse files
authored
Merge pull request #120 from JuliaGPU/jps/load-everywhere
Allow AMDGPU to load everywhere
2 parents 9f387fa + 965f5f4 commit 308941e

File tree

6 files changed

+72
-2
lines changed

6 files changed

+72
-2
lines changed

.buildkite/pipeline.yml

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ steps:
1414
rocm: "*"
1515
if: build.message !~ /\[skip tests\]/
1616
timeout_in_minutes: 60
17+
env:
18+
JULIA_AMDGPU_HSA_MUST_LOAD: "1"
1719

1820
- label: "Documentation"
1921
plugins:

.ci/load.jl

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import Pkg
2+
3+
Pkg.update()
4+
5+
root_directory = dirname(@__DIR__)
6+
7+
amdgpu = Pkg.PackageSpec(path = root_directory)
8+
Pkg.develop(amdgpu)
9+
Pkg.build()
10+
Pkg.precompile()
11+
12+
import AMDGPU
+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI (Julia 1.6-nightly)
2+
on:
3+
push:
4+
branches:
5+
- master
6+
tags: '*'
7+
pull_request:
8+
defaults:
9+
run:
10+
shell: bash
11+
jobs:
12+
CI-julia-1-6-nightly:
13+
name: CI-julia-1-6-nightly
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
version:
19+
- '1.6-nightly'
20+
os:
21+
- ubuntu-latest
22+
- macOS-latest
23+
- windows-latest
24+
arch:
25+
- x64
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: julia-actions/setup-julia@v1
29+
with:
30+
version: ${{ matrix.version }}
31+
arch: ${{ matrix.arch }}
32+
- uses: actions/cache@v1
33+
env:
34+
cache-name: cache-artifacts
35+
with:
36+
path: ~/.julia/artifacts
37+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
38+
restore-keys: |
39+
${{ runner.os }}-test-${{ env.cache-name }}-
40+
${{ runner.os }}-test-
41+
${{ runner.os }}-
42+
- run: julia .ci/load.jl
43+
- uses: julia-actions/julia-processcoverage@v1
44+
- uses: codecov/codecov-action@v1
45+
with:
46+
file: lcov.info

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "AMDGPU"
22
uuid = "21141c5a-9bdb-4563-92ae-f87d6854732e"
33
authors = ["Julian P Samaroo <jpsamaroo@jpsamaroo.me>"]
4-
version = "0.2.4"
4+
version = "0.2.5"
55

66
[deps]
77
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

deps/build.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ if dl_info === nothing && unsatisfied
258258
# Alternatively, you could attempt to install from a separate provider,
259259
# build from source or something even more ambitious here.
260260
@warn "Your platform (\"$(Sys.MACHINE)\", parsed as \"$(triplet(platform_key_abi()))\") is not supported by this package!"
261-
return
261+
exit(0)
262262
end
263263

264264
# If we have a download, and we are unsatisfied (or the version we're

src/AMDGPU.jl

+10
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,16 @@ function __init__()
156156
HSA runtime has not been built, runtime functionality will be unavailable.
157157
Please run Pkg.build("AMDGPU") and reload AMDGPU.
158158
"""
159+
160+
if parse(Bool, get(ENV, "JULIA_AMDGPU_HSA_MUST_LOAD", "0"))
161+
println("Diagnostics:")
162+
println("-- deps/build.log")
163+
println(String(read(joinpath(@__DIR__, "..", "deps", "build.log"))))
164+
println("-- permissions")
165+
run(`ls -lah /dev/kfd`)
166+
run(`ls -lah /dev/dri`)
167+
run(`id`)
168+
end
159169
end
160170

161171
# Check whether device intrinsics are available

0 commit comments

Comments
 (0)