GPU Error in Julia 1.6 but not in Julia 1.5

Hi,

The following kernel works in Julia 1.5.3 but not in Julia 1.6.3. I believe it is related to CUDA.exp but I tried directly with exp() w/o success.

function vr(Nb,Ny,α,β,τ,Vr,V0,Y,B,Price0,P)

ib = (blockIdx().x-1)*blockDim().x + threadIdx().x
iy = (blockIdx().y-1)*blockDim().y + threadIdx().y

if (ib <= Nb && iy <= Ny)

    Max = -Inf
    for b in 1:Nb
        c = CUDA.exp(Y[iy]) + B[ib] - Price0[iy,b]*B[b]
        if c > 0 #If consumption positive, calculate value of return
            sumret = 0
            for y in 1:Ny
                sumret += V0[y,b]*P[iy,y]
            end

            vr = CUDA.pow(c,(1-α))/(1-α) + β * sumret
            Max = CUDA.max(Max, vr)
        end
    end
    Vr[iy,ib] = Max
end
return

end

Hi, CUDA.pow() is replaced by ^ since CUDA v3.0 (thus Julia 1.6), I’d say (ref - here the full intrinsics list).

Thanks!

1 Like

Same with max, exp; you can now just use the Base function (or the one from SpecialFunctions in some other cases).