Expand description
Bit flags, as reported in TensorDesc::flags.
A bitfield rather than more discrete fields: the additions this protocol
is most likely to need are booleans, and each one spent as its own u32
would grow the descriptor – which after release costs a capsule-name
bump. Spending one u32 now buys 32 of them for free.
Constants§
- CPU_
ACCESS_ DECLARED - The producer reports its declared
crate::CpuAccessinCPU_READandCPU_WRITE. When clear the declaration is unknown and an importer keeps its own default. Bit 1. - CPU_
READ - The declaration includes CPU reads. Bit 2.
- CPU_
WRITE - The declaration includes CPU writes. Bit 3.
- SYNC_
PRESENT - [
TensorDesc::sync] carries a real handle. When clear,syncis meaningless and must not be waited on. - VIEW
- The tensor addresses part of a larger buffer (a
view/batchsub-region, at any offset), so an importer must treat its rows as sharing cache lines with bytes outside it. Clear means a whole tensor, which is also what a producer that predates the bit reports. Bit 4.
Functions§
- cpu_
access - The declared access
flagsreports, orNonewhen the producer did not report one. - from_
cpu_ access - The flag bits reporting
access.