Unverified Commit b4297967 authored by Sayak Paul's avatar Sayak Paul Committed by GitHub
Browse files

[core] conditionally import torch distributed stuff. (#12420)

conditionally import torch distributed stuff.
parent 9ae5b629
...@@ -20,7 +20,10 @@ from enum import Enum ...@@ -20,7 +20,10 @@ from enum import Enum
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Literal, Optional, Tuple, Union from typing import TYPE_CHECKING, Any, Callable, Dict, List, Literal, Optional, Tuple, Union
import torch import torch
import torch.distributed._functional_collectives as funcol
if torch.distributed.is_available():
import torch.distributed._functional_collectives as funcol
from ..utils import ( from ..utils import (
get_logger, get_logger,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment