Skip to content

Commit

Permalink
Bump minimal Julia requirement to v1.10. (#552)
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt authored Jul 18, 2024
1 parent 6f3345a commit 150dc27
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 115 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ['1.8', '1.9', '1.10', 'nightly']
version: ['1.10', 'pre', 'nightly']
os: [ubuntu-latest, macOS-latest, windows-latest]
arch: [x64]
steps:
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1.8'
version: '1.10'
- name: Develop packages
run: |
julia -e "
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ Random = "1"
Reexport = "1"
Serialization = "1"
Statistics = "1"
julia = "1.8"
julia = "1.10"
118 changes: 79 additions & 39 deletions docs/Manifest.toml
Original file line number Diff line number Diff line change
@@ -1,95 +1,135 @@
# This file is machine-generated - editing it directly is not advised

[[Base64]]
julia_version = "1.10.4"
manifest_format = "2.0"
project_hash = "e0c77beb18dc1f6cce661ebd60658c0c1a77390f"

[[deps.Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"

[[deps.Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[Dates]]
[[deps.Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[DocStringExtensions]]
deps = ["LibGit2", "Markdown", "Pkg", "Test"]
git-tree-sha1 = "50ddf44c53698f5e784bbebb3f4b21c5807401b1"
[[deps.DocStringExtensions]]
deps = ["LibGit2"]
git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.8.3"
version = "0.8.6"

[[Documenter]]
[[deps.Documenter]]
deps = ["Base64", "Dates", "DocStringExtensions", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"]
git-tree-sha1 = "b7715ae18be02110a8cf9cc8ed2ccdb1e3e3aba2"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "0.26.1"

[[IOCapture]]
[[deps.IOCapture]]
deps = ["Logging"]
git-tree-sha1 = "377252859f740c217b936cebcd918a44f9b53b59"
uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89"
version = "0.1.1"

[[InteractiveUtils]]
[[deps.InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[JSON]]
[[deps.JSON]]
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
git-tree-sha1 = "81690084b6198a2e1da36fcfda16eeca9f9f24e4"
git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.21.1"
version = "0.21.4"

[[LibGit2]]
[[deps.LibGit2]]
deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[Logging]]
[[deps.LibGit2_jll]]
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"]
uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5"
version = "1.6.4+0"

[[deps.LibSSH2_jll]]
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
version = "1.11.0+1"

[[deps.Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[deps.Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[Markdown]]
[[deps.Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[Mmap]]
[[deps.MbedTLS_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
version = "2.28.2+1"

[[deps.Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[Parsers]]
deps = ["Dates"]
git-tree-sha1 = "50c9a9ed8c714945e01cd53a21007ed3865ed714"
[[deps.NetworkOptions]]
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
version = "1.2.0"

[[deps.Parsers]]
deps = ["Dates", "PrecompileTools", "UUIDs"]
git-tree-sha1 = "8489905bcdbcfac64d1daa51ca07c0d8f0283821"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "1.0.15"
version = "2.8.1"

[[Pkg]]
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
[[deps.PrecompileTools]]
deps = ["Preferences"]
git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f"
uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
version = "1.2.1"

[[Printf]]
[[deps.Preferences]]
deps = ["TOML"]
git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6"
uuid = "21216c6a-2e73-6563-6e65-726566657250"
version = "1.4.3"

[[deps.Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets"]
[[deps.REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[Random]]
deps = ["Serialization"]
[[deps.Random]]
deps = ["SHA"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[SHA]]
[[deps.SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
version = "0.7.0"

[[Serialization]]
[[deps.Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[Sockets]]
[[deps.Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[Test]]
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
[[deps.TOML]]
deps = ["Dates"]
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
version = "1.0.3"

[[deps.Test]]
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[UUIDs]]
[[deps.UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[Unicode]]
[[deps.Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
12 changes: 4 additions & 8 deletions lib/GPUArraysCore/src/GPUArraysCore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,11 @@ function repl_frontend_task()
end
_repl_frontend_task[]
end
function get_repl_frontend_task()
@static if VERSION >= v"1.10.0-DEV.444" || v"1.9-beta4" <= VERSION < v"1.10-"
if isdefined(Base, :active_repl)
Base.active_repl.frontend_task
else
missing
end
@noinline function get_repl_frontend_task()
if isdefined(Base, :active_repl)
Base.active_repl.frontend_task
else
nothing
missing
end
end

Expand Down
5 changes: 0 additions & 5 deletions src/host/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,8 @@ GPUIndexStyle(i1::Colon, I...) = GPUIndexStyle(I...)
viewlength() = ()
@inline viewlength(::Real, I...) = viewlength(I...) # skip scalar

if VERSION >= v"1.8.0-DEV.120"
@inline viewlength(i1::AbstractUnitRange, I...) = (Base.length(i1), viewlength(I...)...)
@inline viewlength(i1::AbstractUnitRange, ::Base.ScalarIndex...) = (Base.length(i1),)
else
@inline viewlength(i1::AbstractUnitRange, I...) = (length(i1), viewlength(I...)...)
@inline viewlength(i1::AbstractUnitRange, ::Base.ScalarIndex...) = (length(i1),)
end

# adaptor to upload an array to the GPU
struct ToGPU
Expand Down
58 changes: 1 addition & 57 deletions src/host/linalg.jl
Original file line number Diff line number Diff line change
@@ -1,28 +1,6 @@
# integration with LinearAlgebra stdlib

using LinearAlgebra: MulAddMul

if isdefined(LinearAlgebra, :wrap) # i.e., VERSION >= v"1.10.0-DEV.1365"
using LinearAlgebra: wrap
else
function wrap(A::AbstractVecOrMat, tA::AbstractChar)
if tA == 'N'
return A
elseif tA == 'T'
return transpose(A)
elseif tA == 'C'
return adjoint(A)
elseif tA == 'H'
return Hermitian(A, :U)
elseif tA == 'h'
return Hermitian(A, :L)
elseif tA == 'S'
return Symmetric(A, :U)
else # tA == 's'
return Symmetric(A, :L)
end
end
end
using LinearAlgebra: MulAddMul, wrap

## transpose and adjoint

Expand Down Expand Up @@ -558,46 +536,12 @@ function generic_mattrimul!(C::AbstractGPUVecOrMat{R}, uploc, isunitc, tfun::Fun
C
end

if VERSION >= v"1.10-"
function LinearAlgebra.generic_trimatmul!(C::AbstractGPUVecOrMat, uploc, isunitc, tfun::Function, A::AbstractGPUMatrix, B::AbstractGPUVecOrMat)
generic_trimatmul!(C, uploc, isunitc, tfun, A, B)
end
function LinearAlgebra.generic_mattrimul!(C::AbstractGPUMatrix, uploc, isunitc, tfun::Function, A::AbstractGPUMatrix, B::AbstractGPUMatrix)
generic_mattrimul!(C, uploc, isunitc, tfun, A, B)
end
end

if VERSION < v"1.10.0-DEV.1365"
# catch other functions that are called by LinearAlgebra's mul!
function LinearAlgebra.gemv!(C::AbstractGPUVector, tA::AbstractChar, A::AbstractGPUMatrix, B::AbstractGPUVector, a::Number, b::Number)
generic_matmatmul!(C, wrap(A, tA), B, MulAddMul(a, b))
end
# disambiguation
function LinearAlgebra.gemv!(C::AbstractGPUVector{T}, tA::AbstractChar, A::AbstractGPUMatrix{T}, B::AbstractGPUVector{T}, a::Number, b::Number) where {T<:LinearAlgebra.BlasFloat}
generic_matmatmul!(C, wrap(A, tA), B, MulAddMul(a, b))
end

LinearAlgebra.gemm_wrapper!(C::AbstractGPUVecOrMat, tA::AbstractChar, tB::AbstractChar, A::AbstractGPUVecOrMat, B::AbstractGPUVecOrMat, _add::MulAddMul) =
generic_matmatmul!(C, wrap(A, tA), wrap(B, tB), _add)
# disambiguation
LinearAlgebra.gemm_wrapper!(C::AbstractGPUVecOrMat{T}, tA::AbstractChar, tB::AbstractChar, A::AbstractGPUVecOrMat{T}, B::AbstractGPUVecOrMat{T}, _add::MulAddMul) where {T<:LinearAlgebra.BlasFloat} =
generic_matmatmul!(C, wrap(A, tA), wrap(B, tB), _add)

function LinearAlgebra.syrk_wrapper!(C::AbstractGPUMatrix, tA::AbstractChar, A::AbstractGPUVecOrMat, _add::MulAddMul = MulAddMul())
if tA == 'T'
generic_matmatmul!(C, wrap(A, 'T'), A, _add)
else # tA == 'N'
generic_matmatmul!(C, A, wrap(A, 'T'), _add)
end
end
function LinearAlgebra.herk_wrapper!(C::AbstractGPUMatrix, tA::AbstractChar, A::AbstractGPUVecOrMat, _add::MulAddMul = MulAddMul())
if tA == 'C'
generic_matmatmul!(C, wrap(A, 'C'), A, _add)
else # tA == 'N'
generic_matmatmul!(C, A, wrap(A, 'C'), _add)
end
end
end # VERSION

function generic_rmul!(X::AbstractArray, s::Number)
gpu_call(X, s; name="rmul!") do ctx, X, s
Expand Down
5 changes: 4 additions & 1 deletion test/testsuite/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,10 @@ end
@test b isa AT{Float32, 2}
end
@test(Array(b) == [1.0 0.0 0.0; 2.0 2.0 3.0],
broken=(AT <: Array && VERSION >= v"1.11.0-DEV.727"))
broken=(AT <: Array &&
VERSION >= v"1.11.0-DEV.727" && # broken in JuliaLang/julia#51760
!(v"1.11-rc1" <= VERSION < v"1.12-")) # reverted in -rc1
)

a = AT(Float32[1.0 0.0 0.0; 2.0 2.0 3.0])
b = reinterpret(reshape, ComplexF32, a)
Expand Down
2 changes: 0 additions & 2 deletions test/testsuite/linalg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@
end
end

if VERSION >= v"1.10-"
@testset "mul! + Triangular" begin
@testset "trimatmul! ($TR x $T, $f)" for T in (Float32, ComplexF32), TR in (UpperTriangular, LowerTriangular, UnitUpperTriangular, UnitLowerTriangular), f in (identity, transpose, adjoint)
n = 128
Expand Down Expand Up @@ -164,7 +163,6 @@
@test collect(Ct) C
end
end
end
end

@testset "diagonal" begin
Expand Down

0 comments on commit 150dc27

Please sign in to comment.