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
using Reactant, CUDA
Reactant.set_default_backend("cpu")
functionsquare_kernel!(x, y)
i =threadIdx().x
x[i] = y[i] * y[i]
# We don't yet auto lower this via polygeist# sync_threads()returnnothingendfunctionsquare!(x, y)
@cuda blocks =1 threads =length(x) square_kernel!(x, y)
returnnothingendfunctionsquare(x)
y =similar(x)
square!(y, x)
return y
end
x = Reactant.to_rarray(collect(1:1:64) ./64)
@code_hlosquare(x)
@jitsquare(x)
mmm what happens if you initialize y with ones instead of similar? i suspect that side-effects are not properly tracked and it might be optimizing away the kernel
The text was updated successfully, but these errors were encountered: