Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'cuda:0' parameter passthrough for multi-GPU setup #15

Open
avilella opened this issue Jul 31, 2023 · 0 comments
Open

'cuda:0' parameter passthrough for multi-GPU setup #15

avilella opened this issue Jul 31, 2023 · 0 comments

Comments

@avilella
Copy link

Hi,
Would it be possible to pass-through the GPU id when running RosettaFold2 so that in setups where there is more than one GPU, it can run in parallel? Thx.

Example where it is currently hard-coded:
network/predict.py

class Predictor():
    def __init__(self, model_weights, device="cuda:0"):
        # define model name
        self.model_weights = model_weights
        self.device = device
        self.active_fn = nn.Softmax(dim=1)

        # define model & load model
        self.model = RoseTTAFoldModule(
            **MODEL_PARAM
        ).to(self.device)

        could_load = self.load_model(self.model_weights)
        if not could_load:
            print ("ERROR: failed to load model")
            sys.exit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant