Repository navigation
Keep only each DP row's band, packed together - #12
Merged
Merged
Conversation
Every DP row was stored at full query width, though only its band is ever computed, so each band sat alone in its own stretch of the buffer and every row paged in partly-used pages at both edges of its band. Rows now keep only their band, plus a block either side, packed one after another and addressed through per-row pointers (dp_row, dp_row_w) that keep absolute column indexing, so the DP and backtrack code is otherwise unchanged. The block before each band is set to INF_MIN, where it used to hold whatever the buffer last held: the backtrack reads one column left of where it stands. Alignments are unchanged: MSA, consensus and GFA output in every gap model and alignment mode tried, and tests/run_all.sh. In cactus's bar, on 8Mb of human/mouse at 8 threads, abPOA went from 59s and 6.9GB to 51s and 5.5GB. Also include <stdio.h> in abpoa.h, which uses FILE but stopped getting it when simd_instruction.h was dropped from the header. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
4 tasks done
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.
Summary
abPOA allocates every DP row at the full query width, though it only computes the band. With this change each row stores just its band, plus one block on either side, packed one after another from the front of the DP buffer.
dp_row/dp_row_w, still indexed by absolute block.simd_abpoa_new_rowlays out each row as it is reached.INF_MINblock sits before each band, because the backtrack reads one column to the left of it.abpoa.hnow includes<stdio.h>. It usesFILE, so a source file that included it before<stdio.h>did not compile.Output is identical. That covers 203 library comparisons on simulated sets, spanning all three gap models, band settings and seeding, and 102 command-line comparisons including local and extend modes.
tests/run_all.shpasses (10/10). Through cactus, it also holds on bar's output for 8 Mb of human/mouse and on evolver mammals.In cactus bar, on 8 Mb of human/mouse at 8 threads: 59 s, 6.9 GB → 51 s, 5.5 GB.
ComparativeGenomicsToolkit/cactus#2026 moves cactus's submodule from
yangao07/abPOA(v1.5.6) to this fork and pins this branch's commit, 6e02e17.Base branch
This PR targets a new
mainbranch, a copy of upstreamyangao07/abPOAmain(2e095ba, v1.5.7). This fork'smasteris upstream v1.2.5 from 2021, plus four build tweaks for a cactus build that no longer uses them, so it would conflict and bury this change in five years of upstream history. This branch was cut from upstream 1b7cb00. The three upstream commits since then change only release metadata (version string, README, packaging) and merge cleanly.Please merge with a merge commit rather than squash/rebase, so the commit cactus pins stays reachable.
🤖 Generated with Claude Code