Repository navigation
3D SUMMA: optional sorted output + SpParMat3D EWiseApply, OpenMP local EWiseApply, and a radixSort correctness fix - #35
Open
akashgrao wants to merge 5 commits into
Conversation
Friends.h: OpenMP-parallel local Dcsc EWiseApply (both-operands-non-NULL predicate path), gated by THREADED with the original serial code kept as the #else fallback (byte-identical output). Threshold-split column-merge, fused per-column symbolic count, parallel prefix-sum, exact-size uninitialized allocation, merge-path numeric fill. dcsc.h: Dcsc move constructor + move assignment (steal the arrays) so returning a Dcsc by value moves instead of doing a serial O(nnz) deep copy. Verified byte-identical to the serial kernel across inputs; scales near-linearly under spread NUMA placement on Perlmutter (AMD EPYC 7763). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The std::pair<uint32_t,T> overload of integerSort passed maxV (not maxV+1) as the key range to intSort::iSort. iSort represents keys in [0,m) using log2Up(m) bits; since keys range over [0,maxV], the range must be maxV+1 (as the uint32_t overload already does). With maxV, the element whose key equals the maximum is one bit short of representable and lands in the wrong radix bucket whenever maxV is a power of two, silently breaking sort order (data-dependent). This surfaced as intermittently-unsorted output from MultiwayMergeHash/SerialMergeHash's sorted path, which downstream sorted-merge consumers rely on. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Mult_AnXBn_SUMMA3D gains an opt-in sortOutput parameter (default false): when true its merges row-sort the output. Default preserves the existing fast unsorted behavior; callers feeding the result into a sorted-merge op request sorting explicitly. No extra communication -- only local sorts. Both the per-layer and fiber merges honor the flag, so the output is sorted at any layer count (the fiber merge's nlists==1 fast path would otherwise not sort). - New EWiseApply overload for SpParMat3D mirroring the 2D EWiseApply API (extended form + plain adapter). Combines operands layer-locally (delegating to the 2D EWiseApply per layer) with no inter-layer communication. Requires both operands in canonical, row-sorted form (2D->3D ctor, Convert2D, or SUMMA3D with sortOutput=true). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Verifies the SpParMat3D EWiseApply against the 2D EWiseApply oracle across layer counts (1/4/16), for both ctor-built operands and a SUMMA3D(sortOutput=true) product operand. Reuses the rmat_scale16 test data. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- EWiseApply(SpParMat3D): move-construct the local resultant (steal the DCSC tile at O(1)) instead of deep-copying the layer submatrix. - SpDCCols: add noexcept move constructor (steal Dcsc ptr, null the source) to support it. - SpParMat: add SetSeq(DER*) to replace the local sequential block in place (used by HopScotch apps). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
This PR addresses 3D-distributed eWiseApply support plus a standalone correctness fix for an off-by-one error in the PBBS radix sort (commit 1742a3a). Together they enable layer-local multi-threaded eWiseApply on SpParMat3D operands, which we use downstream to build min-plus 3D-SUMMA APSP kernels on CombBLAS.
Changes: