JuliaLang / AllocCheck.jl

AllocCheck
Other
209 stars 8 forks source link

Pipeline discrepancies + Inference instability under recursion #30

Closed topolarity closed 8 months ago

topolarity commented 9 months ago

@oscardssmith brought up the important point today in the meeting that Inference results can depend on the order of queries to inference, since a cached result may be used to resolve a recursive loop more precisely.

Since inference is not always monotonic, we don't even have the guarantee that something being alloc-free when run with a fresh cache will also be alloc-free when it runs after we already have more precise results cached from other function calls.

Some possible solutions:

P.S. A closely-related issue is that our pipeline-parity guarantees with GPUCompiler vs. Base Julia are pretty weak right now. Under optimization pipeline flags, code coverage, etc. it's quite easy for the two to fall out of sync, in which case we lose soundness.