Skip to content

Commit 3ac64db

Browse files
jiqing-fengChao1Han
authored andcommitted
remove xpu error log on CPU (#239)
* remove xpu error log on CPU Signed-off-by: jiqing-feng <jiqing.feng@intel.com> * Update oneccl_bindings_for_pytorch/__init__.py Co-authored-by: Chao Han <chao1.han@intel.com> --------- Signed-off-by: jiqing-feng <jiqing.feng@intel.com> Co-authored-by: Chao Han <chao1.han@intel.com>
1 parent 58aa3b1 commit 3ac64db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oneccl_bindings_for_pytorch/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def set_env_default(env, key, value):
1616
from .version import __version__, git_version
1717
from . import _C as ccl_lib
1818

19-
if hasattr(torch, 'xpu'):
19+
if hasattr(torch, 'xpu') and torch.xpu._is_compiled():
2020
try:
2121
# load the CCL/XPU library
2222
import ctypes

0 commit comments

Comments
 (0)