Copy
tensorplay.library.opcheck
- tensorplay.library.opcheck(op: str | CustomOpDef, args: tuple[Any, ...], kwargs: dict[str, Any] | None = None, *, test_utils: str | Sequence[str] = ('test_schema', 'test_autograd_registration', 'test_faketensor', 'test_aot_dispatch_dynamic'), raise_exception: bool = True, atol: float | None = None, rtol: float | None = None) dict[str, str][source]
Runs each selected check and reports failures keyed by test name:
test_schema: undeclared inputs are left unmutated and no output aliases an input storage (declared-mutation direction is trusted, matching TensorPlay’s declaration-driven fusion barriers).test_autograd_registration: gradients reach every floating input with matching shapes. TensorPlay composes Python kernels implicitly (CompositeImplicitAutograd semantics), so a missing explicit formula is legal — this check catches kernels that break the autograd graph or drop gradients.test_faketensor: the fake kernel reproduces the real outputs’ metadata.test_aot_dispatch_dynamic: capture + execution reproduce the
Returns the failure mapping; empty means all checks passed.
Help improve this page
Found an error, an unclear step, or a missing example?

