mirror of
https://github.com/clang-retro/llvm.git
synced 2026-11-28 21:29:24 -08:00
Hi @xurui1995 @makslevental, I think in https://github.com/llvm/llvm-project/pull/103087 there's unintended regression where user can no longer create sparse tensors with `tensor.empty`. Previously I could pass: ```python out = tensor.empty(tensor_type, []) ``` where `tensor_type` contained `shape`, `dtype`, and `encoding`. With the latest ```python tensor.empty(sizes: Sequence[Union[int, Value]], element_type: Type, *, loc=None, ip=None) ``` it's no longer possible. I propose to add `encoding` argument which is passed to `RankedTensorType.get(static_sizes, element_type, encoding)` (I updated one of the tests to check it).