Skip to content
This repository was archived by the owner on Sep 27, 2021. It is now read-only.

Commit 0da97eb

Browse files
committed
test all available opencl devices
1 parent 2b88280 commit 0da97eb

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

src/context.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ end
1111
function show(io::IO, ctx::CLContext)
1212
println(io, "OpenCL context with:")
1313
println(io, "CL version: ", cl.info(ctx.device, :version))
14-
device_summary(io, ctx.device)
14+
GPUArrays.device_summary(io, ctx.device)
1515
end
1616

1717
function CLContext(device::cl.Device)
@@ -47,7 +47,7 @@ function device(x::cl.Context)
4747
end
4848

4949

50-
50+
global init
5151
let contexts = Dict{cl.Device, CLContext}(), active_device = cl.Device[], clcontext2context = Dict{cl.Context, CLContext}()
5252
function getcontext!(ctx::cl.Context)
5353
if haskey(clcontext2context, ctx)

src/device.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ import GPUArrays: supports_double, local_memory
44
function devices()
55
filter(cl.devices()) do dev
66
# These drivers have some problems - TODO figure out if we are the problem
7-
!(
8-
contains(cl.info(dev, :version), "AMD-APP (2348.3)") || #AMD for intel. Why though?
9-
contains(cl.info(dev, :version), "(Build 10)") # intels experimental 2.1 driver
10-
)
7+
!contains(cl.info(dev, :version), "(Build 10)") # intels experimental 2.1 driver
118
end
129
end
1310

test/runtests.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ if (
1515
end
1616

1717
using CLArrays
18-
using GPUArrays.TestSuite
19-
20-
TestSuite.run_tests(CLArray)
18+
using GPUArrays.TestSuite, Base.Test
19+
for dev in CLArrays.devices()
20+
CLArrays.init(dev)
21+
@testset "Device: $dev" begin
22+
TestSuite.run_tests(CLArray)
23+
end
24+
end

0 commit comments

Comments
 (0)