This repository was archived by the owner on May 27, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 50
265-fix is only partial #459
Copy link
Copy link
Closed
Labels
Description
Not sure how I only ran into this now...
# used by CUDAnative to determine whether to recompile a kernel
julia> function method_age(f, tt)::UInt
for m in Base._methods(f, tt, 1, typemax(UInt))
if VERSION >= v"1.2.0-DEV.573"
return m[3].primary_world
else
return m[3].min_world
end
end
throw(MethodError(f, tt))
end
# example kernel that uses a method
julia> foo() = bar()
julia> bar() = 1
julia> method_age(foo, Tuple{})
0x00000000000065d2
julia> method_age(bar, Tuple{})
0x00000000000065d3
# redefinition of called function
julia> bar() = 2
# its age changes...
julia> method_age(bar, Tuple{})
0x00000000000065d4
# but not the age of the caller
julia> method_age(foo, Tuple{})
0x00000000000065d2@vtjnash what is the correct way to invalidate a compiled function based on whether it or any called function has changed?