CUDA: support ncols > 1024 in bitonic argsort/top-k The original bito… - #26493
Open
Geramy wants to merge 1 commit into
Open
CUDA: support ncols > 1024 in bitonic argsort/top-k The original bito…#26493Geramy wants to merge 1 commit into
Geramy wants to merge 1 commit into
Conversation
…nic sort used when CUB is unavailable IE HIP, and some versions of older CUDA capped ncols to 1024 threads/blocks due to hardware LDS size limit and instead sent the request the the CPU. I have updated the kernel to now do multiple elements per thread ncols_pad/nthreads.
Contributor
Author
Contributor
Author
|
This would close issue #26399 (comment) |
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.
Overview
This PR changes the argsort / top-k max cols to the maximum of the gpu available LDS by changing the kernel to use the maximum amount of X elements per thread. This was brought on due to the following issue:
#26399 (comment)
This mainly targets HIP devices due to there being no
ggml_cuda_op_top_kimplementation on hip.Additional information
Please note drift is not yet calculated in the below table.
Requirements