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

An error occurs when launching the benchmark. #166

Closed
shiwk opened this issue Mar 5, 2024 · 3 comments
Closed

An error occurs when launching the benchmark. #166

shiwk opened this issue Mar 5, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@shiwk
Copy link

shiwk commented Mar 5, 2024

RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same

The issue arises when running the benchmark code for the Vision Transformer (VIT). I believe it occurs because the input tensor is located on the CPU, while the model is on the GPU.

It will work with the addition of a single line of code:
model = self.model.to(self.device)

@IsaevIlya
Copy link
Contributor

Hello @shiwk,
Thank you for letting us know about the issue. We will have a look on it. Meanwhile, could you share the instance type on which you faced that issue?

@IsaevIlya IsaevIlya added the bug Something isn't working label Mar 5, 2024
@shiwk
Copy link
Author

shiwk commented Mar 6, 2024

Hello @shiwk, Thank you for letting us know about the issue. We will have a look on it. Meanwhile, could you share the instance type on which you faced that issue?

Hi @IsaevIlya , I run it on my own server with a GPU, not on any service of AWS

@IsaevIlya
Copy link
Contributor

@shiwk, Thank you for bringing up this issue. I've successfully replicated it, and the resolution should be addressed by the PR #172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants