Tensor API Buffer Contract
Use this skill when checking whether a reduced or real recovery preserves Isaac Gym's direct tensor-buffer idea. The skill validates named state, action, observation, reward, and reset buffers, their shapes, and whether a claimed direct path includes forbidden CPU staging.
Inputs
- Buffer descriptors with
name,role,shape,producer,consumer, anddirectfields. - Expected environment count for the leading batch dimension.
Outputs
- A report with
ok,errors,direct_flow_ok, androles_present.
Workflow
- Collect descriptors for physics state, policy action, observation, reward, and reset buffers.
- Verify each descriptor has a leading batch dimension matching the environment count.
- Reject missing producer/consumer ownership or
direct=Falsewhen direct flow is claimed. - Save the report as recovery evidence or use it as a cross-check from a harness.
Validation
Run python tests/test_buffer_contract.py or validate the skill tree with tests enabled.
Limitations
This deterministic checker verifies the contract. It cannot prove CUDA pointer aliasing without a real GPU tensor runtime.
Edge-Case Refinement
A negative check must fail when a descriptor uses the wrong leading environment dimension or marks a buffer as non-direct, because such staging would violate the paper Tensor API mechanism.