Skip to content

Instantly share code, notes, and snippets.

@maggiemoss
Created October 10, 2025 20:05
Show Gist options
  • Select an option

  • Save maggiemoss/e6cb2d015dd1ded560ae1329098cf33f to your computer and use it in GitHub Desktop.

Select an option

Save maggiemoss/e6cb2d015dd1ded560ae1329098cf33f to your computer and use it in GitHub Desktop.
>>> Lint for torch/sparse/semi_structured.py:
Advice (PYREFLY) no-matching-overload
No matching overload found for function `torch._C.TensorBase.__init__`
Possible overloads:
(*args: Any, *, device: device | int | str | None = None) -> None
[closest match]
(storage: Storage) -> None
(other: Tensor) -> None
(size: Size | list[int] | tuple[int, ...], *, device: device | int | str
| None = None) -> None
184 | outer_stride,
185 | ) -> torch.Tensor:
186 | shape, fuse_transpose_cusparselt, alg_id_cusparselt, requires_grad = tensor_meta
>>> 187 | return cls(
188 | shape=shape,
189 | packed=inner_tensors.get("packed", None),
190 | meta=inner_tensors.get("meta", None),
Advice (PYREFLY) no-matching-overload
No matching overload found for function `torch._C.TensorBase.__init__`
Possible overloads:
(*args: Any, *, device: device | int | str | None = None) -> None
[closest match]
(storage: Storage) -> None
(other: Tensor) -> None
(size: Size | list[int] | tuple[int, ...], *, device: device | int | str
| None = None) -> None
413 | sparse_tensor_cutlass,
414 | meta_tensor_cutlass,
415 | ) = sparse_semi_structured_from_dense_cutlass(original_tensor)
>>> 416 | return cls(
417 | original_tensor.shape,
418 | packed=sparse_tensor_cutlass,
419 | meta=meta_tensor_cutlass,
Advice (PYREFLY) no-matching-overload
No matching overload found for function `torch._C.TensorBase.__init__`
Possible overloads:
(*args: Any, *, device: device | int | str | None = None) -> None
[closest match]
(storage: Storage) -> None
(other: Tensor) -> None
(size: Size | list[int] | tuple[int, ...], *, device: device | int | str
| None = None) -> None
499 | original_tensor, algorithm=algorithm, use_cutlass=True
500 | )
501 |
>>> 502 | return cls(
503 | original_tensor.shape,
504 | packed=packed,
505 | meta=meta,
Advice (PYREFLY) no-matching-overload
No matching overload found for function `torch._C.TensorBase.__init__`
Possible overloads:
(*args: Any, *, device: device | int | str | None = None) -> None
[closest match]
(storage: Storage) -> None
(other: Tensor) -> None
(size: Size | list[int] | tuple[int, ...], *, device: device | int | str
| None = None) -> None
560 | cls, original_tensor: torch.Tensor
561 | ) -> "SparseSemiStructuredTensorCUSPARSELT":
562 | cls._validate_device_dim_dtype_shape(original_tensor)
>>> 563 | return cls(
564 | shape=original_tensor.shape,
565 | packed=torch._cslt_compress(original_tensor),
566 | meta=None,
Advice (PYREFLY) no-matching-overload
No matching overload found for function `torch._C.TensorBase.__init__`
Possible overloads:
(*args: Any, *, device: device | int | str | None = None) -> None
[closest match]
(storage: Storage) -> None
(other: Tensor) -> None
(size: Size | list[int] | tuple[int, ...], *, device: device | int | str
| None = None) -> None
626 | packed = packed.view(original_tensor.shape[0], -1)
627 | packed_t = packed_t.view(original_tensor.shape[1], -1)
628 |
>>> 629 | return cls(
630 | original_tensor.shape,
631 | packed=packed,
632 | meta=meta,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment