Skip to content

Cannot use 0D tensor as int #33

@roastduck

Description

@roastduck

Please look at this line.

https://github.com/ptillet/torch-blocksparse/blame/master/torch_blocksparse/matmul.py#L239

The error below occurs because width is used as an int.

TypeError: empty() received an invalid combination of arguments - got (Tensor, dtype=torch.dtype), but expected one of:
 * (tuple of ints size, *, tuple of names names, torch.memory_format memory_format, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)
 * (tuple of ints size, *, torch.memory_format memory_format, Tensor out, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)

This error is triggered when using "dsd" mode.

Testing with PyTorch 1.6.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions