File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ def _ensure_dpctl():
1515 from numba_dpex .dpctl_support import dpctl_version
1616
1717 if dpctl_version < (0 , 14 ):
18- raise ImportError ("numba_dpex needs dpctl 0.14 or greater" )
18+ logging .warning (
19+ "numba_dpex needs dpctl 0.14 or greater, using "
20+ f"dpctl={ dpctl_version } may cause unexpected behavior"
21+ )
1922
2023
2124def _dpctl_has_non_host_device ():
Original file line number Diff line number Diff line change 44
55import dpctl
66
7- dpctl_version = tuple (map (int , dpctl .__version__ .split ("." )[:2 ]))
7+
8+ def _parse_version ():
9+ t = dpctl .__version__ .split ("." )
10+ if len (t ) > 1 :
11+ try :
12+ return tuple (map (int , t ))
13+ except ValueError :
14+ return (0 , 0 )
15+ else :
16+ return (0 , 0 )
17+
18+
19+ dpctl_version = _parse_version ()
20+
21+ del _parse_version
You can’t perform that action at this time.
0 commit comments