Skip to content

Conversation

@sstadick
Copy link
Contributor

@sstadick sstadick commented Jul 18, 2025

Major updates:

  • Convert semi-global from using unsigned ints to signed ints

Small QOL changes for doing some debugging.

  • Allows specifying simd width at compile time.
  • Updates the bench aligner.

striped-simd outputs checked against parasail for correctness:

./apps/parasail_aligner -a sg_striped_avx2_256_16 -x -o 3 -e 1 -m blosum62 -t 1 -q ./data/P01111.fasta -f /srv/tmp/uniprot_sprot.fasta -v -g parasail.csv
/ish-aligner --scoring-matrix Blosum62 --query-fasta ~/dev/parasail/data/P01111.fasta --target-fasta /srv/tmp/uniprot_sprot.fasta --output-file /tmp/match.txt  --score-size word --algo striped-semi-global
vimdiff <(tail +2 /tmp/match.txt ) ../parasail/parasail.csv

@sstadick sstadick force-pushed the fix/compare_v_parasail_dna branch 4 times, most recently from 5d2a0a8 to 275a67b Compare July 21, 2025 17:08
var rev = List[UInt8](capacity=len(seq_bytes))
for s in reversed(seq_bytes):
rev.append(s[])
rev.append(s)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All updates for latest mojo version, skippable review wise.

) raises -> List[Self]:
var ret = List[Self]()
for i in range(0, min(DeviceContext.number_of_devices(), max_devices)):
for i in range(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoded to max of 1 for now. Warning will happen in SearcherSettings if you set it above 1. This is because there isn't a good way to filter out non-compatible GPUs.


# Early termination check - match C version exactly
if not (v_f > v_h).reduce_or():
return
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An inline closure allows for something more like a goto than the kind of complex set of breaks we had before.

@sstadick sstadick force-pushed the fix/compare_v_parasail_dna branch from 275a67b to b130f19 Compare July 21, 2025 17:17
Signed-off-by: Seth Stadick <sstadick@gmail.com>
@sstadick sstadick force-pushed the fix/compare_v_parasail_dna branch from b130f19 to 5090c3e Compare July 21, 2025 17:44
@sstadick sstadick merged commit 92f4fad into main Jul 21, 2025
4 checks passed
@sstadick sstadick deleted the fix/compare_v_parasail_dna branch July 21, 2025 18:51
@sstadick sstadick changed the title chore: small qol fixes for comparing feat: switch to signed int striped simd, small qol updates Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants