Skip to content

[Bug] a2a3 onboard: predicated clobber intermittently does not dispatch when its gate is 1 (max_diff is exactly POISON-SENTINEL) #2233

Description

@ChaoWao

Platform

a2a3 (Ascend 910B/C hardware)

Runtime Variant

tensormap_and_ringbuffer

Description

TestPredicatedDispatch::PredicateTrueDispatches intermittently fails its golden comparison on st-onboard-a2a3, and the failing value identifies the mechanism exactly:

AssertionError: TestPredicatedDispatch::PredicateTrueDispatches:
  Golden mismatch on 'x': max_diff=957.0, rtol=0, atol=0

957.0 == 999.0 - 42.0 == POISON - SENTINEL. In this case the gate is 1, so the
clobber task (X = 999.0) is supposed to dispatch on top of the producer's
42.0. x[0] held 42.0, so the producer ran and the gated clobber did
not dispatch
— the predicate behaved as if the gate were 0.

This is not a stale or uninitialised buffer: INIT_VAL is -1.0, and 42.0 is
the legitimate producer output, so the graph ran and only the predicated task
was missing. The comparison is exact (rtol=0, atol=0), so the diff is not
numerical drift either.

It is intermittent. Observed once, at inv=11 in an xdist worker (gw3), so
the case had already passed ten invocations in that same process before failing.

Not reproducible on demand. Re-running the same CI job on the same commit
passed. Locally, on real a2a3 silicon with the same binaries and the same
job-level watchdog env the workflow sets
(SIMPLER_SCHEDULER_TIMEOUT_MS=2000, SIMPLER_OP_EXECUTE_TIMEOUT_US=3000000,
SIMPLER_STREAM_SYNC_TIMEOUT_MS=4000), three consecutive runs passed.

Steps to Reproduce

task-submit --device auto --device-num 1 --run \
  ".venv/bin/python -m pytest \
     tests/st/a2a3/tensormap_and_ringbuffer/predicated_dispatch/test_predicated_dispatch.py \
     --platform a2a3 --device \$TASK_DEVICE --exclude-level 4 \
     --require-pto-isa --pto-session-timeout 600 --manual exclude"

Intermittent; one observed occurrence. It surfaced inside the full
st-onboard-a2a3 sweep, under xdist, after ten passing invocations of the same
case in the same worker process — so repeated invocation in one process, rather
than a single cold run, is the shape worth trying.

Expected Behavior

With gate[0] == 1, the predicated clobber dispatches and x[0] == y[0] == 999.0.

Actual Behavior

x[0] == 42.0 — the producer's value. The predicated clobber did not run, so
the predicate resolved false against a gate of 1, or the task was dropped
between predicate evaluation and dispatch.

Git Commit ID

cfb6c92

CANN Version

CI self-hosted a2a3 runner — as installed there

Driver Version

CI self-hosted a2a3 runner — as installed there

Host Platform

Linux (aarch64)

Additional Context

Failing job: https://github.com/hw-native-sys/simpler/actions/runs/34843921364/job/103975978255
(green on re-run of the same commit)

Context that is probably not the cause, recorded so it is not re-derived.
The same job also failed three L3 async cases with 507018, and a sibling a5
runner was undergoing a card soft restart in the same window. But a 507018 is
a reaped or timed-out op, whereas this is a completed run with a wrong
result
— a different class of failure, which is why it is filed separately
rather than folded into the watchdog story. A destabilised device pool is a
plausible contributor and cannot be ruled out from one occurrence.

Why this one deserves a look despite being a single occurrence: the whole
point of this scene test is that a predicate gates a dispatch, and the observed
value is precisely "the gated task did not run". If the predicate path can drop
a dispatch it should have made, the same hazard is silent in production — a
skipped task leaves a plausible-looking earlier value rather than an error.
PredicateFalseSkips passing tells us nothing here: skipping is its expected
outcome, so it cannot detect an over-eager skip.

Related: #995

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions