Skip to content

Commit b58747a

Browse files
Support for Julia 1.12 (#391)
Co-authored-by: Simeon David Schaub <[email protected]>
1 parent 53f450a commit b58747a

File tree

4 files changed

+22
-5
lines changed

4 files changed

+22
-5
lines changed

.buildkite/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ steps:
22
- label: "CUDA"
33
plugins:
44
- JuliaCI/julia#v1:
5-
version: "1.11"
5+
version: "1.12"
66
- JuliaCI/julia-coverage#v1:
77
codecov: true
88
commands: |

.github/workflows/Test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ jobs:
1515
test:
1616
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.memory_backend }} - PoCL ${{ matrix.pocl }}
1717
runs-on: ${{ matrix.os }}
18-
timeout-minutes: 60
18+
timeout-minutes: 100
1919
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
2020
actions: write
2121
contents: read
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
version: ['1.10', '1.11']
25+
version: ['1.10', '1.12']
2626
os: [ubuntu-24.04, ubuntu-24.04-arm, macOS-15, macOS-15-intel, windows-2025]
2727
arch: [x64, arm64]
2828
pocl: [jll, local]

src/device/quirks.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,12 @@ end
5757
@print_and_throw "Out-of-bounds access of scalar value"
5858
x
5959
end
60+
61+
# From Metal.jl to avoid widemul and Int128
62+
@static if VERSION >= v"1.12.0-DEV.1736" # Partially reverts JuliaLang/julia PR #56750
63+
BitInteger64 = Union{Int64, UInt64}
64+
@device_override function Base.checkbounds(::Type{Bool}, v::StepRange{<:BitInteger64, <:BitInteger64}, i::BitInteger64)
65+
@inline
66+
return checkindex(Bool, eachindex(IndexLinear(), v), i)
67+
end
68+
end

test/device.jl

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,19 @@
5858
:max_image3d_shape,
5959
]
6060
@test isa(cl.platform(), cl.Platform)
61-
@test_throws ErrorException cl.platform().zjdlkf
61+
if isdefined(Core, :FieldError) # VERSION > v"1.12.0-"
62+
@test_throws FieldError cl.platform().zjdlkf
63+
else
64+
@test_throws ErrorException cl.platform().zjdlkf
65+
end
6266

6367
device = cl.device()
6468
@test isa(device, cl.Device)
65-
@test_throws ErrorException device.zjdlkf
69+
if isdefined(Core, :FieldError) # VERSION > v"1.12.0-"
70+
@test_throws FieldError device.zjdlkf
71+
else
72+
@test_throws ErrorException device.zjdlkf
73+
end
6674
for k in device_info_keys
6775
v = getproperty(device, k)
6876
if k == :extensions

0 commit comments

Comments
 (0)