Skip to content

Commit 00eab70

Browse files
authored
Merge pull request #327 from JuliaGPU/tb/1.11
Support for Julia 1.11
2 parents e057d13 + 30b6c39 commit 00eab70

File tree

4 files changed

+29
-9
lines changed

4 files changed

+29
-9
lines changed

.buildkite/pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ steps:
2828
- "1.9"
2929
- "1.10"
3030
- "1.11"
31-
# - "nightly"
31+
- "nightly"
3232
adjustments:
3333
- with:
34-
julia: "1.11"
34+
julia: "nightly"
3535
soft_fail: true
3636

3737
# Test Storage modes Shared and Managed

lib/mps/linalg.jl

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,21 @@ function LinearAlgebra.lu(A::MtlMatrix{T}; check::Bool = true) where {T<:MtlFloa
202202
return LinearAlgebra.LU(B, p, status)
203203
end
204204

205+
function _check_lu_success(info, allowsingular)
206+
if VERSION >= v"1.11.0-DEV.1535"
207+
if info < 0 # zero pivot error from unpivoted LU
208+
LinearAlgebra.checknozeropivot(-info)
209+
else
210+
allowsingular || LinearAlgebra.checknonsingular(info)
211+
end
212+
else
213+
LinearAlgebra.checknonsingular(info)
214+
end
215+
end
216+
205217
# TODO: dispatch on pivot strategy
206-
function LinearAlgebra.lu!(A::MtlMatrix{T}; check::Bool = true) where {T<:MtlFloat}
218+
function LinearAlgebra.lu!(A::MtlMatrix{T};
219+
check::Bool=true, allowsingular::Bool=false) where {T<:MtlFloat}
207220
M,N = size(A)
208221
dev = current_device()
209222
queue = global_queue(dev)
@@ -238,7 +251,7 @@ function LinearAlgebra.lu!(A::MtlMatrix{T}; check::Bool = true) where {T<:MtlFlo
238251
wait_completed(cmdbuf_lu)
239252

240253
status = convert(LinearAlgebra.BlasInt, Metal.@allowscalar status[])
241-
check && checknonsingular(status)
254+
check && _check_lu_success(status, allowsingular)
242255

243256
return LinearAlgebra.LU(A, p, status)
244257
end

src/compiler/compilation.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ const MetalCompilerJob = CompilerJob{MetalCompilerTarget, MetalCompilerParams}
66

77
GPUCompiler.runtime_module(::MetalCompilerJob) = Metal
88

9-
const ci_cache = GPUCompiler.CodeCache()
10-
GPUCompiler.ci_cache(::MetalCompilerJob) = ci_cache
11-
129
GPUCompiler.method_table(::MetalCompilerJob) = method_table
1310

1411

@@ -72,6 +69,9 @@ function compile(@nospecialize(job::CompilerJob))
7269
output = Pipe()
7370

7471
cmd = `$(LLVMDowngrader_jll.llvm_as()) --bitcode-version=5.0 -o -`
72+
if LLVM.version() >= v"16"
73+
cmd = `$cmd --opaque-pointers=0`
74+
end
7575
proc = run(pipeline(cmd, stdout=output, stderr=stderr, stdin=input); wait=false)
7676
close(output.in)
7777

test/setup.jl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,15 @@ function runtests(f, name)
5151

5252
# process results
5353
cpu_rss = Sys.maxrss()
54-
passes,fails,error,broken,c_passes,c_fails,c_errors,c_broken =
55-
Test.get_test_counts(data[1])
54+
if VERSION >= v"1.11.0-DEV.1529"
55+
tc = Test.get_test_counts(data[1])
56+
passes,fails,error,broken,c_passes,c_fails,c_errors,c_broken =
57+
tc.passes, tc.fails, tc.errors, tc.broken, tc.cumulative_passes,
58+
tc.cumulative_fails, tc.cumulative_errors, tc.cumulative_broken
59+
else
60+
passes,fails,errors,broken,c_passes,c_fails,c_errors,c_broken =
61+
Test.get_test_counts(data[1])
62+
end
5663
if data[1].anynonpass == false
5764
data = ((passes+c_passes,broken+c_broken),
5865
data[2],

0 commit comments

Comments
 (0)