Skip to content

Support for SparseMatrixCSC{Float64, Int32} #144

Open

Description

@RoyiAvital

See the code below:

mT = SparseMatrixCSC{Float64, int32}(sprand(1_000, 1_000, 0.01));
GBMatrix(mT); #<! Error!

The last line will just error.
It would be great to have support for SparseMatrixCSC{T, N} where T <: Union{Float16, Float32, Float64, Float128}, N <: Union{Int16, Int32, Int64}.

Activity

  1. rayegun commented on Sep 21, 2024

    @rayegun
    Member
  2. RoyiAvital commented on Sep 21, 2024

    @RoyiAvital
    Author

    Support does not mean change the underlying.
    Just support converting it without creating an error.

    Even something like that:

    GBMatrix(SparseMatrixCSC{elttype(mT), Int64}(mT));

    Will do.

  3. rayegun commented on Sep 21, 2024

    @rayegun
    Member
  4. RoyiAvital commented on Sep 21, 2024

    @RoyiAvital
    Author

    Is there a real reason not to support Int32 in the c code?
    Does it mean a lot of work?

    Just wonder if there any point in asking for it.

  5. rayegun commented on Sep 21, 2024

    @rayegun
    Member
  6. RoyiAvital commented on Sep 21, 2024

    @RoyiAvital
    Author

    The added value is speed.
    The throughput with 32 Bit is twice.

    I don't know about GraphBLAS, but for certain in many sparse related algorithms it makes a difference since most of the data to process are indices. So the cache is twice as big effectively, the bandwidth, etc...

  7. rayegun commented on Sep 21, 2024

    @rayegun
    Member

    As I mentioned it's only valuable when the data type of your values is small, and it's not twice always twice as fast. It depends on the internal representation.

    I agree with you, it's very valuable especially as people often deal with smaller types these days. I'll bring it up in committee meetings but I wouldn't expect progress on that front until next year at the earliest.

  8. RoyiAvital commented on Jan 14, 2026

    @RoyiAvital
    Author

    I think this is not supported in GraphBLAS.
    See DrTimothyAldenDavis/GraphBLAS#335.

  9. rayegun commented on Jan 14, 2026

    @rayegun
    Member

    It is supported now I believe and I can work on the Julia wrapper and get it fully updated within the next two weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions