Skip to content

FORCE_CUDA doesn't force CUDA if torch.cuda.is_available() #4621

@ashgillman

Description

@ashgillman

I would have assumed that FORCE_CUDA would attempt to install CUDA in all cases.

I suspect the logic here:

MONAI/setup.py

Line 39 in edf3b74

BUILD_CUDA = (CUDA_HOME is not None) if torch.cuda.is_available() else FORCE_CUDA

should be

 BUILD_CUDA = FORCE_CUDA or (torch.cuda.is_available() and (CUDA_HOME is not None))

Or perhaps I misunderstood the flag. I couldn't find any documentation for it in the installation guide.

Cheers,
Ash

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