perf: skip torch import on non-macOS (#23438)
This commit is contained in:
1 parent
2112a99b36
commit
f9ceb7fa89
1 file changed
+1
@@ -60,6 +60,7 @@ if USE_CUDA.lower() == 'true':
|
|||||||
else:
|
else:
|
||||||
DEVICE_TYPE = 'cpu'
|
DEVICE_TYPE = 'cpu'
|
||||||
|
|
||||||
|
if sys.platform == 'darwin':
|
||||||
try:
|
try:
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user