-
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
--check-bounds=no
is broken on Julia 1.9.0-beta3
#354
Comments
--check-bounds=no
is broken--check-bounds=no
is broken on Julia 1.9.0-beta3
Is only the |
From the quick testing I've done, no. Only with |
I think I'll move this issue to GPUCompiler, as it is probably its responsibility |
Turns out, this is probably AMDGPU's fault, as it passes alignment argument to AMDGPU.jl/src/device/gcn/array.jl Line 85 in 09cf06c
Removing @jpsamaroo is it the right move? |
That is not true, as explained in JuliaGPU/GPUCompiler.jl#387 (comment). Just don't use |
Yes, I've seen it. For me, however, it consistently results in better performance (especially in things like Nerf.jl).
If there were a way to switch between that for GPU kernels it'd be great. Or is there? |
Yeah, GPUs are sensitive to the branches introduced by bounds checking. We'll probably need a GPUCompiler.jl-based solution, but that may take a while. For the time being, That said, if you write GPU kernels you should generally be using |
Is the perf improvement you see between I really like that approach also:
Sure, one could rather use |
That's |
Agree, but then the code becomes kind of polluted with them, especially if the kernel is more complicated. Much easier is to have some kind of switch to disable them entirely, like |
What's wrong with:
|
Marking
Nothing, but also requires one to think if it is propagated properly. And still is more complex than having a switch for that. |
I would totally agree with @pxl-th on this. |
A switch that introduces the risk of your entire session crashing when there's an inadvertent OOB access somewhere. The argument is that it doesn't make sense for the entire session, and instead should be a fine-grained flag. For example, |
Yes, something like that would be great. |
A switch that you only use if you're sure that your code will not crash (as for example in a production run of a scientific application)! :) Different people have different ways of working! |
How can you be sure that there is no oob memory access anywhere in the code? You might hit a new code path or another part of the code correctly handles bounds checking and starts doing the wrong thing when you turn it off globally. I am strong proponent that like fast math flags like this need to be locally scoped. |
Of course you can never be totally sure; so whether it makes sense or not to have a global switch to remove bounds checking comes exactly down to what you are bringing up here: do we have a high chance to hit a new code path that might fail? |
--check-bounds=no
seems to be broken on Julia1.9.0-beta3
.MWE:
Run below script with
--check-bounds=no
Error:
The text was updated successfully, but these errors were encountered: