Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions test/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import Adapt
end
# TODO: Look into how to port the @sync

if cl.usm_supported(cl.device())
if cl.memory_backend() isa cl.USMBackend
@testset "shared buffers & unsafe_wrap" begin
a = CLVector{Int, cl.UnifiedSharedMemory}(undef, 2)

Expand Down Expand Up @@ -82,8 +82,6 @@ import Adapt
e = c .+ d
@test OpenCL.memtype(e) == cl.UnifiedSharedMemory
end
else
@warn "Skipping USM-specific tests as not supported on device $(cl.device())"
end

@testset "resizing" begin
Expand Down
3 changes: 2 additions & 1 deletion test/buffer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
end
end


if cl.memory_backend() isa cl.SVMBackend
@testset "SVM Buffer" begin
# simple buffer
let buf = cl.svm_alloc(sizeof(Int))
Expand Down Expand Up @@ -124,3 +124,4 @@ end
@test dst == [42,42,42]
end
end
end
2 changes: 1 addition & 1 deletion test/event.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if contains(cl.platform().vendor, "Intel") || contains(cl.platform().vendor, "pocl")
if contains(cl.platform().vendor, "Intel") || contains(cl.platform().vendor, "pocl") || contains(cl.platform().name, "rusticl")
# unsupported by POCL
# hangs on Intel
@warn "Skipping event tests on $(cl.platform().name)"
Expand Down
5 changes: 2 additions & 3 deletions test/intrinsics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@on_device work_group_barrier(OpenCL.LOCAL_MEM_FENCE, OpenCL.memory_scope_work_item)
@on_device work_group_barrier(OpenCL.LOCAL_MEM_FENCE, OpenCL.memory_scope_work_group)
@on_device work_group_barrier(OpenCL.LOCAL_MEM_FENCE, OpenCL.memory_scope_device)
@on_device work_group_barrier(OpenCL.LOCAL_MEM_FENCE, OpenCL.memory_scope_all_svm_devices)
cl.memory_backend() isa cl.SVMBackend && @on_device work_group_barrier(OpenCL.LOCAL_MEM_FENCE, OpenCL.memory_scope_all_svm_devices)
@on_device work_group_barrier(OpenCL.LOCAL_MEM_FENCE, OpenCL.memory_scope_sub_group)

end
Expand All @@ -43,11 +43,10 @@ end
@on_device atomic_work_item_fence(OpenCL.LOCAL_MEM_FENCE, OpenCL.memory_order_relaxed, OpenCL.memory_scope_work_item)
@on_device atomic_work_item_fence(OpenCL.GLOBAL_MEM_FENCE, OpenCL.memory_order_acquire, OpenCL.memory_scope_work_group)
@on_device atomic_work_item_fence(OpenCL.IMAGE_MEM_FENCE, OpenCL.memory_order_release, OpenCL.memory_scope_device)
@on_device atomic_work_item_fence(OpenCL.LOCAL_MEM_FENCE, OpenCL.memory_order_acq_rel, OpenCL.memory_scope_all_svm_devices)
cl.memory_backend() isa cl.SVMBackend && @on_device atomic_work_item_fence(OpenCL.LOCAL_MEM_FENCE, OpenCL.memory_order_acq_rel, OpenCL.memory_scope_all_svm_devices)
@on_device atomic_work_item_fence(OpenCL.GLOBAL_MEM_FENCE, OpenCL.memory_order_seq_cst, OpenCL.memory_scope_sub_group)
@on_device atomic_work_item_fence(OpenCL.IMAGE_MEM_FENCE | OpenCL.LOCAL_MEM_FENCE, OpenCL.memory_order_acquire, OpenCL.memory_scope_sub_group)

end

end

Loading