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

Adding ROCm Support #128

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

SeanSong-amd
Copy link

@SeanSong-amd SeanSong-amd commented Jan 8, 2025

This pull request enables model inference and training on AMD hardware with ROCm support. The key updates include:

  1. Adjusted the CUDA kernel code in casual-conv1d and mamba-1p1p1 to be HIPify-friendly, utilizing PyTorch's HIPification routine to automatically generate .hip source files during package builds on ROCm.
    The original CUDA code remains intact to preserve existing functionality. All ROCm-specific modifications are wrapped within #ifdef/#ifndef USE_ROCM macros.
  2. Minor Python Code Adjustments
    Made minor updates to the Python code to ensure compatibility with CUDA-based systems.

This push does not include ROCm-specific optimizations.

@SeanSong-amd SeanSong-amd changed the title Fix namespace for gpu Add ROCm Support Jan 8, 2025
@SeanSong-amd SeanSong-amd changed the title Add ROCm Support Adding ROCm Support Jan 8, 2025
@SeanSong-amd SeanSong-amd marked this pull request as ready for review January 8, 2025 06:06
@SeanSong-amd
Copy link
Author

@Unrealluver and the Vim team, Thank you so much for releasing the code! The community is truly excited to explore the new architecture. This PR introduces ROCm support, which will help make the model more accessible across a wider range of systems. I would be deeply grateful if you could kindly review the changes at your convenience and let me know if you have any questions or suggestions. Thank you!

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

Successfully merging this pull request may close these issues.

1 participant