WIP: Performance Improvements (for Burgers) - #1402
Open
fglines-nv wants to merge 28 commits into
Open
Conversation
fglines-nv
commented
May 27, 2026
| // Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| //======================================================================================== | ||
|
|
||
| // This file was made in part with generative AI |
Collaborator
Author
There was a problem hiding this comment.
I used AI to refactor a human-written optimized code another engineer had written to reduce the amount of repeated code. Originally there were 4x versions of this loop, AI reduced it down to 2 versions (but only 100 fewer lines).
The new functions PassesFluxCorrectionFilter and GetBoundaryAtIndex were granulized out from the original and the ForEachBoundary* functions refactored to use them. The original strategy is more or less unchanged except AI opted to create the boundary index in a single pass with vector::push_back instead of two passes, one to count and one to create.
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.
PR Summary
Set of optimizations targeting the burgers benchmark but may improve/impact other downstream codes. Optimizations include an
MPI_Barrierafter theMPI_ISendsto force MPI libraries to start sends (this might be implementation dependent, it's applicable to OpenMPI/HPCX during testing); an object to specify team sizes forpar_outer_forand potentially launch bounds in the future (for register pressured kernels); OMP parallelizations for some of the AMR machinery; some changes to burgers driver/package; and some checks disabled for burgers (but might be necessary for sparse variables).Very WIP, I'd like to replace the
#pragma omp ...with something more performance portable and durable. I was compiling with-fopenmpinstead ofKokkos_ENABLE_OMP, which does many other things that apparently slow down the benchmark. Not ideal, suggestions welcome on how to insert OMP parallelization on host-side loops for the GPU-resident path. Also needs testing on everything not-burgers.PR Checklist