Skip to content

Resource manager changing resources when not needed. #209

@andyneff

Description

@andyneff

Right now, when a worker requests a resource, it's completely first come first serve, which can result in a worker changing the resource it uses between tasks. Which this is not directly a bug, it can cause undesired behavior with OTHER libraries that don't handle this well, such as torch keeping a memory reservation on a previous GPU, wasting GPU memory.

The current work around is to have a task run in a subprocess, but a better solution would be to use TLS/Process Local Storage to prefer to use the last used resource first, before picking the next available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions