-
Notifications
You must be signed in to change notification settings - Fork 57
Closed
Description
There's currently two related problems with our current world age handling:
- we index the compilation cache directly with the world age (by taking the hash of the compiler job); instead we should intersect, and handle invalidation
- when creating the FunctionSpec, we should have a way to pass the world age of the calling code, as opposed to the current global world age, which makes e.g.
cufunctionalways look up the latest version of a potentially shadowed kernel (whereas it should be consistent with the world age of the caller); this probably requires a new intrinsic as both the current world age getter and the PTLS entry always point to the latest world:julia> worlds() = (ptls=Int(unsafe_load(convert(Ptr{Csize_t}, Core.getptls() + 8))), runtime=Int(Base.get_world_counter())) worlds (generic function with 1 method) julia> worlds() (ptls = 29611, runtime = 29611) julia> bar() = 42 bar (generic function with 1 method) julia> worlds() (ptls = 29612, runtime = 29612) julia> Int(first(methods(worlds, Tuple{})).primary_world) 29611
Metadata
Metadata
Assignees
Labels
No labels