Fix performance bugs in scalar reductions (#509)#543
Merged
marcinz merged 1 commit intonv-legate:branch-22.07from Aug 17, 2022
Merged
Fix performance bugs in scalar reductions (#509)#543marcinz merged 1 commit intonv-legate:branch-22.07from
marcinz merged 1 commit intonv-legate:branch-22.07from
Conversation
* Unify the template for device reduction tree and do some cleanup * Fix performance bugs in scalar reduction kernels: * Use unsigned 64-bit integers instead of signed integers wherever possible; CUDA hasn't added an atomic intrinsic for the latter yet. * Move reduction buffers from zero-copy memory to framebuffer. This makes the slow atomic update code path in reduction operators run much more efficiently. * Use thew new scalar reduction buffer in binary reductions as well * Use only the RHS type in the reduction buffer as we never call apply * Minor clean up per review * Rename the buffer class and method to make the intent explicit * Flip the polarity of reduce's template parameter
magnatelee
approved these changes
Aug 17, 2022
manopapad
pushed a commit
that referenced
this pull request
Feb 18, 2025
* Update reshape() implementation to avoid unnecessary deepcopy * Optimize reshape function and update tests * Refactor reshaping logic and add type hints to test
manopapad
pushed a commit
that referenced
this pull request
Feb 18, 2025
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.
Unify the template for device reduction tree and do some cleanup
Fix performance bugs in scalar reduction kernels:
Use unsigned 64-bit integers instead of signed integers wherever
possible; CUDA hasn't added an atomic intrinsic for the latter yet.
Move reduction buffers from zero-copy memory to framebuffer. This
makes the slow atomic update code path in reduction operators
run much more efficiently.
Use thew new scalar reduction buffer in binary reductions as well
Use only the RHS type in the reduction buffer as we never call apply
Minor clean up per review
Rename the buffer class and method to make the intent explicit
Flip the polarity of reduce's template parameter