-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fix dispatching for some cuda kernels #1787
Conversation
7cce12f
to
525be4d
Compare
So, it turns out that I discovered a rather insidious bug in our DataLayouts. Both of our @inline function Base.setindex!(data::IFH{S}, val, i, _, _, _, h) where {S}
@inbounds set_struct!(
parent(data),
convert(S, val),
Val(3),
CartesianIndex(i, 1, h),
)
end
@inline function Base.setindex!(
data::IFH{S},
val,
I::CartesianIndex{5},
) where {S}
i, _, _, _, h = I.I
@inbounds set_struct!(
parent(data),
convert(S, val),
Val(3),
CartesianIndex(i, 1, h),
)
end The (very simple) test that I added for This impacts both the CPU and gpu. Looking around at ClimaCore internals, this may impact:
|
5187e13
to
da396fe
Compare
78ded77
to
3014a99
Compare
3276b75
to
d19c358
Compare
Ok, CI is currently broken:
I've also joined a few docs from DataLayouts, because we cannot document a struct and outer constructors separately (at least Documenter doesn't seem to be picking it up). There's a lot more that we can do, but I'd like to split off additional work so that this PR doesn't spiral out of control. |
d19c358
to
adfbd0e
Compare
efb0865
to
abae02c
Compare
Alright, I think that this should (now) work.. |
abae02c
to
6d1c788
Compare
Fix Update test filenames, ndims on DataLayouts - fix CI Build latest version in docs Fixes for cuda kernels with empty fields
Alright, the only failure is due to a fix needed in multibroadcast field |
6d1c788
to
d0731c0
Compare
Okay, I'd like to merge #1788 next (once we find a better name), so maybe you can add a commit to that PR that bumps the minimum version of MBF with the fix, once you release it. |
It's already done, the fix was already incorporated in this commit |
Perfect, thank you! |
This should close #1786, but I think we need more careful testing around this.
This PR:
fill!
size
return the correct number of fields for all datalayouts, instead of returning 1 (this may need to be reverted if we rely on this).setindex!
forIFH
datalayouts.cc @trontrytel