Skip to content

Index type #396

Open
Open

Description

@vchuravy

Int32 can be quite a bit faster and we should make sure that we use it where we can for our index calculations.

Activity

  1. vchuravy commented on Jun 28, 2023

    @vchuravy
    MemberAuthor

    @luraess also mentioned that it would make sense to configure the hardware dimension index into the Kernel struct.

  2. simonbyrne commented on Jul 16, 2023

    @simonbyrne
    Collaborator

    Could you provide a function that would evaluate differently depending on the device? e.g.

    IT = KernelAbstractions.IndexType()
    
  3. brabreda commented on Sep 1, 2023

    @brabreda

    In which case or device would int32 not be sufficient?

  4. vchuravy commented on Sep 1, 2023

    @vchuravy
    MemberAuthor

    The maximum linear index with UInt32 is 4,294,967,295 so an array of about 4GB. With GPUs having upwards of 40GB or more memory in the data canter, it's not unlikely that a user want to process something larger than that.

    In particular ML

  5. giordano commented on Nov 14, 2025

    @giordano
    Collaborator

    How about a scoped variable to choose the index size locally? 👀

  6. vchuravy commented on Nov 16, 2025

    @vchuravy
    MemberAuthor

    @giordano the challenge is on the lower-level. We could have parameterized on the Context argument in KA 0.9, but in KA 0.10 we will have an interface that won't require a hidden context argument (see #635)

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions