Closed mtsokol closed 6 months ago
For performance, we probably do want to use a Finch.Scalar
type, as these avoid some overhead associated with Element
, since Element
needs to be fancy to be the leaf level of a tensor
Finch also supports a SparseScalar
type that has a customizeable default
Issue: #25
Hi @willow-ahrens @hameerabbasi,
This is a WIP PR that is meant to introduce support and tests for scalars. It will change as the discussion about scalars continues.
Out of curiosity I tried to represent scalars as:
SwizzleArray(Tensor(Element{1, Int64, Int64}([1])), ())
, but as expected, for some operations it causes densification of Tensors.