Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CPU(static=true) test #580

Merged
merged 3 commits into from
Mar 12, 2025
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
3 changes: 0 additions & 3 deletions cuda/Project.toml

This file was deleted.

29 changes: 0 additions & 29 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,6 @@ include("testsuite.jl")
Testsuite.testsuite(CPU, "CPU", Base, Array, CPUBackendArray)
end

@kernel function kern_static(A)
I = @index(Global)
A[I] = Threads.threadid()
end

A = zeros(Int, Threads.nthreads())
kern_static(CPU(static = true), (1,))(A, ndrange = length(A))
@test A == 1:Threads.nthreads()

if Base.JLOptions().check_bounds == 0 || Base.JLOptions().check_bounds == 1
# testing bounds errors
@kernel inbounds = false function my_bounded_kernel(a)
idx = @index(Global, Linear)
a[idx] = 0
end
@test_throws BoundsError(Int64[], (1,)) my_bounded_kernel(CPU())(Int[], ndrange = 1)
end

if Base.JLOptions().check_bounds == 0 || Base.JLOptions().check_bounds == 2
@kernel inbounds = true function my_bounded_kernel(a)
idx = @index(Global, Linear)
a[idx] = 0
end
@test nothing == my_inbounds_kernel(CPU())(Int[], ndrange = 1)
end

struct NewBackend <: KernelAbstractions.GPU end
@testset "Default host implementation" begin
backend = NewBackend()
Expand All @@ -60,9 +34,6 @@ struct NewBackend <: KernelAbstractions.GPU end
@test_throws ErrorException KernelAbstractions.priority!(backend, :middle)

@test KernelAbstractions.functional(backend) === missing

kernel = my_no_cpu_kernel(backend)
@test_throws MethodError kernel()
end


Expand Down
Loading