Skip to content
This repository was archived by the owner on May 27, 2021. It is now read-only.

265-fix is only partial #459

@maleadt

Description

@maleadt

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions