-
Notifications
You must be signed in to change notification settings - Fork 42
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
Int8
Offsets
#370
Comments
Wondering if it was possible to find a solution for this issue. Cheers. |
A PR is welcome |
thanks @jishnub, I ll give it a try |
I think the choice of |
I think we would be ok with preserving But I think @jishnub is right that we will need a new type parameter in Lines 78 to 95 in 5972e9e
|
Do we necessarily need to change I have a tentative PR where almost all tests pass except for the @testset "issue #235" begin
Vec64 = zeros(6)
ind_a_64 = 3
ind_a_32 =Int32.(ind_a_64)
@test reshape(Vec64, ind_a_32, :) == reshape(Vec64, ind_a_64, :)
end which I am not sure why returns a StackOverflow. I will open the PR but I am not extremely sure about the downstream implication of the changes I am making. |
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
, soInt8
would be enough for our scope.However, it looks like the
Int
type is hardcoded in theOffsetArray
type.OffsetArrays.jl/src/OffsetArrays.jl
Line 114 in 5972e9e
Is there a specific reason for having offsets as
Int64
s 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
The text was updated successfully, but these errors were encountered: