Skip to content

Metal shader pipeline states not released when compiled functions are erased #3297

@robert-johansson

Description

@robert-johansson

When a compiled function is removed from CompilerCache (via compile_erase or compile_clear_cache), the associated Metal shader libraries and pipeline states in Device::library_kernels_ are not released. They persist until process exit.

Device::clear_library() exists but is never called from the compile cache cleanup path.

Found while investigating Metal resource accumulation in a long-running process that creates and discards compiled functions over time.

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