Skip to content

One Tenstorrent vector test fails at VLEN=256 / LMUL=m4 (rv64v_14) #57

Description

@tommythorn

Symptom

One test out of the Tenstorrent suite fails, and only this one:

tests/tenstorrent/run.sh machine/paging_bare/rv_v
...
machine/paging_bare/rv_v/xlen_256/vlmul_m4     15 / 16     1 FAIL

The test is xlen_256/vlmul_m4/rv64v_14. Everything else in the suite passes
(8999/8999 scalar, 95/96 vector).

What is known

Self-check mismatch, not an exception: the test reaches test_failed
directly from a bne, having compared an expected 0x1d9c against
simmerv's 0x1d9d.

The trace around it:

vslide1down.vx v24, v0, x0      # funct6=001111 OPMVX
vmv.x.s a0, v24                 # -> 0x18f3, matches expected
vslide1down.vx v0,  v24, x0
vmv.x.s a0, v0                  # -> 0x1d9d, expected 0x1d9c   FAIL

What has been ruled out

The obvious reading -- an off-by-one in vslide1down.vx at LMUL=m4 -- does
not survive checking. tests/vector/gen_vtest.py previously generated the
slides only at LMUL=m1; 3cee2d8 adds vslideup.vx, vslide1up.vx,
vslide1down.vx and vslidedown.vx at mf2/m2/m4 for SEW 8 and 32. The QEMU
differential then passes 2018/2018 identical transcript lines at both
VLEN=128 and VLEN=256. So simmerv agrees with QEMU on these slides at m4.

The two values differ by one in the low bit, which looks more like an
arithmetic result than a misplaced element -- suggesting the wrong value was
produced by something earlier in the test and the slides merely moved it
into view.

Suggested next step

Run the same ELF under qemu-system-riscv64 -M spike (which implements the
HTIF tohost the test ends with) and diff the register trace against
simmerv's -t output to find the first divergence, rather than reasoning
from the failing comparison backwards. The ELF is reproducible with
tests/tenstorrent/run.sh machine/paging_bare/rv_v; the built binary is
left in tests/tenstorrent/out/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    correctnessEither further tests or testing infrastructure, or work on known lack of compliance. Unlike bugs.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions