Skip to content

Commit fccbee2

Browse files
committed
revert logging #1137
1 parent e0acb10 commit fccbee2

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

library/device_utils.py

+3-8
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33

44
import torch
55

6-
from .utils import setup_logging
7-
setup_logging()
8-
import logging
9-
logger = logging.getLogger(__name__)
10-
116
try:
127
HAS_CUDA = torch.cuda.is_available()
138
except Exception:
@@ -64,7 +59,7 @@ def get_preferred_device() -> torch.device:
6459
device = torch.device("mps")
6560
else:
6661
device = torch.device("cpu")
67-
logger.info(f"get_preferred_device() -> {device}")
62+
print(f"get_preferred_device() -> {device}")
6863
return device
6964

7065

@@ -82,8 +77,8 @@ def init_ipex():
8277

8378
is_initialized, error_message = ipex_init()
8479
if not is_initialized:
85-
logger.error("failed to initialize ipex: {error_message}")
80+
print("failed to initialize ipex:", error_message)
8681
else:
8782
return
8883
except Exception as e:
89-
logger.error("failed to initialize ipex: {e}")
84+
print("failed to initialize ipex:", e)

0 commit comments

Comments
 (0)