Skip to content

Commit c76e949

Browse files
authored
Fix build on Python 3.9 (#8759)
1 parent 60001c7 commit c76e949

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

torch_xla/debug/profiler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import functools
22
import os
33
import threading
4+
from typing import Union
45

56
import torch_xla
67
import torch_xla.core.xla_model as xm
@@ -208,7 +209,7 @@ def reset(self):
208209
_profile_state = _ProfileState()
209210

210211

211-
def start_trace(log_dir: os.PathLike | str) -> None:
212+
def start_trace(log_dir: Union[os.PathLike, str]) -> None:
212213
"""Starts a profiler trace.
213214
214215
The trace will capture CPU, GPU, and/or TPU activity, including Python

0 commit comments

Comments
 (0)