Context
tenferro-rs#1516B must remove legacy typed-uninitialized pooled outputs without adding an output-sized zero-fill pass. The current erased reduction and indexed plans accept initialized destinations even when they overwrite every logical element. This blocks the safety migration.
Tracks strided-rs#149 and tensor4all/tenferro-rs#1516 / #1535.
Scope
Add explicit uninitialized destination replay for:
ErasedReducePlan
ErasedGatherPlan
ErasedScatterPlan
ErasedDynamicSlicePlan
ErasedDynamicUpdateSlicePlan
Use the existing erased uninitialized raw descriptor/storage plumbing. Preserve explicit ExecContext, cached plans, dtype validation, wrapping integer behavior, SIMD paths, parallel thresholds, and the expected-serial additive-scatter policy.
Scatter and dynamic update must perform their initial full operand copy through an uninitialized destination, transition privately only after that copy completes, then run read-modify-write updates. Do not expose a public forgeable initialized-state receipt.
Acceptance
- no caller-side destination zero-fill or duplicate operand copy
- every successful path initializes every logical output before any typed read
- typed errors before/while writing leave ownership with the caller; partial destinations are never read/dropped as initialized values
- stale invalid
bool storage tests for direct overwrite families
- error/panic and empty/zero-size coverage
- differential tests against initialized replay for every
KernelDType and supported index dtype/layout
- explicit
ExecContext coverage at serial and bounded-parallel settings; additive scatter remains deliberately serial
- Miri-capable lifecycle tests and >=90% coverage for new production files
- before/after focused benchmarks show no new output-sized pass or >20% regression
- worklog, fmt, fast checks, repository rules review, and Sol low/high review
Non-goals
GEMM/einsum overwrite is tracked separately because all backends must agree not to read C.
Context
tenferro-rs#1516B must remove legacy typed-uninitialized pooled outputs without adding an output-sized zero-fill pass. The current erased reduction and indexed plans accept initialized destinations even when they overwrite every logical element. This blocks the safety migration.
Tracks strided-rs#149 and tensor4all/tenferro-rs#1516 / #1535.
Scope
Add explicit uninitialized destination replay for:
ErasedReducePlanErasedGatherPlanErasedScatterPlanErasedDynamicSlicePlanErasedDynamicUpdateSlicePlanUse the existing erased uninitialized raw descriptor/storage plumbing. Preserve explicit
ExecContext, cached plans, dtype validation, wrapping integer behavior, SIMD paths, parallel thresholds, and the expected-serial additive-scatter policy.Scatter and dynamic update must perform their initial full operand copy through an uninitialized destination, transition privately only after that copy completes, then run read-modify-write updates. Do not expose a public forgeable initialized-state receipt.
Acceptance
boolstorage tests for direct overwrite familiesKernelDTypeand supported index dtype/layoutExecContextcoverage at serial and bounded-parallel settings; additive scatter remains deliberately serialNon-goals
GEMM/einsum overwrite is tracked separately because all backends must agree not to read C.