You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Load and store trace packets should respect access predicates #9504
This text was written by a machine (GitHub Copilot), not by the PR author.
Description
Tracking the bug Andrew Adams requested while reviewing PR #9476: load and store trace packets ignore the access predicate. A trace should describe the accesses actually performed, not report inactive accesses or lanes.
Issues to open:
bug: load and store trace packets ignore the predicate
enhancement: use predicated calls for zero boundary conditions
Reproducing case / code evidence
In PR #9476, src/Tracing.cpp, InjectTracing::visit(const Call *) builds a halide_trace_load event and wraps the load in Let(value, call, return_second(trace, value)). The trace does not inherit the load Call's predicate: a skipped Call produces zero, but still gets traced. The store visitor applies a predicate to the trace Call, but trace packets also need to faithfully represent active lanes after vectorization rather than advertising every lane as accessed.
This is a review-requested tracking issue; a standalone runtime reproducer has not been independently validated here. Regression coverage should include scalar and vector loads and stores with false/mixed predicates, checking emitted events and coordinates against actual memory accesses.
Expected resolution
Preserve access predicates through tracing and vectorization, and represent/filter inactive lanes appropriately in the emitted packets. Keep trace value evaluation ordered correctly and avoid re-evaluating side effects.
Additional context
Built-from-source PR #9476, reviewed at commit 7217e690970301666ba5dbe03eb84548b6c0dff6. This follow-up is separate from the predicated-Calls implementation review fixes.
Activity
Address predicated Calls review feedback