Skip to content

Commit 786d4f9

Browse files
committed
re-enable flaky test
Signed-off-by: Mitchell <mitch_dz@hotmail.com>
1 parent 5c3e3fb commit 786d4f9

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

python/tests/kernel/test_assignments.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -844,26 +844,26 @@ class MyTuple:
844844
l1: list[int]
845845
l2: list[int]
846846

847-
# FIXME: This test is flaky on py3.11 + arm64 + cuda12.6.
847+
# NOTE: This test is flaky on py3.11 + arm64 + cuda12.6.
848848
# The struct argument marshaling is now correct (see PR #3879), but the
849849
# kernel-internal deep copy and list mutation still produce wrong results
850850
# intermittently on that configuration. Disabling until root cause is
851851
# identified.
852-
# @cudaq.kernel
853-
# def test11(t: MyTuple, size: int) -> list[int]:
854-
# l = [t.copy(deep=True) for _ in range(size)]
855-
# l[0].l1 = [2]
856-
# l[1].l2[0] = 3
857-
# res = [0 for _ in range(4 * len(l))]
858-
# for idx, item in enumerate(l):
859-
# res[4 * idx] = len(item.l1)
860-
# res[4 * idx + 1] = item.l1[0]
861-
# res[4 * idx + 2] = len(item.l2)
862-
# res[4 * idx + 3] = item.l2[0]
863-
# return res
864-
#
865-
# result = test11(MyTuple([1], [1]), 2)
866-
# assert (result == [1, 2, 1, 1, 1, 1, 1, 3])
852+
@cudaq.kernel
853+
def test11(t: MyTuple, size: int) -> list[int]:
854+
l = [t.copy(deep=True) for _ in range(size)]
855+
l[0].l1 = [2]
856+
l[1].l2[0] = 3
857+
res = [0 for _ in range(4 * len(l))]
858+
for idx, item in enumerate(l):
859+
res[4 * idx] = len(item.l1)
860+
res[4 * idx + 1] = item.l1[0]
861+
res[4 * idx + 2] = len(item.l2)
862+
res[4 * idx + 3] = item.l2[0]
863+
return res
864+
865+
result = test11(MyTuple([1], [1]), 2)
866+
assert (result == [1, 2, 1, 1, 1, 1, 1, 3])
867867

868868
with pytest.raises(RuntimeError) as e:
869869

0 commit comments

Comments
 (0)