Skip to content

Commit dadcff8

Browse files
authored
Switch to CUDACore (#57)
* Switch to CUDACore * Bump StridedViews version whoops * Use cuRAND for tests
1 parent e456c7a commit dadcff8

4 files changed

Lines changed: 19 additions & 17 deletions

File tree

Project.toml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "Strided"
22
uuid = "5e0ebb24-38b0-5f93-81fe-25c709ecae67"
3-
version = "2.3.6"
3+
version = "2.4.0"
44
authors = ["Lukas Devos <lukas.devos@ugent.be>", "Maarten Van Damme <maartenvd1994@gmail.com>", "Jutho Haegeman <jutho.haegeman@ugent.be>"]
55

66
[deps]
@@ -12,35 +12,37 @@ TupleTools = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6"
1212
AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e"
1313
JLArrays = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb"
1414
GPUArrays = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
15-
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
15+
CUDACore = "bd0ed864-bdfe-4181-a5ed-ce625a5fdea2"
1616

1717
[extensions]
1818
StridedAMDGPUExt = "AMDGPU"
1919
StridedJLArraysExt = "JLArrays"
2020
StridedGPUArraysExt = "GPUArrays"
21-
StridedCUDAExt = "CUDA"
21+
StridedCUDACoreExt = "CUDACore"
2222

2323
[compat]
2424
AMDGPU = "2"
2525
Aqua = "0.8"
26-
CUDA = "5"
26+
CUDACore = "6"
27+
cuRAND = "6"
2728
JLArrays = "0.3.1"
2829
GPUArrays = "11.4.1"
2930
LinearAlgebra = "1.6"
3031
Random = "1.6"
31-
StridedViews = "0.4.6"
32+
StridedViews = "0.5"
3233
Test = "1.6"
3334
TupleTools = "1.6"
3435
julia = "1.6"
3536

3637
[extras]
3738
AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e"
3839
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
39-
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
40+
CUDACore = "bd0ed864-bdfe-4181-a5ed-ce625a5fdea2"
41+
cuRAND = "20fd9a0b-12d5-4c2f-a8af-7c34e9e60431"
4042
JLArrays = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb"
4143
GPUArrays = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
4244
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
4345
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
4446

4547
[targets]
46-
test = ["Test", "Random", "Aqua", "AMDGPU", "CUDA", "GPUArrays", "JLArrays"]
48+
test = ["Test", "Random", "Aqua", "AMDGPU", "CUDACore", "cuRAND", "GPUArrays", "JLArrays"]
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
module StridedCUDAExt
1+
module StridedCUDACoreExt
22

3-
using Strided, StridedViews, CUDA
4-
using CUDA: Adapt, KernelAdaptor
5-
using CUDA: GPUArrays
3+
using Strided, StridedViews, CUDACore
4+
using CUDACore: Adapt, KernelAdaptor
5+
using CUDACore: GPUArrays
66

77
const ALL_FS = Union{typeof(adjoint), typeof(conj), typeof(identity), typeof(transpose)}
88

test/cuda.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
for T in (Float32, Float64, Complex{Float32}, Complex{Float64})
22
@testset "Copy with CuStridedView: $T, $f1, $f2" for f2 in (identity, conj, adjoint, transpose), f1 in (identity, conj, transpose, adjoint)
33
for m1 in (0, 16, 32), m2 in (0, 16, 32)
4-
A1 = CUDA.randn(T, (m1, m2))
4+
A1 = cuRAND.randn(T, (m1, m2))
55
A2 = similar(A1)
66
zA1 = CuMatrix(f1(zeros(T, (m1, m2))))
77
zA2 = CuMatrix(f2(zeros(T, (m1, m2))))
@@ -10,16 +10,16 @@ for T in (Float32, Float64, Complex{Float32}, Complex{Float64})
1010
B1 = f1(StridedView(A1c))
1111
B2 = f2(StridedView(A2c))
1212
axes(f1(A1)) == axes(f2(A2)) || continue
13-
@test collect(CuMatrix(copy!(f2(A2), f1(A1)))) == CUDA.Adapt.adapt(Vector{T}, copy!(B2, B1))
13+
@test collect(CuMatrix(copy!(f2(A2), f1(A1)))) == CUDACore.Adapt.adapt(Vector{T}, copy!(B2, B1))
1414
@test copy!(zA1, f1(A1)) == copy!(zA2, B1)
1515
A3 = CuArray(randn(T, (m1, m2)))
1616
A3c = copy(A3)
1717
B3 = f1(StridedView(A3c))
1818
@. B1 = 2 * B1 - B3 / 3 # test copyto! of Broadcasted
1919
@. A1 = 2 * A1 - A3 / 3 # test copyto! of Broadcasted
20-
@test CUDA.Adapt.adapt(Vector{T}, f1(A1)) == CUDA.Adapt.adapt(Vector{T}, B1)
20+
@test CUDACore.Adapt.adapt(Vector{T}, f1(A1)) == CUDACore.Adapt.adapt(Vector{T}, B1)
2121
x = rand(T)
22-
@test f1(StridedView(CUDA.Adapt.adapt(Vector{T}, fill!(A1c, x)))) == CUDA.Adapt.adapt(Vector{T}, fill!(B1, x))
22+
@test f1(StridedView(CUDACore.Adapt.adapt(Vector{T}, fill!(A1c, x)))) == CUDACore.Adapt.adapt(Vector{T}, fill!(B1, x))
2323
end
2424
end
2525
end

test/runtests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ using Random
44
using Strided
55
using Strided: StridedView
66
using Aqua
7-
using JLArrays, AMDGPU, CUDA, GPUArrays
7+
using JLArrays, AMDGPU, CUDACore, cuRAND, GPUArrays
88

99
Random.seed!(1234)
1010

@@ -32,7 +32,7 @@ if !is_buildkite
3232
Aqua.test_all(Strided; piracies = false)
3333
end
3434

35-
if CUDA.functional()
35+
if CUDACore.functional()
3636
include("cuda.jl")
3737
end
3838

0 commit comments

Comments
 (0)