Skip to content

Int8 Offsets #370

Open
Open
@simone-silvestri

Description

@simone-silvestri

Hello, first of all, thanks for the beautiful package. Over at Oceananigans.jl and ClimaOcean.jl, we use offset arrays to store the underlying data of our Field types. However, now that we are increasing the complexity of the model, we are having increasingly frequent problems with GPU parameter space when launching kernels that require many offset array inputs.

We think that this has to do with the fact that offsets are Int64 types, which consume quite a lot of parameter space, however, we typically need offsets in the range of -10 .. 10, so Int8 would be enough for our scope.

However, it looks like the Int type is hardcoded in the OffsetArray type.

offsets::NTuple{N,Int}

Is there a specific reason for having offsets as Int64s or would it be possible to allow flexibility in the sizes of the offsets?

In the latter case, could I attempt a PR allowing lower-sized offsets?

cc @glwagner

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