Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions dpctl/tensor/_clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -791,17 +791,17 @@ def clip(x, /, min=None, max=None, out=None, order="K"):

if order == "K":
if (
x.flags.f_contiguous
and a_min.flags.f_contiguous
and a_max.flags.f_contiguous
):
order = "F"
elif (
x.flags.c_contiguous
and a_min.flags.c_contiguous
and a_max.flags.c_contiguous
):
order = "C"
elif (
x.flags.f_contiguous
and a_min.flags.f_contiguous
and a_max.flags.f_contiguous
):
order = "F"
if order == "K":
buf1 = _empty_like_orderK(a_min, buf1_dt)
else:
Expand Down
6 changes: 3 additions & 3 deletions dpctl/tensor/_elementwise_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,10 +858,10 @@ def __call__(self, o1, o2, /, *, out=None, order="K"):
return out

if order == "K":
if src1.flags.f_contiguous and src2.flags.f_contiguous:
order = "F"
elif src1.flags.c_contiguous and src2.flags.c_contiguous:
if src1.flags.c_contiguous and src2.flags.c_contiguous:
order = "C"
elif src1.flags.f_contiguous and src2.flags.f_contiguous:
order = "F"
if order == "K":
buf1 = _empty_like_orderK(src1, buf1_dt)
else:
Expand Down
6 changes: 3 additions & 3 deletions dpctl/tensor/_linear_algebra_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,10 +942,10 @@ def matmul(x1, x2, out=None, dtype=None, order="K"):
return out

if order == "K":
if x1.flags.f_contiguous and x2.flags.f_contiguous:
order = "F"
elif x1.flags.c_contiguous and x2.flags.c_contiguous:
if x1.flags.c_contiguous and x2.flags.c_contiguous:
order = "C"
elif x1.flags.f_contiguous and x2.flags.f_contiguous:
order = "F"
if order == "K":
buf1 = _empty_like_orderK(x1, buf1_dt)
else:
Expand Down