Propagate inbounds for apply/compose operators
- Dominant language
- Julia
- Stars
- 117
- Forks
- 19
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 41
Description
I tried properly apply `Base.@propagate_inbounds` to `apply_stencil_at_idx` and `compose_stencils_at_idx` in #917 (to elide `@boundscheck` in `getidx`). However, CI times for [this job](https://github.com/CliMA/ClimaCore.jl/blob/208d8d8ade0acabf9a5999ee5d14f9947bd561e3/.buildkite/pipeline.yml#L123-L130) was going from 6 mins to more than 57 mins when applied to `apply_stencil_at_idx`, and basically hung (for all three `implicit_stencil` tests) when applied to `compose_stencils_at_idx`.
We should probably investigate why this is happening. Interestingly, ClimaAtmos ran fine on the #917 branch with both `apply_stencil_at_idx` and `compose_stencils_at_idx`, so it could be that the issue was related to using `--check-bounds=yes`. I'd be fine disabling bounds check in the opt test, but it's probably important that we keep it in the correctness test, so we should dig more into this if there's significant performance implications here. I'll leave this as a later effort for now, but wanted to track latest details if this needs to be revived.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.