portlayout

command
v0.6.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command portlayout sweeps ordinary input and output E5RT ports across tensor shapes with the same self-indexing technique that mapped the state buffer layout, and checks the claim that only the state carries padding.

The padding finding came from examples/ane/statecache: each channel of a bound state starts on a 64-byte boundary, so the packed element count lies about the footprint. Ordinary ports were asserted packed from a narrow set of shapes exercised by passing programs. This command widens the observation: for every swept shape it binds oversized buffers to an identity program's input and output ports, fills the input with slot-index marks, executes, and reads back which slot produced each output value.

What each check establishes, per shape

  • Packed round trip. Output value i equals input mark i exactly, in fp16, which represents integers exactly up to 2048 — hence the sweep guard. A mismatch names the first element and the stride error it implies.

  • No over-read. Every returned mark was written inside the input's logical size. An engine that read past the declared port size would fetch tail marks whose indices exceed the element count, and the round trip above would catch them as wrong values; the tail is filled with continuing indices precisely so that such a fetch cannot pass silently.

  • No over-write. Everything past the output buffer's logical size carries a position-dependent poison byte pattern that must survive execution. This is the same instrument x/ane/e5rt applies to state ports (TestStatePoisonTail): E5RT exposes no way to place a guard page after its own allocation, so detection happens at check time, not fault time.

  • A refusal control. Retaining a port name the compiled function does not declare must fail, so that a successful bind means resolution rather than indifference.

Scope

The sweep covers channel and spatial extents including odd and non-multiple values, plus one two-batch shape. Element type is fp16 throughout, because that is what every ANE-bound program here uses. Ranks other than 4 are not emitted by any MIL generator in this module and stay unmeasured, as do fp32 ports; a shape this command refuses to build is reported as such rather than quietly dropped from the claim.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL