Skip to content

Commit 3497077

Browse files
authored
Merge pull request #950 from JuliaGPU/tb/sanitize
CI fixes
2 parents 2c40cb4 + df08dd5 commit 3497077

File tree

13 files changed

+118
-71
lines changed

13 files changed

+118
-71
lines changed

.buildkite/pipeline.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ steps:
2828
version: 1.6
2929
- JuliaCI/julia-test#v1:
3030
julia_args: "-g2"
31-
test_args: "--sanitize --quickfail --jobs=1"
31+
test_args: "--sanitize --quickfail"
3232
- JuliaCI/julia-coverage#v1:
3333
codecov: true
3434
dirs:
@@ -37,13 +37,14 @@ steps:
3737
- examples
3838
agents:
3939
queue: "juliagpu"
40-
cuda: "11.3" # compute-sanitizer uses a lot of memory, so we need device_reset!
40+
cuda: "11.0"
4141
cap: "recent" # test as much as possible
4242
env:
43-
JULIA_CUDA_VERSION: '11.2' # older versions of CUDA have issues
43+
JULIA_CUDA_VERSION: '11.4'
4444
JULIA_CUDA_DEBUG_INFO: 'false' # NVIDIA bug #3305774: ptxas segfaults with out debug info
4545
JULIA_CUDA_USE_BINARYBUILDER: 'true'
46-
if: build.message !~ /\[skip tests\]/
46+
if: build.message !~ /\[skip tests\]/ &&
47+
!build.pull_request.draft
4748
timeout_in_minutes: 120
4849

4950
- label: "Julia 1.7"
@@ -60,7 +61,7 @@ steps:
6061
agents:
6162
queue: "juliagpu"
6263
cuda: "*"
63-
if: build.message !~ /\[skip tests\]/
64+
if: build.message !~ /\[skip tests\]/ && !build.pull_request.draft
6465
timeout_in_minutes: 120
6566

6667
- label: "Julia 1.8"
@@ -77,7 +78,7 @@ steps:
7778
agents:
7879
queue: "juliagpu"
7980
cuda: "*"
80-
if: build.message !~ /\[skip tests\]/
81+
if: build.message !~ /\[skip tests\]/ && !build.pull_request.draft
8182
timeout_in_minutes: 120
8283
soft_fail:
8384
- exit_status: 1
@@ -110,7 +111,7 @@ steps:
110111
env:
111112
JULIA_CUDA_VERSION: '11.4'
112113
JULIA_CUDA_USE_BINARYBUILDER: 'true'
113-
if: build.message !~ /\[skip tests\]/
114+
if: build.message !~ /\[skip tests\]/ && !build.pull_request.draft
114115
timeout_in_minutes: 120
115116

116117
- label: "CUDA 11.3"
@@ -130,7 +131,7 @@ steps:
130131
env:
131132
JULIA_CUDA_VERSION: '11.3'
132133
JULIA_CUDA_USE_BINARYBUILDER: 'true'
133-
if: build.message !~ /\[skip tests\]/
134+
if: build.message !~ /\[skip tests\]/ && !build.pull_request.draft
134135
timeout_in_minutes: 120
135136

136137
- label: "CUDA 11.2"
@@ -150,7 +151,7 @@ steps:
150151
env:
151152
JULIA_CUDA_VERSION: '11.2'
152153
JULIA_CUDA_USE_BINARYBUILDER: 'true'
153-
if: build.message !~ /\[skip tests\]/
154+
if: build.message !~ /\[skip tests\]/ && !build.pull_request.draft
154155
timeout_in_minutes: 120
155156

156157
- label: "CUDA 11.1"
@@ -170,7 +171,7 @@ steps:
170171
env:
171172
JULIA_CUDA_VERSION: '11.1'
172173
JULIA_CUDA_USE_BINARYBUILDER: 'true'
173-
if: build.message !~ /\[skip tests\]/
174+
if: build.message !~ /\[skip tests\]/ && !build.pull_request.draft
174175
timeout_in_minutes: 120
175176

176177
- label: "CUDA 11.0"
@@ -190,7 +191,7 @@ steps:
190191
env:
191192
JULIA_CUDA_VERSION: '11.0'
192193
JULIA_CUDA_USE_BINARYBUILDER: 'true'
193-
if: build.message !~ /\[skip tests\]/
194+
if: build.message !~ /\[skip tests\]/ && !build.pull_request.draft
194195
timeout_in_minutes: 120
195196

196197
- label: "CUDA 10.2"
@@ -210,7 +211,7 @@ steps:
210211
env:
211212
JULIA_CUDA_VERSION: '10.2'
212213
JULIA_CUDA_USE_BINARYBUILDER: 'true'
213-
if: build.message !~ /\[skip tests\]/
214+
if: build.message !~ /\[skip tests\]/ && !build.pull_request.draft
214215
timeout_in_minutes: 120
215216

216217
- label: "CUDA 10.1"
@@ -230,7 +231,7 @@ steps:
230231
env:
231232
JULIA_CUDA_VERSION: '10.1'
232233
JULIA_CUDA_USE_BINARYBUILDER: 'true'
233-
if: build.message !~ /\[skip tests\]/
234+
if: build.message !~ /\[skip tests\]/ && !build.pull_request.draft
234235
timeout_in_minutes: 120
235236

236237

@@ -250,7 +251,7 @@ steps:
250251
agents:
251252
queue: "juliagpu-windows"
252253
cuda: "*"
253-
if: build.message !~ /\[skip tests\]/
254+
if: build.message !~ /\[skip tests\]/ && !build.pull_request.draft
254255
timeout_in_minutes: 120
255256

256257
- label: "NNlibCUDA.jl"
@@ -276,7 +277,7 @@ steps:
276277
agents:
277278
queue: "juliagpu"
278279
cuda: "*"
279-
if: build.message !~ /\[skip tests\]/
280+
if: build.message !~ /\[skip tests\]/ && !build.pull_request.draft
280281
timeout_in_minutes: 60
281282

282283

@@ -315,7 +316,8 @@ steps:
315316
queue: "benchmark"
316317
cuda: "*"
317318
if: build.message !~ /\[skip benchmarks\]/ &&
318-
build.branch =~ /^master$$/
319+
build.branch =~ /^master$$/ &&
320+
!build.pull_request.draft
319321
timeout_in_minutes: 30
320322

321323
- wait
@@ -341,7 +343,8 @@ steps:
341343
queue: "juliagpu"
342344
cuda: "*"
343345
if: build.message !~ /\[skip benchmarks\]/ &&
344-
build.branch !~ /^master$$/
346+
build.branch !~ /^master$$/ &&
347+
!build.pull_request.draft
345348
timeout_in_minutes: 30
346349

347350
- label: "Documentation"
@@ -362,7 +365,7 @@ steps:
362365
agents:
363366
queue: "juliagpu"
364367
cuda: "*"
365-
if: build.message !~ /\[skip docs\]/
368+
if: build.message !~ /\[skip docs\]/ && !build.pull_request.draft
366369
timeout_in_minutes: 30
367370

368371

Manifest.toml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,15 @@ version = "0.1.6"
7777

7878
[[GPUArrays]]
7979
deps = ["Adapt", "LinearAlgebra", "Printf", "Random", "Serialization", "Statistics"]
80-
git-tree-sha1 = "59aa54826b2667e2a9161f6dbd9e37255fdb541b"
81-
repo-rev = "e1a4b3d"
82-
repo-url = "https://github.com/JuliaGPU/GPUArrays.jl.git"
80+
git-tree-sha1 = "7c39d767a9c55fafd01f7bc8b3fd0adf175fbc97"
8381
uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
84-
version = "8.0.2"
82+
version = "8.1.0"
8583

8684
[[GPUCompiler]]
8785
deps = ["ExprTools", "InteractiveUtils", "LLVM", "Libdl", "Logging", "TimerOutputs", "UUIDs"]
88-
git-tree-sha1 = "4ed2616d5e656c8716736b64da86755467f26cf5"
86+
git-tree-sha1 = "55ea723d032654a52671923fdce9d785e02ed577"
8987
uuid = "61eb1bfa-7361-4325-ad38-22787b887f55"
90-
version = "0.12.9"
88+
version = "0.13.0"
9189

9290
[[InteractiveUtils]]
9391
deps = ["Markdown"]
@@ -106,9 +104,9 @@ version = "1.3.0"
106104

107105
[[LLVM]]
108106
deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Printf", "Unicode"]
109-
git-tree-sha1 = "23a47d417a3cd9c2e73c854bac7dd4731c105ef7"
107+
git-tree-sha1 = "36d95ecdfbc3240d728f68d73064d5b097fbf2ef"
110108
uuid = "929cbde3-209d-540e-8aea-75f648917ca0"
111-
version = "4.4.0"
109+
version = "4.5.2"
112110

113111
[[LLVMExtra_jll]]
114112
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ BFloat16s = "0.1"
3333
CEnum = "0.2, 0.3, 0.4"
3434
ExprTools = "0.1"
3535
GPUArrays = "8"
36-
GPUCompiler = "0.12.6"
36+
GPUCompiler = "0.13.0"
3737
LLVM = "4.1.1"
3838
Random123 = "1.2"
3939
RandomNumbers = "1.5.3"

lib/cudadrv/execution.jl

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ export cudacall
66
## device
77

88
# pack arguments in a buffer that CUDA expects
9-
@generated function pack_arguments(f::Function, args...)
9+
@inline @generated function pack_arguments(f::Function, args...)
1010
for arg in args
1111
isbitstype(arg) || throw(ArgumentError("Arguments to kernel should be bitstype."))
1212
end
1313

14-
ex = quote
15-
Base.@_inline_meta
16-
end
14+
ex = quote end
1715

1816
# If f has N parameters, then kernelParams needs to be an array of N pointers.
1917
# Each of kernelParams[0] through kernelParams[N-1] must point to a region of memory
@@ -78,12 +76,10 @@ end
7876

7977
# convert the argument values to match the kernel's signature (specified by the user)
8078
# (this mimics `lower-ccall` in julia-syntax.scm)
81-
@generated function convert_arguments(f::Function, ::Type{tt}, args...) where {tt}
79+
@inline @generated function convert_arguments(f::Function, ::Type{tt}, args...) where {tt}
8280
types = tt.parameters
8381

84-
ex = quote
85-
Base.@_inline_meta
86-
end
82+
ex = quote end
8783

8884
converted_args = Vector{Symbol}(undef, length(args))
8985
arg_ptrs = Vector{Symbol}(undef, length(args))

lib/cudnn/util.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ juliaDataType(a)=(a==CUDNN_DATA_HALF ? Float16 :
2424
tuple_strides(A::Tuple) = _strides((1,), A)
2525
_strides(out::Tuple{Int}, A::Tuple{}) = ()
2626
_strides(out::NTuple{N,Int}, A::NTuple{N}) where {N} = out
27-
function _strides(out::NTuple{M,Int}, A::Tuple) where M
28-
Base.@_inline_meta
27+
@inline function _strides(out::NTuple{M,Int}, A::Tuple) where M
2928
_strides((out..., out[M]*A[M]), A)
3029
end
3130

perf/volumerhs.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ for (jlf, f) in zip((:+, :*, :-), (:add, :mul, :sub))
2727
"""
2828
@eval begin
2929
# the @pure is necessary so that we can constant propagate.
30-
Base.@pure function $jlf(a::$T, b::$T)
31-
Base.@_inline_meta
30+
@inline Base.@pure function $jlf(a::$T, b::$T)
3231
Base.llvmcall($ir, $T, Tuple{$T, $T}, a, b)
3332
end
3433
end
@@ -46,8 +45,7 @@ let (jlf, f) = (:div_arcp, :div)
4645
"""
4746
@eval begin
4847
# the @pure is necessary so that we can constant propagate.
49-
Base.@pure function $jlf(a::$T, b::$T)
50-
@Base._inline_meta
48+
@inline Base.@pure function $jlf(a::$T, b::$T)
5149
Base.llvmcall($ir, $T, Tuple{$T, $T}, a, b)
5250
end
5351
end

src/compiler/execution.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ The following keyword arguments are supported:
174174
"""
175175
AbstractKernel
176176

177-
@generated function call(kernel::AbstractKernel{F,TT}, args...; call_kwargs...) where {F,TT}
177+
@inline @generated function call(kernel::AbstractKernel{F,TT}, args...; call_kwargs...) where {F,TT}
178178
sig = Tuple{F, TT.parameters...} # Base.signature_type with a function type
179179
args = (:(kernel.f), (:( args[$i] ) for i in 1:length(args))...)
180180

@@ -197,8 +197,6 @@ AbstractKernel
197197
call_tt = Base.to_tuple_type(call_t)
198198

199199
quote
200-
Base.@_inline_meta
201-
202200
cudacall(kernel.fun, $call_tt, $(call_args...); call_kwargs...)
203201
end
204202
end

src/device/intrinsics/dynamic_parallelism.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,9 @@ function launch(f::CuDeviceFunction, args::Vararg{Any,N}; blocks::CuDim=1, threa
7373
return
7474
end
7575

76-
@generated function parameter_buffer(f::CuDeviceFunction, blocks, threads, shmem, args...)
76+
@inline @generated function parameter_buffer(f::CuDeviceFunction, blocks, threads, shmem, args...)
7777
# allocate a buffer
7878
ex = quote
79-
Base.@_inline_meta
8079
buf = cudaGetParameterBufferV2(f, blocks, threads, shmem)
8180
ptr = Base.unsafe_convert(Ptr{UInt32}, buf)
8281
end

src/device/intrinsics/output.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ const cuprint_specifiers = Dict(
117117
Cstring => "%s",
118118
)
119119

120-
@generated function _cuprint(parts...)
120+
@inline @generated function _cuprint(parts...)
121121
fmt = ""
122122
args = Expr[]
123123

@@ -170,7 +170,6 @@ const cuprint_specifiers = Dict(
170170
end
171171

172172
quote
173-
Base.@_inline_meta
174173
@cuprintf($fmt, $(args...))
175174
end
176175
end

src/device/quirks.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,13 @@ end
3636
# trig.jl
3737
@device_override @noinline Base.Math.sincos_domain_error(x) =
3838
@print_and_throw "sincos(x) is only defined for finite x."
39+
40+
# multidimensional.jl
41+
if VERSION >= v"1.7-"
42+
# XXX: the boundscheck change in JuliaLang/julia#42119 has exposed additional issues
43+
# with bad code generation by ptxas, so revert that changen for now.
44+
@device_override Base.@propagate_inbounds function Base.getindex(iter::CartesianIndices{N,R},
45+
I::Vararg{Int, N}) where {N,R}
46+
CartesianIndex(getindex.(iter.indices, I))
47+
end
48+
end

0 commit comments

Comments
 (0)