-
Notifications
You must be signed in to change notification settings - Fork 51
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
How to set fast math for CUDA #491
Comments
You can use the |
|
Does Lines 427 to 441 in 15f0077
That's what I cared about, I'm already using @fastmath to use the faster versions of functions.
It doesn't seem to, e.g. @fastmath function kernel!(y, x)
i = threadIdx().x
@inbounds y[i] = sqrt(x[i])
return nothing
end
x = CuArray(Float32[])
@device_code_ptx @cuda launch=false always_inline=true kernel!(x, x) Looking at the ptx of this I see |
|
Ah yes, that kind of stuff we should be able to control.
That won't be affected by the proposed I guess we could have a GPUCompiler pass that adds fast-math stuff everywhere, but that feels like a hack. |
Thanks |
It seems to me that fast math is set in this line and as
--math-mode
has been disabled (JuliaLang/julia#41638) there is no way currently to use fast math.GPUCompiler.jl/src/ptx.jl
Line 427 in 15f0077
Perhaps fast math should be set by the user similarly to
max_regs
.The text was updated successfully, but these errors were encountered: