Comments (6)
That issue name
Thanks for finding/cataloging these regressions, it's extremely useful.
from cassette.jl.
With #40 + JuliaLang/julia#26826 + a hack to also ignore Overdub{Execute}
in the recursion limiting heuristic [1], this goes back to your "before" case...which is still inferring as Any
.
Sigh.
[1] This is a separate hack from the spoofing we're using to ignore Overdub{Transform}
...we haven't decided how to do it in a not hacky way yet.
from cassette.jl.
Okay, JuliaLang/julia#26826 now implements the recursion limiting spoofing in a way that fixes the problem we were hacking around, so with #40 and JuliaLang/julia#26826 this becomes:
julia> code_warntype(Cassette.overdub(Ctx, unsafe_load), Tuple{Ptr{Float32}})
Variables:
o<optimized out>
x1::Ptr{Float32}
i<optimized out>
Body:
begin
Core.SSAValue(119) = (typeassert)(1, Int64)::Int64
Core.SSAValue(192) = (pointerref)(x1::Ptr{Float32}, Core.SSAValue(119), 1)::Any
return Core.SSAValue(192)
end::Any
from cassette.jl.
Yay, looking good. Any idea which limit/deficiency prevents pointerref
from being inferred?
from cassette.jl.
Any idea which limit/deficiency prevents pointerref from being inferred?
The problem was that intrinsics don't each have their own type - they're all of type Core.IntrinsicFunction
, so inference relies on constant propagation in order to infer calls to them. However, Cassette's splatting was thwarting the compiler's ability to constant propagate. JuliaLang/julia#26826 enables varargs constant propagation (and adds another patch on top of the recursion limiting heuristic), thus allowing this case to be inferred.
Leveraging this required refactoring Cassette's overdub implementation a bit (#41), because storing the function in an intermediate Overdub
struct was also getting in the way of constant propagation (and is no longer necessary, anyway, since I've been told that other compiler patches have since fixed the problems that struct was hacking around).
from cassette.jl.
closed by #41
from cassette.jl.
Related Issues (20)
- Subtrace test broken on 1.4 HOT 1
- More problems with `_apply_iterate`? HOT 2
- Something with tagging is broken in 1.4 HOT 1
- Inference issues with accessing hcat-ed arrays
- Tag new version HOT 5
- Internal error when overdubbing HTTP.request HOT 1
- Open discussion - support for dynamic pass creation HOT 3
- Overdubbing not working when function called from within `@threads for` loop HOT 2
- Code using Cassette fails for nightly builds HOT 2
- Discriminating overdub calls for "same" function/args HOT 1
- Is there a way to bail out of overdubbing? HOT 2
- TagBot trigger issue HOT 10
- Errors on Julia v1.6 HOT 3
- less helpful stacktraces on 1.6 HOT 3
- Error compiling Cubature.hcubature in context Traceur.Trace
- Default value to `reflect` should be `Base.current_world` HOT 1
- Cassette and AbstractInterpeter
- Cassette compilation fails as of Julia commit 6ce28008ba6db324b171909fa8e641fe8bce9db4 HOT 1
- Error in overdub with StaticArrays.jl HOT 5
- Error on ColorTypes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cassette.jl.