-
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 integrals for broadcasts and update docstrings #1947
Conversation
I argue that we should keep all the usage of anything related to If the issue is the extra allocation, we can use temporary |
7e6a03e
to
5023420
Compare
@Sbozzolo, the goal here is not necessarily reducing allocations, but rather kernel fusion. We don't need to launch an additional kernel to populate the integrand before computing an integral, and the current design lets us avoid this by passing unmaterialized |
3d8f497
to
4e157ab
Compare
If the issue is kernel fusion (or performance), how important is to enable this capability now? Can't we wait after you added the functions you want to add to ClimaCore? I am worried that we are opening the door to code that only one or two people can work with. Let's cross the bridge of kernel fusion when it starts to matter and focus on delivering code that people can understand and use. |
It is certainly possible to avoid making use of this capability now---you can just materialize the integrand and pass in the resulting More generally, though, I think we will need to get used to seeing |
4e157ab
to
63d04e3
Compare
After an offline discussion, we have decided that this can be merged in, but that we shouldn't use the kernel fusion capability in ClimaAtmos until it is better documented on the ClimaCore side. I will be adding documentation and converting the integral functions into operators in future PRs. |
d478912
to
142e0cc
Compare
This PR fixes the issue identified in CliMA/ClimaAtmos.jl#3254, allowing the definite and indefinite integral functions to accept
AbstractBroadcasted
s in addition toField
s. It also makes the function argument names more consistent, updates the docstrings, and modifies the unit tests to useAbstractBroadcasted
s instead ofField
s.