Skip to content

Commit

Permalink
- Disable torch.compile explicitly when using TE
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelion-source committed Feb 1, 2025
1 parent 2118a14 commit b51938d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions megatron/model/transformer_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
from megatron.model.positional_embeddings import RotaryEmbedding
from megatron import mpu

# https://github.com/NVIDIA/TransformerEngine/issues/405
import os
os.environ['NVTE_TORCH_COMPILE'] = str(0)

try:
import transformer_engine as te
except ImportError:
Expand All @@ -50,6 +54,7 @@
)



class TERMSNorm(torch.nn.Module):
def __init__(self, dim, eps=1e-8, **kwargs):
"""
Expand Down

0 comments on commit b51938d

Please sign in to comment.