We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ipex
xpu
It looks like this line:
Megatron-DeepSpeed/megatron/model/__init__.py
Line 4 in 61350c5
from #431 breaks things on non Intel systems.
A simple (not yet tested) fix for a device-angostic approach could be something like:
import torch try: import intel_extension_for_pytorch as ipex except Exception: pass DEVICE = ( "cuda" if torch.cuda.is_available() else ( "xpu" if torch.xpu.is_available() else ( "mps" if torch.backends.mps.is_available() else ( "cpu" ) ) ) ) if DEVICE == 'cuda': from .fused_layer_norm import MixedFusedLayerNorm as LayerNorm from apex.normalization import MixedFusedRMSNorm as RMSNorm else: if hasattr(torch.xpu, "IpexRmsNorm"): from .fused_rmsnorm import RMSNorm else: from .rmsnorm import RMSNorm from torch.nn import LayerNorm # ...
which I believe should work
The text was updated successfully, but these errors were encountered:
I've also had this same issue recently. Can someone please fix this bug?
Sorry, something went wrong.
+1
No branches or pull requests
It looks like this line:
Megatron-DeepSpeed/megatron/model/__init__.py
Line 4 in 61350c5
from #431 breaks things on non Intel systems.
A simple (not yet tested) fix for a device-angostic approach could be something like:
which I believe should work
The text was updated successfully, but these errors were encountered: