Reputation: 1
I'm working with an FDTD problema and to get a better performance I'm programming in CUDA. What am I doing wrong?
This my code:
using BenchmarkTools
using CUDA
CUDA.@allowscalar(true)
tamaño::Int32 = 200
epsilon = CuArray{Float32}(undef,tamaño)
function Cond_Front()
CUDA.@sync CUDA.@allowscalar for mm in 1:1:tamaño
if (mm <= 100)
@inbounds epsilon[mm] = 1.0
else
@inbounds epsilon[mm] = 9.0
end
end
return #nothing
end
function bench_gpu1!()
CUDA.@sync begin
@cuda Cond_Front()
end
end
# MEDICION DEL TIEMPO DE EJECUCION
@btime bench_gpu1!()
Thanks
This is the error I get :
IDs have conflicting values ('i32 4' from globals with 'i32 2' from start)
Upvotes: 0
Views: 31