-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPU implementation of hamming distance #541
Open
felixpetschko
wants to merge
118
commits into
scverse:main
Choose a base branch
from
felixpetschko:gpu_hamming
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
118 commits
Select commit
Hold shift + click to select a range
bad62d8
take static methods out of tcrdist
felixpetschko 72565bf
made _tcrdist_mat a normal class method
felixpetschko add8e7f
parent method NumbaDistanceCalculator extracted
felixpetschko e9c0642
numba version of hamming distance implemented
felixpetschko 68e0493
hamming numba tests passed and reference test added
felixpetschko ef0fa7d
hamming numba distance calculator implemented and tested
felixpetschko 0b15f8b
n_jobs parameter handling done in NumbaDistanceCalculator superclass
felixpetschko 46bfc14
documentation adapted
felixpetschko e339e14
removed unnecessary import
felixpetschko 7da4519
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 82b0259
hamming distance with numba parallelization implemented
felixpetschko b2d28d3
Merge branch 'numba_hamming' of https://github.com/felixpetschko/scir…
felixpetschko 249e626
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 2fccc6a
imports fixed
felixpetschko 9ee1a2b
Merge branch 'numba_hamming' of https://github.com/felixpetschko/scir…
felixpetschko a68ab53
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d68a10b
implemented parallelization with n_jobs and n_blocks for hamming and …
felixpetschko 0005e63
performance optimization for hamming and tcrdist
felixpetschko 6f16a3e
more documentation added
felixpetschko 6b32311
Merge branch 'numba_hamming' of https://github.com/felixpetschko/scir…
felixpetschko ad13f52
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 08ad838
documentation adapted
felixpetschko a8d9846
Merge branch 'numba_hamming' of https://github.com/felixpetschko/scir…
felixpetschko b86030c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 2fb8254
documentation adapted
felixpetschko bb0f430
Merge branch 'numba_hamming' of https://github.com/felixpetschko/scir…
felixpetschko 80ae271
signature of _calc_dist_mat_block changed
felixpetschko 91c1dea
the alphabet for the hamming distance is now the unique characters oc…
felixpetschko 899e2eb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] a0627b4
Merge branch 'main' into numba_hamming
grst d5dbe8e
normalized hamming distance added
felixpetschko 5a6ef24
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 3060314
renaming test
felixpetschko 6b2b025
histogram creation for hamming distance added
felixpetschko fc24ac5
merge
felixpetschko 5670a84
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 53d542e
refactored
felixpetschko fe31be7
Merge branch 'numba_hamming' of https://github.com/felixpetschko/scir…
felixpetschko 59a3c9d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] c1d9d51
hamming histogram adjustments
felixpetschko ce4f3f3
Merge branch 'numba_hamming' of https://github.com/felixpetschko/scir…
felixpetschko 5419d0b
reference test cases added for normalized hamming and hamming histogram
felixpetschko effee43
Merge branch 'main' into numba_hamming
grst da07aff
Update src/scirpy/ir_dist/metrics.py
felixpetschko a934743
Merge branch 'numba_hamming' of https://github.com/felixpetschko/scir…
felixpetschko c0e0381
test cases for normalized hamming and hamming histogram adapted
felixpetschko 6a220a7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 8683ab6
docstring for normalized hamming distance and tcrdist distance added
felixpetschko bfe35fd
adapted default parameters and tests for n_jobs and n_blocks
felixpetschko a91130a
Merge branch 'numba_hamming' of https://github.com/felixpetschko/scir…
felixpetschko 15c04bd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d45ab64
test_sequence_dist_all_metrics adaptions
felixpetschko 1730b3f
n_jobs default value set to -1
felixpetschko 8f18210
docstring of ir_dist for n_jobs adapted
felixpetschko d62c1c8
Merge branch 'numba_hamming' of https://github.com/felixpetschko/scir…
felixpetschko 8cfc1c6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] efbc37b
docstring change to test cicd pipeline
felixpetschko ae3121a
Merge branch 'numba_hamming' of https://github.com/felixpetschko/scir…
felixpetschko 9398d7c
docstring for n_jobs of _ir_dist changed
felixpetschko 66d6f70
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] afc03ba
docstring for n_jobs of _ir_dist changed
felixpetschko def8b1e
Merge branch 'numba_hamming' of https://github.com/felixpetschko/scir…
felixpetschko dc8dae4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 758feed
moved histogram creation to parent class of hamming distance calculator
felixpetschko 04d0db7
histogram computation adaptions
felixpetschko b7ed4ca
test case test_tcrdist_histogram_not_implemented added
felixpetschko d40e193
documentation for histogram adapted
felixpetschko f2c32af
Merge branch 'numba_hamming' of https://github.com/felixpetschko/scir…
felixpetschko 54c0cc2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b16c705
reformatted doc string
felixpetschko 3aab445
Merge branch 'numba_hamming' of https://github.com/felixpetschko/scir…
felixpetschko 2419bfb
handling of symmetric matrices with respect to histogram variable cha…
felixpetschko e516a86
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 20c14eb
retrieval of usable cpus for numba adapted
felixpetschko 7c2cc06
Merge branch 'numba_hamming' of https://github.com/felixpetschko/scir…
felixpetschko f566211
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f68dd70
more documentation for histogram and (hamming) normalize added
felixpetschko 3955eb1
Merge branch 'numba_hamming' of https://github.com/felixpetschko/scir…
felixpetschko d9dd20e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 636b8e0
added GPUHammingDistanceCalculator
felixpetschko 3e4f0d3
added test case for gpu hamming distance
felixpetschko 30f6947
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 57e31a6
Merge branch 'main' of https://github.com/scverse/scirpy into gpu_ham…
felixpetschko 2f3bfb3
documentation for GPUHammingDistanceCalculator adapted
felixpetschko 3b49d16
adapted documentation of _tcrdist_mat
felixpetschko 51c6721
Merge branch 'main' into gpu_hamming
grst f50d082
Merge branch 'main' of https://github.com/scverse/scirpy into gpu_ham…
felixpetschko 03afdd3
cuda numba experiments
felixpetschko 0b0c5fb
cupy experiments
felixpetschko babdf9a
cupy experiments
felixpetschko f22ae38
scaled cupy to 1 million cells
felixpetschko 730cb80
sorted sequences by length
felixpetschko 5e4776c
textures used for seqs_mat1 and seqs_mat2
felixpetschko e6bf393
texture mit up to 100k cells
felixpetschko da251d0
sorted seqs with multiple blocks
felixpetschko 60ec651
scaled textures to 1 million cells
felixpetschko 6f9d6bd
use char for sequences
felixpetschko adbd239
shared memory used
felixpetschko a39dbeb
experiments, run 1 million cells with global memory
felixpetschko 972836f
run 1 million cells with only global memory
felixpetschko 8d0c2e4
refactoring and time measurements
felixpetschko 6bc496c
optimized seqs2mat
felixpetschko 2d4756f
increased result matrix stacking speed
felixpetschko c2a290f
changed data dtype to int8
felixpetschko 459c2a2
scaled to 1 million cells
felixpetschko 1fb02b1
Merge branch 'gpu_hamming' of https://github.com/felixpetschko/scirpy…
felixpetschko f54dc7e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 38f1fea
sort indices of result csr matrix
felixpetschko c646651
refactoring
felixpetschko 897c17b
Merge branch 'gpu_hamming' of https://github.com/felixpetschko/scirpy…
felixpetschko f6668c4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f7a4a03
remove test from ci
Intron7 9e021fd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 44d7b34
move cupy import to func
Intron7 8315e2f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 8044b28
add GPU test
Intron7 d638cfa
rename
Intron7 a644fef
Rename .cirun.yaml to .cirun.yml
Intron7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
runners: | ||
- name: aws-gpu-runner | ||
cloud: aws | ||
instance_type: g4dn.xlarge | ||
machine_image: ami-067a4ba2816407ee9 | ||
region: eu-north-1 | ||
preemptible: | ||
- true | ||
- false | ||
labels: | ||
- cirun-aws-gpu |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: GPU-CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
types: | ||
- labeled | ||
- opened | ||
- synchronize | ||
|
||
# Cancel the job if new commits are pushed | ||
# https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: flying-sheep/check@v1 | ||
with: | ||
success: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'run-gpu-ci') }} | ||
test: | ||
name: GPU Tests | ||
needs: check | ||
runs-on: "cirun-aws-gpu--${{ github.run_id }}" | ||
timeout-minutes: 30 | ||
|
||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Nvidia SMI sanity check | ||
run: nvidia-smi | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install UV | ||
uses: hynek/setup-cached-uv@v2 | ||
with: | ||
cache-dependency-path: pyproject.toml | ||
|
||
- name: Install scirpy | ||
run: uv pip install --system -e ".[dev,test,rpack,dandelion,diversity,parasail,cupy]" | ||
- name: Pip list | ||
run: pip list | ||
|
||
- name: Run test | ||
run: pytest -m gpu | ||
|
||
- name: Remove 'run-gpu-ci' Label | ||
if: always() | ||
uses: actions-ecosystem/action-remove-labels@v1 | ||
with: | ||
labels: "run-gpu-ci" | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems duplicated now