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

Error training on GPU #2

Open
Sajjadkhani opened this issue Jul 25, 2024 · 2 comments
Open

Error training on GPU #2

Sajjadkhani opened this issue Jul 25, 2024 · 2 comments

Comments

@Sajjadkhani
Copy link

I am trying to train the MS2FP model exactly based on the demo colab and input data from repo. Training works with cpu. Also prediction works with GPU. However when I try training with GPU I get the following error:
Pointer argument (at 2) cannot be accessed from Triton (cpu tensor?)

It runs without error until the following line in this file: IDSL_MINT-main/IDSL_MINT/MS2FP/MS2FP_Model.py:
Source = self.PeakEmbedding(MZ_Tokens, INT).permute(1, 0, 2)

Do you have any idea what can be the problem?
Thanks!

@sajfb
Copy link
Collaborator

sajfb commented Jul 25, 2024

This is a problem with PyTorch. please see below link:

[issue 1] (#1)

you should downgrade your PyTorch to circumvent this problem or follow up with PyTorch.

@Sajjadkhani
Copy link
Author

Sajjadkhani commented Jul 29, 2024

Seems that the problem is the D_model tensor in line 19 of MS2FP_Model.py.

This solved the problem for me:
`self.device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')

self.D_model = torch.tensor(D_MODEL, device=self.device)`

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

2 participants