Skip to content

Commit 7f38f28

Browse files
authored
Merge pull request #360 from JuliaGPU/tb/julia_1.7
Fixes for Julia 1.7
2 parents 5172041 + 454e51e commit 7f38f28

File tree

5 files changed

+3
-34
lines changed

5 files changed

+3
-34
lines changed

Project.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ Adapt = "2.0, 3.0"
1717
julia = "1.5"
1818

1919
[extras]
20-
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
2120
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2221

2322
[targets]
24-
test = ["Test", "FillArrays"]
23+
test = ["Test"]

docs/src/testsuite.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,6 @@ gpuarrays_root = dirname(dirname(gpuarrays))
1212
include(joinpath(gpuarrays_root, "test", "testsuite.jl"))
1313
```
1414

15-
This however implies that the test system will not know about extra dependencies that are
16-
required by the test suite. To remedy this, you should add the following dependencies to
17-
your `Project.toml`:
18-
19-
```
20-
[extras]
21-
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
22-
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
23-
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
24-
...
25-
26-
[targets]
27-
test = [..., "FFTW", "ForwardDiff", "FillArrays"]
28-
```
29-
3015
With this set-up, you can run the test suite like this:
3116

3217
```julia

src/host/indexing.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ function _getindex(src::AbstractGPUArray, Is...)
145145
end
146146

147147
@generated function getindex_kernel(ctx::AbstractKernelContext, dest, src, idims,
148-
Is::Vararg{<:Any,N}) where {N}
148+
Is::Vararg{Any,N}) where {N}
149149
quote
150150
i = @linearidx dest
151151
is = @inbounds CartesianIndices(idims)[i]
@@ -172,7 +172,7 @@ function _setindex!(dest::AbstractGPUArray, src, Is...)
172172
end
173173

174174
@generated function setindex_kernel(ctx::AbstractKernelContext, dest, src, idims, len,
175-
Is::Vararg{<:Any,N}) where {N}
175+
Is::Vararg{Any,N}) where {N}
176176
quote
177177
i = linear_index(ctx)
178178
i > len && return

test/testsuite.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ using Random
1313
using Test
1414

1515
using Adapt
16-
using FillArrays
1716

1817
struct ArrayAdaptor{AT} end
1918
Adapt.adapt_storage(::ArrayAdaptor{AT}, xs::AbstractArray) where {AT} = AT(xs)

test/testsuite/construction.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -174,17 +174,3 @@ end
174174
@test Array(x1) x
175175
end
176176
end
177-
178-
@testsuite "construct/iterator" AT->begin
179-
for T in supported_eltypes()
180-
@test Array(AT(Fill(T(0), (10,)))) == Array(fill!(similar(AT{T}, (10,)), T(0)))
181-
@test Array(AT(Fill(T(0), (10, 10)))) == Array(fill!(similar(AT{T}, (10, 10)), T(0)))
182-
if T <: Real
183-
x = AT{Float32}(Fill(T(0), (10, 10)))
184-
@test eltype(x) == Float32
185-
@test Array(AT(Eye{T}((10)))) == Array(AT{T}(I, 10, 10))
186-
x = AT{Float32}(Eye{T}(10))
187-
@test eltype(x) == Float32
188-
end
189-
end
190-
end

0 commit comments

Comments
 (0)