Skip to content
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

[RFC] Increase computation intensity for certain kernels #190

Open
sustcsonglin opened this issue Feb 17, 2025 · 1 comment
Open

[RFC] Increase computation intensity for certain kernels #190

sustcsonglin opened this issue Feb 17, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@sustcsonglin
Copy link
Collaborator

Proposal

The current chunk mode normally loads 64x64 blocks, do the computation, and then save the resulting hidden state, which could bring I/O burden. In Tri Dao's Mamba2 implementation and xLSTM's chunkwise implementation, they load several 64x64 blocks to save a hidden state every 128 or 256 length, which reduces the I/O cost of saving hidden state and increasing the memory intensity. In my previous preliminary experiments, this could result in a not-small improvement. We'd want to change some kernels rich in matmul to this strategy, like in simple-gla's and deltanet's chunk kernel.

Rationale

@sustcsonglin sustcsonglin added the enhancement New feature or request label Feb 17, 2025
@Triang-jyed-driung
Copy link
Contributor

RWKV7 would benefit from that too :) Wind's CUDA kernel may have done something similar to that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants