Skip to content

Commit 5b5a2a5

Browse files
Pass trans_code to getrs in dpnp_solve()
1 parent 932a23a commit 5b5a2a5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

dpnp/linalg/dpnp_utils_linalg.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2632,6 +2632,12 @@ def dpnp_solve(a, b):
26322632
_manager = dpu.SequentialOrderManager[exec_q]
26332633
dev_evs = _manager.submitted_events
26342634

2635+
# TODO: remove after PR #2558 is merged
2636+
# Temporarily set trans_code=1 (transpose) because the LU-factorized
2637+
# array is C-contiguous.
2638+
# For F-contiguous arrays use 0 (non-transpose)
2639+
trans_code = 1
2640+
26352641
# use DPCTL tensor function to fill the сopy of the input array
26362642
# from the input array
26372643
ht_ev, a_copy_ev = ti._copy_usm_ndarray_into_usm_ndarray(
@@ -2688,6 +2694,7 @@ def dpnp_solve(a, b):
26882694
a_h.get_array(),
26892695
ipiv_h.get_array(),
26902696
b_h.get_array(),
2697+
trans_code,
26912698
depends=[b_copy_ev, getrf_ev],
26922699
)
26932700
_manager.add_event_pair(ht_ev, getrs_ev)

0 commit comments

Comments
 (0)