aether_dsc.Payload#
- class aether_dsc.Payload(digest, headers, host_only_names=frozenset({}))[source]#
Bases:
objectA sealed set of headers plus its content digest.
headers maps include-relative names (aether/…, rtc/<std name>, plugin/gref_layout.h) to their bytes; digest is
digest_of()applied to that mapping — two Payload instances with the same file set and content always carry the same digest, independent of how or in what order their files were discovered (aether_dsc.seal’s own order-independence guarantee, exercised by tests/test_aether_dsc.py::test_seal_digest_order_independent).host_only_names names the subset of headers that is the HOST-ONLY section: sealed (so
serve()writes them out for a host -I root exactly like every other entry) but never claimed NVRTC-clean and never handed to an NVRTC compile — seedevice_headers. digest covers headers whole, host-only entries included, so a changed host-only file changes the digest too (the cache-validity term every compile keys on).- Parameters:
digest (str)
headers (Mapping[str, bytes])
host_only_names (frozenset[str])
- digest#
- headers#
- host_only_names#
- property device_headers: dict[str, bytes]#
headers minus the host-only section — what an NVRTC compile is actually served (
hawk.compile.drivers’s device path,hawk.compile.nvrtc’s publicdevice/cubin): the host-only headers are never NVRTC-clean-checked and must never reach NVRTC even as an unreferenced, served-but-unused file.
- serve()[source]#
Materialise every header into a PRIVATE, owner-only directory for the compile’s lifetime, then remove it — on the normal exit path and when the with block raises.
Prefers a tmpfs (/dev/shm, checked via /proc/mounts — never assumed from the path alone) so nothing touches spinning or networked storage; falls back to $TMPDIR otherwise. A private mount namespace with its own tmpfs is an opportunistic upgrade this function does not attempt: measurement found it refused outright on an SELinux-enforcing box, so the plain RAM directory is the one path every caller can rely on.
- Return type:
Iterator[Path]