Skip to content

Commit bcf1b82

Browse files
committed
Clean-up version checks.
1 parent 6f322bd commit bcf1b82

File tree

11 files changed

+5
-44
lines changed

11 files changed

+5
-44
lines changed

deps/compatibility.jl

-5
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,6 @@ end
175175
## high-level functions that return target and isa support
176176

177177
function llvm_compat(version=LLVM.version())
178-
# https://github.com/JuliaGPU/CUDAnative.jl/issues/428
179-
if version >= v"8.0" && VERSION < v"1.3.0-DEV.547"
180-
error("LLVM 8.0 requires a newer version of Julia")
181-
end
182-
183178
InitializeNVPTXTarget()
184179

185180
cap_support = sort(collect(llvm_cap_support(version)))

examples/wmma/high-level.jl

-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# Need https://github.com/JuliaLang/julia/pull/33970
2-
# and https://github.com/JuliaLang/julia/pull/34043
3-
if VERSION < v"1.5-"
4-
exit()
5-
end
6-
71
using CUDA
82
if capability(device()) < v"7.0"
93
exit()

examples/wmma/low-level.jl

-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# Need https://github.com/JuliaLang/julia/pull/33970
2-
# and https://github.com/JuliaLang/julia/pull/34043
3-
if VERSION < v"1.5-"
4-
exit()
5-
end
6-
71
using CUDA
82
if capability(device()) < v"7.0"
93
exit()

src/CUDA.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ using ExprTools
2525

2626
const ci_cache = GPUCompiler.CodeCache()
2727

28-
@static if VERSION >= v"1.7-"
28+
@static if isdefined(Base.Experimental, Symbol("@overlay"))
2929
Base.Experimental.@MethodTable(method_table)
3030
else
3131
const method_table = nothing

src/array.jl

-6
Original file line numberDiff line numberDiff line change
@@ -476,12 +476,6 @@ function Base.reshape(a::CuArray{T,M}, dims::NTuple{N,Int}) where {T,N,M}
476476
return b
477477
end
478478

479-
# allow missing dimensions with Colon()
480-
if VERSION < v"1.6.0-DEV.1358"
481-
Base.reshape(parent::CuArray, dims::Tuple{Vararg{Union{Int,Colon}}}) =
482-
Base.reshape(parent, Base._reshape_uncolon(parent, dims))
483-
end
484-
485479

486480
## reinterpret
487481

src/compiler/execution.jl

+1-5
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,7 @@ AbstractKernel
166166
args = (:F, (:( args[$i] ) for i in 1:length(args))...)
167167

168168
# filter out arguments that shouldn't be passed
169-
predicate = if VERSION >= v"1.5.0-DEV.581"
170-
dt -> isghosttype(dt) || Core.Compiler.isconstType(dt)
171-
else
172-
dt -> isghosttype(dt)
173-
end
169+
predicate = dt -> isghosttype(dt) || Core.Compiler.isconstType(dt)
174170
to_pass = map(!predicate, sig.parameters)
175171
call_t = Type[x[1] for x in zip(sig.parameters, to_pass) if x[2]]
176172
call_args = Union{Expr,Symbol}[x[1] for x in zip(args, to_pass) if x[2]]

src/device/intrinsics.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ macro device_override(ex)
66
code = quote
77
$GPUCompiler.@override($method_table, $ex)
88
end
9-
if VERSION >= v"1.7-"
9+
if isdefined(Base.Experimental, Symbol("@overlay"))
1010
return esc(code)
1111
else
1212
push!(overrides.args, code)

src/mapreduce.jl

-6
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,6 @@ end
131131

132132
## COV_EXCL_STOP
133133

134-
if VERSION < v"1.5.0-DEV.748"
135-
Base.axes(bc::Base.Broadcast.Broadcasted{<:CuArrayStyle, <:NTuple{N}},
136-
d::Integer) where N =
137-
d <= N ? axes(bc)[d] : Base.OneTo(1)
138-
end
139-
140134
function GPUArrays.mapreducedim!(f::F, op::OP, R::AnyCuArray{T},
141135
A::Union{AbstractArray,Broadcast.Broadcasted};
142136
init=nothing) where {F, OP, T}

test/exceptions.jl

+1-5
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,7 @@ let (code, out, err) = julia_script(script, `-g2`)
5454
occursin("ERROR: CUDA error: an illegal instruction was encountered", err) ||
5555
occursin("ERROR: CUDA error: unspecified launch failure", err)
5656
@test occursin(r"ERROR: a \w+ was thrown during kernel execution", out)
57-
if VERSION < v"1.3.0-DEV.270"
58-
@test occursin("[1] Type at float.jl", out)
59-
else
60-
@test occursin("[1] Int64 at float.jl", out)
61-
end
57+
@test occursin("[1] Int64 at float.jl", out)
6258
@test occursin("[4] kernel at none:5", out)
6359
end
6460

test/execution.jl

-2
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,6 @@ end
854854
@test out == "Hello, World!"
855855
end
856856

857-
if VERSION >= v"1.1" # behavior of captured variables (box or not) has improved over time
858857
@testset "closures" begin
859858
function hello()
860859
x = 1
@@ -869,7 +868,6 @@ if VERSION >= v"1.1" # behavior of captured variables (box or not) has improved
869868
end
870869
@test out == "Hello, World 1!"
871870
end
872-
end
873871

874872
@testset "argument passing" begin
875873
## padding

test/runtests.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ if !has_cutensor() || CUDA.version() < v"10.1" || first(picks).cap < v"7.0"
163163
push!(skip_tests, "cutensor")
164164
end
165165
is_debug = ccall(:jl_is_debugbuild, Cint, ()) != 0
166-
if VERSION < v"1.5-" || first(picks).cap < v"7.0"
166+
if first(picks).cap < v"7.0"
167167
push!(skip_tests, "device/wmma")
168168
end
169169
if Sys.ARCH == :aarch64

0 commit comments

Comments
 (0)