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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

When the torch.masked_select operator passes in the same parameters, it behaves differently on CPU and GPU. #89416

Open
triumph-wangyuyang opened this issue Nov 21, 2022 · 1 comment
Labels
module: masked operators Masked operations triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@triumph-wangyuyang
Copy link

馃悰 Describe the bug

Test on the CPU:

import torch
input = torch.rand([], dtype=torch.float64)
out = torch.logcumsumexp(input, dim=1)
print(out)

result: IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)

Test on the CPU:

import torch
input = torch.rand([], dtype=torch.float64).cuda()
out = torch.logcumsumexp(input, dim=1)
print(out)

result: IndexError: tensor(0.4230, device='cuda:0', dtype=torch.float64)

When the torch.masked_select operator passes in the same parameters, it behaves differently on CPU and GPU.

Versions

pytorch: 1.12.1
Python version: 3.8
CUDA/cuDNN version: cuDNN 11.3
GPU models and configuration: RTX3060
Operating System锛歐indows

@samdow samdow added triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module module: masked operators Masked operations labels Nov 21, 2022
@jingxu10
Copy link
Collaborator

It seems like the behavior on CPU is as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: masked operators Masked operations triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

3 participants