Fix for set_adapt_weight() with Poisson solver. - #851
Merged
Conversation
TTBurnett
force-pushed
the
transfer_kernel
branch
from
July 24, 2026 20:05
47fade0 to
6b98ca9
Compare
TTBurnett
force-pushed
the
transfer_kernel
branch
from
July 24, 2026 20:09
6b98ca9 to
9f156a3
Compare
mkstoyanov
requested changes
Jul 25, 2026
mkstoyanov
left a comment
Member
There was a problem hiding this comment.
Severe jetlag here, saw these will have other comments later.
TTBurnett
force-pushed
the
transfer_kernel
branch
from
July 27, 2026 14:53
866a78d to
b8c184e
Compare
TTBurnett
force-pushed
the
transfer_kernel
branch
from
July 27, 2026 15:01
b8c184e to
735b07f
Compare
mkstoyanov
reviewed
Jul 28, 2026
| int i = threadIdx.x + blockIdx.x * num_threads; | ||
| int64_t total_elements = block_size * num_transfers; | ||
| while (i < total_elements) { | ||
| int64_t transfer_idx = i / block_size; |
Member
There was a problem hiding this comment.
Next time we talk, remind me to talk about launching a kernel on a 2D thread grid and doing cycles.
Nothing to change right now, this is fine.
mkstoyanov
approved these changes
Jul 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adapt weight was crashing when used with an electric moment because the poisson solver was not initialized before set_initial_condition() was called. I fixed this so set_adapt_weight() works with the Poisson solver. I also added a single kernel for the remap_() function on GPU in asgard_poisson.cpp to reduce the number of kernel launches.