-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Removal of @pure
makes constant-prop less effective.
#49472
Comments
Note that this behavior for |
Yes, this is expected. Do not use |
I am aware of that discussion. However, if I understand it correctly, the conclusion was to not yet disallow Are you saying that this issue is |
Note my observation in JuliaArrays/StaticArrays.jl#1155 (comment) |
--check-bounds=no
@pure
makes constant-prop less effective.
We have at least two execution environments that heavily rely on constant-propagation and can't use concrete-evaluation.
The removal of @aviatesk is constant propagation using the effect system? Trying @sloede test-case on JuliaArrays/StaticArrays.jl#1156 shows that Julia 1.10 will regress the situation again. |
To increase the chances of concrete evaluation for an external compiler pipeline using a custom method table, we can separate # this overlay isn't really concrete-eval-eligible
@overlay sin(x::Union{Float32,Float64}) = cos(x)
# this overlay might be concrete-eval-eligible, assuming that we are okay with having this error on CPU env during compile time
@overlay throw_some_error(x) = throw_on_gpu_env(x)
We can also boost the chances of concrete evaluation for processes using |
With the current commit on the
backports-release-1.9
branch (29889c7), in StaticArrays.jl a type instability is triggered when running Julia with--check-bounds=no
. I tried to create an MWE as follows:Start Julia with
JULIA_DEPOT_PATH=$PWD/tmp-depot path/to/julia-1.9-29889c7a1c --project=. --check-bounds=no
for a clean depot. Then run the following code:
When starting Julia without
--check-bounds=no
, the output of@code_warntype
is as expected:This causes a considerable performance regression to the point that code that heavily uses StaticArrays in hot loops becomes unusable.
cc @ranocha
The text was updated successfully, but these errors were encountered: