Skip to content

Commit 05cb784

Browse files
authored
Merge pull request #103 from mcabbott/gpu3
Test with newer gpu packages, incl. CUDAKernels
2 parents 6044030 + 0849f38 commit 05cb784

File tree

4 files changed

+23
-10
lines changed

4 files changed

+23
-10
lines changed

.buildkite/pipeline.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,16 @@ steps:
1515
cuda: "*"
1616
if: build.message !~ /\[skip tests\]/
1717
timeout_in_minutes: 60
18+
19+
- label: "Julia 1.6"
20+
plugins:
21+
- JuliaCI/julia#v0.5:
22+
version: 1.6
23+
- JuliaCI/julia-test#v0.3: ~
24+
# - JuliaCI/julia-coverage#v0.3:
25+
# codecov: true
26+
agents:
27+
queue: "juliagpu"
28+
cuda: "*"
29+
if: build.message !~ /\[skip tests\]/
30+
timeout_in_minutes: 60

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
99
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
1010

1111
[compat]
12-
CUDA = "2"
13-
CUDAKernels = "0.1"
12+
CUDA = "2, 3"
13+
CUDAKernels = "0.1, 0.2"
1414
DiffRules = "1"
1515
FillArrays = "0.10, 0.11"
1616
ForwardDiff = "0.10"

test/gradients.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ end
4141
@test _gradient(sumh2, rand(2,3), rand(3,2)) == (ones(2,3), ones(3,2))
4242

4343
# nontrivial function
44-
flog(x,y) = @tullio z[i] := log(x[i,j]) / y[j,i]
44+
flog(x,y) = @tullio z[i] := log(x[i,j]) / y[j,i] avx=false # new failure LoopVectorization v0.12.14? only on CI?
4545
r_x, r_y = rand(2,3), rand(3,2)
4646
fx = ForwardDiff.gradient(x -> sum(flog(x, r_y)), r_x)
4747
fy = ForwardDiff.gradient(y -> sum(flog(r_x, y)), r_y)
@@ -79,7 +79,7 @@ end
7979
@test _gradient(x -> sum(@tullio y[] := log(x[i])), collect(1:3.0))[1] == 1 ./ (1:3)
8080
end
8181
# one-element vectors are fine:
82-
@test _gradient(x -> sum(@tullio y[1] := log(x[i])), collect(1:3.0))[1] == 1 ./ (1:3)
82+
@test _gradient(x -> sum(@tullio y[1] := log(x[i]) avx=false), collect(1:3.0))[1] == 1 ./ (1:3) # new failure LoopVectorization v0.12.14? only on CI?
8383
# which is what's now used for this:
8484
@test _gradient(x -> (@tullio y := log(x[i])), collect(1:3.0))[1] == 1 ./ (1:3)
8585

@@ -146,7 +146,7 @@ end
146146
@testset "@inferred" begin
147147

148148
h2(x,y) = @tullio z[i] := x[i,j] + y[j,i] # as above
149-
flog(x,y) = @tullio z[i] := log(x[i,j]) / y[j,i]
149+
flog(x,y) = @tullio z[i] := log(x[i,j]) / y[j,i] avx=false # new failure LoopVectorization v0.12.14? only on CI?
150150

151151
mat = rand(3,3)
152152
@test @inferred(h2(mat, mat)) vec(sum(mat .+ mat', dims=2))

test/parsing.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ using Tullio, Test, LinearAlgebra
127127
@test H[1,:] == M[2,:] # but H[3,:] gets written into twice.
128128

129129
J′ = [1,2,10]
130-
@tullio H′[J′[i'],k] := A[k]
130+
@tullio H′[J′[i'],k] := A[k] avx=false # new failure LoopVectorization v0.12.13? only on CI?
131131
@test size(H′) == (10, length(A))
132132
@test H′[2,:] == A
133133
@test H′[3,4] == 0 # zeroed before being written into
@@ -366,7 +366,7 @@ using OffsetArrays
366366

367367
# shifts on left
368368
E = zero(A)
369-
@tullio E[2i+1] = A[i]
369+
@tullio E[2i+1] = A[i] avx=false # new failure LoopVectorization v0.12.14? only on CI?
370370
@test E[2+1] == A[1]
371371
@test E[2*4+1] == A[4]
372372

@@ -552,7 +552,7 @@ end
552552

553553
@tullio B[i,j] := A[i] + A[k] // A[j]
554554

555-
@tullio B2[_,j] := (B[i,j] + B[j,i])^2 |> sqrt
555+
@tullio B2[_,j] := (B[i,j] + B[j,i])^2 |> sqrt avx=false # new failure LoopVectorization v0.12.14? only on CI?
556556
@test B2 mapslices(norm, B .+ B', dims=1)
557557

558558
# trivial use, scalar output -- now forbidden
@@ -564,11 +564,11 @@ end
564564

565565
# larger size, to trigger threads & tiles
566566
C = randn(10^6) # > Tullio.BLOCK[]
567-
@tullio n2[_] := C[i]^2 |> sqrt
567+
@tullio n2[_] := C[i]^2 |> sqrt avx=false
568568
@test n2[1] norm(C,2)
569569

570570
D = rand(1000, 1000) # > Tullio.TILE[]
571-
@tullio D2[_,j] := D[i,j]^2 |> sqrt
571+
@tullio D2[_,j] := D[i,j]^2 |> sqrt avx=false
572572
@test D2 mapslices(norm, D, dims=1)
573573

574574
# functions with underscores

0 commit comments

Comments
 (0)