8000 NotImplementedError: Could not run 'aten::log' with arguments from the 'SparseCUDA' backend. · Issue #153497 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

NotImplementedError: Could not run 'aten::log' with arguments from the 'SparseCUDA' backend. #153497

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

Open
ringohoffman opened this issue May 13, 2025 · 1 comment
Labels
module: cuda Related to torch.cuda, and CUDA support in general module: sparse Related to torch.sparse triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@ringohoffman
Copy link
Contributor
ringohoffman commented May 13, 2025

🚀 The feature, motivation and pitch

import torch

device = torch.device("cuda:0")
indices = torch.tensor(
    [
        [0, 1, 2, 3],
        [1, 2, 3, 4],
        [2, 3, 4, 5]
    ],
    device=device,
)
values = torch.tensor(
    [10.0, 20.0, 30.0, 40.0],
    device=device,
)
size = (4, 5, 6)

sparse_tensor = torch.sparse_coo_tensor(indices, values, size)

sparse_tensor.log()  # NotImplementedError: Could not run 'aten::log' with arguments from the 'SparseCUDA' backend.

Alternatives

It's trivial to build a new sparse tensor with log values:

torch.sparse_coo_tensor(indices, values.log(), size)

Additional context

No response

cc @alexsamardzic @nikitaved @pearu @cpuhrsch @amjames @bhosmer @jcaip @ptrblck @msaroufim @eqy @jerryzh168

@ringohoffman
Copy link
Contributor Author

@pytorchbot label "module: sparse"

@pytorch-bot pytorch-bot bot added the module: sparse Related to torch.sparse label May 13, 2025
@malfet malfet added module: cuda Related to torch.cuda, and CUDA support in general triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: cuda Related to torch.cuda, and CUDA support in general module: sparse Related to torch.sparse 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

2 participants
0