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
10 changes: 10 additions & 0 deletions test/npu_validation/scripts/generate_testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -1623,6 +1623,16 @@ def generate_testcase(
file_cnt = ptr_elem_counts.get(name, logical_elem_count)
if file_cnt and req < int(file_cnt):
compare_prefix_counts[name] = req
# TMRGSORT format2 testcase writes three contiguous regions:
# 2-way (256) + 3-way (384) + 4-way (up to 512).
# With 4-way exhausted mode, the stable worst-case valid prefix for 4-way
# is 128 elements, so compare 256 + 384 + 128 = 768 elements.
testcase_lc = testcase.lower()
if testcase_lc == "mrgsort_format2":
for p in output_ptrs:
name = p["name"]
file_cnt = int(ptr_elem_counts.get(name, logical_elem_count))
compare_prefix_counts[name] = min(file_cnt, 768)
for p in output_ptrs:
np_dtype = _np_dtype_for_cpp(p["cpp_type"])
name = p["name"]
Expand Down
4 changes: 2 additions & 2 deletions test/samples/Mrgsort/mrgsort_format2.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ def build():
srcs=[tb_s0, tb_s1, tb_s2],
dsts=[tb_dst3, tb_tmp3],
excuted=excuted,
exhausted=True,
exhausted=False,
)

# 4-way: src0 + src1 + src2 + src3 -> 1x512
pto.TMrgSortOp(
srcs=[tb_s0, tb_s1, tb_s2, tb_s3],
dsts=[tb_dst4, tb_tmp4],
excuted=excuted,
exhausted=False,
exhausted=True,
)

sv_out2 = pto.PartitionViewOp(part_view_1x256, tv_out, offsets=[c0, c0], sizes=[c1, c256]).result
Expand Down
Loading