Skip to content

Let user choose which GPU to use #156

@AlexMeinke

Description

@AlexMeinke

Feature

Desired Behavior / Functionality

Currently, one can only enable or disable cuda and also only do so globally using the torchquad.set_up_backend function. First of all, this means that even on multi-GPU machines one can only ever use the first device "cuda:0". Secondly, it means that using torchquad can break existing code that one tries to integrate it into, because the set_up_backend function globally changes how torch Tensors are initialized. Instead I propose to include device as an optional argument in the integrate function.

What Needs to Be Done

Unfortunately, I am not familiar enough with the library's code to make informed comments on how this can be implemented. I suspect that it's actually a fairly difficult request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions