Skip to content

Potential GPU Memory Leak in LabelStats when label is on GPU but image is on CPU in auto3dseg/analyzer.py #8697

@benediktjohannes

Description

@benediktjohannes

Current code only checks image tensor for CUDA device

If label tensor is on GPU (even if image is on CPU), torch.cuda.empty_cache() is not called

This can cause GPU memory leaks during connected component analysis

(in auto3dseg/analyzer.py)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions