@@ -163,20 +163,20 @@ def _clip_none(x, val, out, order, _binary_fn):
163163
164164 if ti ._array_overlap (x , out ):
165165 if not ti ._same_logical_tensors (x , out ):
166- out = dpt .empty_like (out )
166+ out = dpt_ext .empty_like (out )
167167
168168 if isinstance (val , dpt .usm_ndarray ):
169169 if (
170170 ti ._array_overlap (val , out )
171171 and not ti ._same_logical_tensors (val , out )
172172 and val_dtype == res_dt
173173 ):
174- out = dpt .empty_like (out )
174+ out = dpt_ext .empty_like (out )
175175
176176 if isinstance (val , dpt .usm_ndarray ):
177177 val_ary = val
178178 else :
179- val_ary = dpt .asarray (val , dtype = val_dtype , sycl_queue = exec_q )
179+ val_ary = dpt_ext .asarray (val , dtype = val_dtype , sycl_queue = exec_q )
180180
181181 if order == "A" :
182182 order = (
@@ -197,17 +197,17 @@ def _clip_none(x, val, out, order, _binary_fn):
197197 x , val_ary , res_dt , res_shape , res_usm_type , exec_q
198198 )
199199 else :
200- out = dpt .empty (
200+ out = dpt_ext .empty (
201201 res_shape ,
202202 dtype = res_dt ,
203203 usm_type = res_usm_type ,
204204 sycl_queue = exec_q ,
205205 order = order ,
206206 )
207207 if x_shape != res_shape :
208- x = dpt .broadcast_to (x , res_shape )
208+ x = dpt_ext .broadcast_to (x , res_shape )
209209 if val_ary .shape != res_shape :
210- val_ary = dpt .broadcast_to (val_ary , res_shape )
210+ val_ary = dpt_ext .broadcast_to (val_ary , res_shape )
211211 _manager = SequentialOrderManager [exec_q ]
212212 dep_evs = _manager .submitted_events
213213 ht_binary_ev , binary_ev = _binary_fn (
@@ -229,7 +229,7 @@ def _clip_none(x, val, out, order, _binary_fn):
229229 if order == "K" :
230230 buf = _empty_like_orderK (val_ary , res_dt )
231231 else :
232- buf = dpt .empty_like (val_ary , dtype = res_dt , order = order )
232+ buf = dpt_ext .empty_like (val_ary , dtype = res_dt , order = order )
233233 _manager = SequentialOrderManager [exec_q ]
234234 dep_evs = _manager .submitted_events
235235 ht_copy_ev , copy_ev = ti ._copy_usm_ndarray_into_usm_ndarray (
@@ -242,7 +242,7 @@ def _clip_none(x, val, out, order, _binary_fn):
242242 x , buf , res_dt , res_shape , res_usm_type , exec_q
243243 )
244244 else :
245- out = dpt .empty (
245+ out = dpt_ext .empty (
246246 res_shape ,
247247 dtype = res_dt ,
248248 usm_type = res_usm_type ,
@@ -251,8 +251,8 @@ def _clip_none(x, val, out, order, _binary_fn):
251251 )
252252
253253 if x_shape != res_shape :
254- x = dpt .broadcast_to (x , res_shape )
255- buf = dpt .broadcast_to (buf , res_shape )
254+ x = dpt_ext .broadcast_to (x , res_shape )
255+ buf = dpt_ext .broadcast_to (buf , res_shape )
256256 ht_binary_ev , binary_ev = _binary_fn (
257257 src1 = x ,
258258 src2 = buf ,
@@ -353,14 +353,14 @@ def clip(x, /, min=None, max=None, out=None, order="K"):
353353
354354 if ti ._array_overlap (x , out ):
355355 if not ti ._same_logical_tensors (x , out ):
356- out = dpt .empty_like (out )
356+ out = dpt_ext .empty_like (out )
357357 else :
358358 return out
359359 else :
360360 if order == "K" :
361361 out = _empty_like_orderK (x , x .dtype )
362362 else :
363- out = dpt .empty_like (x , order = order )
363+ out = dpt_ext .empty_like (x , order = order )
364364
365365 _manager = SequentialOrderManager [exec_q ]
366366 dep_evs = _manager .submitted_events
@@ -519,32 +519,32 @@ def clip(x, /, min=None, max=None, out=None, order="K"):
519519
520520 if ti ._array_overlap (x , out ):
521521 if not ti ._same_logical_tensors (x , out ):
522- out = dpt .empty_like (out )
522+ out = dpt_ext .empty_like (out )
523523
524524 if isinstance (min , dpt .usm_ndarray ):
525525 if (
526526 ti ._array_overlap (min , out )
527527 and not ti ._same_logical_tensors (min , out )
528528 and buf1_dt is None
529529 ):
530- out = dpt .empty_like (out )
530+ out = dpt_ext .empty_like (out )
531531
532532 if isinstance (max , dpt .usm_ndarray ):
533533 if (
534534 ti ._array_overlap (max , out )
535535 and not ti ._same_logical_tensors (max , out )
536536 and buf2_dt is None
537537 ):
538- out = dpt .empty_like (out )
538+ out = dpt_ext .empty_like (out )
539539
540540 if isinstance (min , dpt .usm_ndarray ):
541541 a_min = min
542542 else :
543- a_min = dpt .asarray (min , dtype = min_dtype , sycl_queue = exec_q )
543+ a_min = dpt_ext .asarray (min , dtype = min_dtype , sycl_queue = exec_q )
544544 if isinstance (max , dpt .usm_ndarray ):
545545 a_max = max
546546 else :
547- a_max = dpt .asarray (max , dtype = max_dtype , sycl_queue = exec_q )
547+ a_max = dpt_ext .asarray (max , dtype = max_dtype , sycl_queue = exec_q )
548548
549549 if order == "A" :
550550 order = (
@@ -572,19 +572,19 @@ def clip(x, /, min=None, max=None, out=None, order="K"):
572572 exec_q ,
573573 )
574574 else :
575- out = dpt .empty (
575+ out = dpt_ext .empty (
576576 res_shape ,
577577 dtype = res_dt ,
578578 usm_type = res_usm_type ,
579579 sycl_queue = exec_q ,
580580 order = order ,
581581 )
582582 if x_shape != res_shape :
583- x = dpt .broadcast_to (x , res_shape )
583+ x = dpt_ext .broadcast_to (x , res_shape )
584584 if a_min .shape != res_shape :
585- a_min = dpt .broadcast_to (a_min , res_shape )
585+ a_min = dpt_ext .broadcast_to (a_min , res_shape )
586586 if a_max .shape != res_shape :
587- a_max = dpt .broadcast_to (a_max , res_shape )
587+ a_max = dpt_ext .broadcast_to (a_max , res_shape )
588588 _manager = SequentialOrderManager [exec_q ]
589589 dep_ev = _manager .submitted_events
590590 ht_binary_ev , binary_ev = ti ._clip (
@@ -612,7 +612,7 @@ def clip(x, /, min=None, max=None, out=None, order="K"):
612612 if order == "K" :
613613 buf2 = _empty_like_orderK (a_max , buf2_dt )
614614 else :
615- buf2 = dpt .empty_like (a_max , dtype = buf2_dt , order = order )
615+ buf2 = dpt_ext .empty_like (a_max , dtype = buf2_dt , order = order )
616616 _manager = SequentialOrderManager [exec_q ]
617617 dep_ev = _manager .submitted_events
618618 ht_copy_ev , copy_ev = ti ._copy_usm_ndarray_into_usm_ndarray (
@@ -631,18 +631,18 @@ def clip(x, /, min=None, max=None, out=None, order="K"):
631631 exec_q ,
632632 )
633633 else :
634- out = dpt .empty (
634+ out = dpt_ext .empty (
635635 res_shape ,
636636 dtype = res_dt ,
637637 usm_type = res_usm_type ,
638638 sycl_queue = exec_q ,
639639 order = order ,
640640 )
641641
642- x = dpt .broadcast_to (x , res_shape )
642+ x = dpt_ext .broadcast_to (x , res_shape )
643643 if a_min .shape != res_shape :
644- a_min = dpt .broadcast_to (a_min , res_shape )
645- buf2 = dpt .broadcast_to (buf2 , res_shape )
644+ a_min = dpt_ext .broadcast_to (a_min , res_shape )
645+ buf2 = dpt_ext .broadcast_to (buf2 , res_shape )
646646 ht_binary_ev , binary_ev = ti ._clip (
647647 src = x ,
648648 min = a_min ,
@@ -668,7 +668,7 @@ def clip(x, /, min=None, max=None, out=None, order="K"):
668668 if order == "K" :
669669 buf1 = _empty_like_orderK (a_min , buf1_dt )
670670 else :
671- buf1 = dpt .empty_like (a_min , dtype = buf1_dt , order = order )
671+ buf1 = dpt_ext .empty_like (a_min , dtype = buf1_dt , order = order )
672672 _manager = SequentialOrderManager [exec_q ]
673673 dep_ev = _manager .submitted_events
674674 ht_copy_ev , copy_ev = ti ._copy_usm_ndarray_into_usm_ndarray (
@@ -687,18 +687,18 @@ def clip(x, /, min=None, max=None, out=None, order="K"):
687687 exec_q ,
688688 )
689689 else :
690- out = dpt .empty (
690+ out = dpt_ext .empty (
691691 res_shape ,
692692 dtype = res_dt ,
693693 usm_type = res_usm_type ,
694694 sycl_queue = exec_q ,
695695 order = order ,
696696 )
697697
698- x = dpt .broadcast_to (x , res_shape )
699- buf1 = dpt .broadcast_to (buf1 , res_shape )
698+ x = dpt_ext .broadcast_to (x , res_shape )
699+ buf1 = dpt_ext .broadcast_to (buf1 , res_shape )
700700 if a_max .shape != res_shape :
701- a_max = dpt .broadcast_to (a_max , res_shape )
701+ a_max = dpt_ext .broadcast_to (a_max , res_shape )
702702 ht_binary_ev , binary_ev = ti ._clip (
703703 src = x ,
704704 min = buf1 ,
@@ -736,7 +736,7 @@ def clip(x, /, min=None, max=None, out=None, order="K"):
736736 if order == "K" :
737737 buf1 = _empty_like_orderK (a_min , buf1_dt )
738738 else :
739- buf1 = dpt .empty_like (a_min , dtype = buf1_dt , order = order )
739+ buf1 = dpt_ext .empty_like (a_min , dtype = buf1_dt , order = order )
740740
741741 _manager = SequentialOrderManager [exec_q ]
742742 dep_evs = _manager .submitted_events
@@ -747,7 +747,7 @@ def clip(x, /, min=None, max=None, out=None, order="K"):
747747 if order == "K" :
748748 buf2 = _empty_like_orderK (a_max , buf2_dt )
749749 else :
750- buf2 = dpt .empty_like (a_max , dtype = buf2_dt , order = order )
750+ buf2 = dpt_ext .empty_like (a_max , dtype = buf2_dt , order = order )
751751 ht_copy2_ev , copy2_ev = ti ._copy_usm_ndarray_into_usm_ndarray (
752752 src = a_max , dst = buf2 , sycl_queue = exec_q , depends = dep_evs
753753 )
@@ -758,17 +758,17 @@ def clip(x, /, min=None, max=None, out=None, order="K"):
758758 x , buf1 , buf2 , res_dt , res_shape , res_usm_type , exec_q
759759 )
760760 else :
761- out = dpt .empty (
761+ out = dpt_ext .empty (
762762 res_shape ,
763763 dtype = res_dt ,
764764 usm_type = res_usm_type ,
765765 sycl_queue = exec_q ,
766766 order = order ,
767767 )
768768
769- x = dpt .broadcast_to (x , res_shape )
770- buf1 = dpt .broadcast_to (buf1 , res_shape )
771- buf2 = dpt .broadcast_to (buf2 , res_shape )
769+ x = dpt_ext .broadcast_to (x , res_shape )
770+ buf1 = dpt_ext .broadcast_to (buf1 , res_shape )
771+ buf2 = dpt_ext .broadcast_to (buf2 , res_shape )
772772 ht_ , clip_ev = ti ._clip (
773773 src = x ,
774774 min = buf1 ,
0 commit comments