TorchLean API

NN.Backend.ContractCheck

Backend Contract Checks #

The planner admits a capsule only when its operation, device, provider, gradient mode, trust level, and contract claims match the kernel policy. The contract audit then looks inside the selected capsules: each of the four descriptors must rest on evidence the assurance policy accepts.

Acceptance repeats both checks at the execution boundary. This matters because PlannedKernel is a public diagnostic record and can therefore be assembled directly by a caller. Accepted values carry the successful gate as a proof field, and graph acceptance derives its grouped audit plan from the graph plan instead of accepting unrelated groups from the caller.

One contract obligation of one selected backend kernel.

Instances For

    Result of checking a plan audit against an assurance policy.

    Instances For

      All contract obligations of a selected kernel.

      Instances For

        All contract obligations of all selected kernels.

        Instances For

          Obligations whose evidence the policy does not accept.

          Instances For

            Check every obligation of a plan audit against an assurance policy.

            Instances For

              Check every obligation of a selected plan against an assurance policy.

              Instances For

                Check every obligation of a grouped graph plan against an assurance policy.

                Instances For

                  One reason a planned kernel cannot cross the execution boundary.

                  Instances For

                    Whether a directly supplied planned kernel satisfies the complete policy and evidence gate.

                    Instances For

                      Explain every failed part of the complete kernel acceptance gate.

                      Instances For

                        Explain every kernel that fails the complete policy and evidence gate.

                        Instances For

                          Whether every grouped kernel satisfies the complete policy and evidence gate.

                          Instances For

                            One planned operation whose capsule has passed the complete policy and evidence gate.

                            Instances For
                              opaque NN.Backend.AcceptedKernel.Internal.create (op : BackendOp) (capsule : KernelCapsule) (policy : KernelPolicy) (accepted : PlannedKernel.acceptable policy { op := op, capsule := capsule } = true) :

                              Construct an accepted kernel after the execution-boundary check succeeds.

                              Check a planned kernel and return a value that an executor can consume only on success.

                              Instances For

                                A graph kernel plan after grouping and contract checking.

                                Instances For

                                  Construct an accepted graph plan after every grouped kernel passes the execution gate.

                                  Source IR node ids covered by the accepted grouped plan.

                                  Instances For

                                    Selected capsule names in accepted group order.

                                    Instances For

                                      Audit for the accepted grouped plan.

                                      Instances For

                                        Result of planning, grouping, and checking a graph.

                                        Instances For

                                          Derive, check, and expose a grouped graph plan only when every selected kernel passes.

                                          Deriving the groups here keeps the accepted audit tied to the exact graph plan that produced it.

                                          Instances For