Skip to content

Commit 961a1e1

Browse files
committed
fix jit func
1 parent f8eeb26 commit 961a1e1

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

  • transformer_engine/pytorch

transformer_engine/pytorch/jit.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,14 @@
88
from typing import Callable, Optional, Tuple
99
import torch
1010

11+
from transformer_engine import te_device_type
1112
from . import torch_version
1213
from .export import is_in_onnx_export_mode
1314
from .utils import gpu_autocast_ctx
1415

1516
# pylint: disable=unnecessary-lambda-assignment
1617

1718

18-
def te_device_type(default="cuda"):
19-
try:
20-
import transformer_engine as te
21-
22-
device_type = getattr(te, "TE_DEVICE_TYPE", "cuda")
23-
return device_type
24-
except Exception:
25-
return default
26-
27-
2819
def lazy_compile(func):
2920
"""Lazy compile a function with torch.compile
3021

0 commit comments

Comments
 (0)