You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I may have missed something important, but this code is currently failing on the CPU
using KernelAbstractions
@kernel function f_test_kernel!(input)
tid = @index(Global, Linear)
@uniform a = tid
end
function f_test!(input; numcores = 4, numthreads = 256)
if isa(input, Array)
kernel! = f_test_kernel!(CPU(), numcores)
else
kernel! = f_test_kernel!(CUDADevice(), numthreads)
end
kernel!(input, ndrange=size(input))
end
f_test!(zeros(10))
I may have missed something important, but this code is currently failing on the CPU
With
tid not defined
:In my case, I wanted to use
@uniform elem = input[tid]
as a separate element variable, which I expect to be a fairly common use-caseThe text was updated successfully, but these errors were encountered: