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

Mamba SSM operations not able to compile for Inferentia #1111

Open
sophieker opened this issue Feb 12, 2025 · 0 comments
Open

Mamba SSM operations not able to compile for Inferentia #1111

sophieker opened this issue Feb 12, 2025 · 0 comments

Comments

@sophieker
Copy link

Model we are trying to compile in inferentia:
https://github.com/MCG-NJU/VFIMamba

We are experiencing issues with compilation when the model uses mamba_ssm
from mamba_ssm.ops.selective_scan_interface import selective_scan_fn, selective_scan_ref
Line 5, model/feature_extractor.py

The selective_scan_fn relies on cuda. selective_scan_ref performs the same operation without cuda but is significantly slower, so we would prefer to compile with selective_scan_fn. Additionally, selective_scan_ref contains conditional logic which conflicts with inferentia compilation.

We tried to reference these docs for creating a custom NKI kernel for mamba, but we were not able to translate it over properly:
https://awsdocs-neuron.readthedocs-hosted.com/en/latest/general/nki/tutorials/fused_mamba.html

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

No branches or pull requests

1 participant