add mamba causal-conv1d-update kernel#48
Open
thoangtrvn wants to merge 2 commits intometa-pytorch:mainfrom
Open
add mamba causal-conv1d-update kernel#48thoangtrvn wants to merge 2 commits intometa-pytorch:mainfrom
thoangtrvn wants to merge 2 commits intometa-pytorch:mainfrom
Conversation
lessw2020
reviewed
Apr 10, 2025
| cache_seqlens: Optional[torch.Tensor] = None, | ||
| conv_state_indices: Optional[torch.Tensor] = None, | ||
| pad_slot_id: int = PAD_SLOT_ID, | ||
| ): |
Contributor
There was a problem hiding this comment.
you are returning o but it is not listed here in your function signature?
lessw2020
reviewed
Apr 10, 2025
| for example: cache_indices = [pad_slot_id, 1 ,20 ,pad_slot_id] | ||
| in this case, the kernel will not process entries at | ||
| indices 0 and 3 | ||
| out: (batch, dim) or (batch, dim, seqlen) |
Contributor
There was a problem hiding this comment.
also inconsistent - out? (vs o)
lessw2020
reviewed
Apr 10, 2025
| conv_state_indices=conv_state_indices, | ||
| pad_slot_id=pad_slot_id, | ||
| ) | ||
| return o |
Contributor
There was a problem hiding this comment.
nit but not a fan of using o by itself... out or output etc. makes it more clear imo.
Contributor
|
Hi @thoangtrvn - thanks for the update and sorry for the delay! |
Contributor
Author
|
Thanks @lessw2020 , I'll update base on your feedback. |
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 is related to the prior PR: #47
This adds the second Triton kernel (decode stage) to be used in mamba-based model for the inference purpose.