-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Modify codes so that different accelerators can be called according to specific device conditions #844
Merged
Conversation
This file contains 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
…ard code about cuda to access and enable the accelerators available(not just Nvidia's GPU) in the current device
…vice) for generalization.
tjruwase
approved these changes
Jan 8, 2024
@tjruwase Hi, thanks for your approval. If there's no more problems, please take time to merge. Thanks. |
stceum
pushed a commit
to stceum/DeepSpeedExamples
that referenced
this pull request
Jan 27, 2024
…o specific device conditions (deepspeedai#844) * modify inference-test.py to meet with the requirement of using Intel's device * modify ds-hf-compare.py to meet with the requirement of using Intel's device * use deepspeed.accelerator.get_accelerator() to replace the original hard code about cuda to access and enable the accelerators available(not just Nvidia's GPU) in the current device * column 117: self.model.xpu().to(self.device)--->self.model.to(self.device) for generalization. * For upstream, use get_accelerator() to hide backend. Add bf16 dtype for cpu. * Update README.md * Delete redundant comment code * Delete +123 in README title * delete checkpoints.json * modify inference-test.py * modify inference-test.py v2 * modify inference.py v3 * add bfloat16 for cpu * fix an error in setup commands with conda --------- Co-authored-by: Olatunji Ruwase <[email protected]>
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.
Modifications in: DeepSpeedExamples/inference/huggingface/text-generation :
1、use "deepspeed.accelerator.get_accelerator()" to replace "cuda" specific codes;
2、Add "bfloat16" to dtype so that the code can run on CPUs;
3、fix an error in README setup commands with conda.
p.s. Before running it, you need to get support of idex(intel-extension-for-deepspeed) and ipex(intel-extension-for-pytorch).