Concepts#
A short map of why raptor is shaped the way it is.
Three modules, one direction of dependency#
raptor.schemais the kernel-manifest contract: a bird-neutral core layer (raptor.schema.manifest) that any producer can write against, plus one extension (raptor.schema.blocks, theneural_blockdescriptor family) that a producer never has to import.raptor.schema.dtypescarries the scalar-type vocabulary both layers share.raptor.protocolsis the structural-typing contract:Backend/Executablefor program-level execution,KernelLauncher/Marshalfor kernel-level launch and argument marshalling,ManifestProviderfor the one kernel-provider facet the family ships today. Every protocol is atyping.Protocol— an implementation satisfies it by shape, not by inheriting from it.raptor.conformanceis the interop declaration: which array frameworks the family bridges to, which crossings are certified today, and the row catalogue every owning repository’s test suite is written against. See Interoperability for the full matrix.
Dependencies between them run one way only: schema.blocks may import
schema.manifest, never the reverse; conformance references schema and
protocols by name in its documentation but never imports a framework
object. raptor itself has zero hard dependencies — the whole package
stays importable on an interpreter with no numpy, no torch, nothing.
A reverted design, stated plainly#
The kernel-provider protocol has exactly one facet today:
ManifestProvider, a compiled kernel described by a schema-versioned
manifest. An earlier design added a second, symbolic facet — an evaluable
trace any array namespace could interpret. It was reverted on measured
evidence (compiling and dlopening a kernel ran roughly 3.8x faster than
interpreting it on numpy, even for a trivial kernel), and its orphaned
protocol declaration was deleted rather than left standing as a promise
nothing implemented. See the full account in
Interoperability, including the narrower use
case that design may still return for.
Schema versions are a transition bridge, not a replacement#
schema_version 1 and 2 both load today. A v1 manifest is legacy —
whole-view, single-device, exactly the behavior that predates the execution
axis. A v2 manifest adds three flat top-level keys (exec_targets,
exec_access, exec_op) that declare which execution structures may run a
body and how it touches sample-local versus cross-sample data. Absence of a
required v2 key is a load refused, never a guessed default — see
raptor.schema.manifest.check_execution_axis for the
exact rules.
Where to read next#
Tutorials walk through the schema, the protocols and the conformance matrix hands-on.
Interoperability is the family’s reference interop page — the row-by-row certification matrix lives there, not here.
API reference is the generated signature-level detail for everything mentioned above.