Skip to content

Commit 6bceee4

Browse files
committed
Fixes
1 parent c7e5335 commit 6bceee4

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/indexing.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function _getindex(xs::GPUArray{T}, i::Integer) where T
1616
end
1717

1818
function Base.getindex(xs::GPUArray{T}, i::Integer) where T
19-
assertslow("getindex")
19+
# assertslow("getindex")
2020
_getindex(xs, i)
2121
end
2222

@@ -27,7 +27,7 @@ function _setindex!(xs::GPUArray{T}, v::T, i::Integer) where T
2727
end
2828

2929
function Base.setindex!(xs::GPUArray{T}, v::T, i::Integer) where T
30-
assertslow("setindex!")
30+
# assertslow("setindex!")
3131
_setindex!(xs, v, i)
3232
end
3333

src/testsuite/pool.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,24 @@ using GPUArrays.TestSuite, Base.Test, Flux
33
function run_pool(Typ)
44
for ET in supported_eltypes()
55
T = Typ{ET}
6+
if (ET == Complex{Float32} || ET == Complex{Float64})
7+
continue
8+
end
69
@testset "$ET" begin
710
@testset "maxpool" begin
811
pool = 3
912
stride = 3
1013
pad = 3
1114

12-
a = rand(9,9,3,1)
15+
a = rand(ET, 9,9,3,1)
1316
b = zeros(eltype(a), size(a,1) + pad * 2, size(a,2) + pad * 2, size(a,3), size(a,4))
1417
b[pad + 1 : pad + size(a,1), pad + 1 : pad + size(a,2), :, :] = a
1518
out1 = maxpool(b, (3, 3))
1619

1720
a = T(a)
1821
out2 = GPUArrays.maxpool2d(a, pool, stride = 3, pad = 3)
1922

20-
@test convert(Array{FLoat32, ndims(a)}, out1) convert(Array{FLoat32, ndims(a)}, out2)
23+
@test out1 out2
2124
end
2225
end
2326
end

0 commit comments

Comments
 (0)