Commit fccbee2 1 parent e0acb10 commit fccbee2 Copy full SHA for fccbee2
File tree 1 file changed +3
-8
lines changed
1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 3
3
4
4
import torch
5
5
6
- from .utils import setup_logging
7
- setup_logging ()
8
- import logging
9
- logger = logging .getLogger (__name__ )
10
-
11
6
try :
12
7
HAS_CUDA = torch .cuda .is_available ()
13
8
except Exception :
@@ -64,7 +59,7 @@ def get_preferred_device() -> torch.device:
64
59
device = torch .device ("mps" )
65
60
else :
66
61
device = torch .device ("cpu" )
67
- logger . info (f"get_preferred_device() -> { device } " )
62
+ print (f"get_preferred_device() -> { device } " )
68
63
return device
69
64
70
65
@@ -82,8 +77,8 @@ def init_ipex():
82
77
83
78
is_initialized , error_message = ipex_init ()
84
79
if not is_initialized :
85
- logger . error ("failed to initialize ipex: { error_message}" )
80
+ print ("failed to initialize ipex:" , error_message )
86
81
else :
87
82
return
88
83
except Exception as e :
89
- logger . error ("failed to initialize ipex: {e}" )
84
+ print ("failed to initialize ipex:" , e )
You can’t perform that action at this time.
0 commit comments