-
Notifications
You must be signed in to change notification settings - Fork 985
MUSA: Use Monkey Patching to Automatically Convert CUDA Backend to MUSA #583
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
base: main
Are you sure you want to change the base?
Conversation
generate_device: str = "cuda", | ||
prefill_device: str = "cuda", | ||
generate_device: str = CUDA, | ||
prefill_device: str = CUDA, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefill_device and generate_device is not needed to change.
Change it in your custom yaml file. It's the same elsewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just want to ensure consistency throughout the code (Both CUDA
and "cuda"
will be present.).
Would you like me to revert this change?
Thank you for your contribution. |
4792b81
to
70457b7
Compare
Rebased |
The latest commit includes the following improvements:
|
Signed-off-by: Xiaodong Ye <[email protected]>
This PR introduces monkey patches to automatically convert
CUDA
backend toMUSA
backend.Key Updates
util.torch_auto_backend.py
CUDA
andCUDA0
to replace hardcoded"cuda"
and"cuda:0"
.CUDA
backend toMUSA
.MUSA
.Testing Done
make dev_install
python ./tests/torch_auto_backend_test.py