File tree Expand file tree Collapse file tree 3 files changed +3
-31
lines changed Expand file tree Collapse file tree 3 files changed +3
-31
lines changed Original file line number Diff line number Diff line change 6666 )
6767
6868from numba .cuda .np .ufunc import vectorize , guvectorize
69-
70-
71- _lazy_exports = {
72- "literal_unroll" : ("numba.cuda.misc.special" , "literal_unroll" ),
73- "literal" : ("numba.cuda.misc" , "literal" ),
74- }
75-
76- __all__ = list (globals ().get ("__all__" , [])) + list (_lazy_exports .keys ())
77-
78-
79- def __getattr__ (name ):
80- """
81- Lazily import a few attrs that might import lowering
82- """
83- if name in _lazy_exports :
84- mod_name , attr_name = _lazy_exports [name ]
85- try :
86- module = importlib .import_module (mod_name )
87- value = getattr (module , attr_name )
88- except Exception as exc :
89- raise ImportError (
90- f"could not import name { attr_name !r} from { mod_name !r} "
91- ) from exc
92- globals ()[name ] = value
93- return value
94- raise AttributeError (f"module { __name__ !r} has no attribute { name !r} " )
95-
96-
97- def __dir__ ():
98- return sorted (set (list (globals ().keys ()) + list (_lazy_exports .keys ())))
Original file line number Diff line number Diff line change 8787 PTXSource ,
8888)
8989
90+ from numba .cuda .misc .special import literal_unroll
91+ from numba .cuda .misc import literal
92+
9093reduce = Reduce = reduction .Reduce
9194
9295# Expose vector type constructors and aliases as module level attributes.
Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ def test_no_impl_import(self):
3838 "numba.cuda.python.printimpl" ,
3939 "numba.cuda.core.optional" ,
4040 "numba.cuda.misc.gdb_hook" ,
41- "numba.cuda.misc.literal" ,
4241 "numba.cuda.misc.cffiimpl" ,
4342 "numba.np.linalg" ,
4443 "numba.np.polynomial" ,
You can’t perform that action at this time.
0 commit comments