Skip to content
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

API: Add support for scalars #26

Closed
wants to merge 1 commit into from

Conversation

mtsokol
Copy link
Member

@mtsokol mtsokol commented Mar 26, 2024

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.

@mtsokol mtsokol self-assigned this Mar 26, 2024
@willow-ahrens
Copy link
Collaborator

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

@willow-ahrens
Copy link
Collaborator

Finch also supports a SparseScalar type that has a customizeable default

@mtsokol
Copy link
Member Author

mtsokol commented Mar 28, 2024

Replaced by #27

@mtsokol mtsokol closed this Mar 28, 2024
@mtsokol mtsokol deleted the scalars-support branch March 28, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants